path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
es/utils/react-if.js | cvdlab/react-planner | import React from 'react';
import PropTypes from 'prop-types';
/**
* @return {null}
*/
export default function If(_ref) {
var condition = _ref.condition,
style = _ref.style,
children = _ref.children;
return condition ? Array.isArray(children) ? React.createElement(
'div',
{ style: style },
... |
app/javascript/mastodon/features/ui/components/column_subheading.js | tootcafe/mastodon | import React from 'react';
import PropTypes from 'prop-types';
const ColumnSubheading = ({ text }) => {
return (
<div className='column-subheading'>
{text}
</div>
);
};
ColumnSubheading.propTypes = {
text: PropTypes.string.isRequired,
};
export default ColumnSubheading;
|
src/Parser/DemonHunter/Havoc/Modules/Spells/Momentum.js | hasseboulen/WoWAnalyzer | import React from 'react';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import { formatPercentage, formatDuration } from 'common/format';
import StatisticBox, { STATISTIC_ORDER } fro... |
docs/app/Examples/collections/Message/Variations/MessageExampleNegative.js | shengnian/shengnian-ui-react | import React from 'react'
import { Message } from 'shengnian-ui-react'
const MessageExampleNegative = () => (
<Message negative>
<Message.Header>We're sorry we can't apply that discount</Message.Header>
<p>That offer has expired</p>
</Message>
)
export default MessageExampleNegative
|
examples/cra-kitchen-sink/src/stories/force-rerender.stories.js | storybooks/storybook | import React from 'react';
import { forceReRender } from '@storybook/react';
import { Button } from '@storybook/react/demo';
let count = 0;
const increment = () => {
count += 1;
forceReRender();
};
export default {
title: 'Force ReRender',
};
export const DefaultView = () => (
<Button type="button" onClick={... |
src/components/input/autocomplete-text/consult.js | KleeGroup/focus-components | import React from 'react';
function AutocompleteTextConsult({ label, name, type, value }) {
return (
<div label={label} name={name} type={type}>
{value}
</div>
);
}
export default AutocompleteTextConsult;
|
src/js/components/postList.js | blaketarter/react-lobsters | import React from 'react';
import Post from './post';
export default class PostList extends React.Component {
render() {
const postNodes = this.props.posts.map(function(post) {
post = post.toJS();
return (
<Post { ...post } key={post.shortId} />
);
});
return (
<ul c... |
app/components/Transcribe/UserForm.js | taggun/app-benchmark | /* eslint-disable react/no-array-index-key */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import styles from './Transcribe.css';
const internals = {};
internals.renderData = item => {
if (!item || !item.confidenceLevel) {
return '';
}
if (moment... |
src/scenes/home/scholarshipApplication/success/success.js | miaket/operationcode_frontend | import React from 'react';
import { Link } from 'react-router-dom';
import Section from 'shared/components/section/section';
import FormButton from 'shared/components/form/formButton/formButton';
import styles from './success.css';
const Success = () => (
<Section title="Success!" theme="white">
<span className=... |
src/shared/element-react/dist/npm/es6/src/slider/Slider.js | thundernet8/Elune-WWW | import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React from 'react';
import { Component, PropTypes } from '../../libs';
import InputNumber from '..... |
app/components/WhyStart.js | gidich/votrient-kiosk | import React, { Component } from 'react';
import { Link } from 'react-router';
import styles from './WhyStart.css';
export default class WhyStart extends Component {
render() {
return (
<div className={styles.container}>
<Link to="/" className={styles.home}></Link>
<Link to="/ThankYou" ... |
frontend/src/components/common/grid/customGridColumn.js | unicef/un-partner-portal | import React from 'react';
import PropTypes from 'prop-types';
import Grid from 'material-ui/Grid';
import { withStyles } from 'material-ui/styles';
/** Custom grid column based on flexbox
* - used instead of materia-ui one to avoid strange spacing
* issues when multiple grid columns being nested in each other
* cu... |
src/templates/categories-list-template.js | bapti/blog | // @flow strict
import React from 'react';
import { Link } from 'gatsby';
import kebabCase from 'lodash/kebabCase';
import Sidebar from '../components/Sidebar';
import Layout from '../components/Layout';
import Page from '../components/Page';
import { useSiteMetadata, useCategoriesList } from '../hooks';
const Categor... |
geonode/monitoring/frontend/monitoring/src/components/atoms/hr/index.js | francbartoli/geonode | /*
#########################################################################
#
# Copyright (C) 2019 OSGeo
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# ... |
app/redux/router.js | andreipreda/coconut | import React from 'react';
import { Router, Route, browserHistory, IndexRoute } from 'react-router';
import { Wrap, Header } from './../wrap';
const NotFound = () =>
<div>Route not found</div>;
export const AppRouter = () =>
<Router history={browserHistory}>
<Route path="/" component={Wrap}>
<IndexRoute... |
src/index.js | madi031/ReactRouterBlog | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import { createStore, applyMiddleware } from 'redux';
import promise from 'redux-promise';
import PostsIndex from './components/posts_index';
import Post... |
src/ServiceList.js | CanopyTax/sofe-inspector | import React from 'react';
import formStyles from './Form.style.css';
import buttonStyles from './Button.style.css';
export default function ServiceList({services, updateService, deleteService, renameService}) {
return (services && services.length) ? <div style={{height: '240px', overflow: 'auto', marginBottom: '16px... |
src/containers/Home/FormActions.js | oPauloChaves/controle-frotas | import React from 'react'
import Row from 'react-bootstrap/lib/Row'
import Col from 'react-bootstrap/lib/Col'
import Button from 'react-bootstrap/lib/Button'
import Glyphicon from 'react-bootstrap/lib/Glyphicon'
import FormGroup from 'react-bootstrap/lib/FormGroup'
import InputGroup from 'react-bootstrap/lib/InputGroup... |
src/svg-icons/social/sentiment-neutral.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialSentimentNeutral = (props) => (
<SvgIcon {...props}>
<path d="M9 14h6v1.5H9z"/><circle cx="15.5" cy="9.5" r="1.5"/><circle cx="8.5" cy="9.5" r="1.5"/><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C1... |
src/index.js | surongaukeys/gallery-by-react | import 'core-js/fn/object/assign';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/Main';
// Render the main component into the dom
ReactDOM.render(<App />, document.getElementById('app'));
|
src/svg-icons/navigation/arrow-drop-down-circle.js | rscnt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationArrowDropDownCircle = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 12l-4-4h8l-4 4z"/>
</SvgIcon>
);
NavigationArrowDropDownCircle =... |
docs/pages/home.js | n7best/react-weui | import React from 'react';
import FontAwesome from 'react-fontawesome';
import './home.less';
//import { Button } from 'react-weui';
const Home = () =>
(
<div className="App__preview background--canvas flex-center">
<div className="App__preview--none">
<FontAwesome name="weixin" size="4x" />
<p>Hello... |
src/index.js | ianwcarlson/react-components | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
react-router-nb/react-router/examples/pinterest/app.js | zhangfaliang/learnReact | import React from 'react'
import { render } from 'react-dom'
import { browserHistory, Router, Route, IndexRoute, Link } from 'react-router'
import withExampleBasename from '../withExampleBasename'
const PICTURES = [
{ id: 0, src: 'http://placekitten.com/601/601' },
{ id: 1, src: 'http://placekitten.com/610/610' }... |
00-todo-lab4/src/TodoList.js | iproduct/course-node-express-react | import React from 'react';
const TodoList = ({todos, ...rest}) => {
return (
<ul className="list-group">
{
todos.map(todo => (<li>{todo.text} - {todo.status}</li>))
}
</ul>
);
}
export default TodoList;
|
server/sonar-web/src/main/js/apps/overview/main/timeline.js | vamsirajendra/sonarqube | import d3 from 'd3';
import React from 'react';
import { LineChart } from '../../../components/charts/line-chart';
const HEIGHT = 80;
export class Timeline extends React.Component {
filterSnapshots () {
return this.props.history.filter(s => {
let matchBefore = !this.props.before || s.date <= this.props... |
V2-Node/esquenta.v2/UI/src/views/Base/Tables/Tables.js | leandrocristovao/esquenta | import React, { Component } from 'react';
import { Badge, Card, CardBody, CardHeader, Col, Pagination, PaginationItem, PaginationLink, Row, Table } from 'reactstrap';
class Tables extends Component {
render() {
return (
<div className="animated fadeIn">
<Row>
<Col xs="12" lg="6">
... |
pages/404.js | ivygong/irc | import React, { Component } from 'react';
import Helmet from 'react-helmet';
import { config } from 'config';
import { Link } from 'react-router';
import { prefixLink } from 'gatsby-helpers';
export default class NotFound extends Component {
render () {
return (
<div className="page page--not-found">
... |
src/components/logout_button.js | Helabs/handup-web | import React from 'react';
import { connect } from 'react-redux';
import { graphql, compose } from 'react-apollo';
import gql from 'graphql-tag';
import { SetCurrentUserId, SetCurrentUserToken } from '../actions';
function LogoutButton({ currentUserId, getUserQuery, SetCurrentUserId, SetCurrentUserToken }) {
if (!c... |
packages/mcs-lite-ui/src/TabItem/TabItem.example.js | MCS-Lite/mcs-lite | import React from 'react';
import PropTypes from 'prop-types';
import { storiesOf } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import { action } from '@storybook/addon-actions';
import TabItem from '.';
class StatefulTabItems extends React.Component {
static propTypes = {
items: P... |
actor-apps/app-web/src/app/components/sidebar/RecentSection.react.js | TimurTarasenko/actor-platform | import _ from 'lodash';
import React from 'react';
import { Styles, RaisedButton } from 'material-ui';
import ActorTheme from 'constants/ActorTheme';
import DialogActionCreators from 'actions/DialogActionCreators';
import DialogStore from 'stores/DialogStore';
import CreateGroupActionCreators from 'actions/CreateGro... |
codes/chapter03/webpack2/demo13/app/components/Welcome.js | atlantis1024/react-step-by-step | /**
* Created by Zhang Peng on 2017/6/8.
*/
import React from 'react';
class Clock extends React.Component {
constructor(props) {
super(props);
this.state = { date: new Date().toLocaleDateString() };
this.click = this.click.bind(this);
}
click() {
// 动态引入import()
import('moment')
.th... |
src/routes/ConnectedDevices/components/ConnectedDevicesSpeeds.js | liuyaoao/omnyiq-sc1-server-render | import React from 'react';
import {getSpeedsChartData} from './ConnectedDevicesChartData';
import TimeSelectionTab from '../../../components/TimeSelectionTab';
var ConnectedDevicesSpeeds = React.createClass({
getInitialState:function(){
return{
}
},
componentDidMount:function(){
let _this = this;
... |
__tests__/index.ios.js | Manuelandro/Universal-Commerce | import 'react-native';
import React from 'react';
import Index from '../index.ios.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
js/cards/MarkDownCard/MarkDownCard.js | Learnone/ShanghaiTechAPP | import React, { Component } from 'react';
import { View } from 'react-native';
import { Container, Content, CardItem, Text } from 'native-base';
import Markdown from 'react-native-simple-markdown';
import { connect } from 'react-redux';
import { FlipCard } from '../../cards';
import styles from './styles';
const mar... |
consoles/my-joy-instances/src/components/instances/__tests__/metadata.spec.js | yldio/joyent-portal | import React from 'react';
import renderer from 'react-test-renderer';
import 'jest-styled-components';
import { AddForm, EditForm } from '../metadata';
import Theme from '@mocks/theme';
it('renders <AddForm /> without throwing', () => {
expect(
renderer
.create(
<Theme>
<AddForm />
... |
packages/ui/src/components/uploadAttendance.js | she-smashes/thehub | /**
* @author Thenmozhi Subramaniam
* @name EventDetails
* @desc renders event details component
*/
import React, { Component } from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import {Link} from 'react-router-dom';
import {
Table,
TableBody,
TableHeader,
TableHeaderColumn,
TableRow,
... |
react/src/browser/app/components/View.js | janprasil/mi-vmm-product-quality-rating | /* @flow */
import React from 'react';
import { Base } from 'rebass';
const View = (props: Object) => (
<Base {...props} is="div" />
);
export default View;
|
client/src/components/FocusedCrawling.js | ViDA-NYU/domain_discovery_tool_react | import React, { Component } from 'react';
import { Col, Row} from 'react-bootstrap';
// From https://github.com/oliviertassinari/react-swipeable-views
import Terms from './Terms';
import ScaleBar from './ScaleBar';
import { InputGroup, FormControl , DropdownButton} from 'react-bootstrap';
import RaisedButton from 'mate... |
components/Deadline/components/List/List.js | yabeow/sinhvienuit | import React from 'react';
import PropTypes from 'prop-types';
import { FlatList, RefreshControl } from 'react-native';
import { View } from 'native-base';
import Deadline from './Item';
import EmptyList from '../../../EmptyList';
import { ANDROID_PULL_TO_REFRESH_COLOR } from '../../../../config/config';
const sortDea... |
js/BaseComponents/ThemedMaterialIcon.js | telldus/telldus-live-mobile-v3 | /**
* Copyright 2016-present Telldus Technologies AB.
*
* This file is part of the Telldus Live! app.
*
* Telldus Live! app is free : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
*... |
src/components/Main.js | Amous-th/gallery-by-react | require('normalize.css/normalize.css');
require('styles/App.scss');
import React from 'react';
import {findDOMNode} from 'react-dom';
//获取图片相关的数据
var imageDatas = require('../data/imageDatas.json');
//利用自执行函数,将图片信息转成图片URL路径信息
imageDatas = (function getImageURL(imageDataArr) {
for(var i = 0,j=imageDataArr.length;i<j... |
src/frontend/src/components/DonorDetailPage.js | open-austin/influence-texas | import React from 'react'
import { useParams } from 'react-router-dom'
import { useQuery } from '@apollo/react-hooks'
import { gql } from 'apollo-boost'
import Typography from '@material-ui/core/Typography'
import PaginatedList, { ShortLoadingListBody } from './PaginatedList'
import { formatMoney, getDebugQuery } from ... |
packages/core/__deprecated__/Project/Project.js | romelperez/arwes | import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import AnimationComponent from '../Animation';
import FrameComponent from '../Frame';
import WordsComponent from '../Words';
import HeadingComponent from '../Heading';
// TODO:
// - Add a 'featured' prop to highligh item.
exp... |
docs/app/Examples/modules/Dropdown/Content/DropdownExampleLabel.js | clemensw/stardust | import React from 'react'
import { Dropdown } from 'semantic-ui-react'
const DropdownExampleLabel = () => (
<Dropdown text='Filter' floating labeled button className='icon'>
{/* <i class="filter icon"></i> */}
<Dropdown.Menu>
<Dropdown.Header icon='tags' content='Filter by tag' />
<Dropdown.Divid... |
components/Form/Select/Select.story.js | NGMarmaduke/bloom | import React from 'react';
import { storiesOf, action } from '@storybook/react';
import { withKnobs, boolean } from '@storybook/addon-knobs';
import Select from './Select';
import Option from './Option';
import icons from '../../Icon/icons';
const stories = storiesOf('FormComponents', module);
stories.addDecorator(w... |
node_modules/redbox-react/examples/react-hot-loader-example/index.js | hnikupet/dddhackaton | import React from 'react'
import App from './components/App'
const root = document.getElementById('root')
React.render(<App />, root)
|
src/components/Layout/SearchDrawer/AdvancedSearch/DateField/presenter.js | ndlib/usurper | import React from 'react'
import PropTypes from 'prop-types'
const DateField = (props) => {
// Create list of days
const days = [(<option id={`${props.id}Day_00`} key={`${props.id}Day_00`}>Day</option>)]
for (let i = 1; i <= 31; i++) {
const id = `${props.id}${props.formatID(i, 'Day')}`
days.push(<option... |
docs/src/pages/components/tables/CustomPaginationActionsTable.js | lgollut/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import { makeStyles, useTheme } from '@material-ui/core/styles';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';
import TableContainer from '@material-ui/... |
app/assets/scripts/components/map-options.js | orma/openroads-vn-analytics | import React from 'react';
import {
getContext
} from 'recompose';
import T, {
translate
} from './t';
const MapOptions = ({ layer, language, handleLayerChange, handleShowNoVpromms }) => (
<div className='panel options-panel'>
<div className='panel__body'>
<form className='form'>
<div classNam... |
docs/app/Examples/elements/Icon/IconSet/IconExampleAccessibility.js | ben174/Semantic-UI-React | import React from 'react'
import { Grid, Icon } from 'semantic-ui-react'
const IconExampleAccessibility = () => (
<Grid columns='5' doubling>
<Grid.Column>
<Icon name='wheelchair' />
<p>wheelchair</p>
</Grid.Column>
<Grid.Column>
<Icon name='asl interpreting' />
<p>asl interpretin... |
src/svg-icons/hardware/phone-iphone.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwarePhoneIphone = (props) => (
<SvgIcon {...props}>
<path d="M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1zm-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1... |
ui/src/main/js/components/UpdateStateMachine.js | rdelval/aurora | import React from 'react';
import StateMachine from 'components/StateMachine';
import { addClass } from 'utils/Common';
import { UPDATE_STATUS } from 'utils/Thrift';
import { getClassForUpdateStatus } from 'utils/Update';
export default function UpdateStateMachine({ update }) {
const events = update.updateEvents;
... |
app/javascript/mastodon/features/account_gallery/components/media_item.js | im-in-space/mastodon | import Blurhash from 'mastodon/components/blurhash';
import classNames from 'classnames';
import Icon from 'mastodon/components/icon';
import { autoPlayGif, displayMedia, useBlurhash } from 'mastodon/initial_state';
import { isIOS } from 'mastodon/is_mobile';
import PropTypes from 'prop-types';
import React from 'react... |
src/components/foundation/original/FoundationOriginal.js | fpoumian/react-devicon | import React from 'react'
import PropTypes from 'prop-types'
import SVGDeviconInline from '../../_base/SVGDeviconInline'
import iconSVG from './FoundationOriginal.svg'
/** FoundationOriginal */
function FoundationOriginal({ width, height, className }) {
return (
<SVGDeviconInline
className={'FoundationOri... |
src/components/Home/index.js | chavisclark/chavisclark.github.io | import React from 'react';
import Button from '../Button';
import { Link } from 'react-router';
import Helmet from 'react-helmet';
import styles from './styles.css';
function Home() {
return (
<article className={styles.padding}>
<Helmet
title="Chavis Clark | Digital Nomad & Fullstack Web De... |
examples/src/components/CustomRenderField.js | mcanthony/react-select | import React from 'react';
import Select from 'react-select';
function logChange() {
console.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments)));
}
var CustomRenderField = React.createClass({
displayName: 'CustomRenderField',
propTypes: {
delimiter: React.PropTypes.st... |
src/results/ResultsList.react.js | codeforamerica/citybook | import React, { Component } from 'react';
import Alert from 'react-bootstrap/lib/Alert';
import LoadingSpinner from '../LoadingSpinner.react.js';
import Result from './Result.react.js';
import '../../styles/loading-spinner.scss';
export default class ResultsList extends Component {
constructor(){
super();
}
... |
src/navigation/auth.js | banovotz/WatchBug2 | /**
* Auth Scenes
*
* React Native Starter App
* https://github.com/mcnamee/react-native-starter-app
*/
import React from 'react';
import { Scene, ActionConst } from 'react-native-router-flux';
// Consts and Libs
import { AppConfig } from '@constants/';
// Scenes
import Authenticate from '@containers/auth/Authen... |
src/server/index.js | vesparny/widget | 'use strict';
const env = process.env.NODE_ENV || 'development';
import http from 'http';
import path from 'path';
import cors from 'cors';
import React from 'react';
import Router from 'react-router';
import FluxComponent from 'flummox/component';
import Flux from '../shared/Flux';
import routes from '../shared/rout... |
packages/material-ui-icons/src/Laptop.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z" /></g>
, 'Laptop');
|
blueocean-material-icons/src/js/components/svg-icons/image/filter-9.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageFilter9 = (props) => (
<SvgIcon {...props}>
<path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM15 5h-2c-1.1 0-2 .89-2 2v2c0 1.11.9 2 2 2h2v2h-4v2h4c1.1 0... |
docs/src/pages/layout/hidden/BreakpointOnly.js | cherniavskii/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import compose from 'recompose/compose';
import { withStyles } from 'material-ui/styles';
import Paper from 'material-ui/Paper';
import Hidden from 'material-ui/Hidden';
import withWidth from 'material-ui/utils/withWidth';
import Typography from 'material-u... |
server/sonar-web/src/main/js/components/shared/checkbox.js | abbeyj/sonarqube | import React from 'react';
export default React.createClass({
propTypes: {
onCheck: React.PropTypes.func.isRequired,
initiallyChecked: React.PropTypes.bool,
thirdState: React.PropTypes.bool
},
getInitialState() {
return { checked: this.props.initiallyChecked || false };
},
componentWillRec... |
frontend/app/components/Form/FormRelatedPictures.js | First-Peoples-Cultural-Council/fv-web-ui | import React from 'react'
import PropTypes from 'prop-types'
// import Text from 'components/Form/Common/Text'
// NOTE: importing the non-wrapped provide() version
import FormRelatedPicture from 'components/Form/FormRelatedPicture'
import { getIndexOfElementById, removeItem, moveItemDown, moveItemUp } from 'components... |
app/component/AddFriend.js | icalF/piye-kabare | 'use strict';
import React, { Component } from 'react';
import {
ActivityIndicator,
StyleSheet,
Text,
TextInput,
TouchableHighlight,
View
} from 'react-native';
import styles from '../style/FormStyles';
export default class AddFriend extends Component {
constructor(props) {
super(props);
this.s... |
src/components/form/index.js | WHCIBoys/nitpik-web | import React from 'react';
function Form({ children, handleSubmit }) {
return (
<form
onSubmit={(e) => {
e.preventDefault();
if (document.activeElement) {
document.activeElement.blur();
}
handleSubmit();
}}>
{ children }
</form>
);
}
Form.propTyp... |
src/lib/components/SecondExample.js | thepixelninja/react-component-test | import React from 'react';
import './SecondExample.scss';
const SecondExample = () => (
<div className="SecondExample">
<p className="SecondExample-text">
Based on Facebook's {'\u00A0'}
<a
className="SecondExample-link"
target="_blank"
rel="noopener noreferrer"
href="h... |
packages/react-scripts/fixtures/kitchensink/src/features/webpack/SvgInclusion.js | iamdoron/create-react-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
import Rea... |
src/index.js | straku/react-workshop | import injectTapEventPlugin from 'react-tap-event-plugin'
injectTapEventPlugin()
import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import MuiTheme from './components/MuiTheme/MuiTheme'
import App from './components/App/App'
import store from './store'
import './styles... |
frontend/src/app/components/Header.js | dannycoates/testpilot | import React from 'react';
import { Link } from 'react-router';
import classnames from 'classnames';
import LayoutWrapper from './LayoutWrapper';
import RetireConfirmationDialog from './RetireConfirmationDialog';
export default class Header extends React.Component {
constructor(props) {
super(props);
this.... |
tests/layouts/CoreLayout.spec.js | fxghqc/svg-react-playground | import React from 'react'
import TestUtils from 'react-addons-test-utils'
import CoreLayout from 'layouts/CoreLayout/CoreLayout'
function shallowRender (component) {
const renderer = TestUtils.createRenderer()
renderer.render(component)
return renderer.getRenderOutput()
}
function shallowRenderWithProps (props... |
src/routes/Home/components/HomeView.js | dmassaneiro/integracao-continua | import React from 'react'
import DuckImage from '../assets/Duck.jpg'
import './HomeView.scss'
export const HomeView = () => (
<div>
<h4>Welcome!</h4>
<img alt='This is a duck, because Redux!' className='duck' src={DuckImage} />
</div>
)
export default HomeView
|
src/components/Home/Shows/Views/Desktop/tpl.js | HopeUA/tv.hope.ua-react | /**
* [IL]
* Library Import
*/
import React from 'react';
import Slider from 'vendor/Slider/SliderComponent';
/**
* [IS]
* Style Import
*/
import Styles from './Styles/main.scss';
import Grids from 'theme/Grid.scss';
function Desktop() {
const styles = {
backgroundImage: 'url(https://cdn.hope.ua/med... |
src/js/components/input_error_body.js | frig-js/frigging-bootstrap | import React from 'react'
export default class InputErrorBody extends React.Component {
static propTypes = {
msg: React.PropTypes.string.isRequired,
i: React.PropTypes.number,
}
static defaultProps = {
i: 0,
}
render() {
return (
<span className="help-block" key={`error-${this.props.i... |
admin/client/App/screens/Home/components/ListTile.js | xyzteam2016/keystone | import React from 'react';
import { Link } from 'react-router';
/**
* Displays information about a list and lets you create a new one.
*/
var ListTile = React.createClass({
propTypes: {
count: React.PropTypes.string,
href: React.PropTypes.string,
label: React.PropTypes.string,
path: React.PropTypes.string,
... |
client/components/Breakpoints.js | HelpAssistHer/help-assist-her | import React from 'react'
import Responsive from 'react-responsive'
const PHONE_MIN_BREAKPOINT = 320
const PHONE_MAX_BREAKPOINT = 439
const BIG_PHONE_MIN_BREAKPOINT = 440
const BIG_PHONE_MAX_BREAKPOINT = 699
const TABLET_MIN_BREAKPOINT = 700
const TABLET_MAX_BREAKPOINT = 1099
const DESKTOP_MIN_BREAKPOINT = 1100
const... |
src/schema/test.dataSchema.js | jiangxy/react-antd-admin | import React from 'react';
import {Icon} from 'antd';
// 定义某个表的dataSchema, 结构跟querySchema很相似, 见下面的例子
// 注意: 所有的key不能重复
// 这个配置不只决定了table的schema, 也包括用于新增/删除的表单的schema
module.exports = [
{
key: 'id', // 传递给后端的key
title: 'ID', // 前端显示的名字
// 其实dataType对前端的意义不大, 更重要的是生成后端接口时要用到, 所以要和DB中的类型一致
// 对java... |
DataRepository.js | dcy0701/ReactNativeServer | 'use strict';
import {
AsyncStorage,
} from 'react-native';
import React, { Component } from 'react';
var API_COVER_URL = "http://news-at.zhihu.com/api/4/start-image/1080*1776";
var KEY_COVER = '@Cover';
function parseDateFromYYYYMMdd(str) {
if (!str) return new Date();
return new Date(str.slice(0, 4),str.sli... |
src/components/index.js | ctrl-alt-p/born-to-sell | import React from 'react';
import App from './app';
import CommentBox from './comment_box';
import CommentList from './comment_list';
export default App;
export default CommentList;
export default CommentBox;
|
docs/src/PropTable.js | herojobs/react-bootstrap | import merge from 'lodash/object/merge';
import React from 'react';
import Glyphicon from '../../src/Glyphicon';
import Label from '../../src/Label';
import Table from '../../src/Table';
let cleanDocletValue = str => str.trim().replace(/^\{/, '').replace(/\}$/, '');
let capitalize = str => str[0].toUpperCase() + str.... |
src/components/LoggedInPage.js | KingCountySAR/database-frontend | import React from 'react';
import { withRouter } from 'react-router-dom';
import { CallbackComponent } from 'redux-oidc';
import userManager from '../userManager';
class CallbackPage extends React.Component {
successCallback = () => {
this.props.history.push(sessionStorage.redirect || '/');
}
rend... |
src/svg-icons/action/account-box.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAccountBox = (props) => (
<SvgIcon {...props}>
<path d="M3 5v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2zm12 4c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zm-9 8c0-2 4-3... |
7.Middlewares/src/components/app.js | Branimir123/Learning-React | import React, { Component } from 'react';
import UserList from './user_list';
export default class App extends Component {
render() {
return (
<div>
<UserList />
</div>
);
}
}
|
src/app/components/Home.js | maria-robobug/react-js-basics | import React from 'react';
export class Home extends React.Component {
constructor (props) {
super();
this.state = {
age: props.initialAge,
status: 0,
homeLink: props.initialLinkName
};
setTimeout(() => {
this.setState({
status: 1
});
},3000);
console.log('Constructor');
}
component... |
app/components/Journal.js | csreyes/TLCJournal | import React from 'react';
import {Link} from 'react-router';
import {Pager, PageItem} from 'react-bootstrap';
import moment from 'moment';
import JournalStore from '../stores/JournalStore'
import JournalActions from '../actions/JournalActions';
// import HomeStore from '../stores/HomeStore'
// import HomeActions fro... |
src/components/RefreshableListView.js | yogakurniawan/phoney-mobile | /*
* Component Name: RefreshableListView
* Author: Simar Singh (github/iSimar)
* Description: This component is used to render a listview that can be
* pulled down to refresh
* Dependencies:
* -> react-native-gifted-listview 0.0.15 (https://github.com/FaridSafi/react-native-gifted-listview)
*
* Pr... |
src/routes/admin/Admin.js | ben-miller/adddr.io | /**
* adddr (https://www.adddr.io/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-types';
import withStyl... |
src/index.js | superpersonman/react-raf-parallax | import React from 'react';
var lastTime = 0,
lastTimeSelected = 0,
elementCache = [];
export default React.createClass({
getDefaultProps() {
return {
perspective: 100,
x: false,
y: true,
relativeToParent: true
}
},
componentDidMount()... |
dist/lib/carbon-fields/assets/js/fields/components/checkbox/index.js | ArtFever911/statrer-kit | /**
* The external dependencies.
*/
import React from 'react';
import PropTypes from 'prop-types';
import {
compose,
withProps,
withHandlers,
setStatic
} from 'recompose';
/**
* The internal dependencies.
*/
import Field from 'fields/components/field';
import withStore from 'fields/decorators/with-store';
impo... |
app/javascript/mastodon/features/public_timeline/index.js | primenumber/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import ColumnHeader fro... |
components/Html.js | hobinjk/illuminate | import React from 'react';
class Html extends React.Component {
render() {
return (
<html>
<head>
<meta charSet="utf-8" />
<title>{this.props.title}</title>
<meta name="viewport" content="width=device-width, user-scalable=no" />
<link rel="styleshee... |
packages/react-events/src/FocusScope.js | VioletLife/react | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import type {
ReactResponderEvent,
ReactResponderContext,
} from 'shared/ReactTypes';
import React from 'react';
... |
packages/material-ui-icons/src/EventBusy.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let EventBusy = props =>
<SvgIcon {...props}>
<path d="M9.31 17l2.44-2.44L14.19 17l1.06-1.06-2.44-2.44 2.44-2.44L14.19 10l-2.44 2.44L9.31 10l-1.06 1.06 2.44 2.44-2.44 2.44L9.31 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1... |
components/HighlightGrid.js | RomainInnocent/tpdevops | /**
* Created by Adrien on 30/06/2017.
*/
import React from 'react';
import {GridList, GridTile} from 'material-ui/GridList';
import IconButton from 'material-ui/IconButton';
import Subheader from 'material-ui/Subheader';
import StarBorder from 'material-ui/svg-icons/toggle/star-border';
import StartupCard from './St... |
test/TabSpec.js | jakubsikora/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Tab from '../src/Tab';
describe('Tab', function () {
it('Should have class', function () {
let instance = ReactTestUtils.renderIntoDocument(
<Tab>Item content</Tab>
);
assert.ok(ReactTestUtils.findRenderedDOMCo... |
packages/showcase/plot/grid.js | uber/react-vis | // Copyright (c) 2016 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify... |
src/containers/AddTodo.js | lingxiao-Zhu/react-redux-demo | /**
* Created by larry on 2017/1/4.
*/
import React from 'react';
import { connect } from 'react-redux';
import { addTodo } from '../actions';
let AddTodo = ({ dispatch }) => {
let input;
return(
<div>
<form onSubmit={e=>{
e.preventDefault();
if(!input.val... |
humantest/App.js | gutenye/react-mc | /* eslint-disable */
import React from 'react'
import '../docs/docs'
import '../docs/docs.css'
import { render } from 'react-dom'
import {
Button,
Card,
Dialog,
Drawer,
Elevation,
Checkbox,
Fab,
FormField,
GridList,
IconToggle,
LayoutGrid,
LinearProgress,
Menu,
List,
Radio,
Select,
Sli... |
src/UnmountClosed.js | nkbt/react-collapse | import React from 'react';
import PropTypes from 'prop-types';
import {Collapse} from './Collapse';
export class UnmountClosed extends React.PureComponent {
static propTypes = {
isOpened: PropTypes.bool.isRequired,
onWork: PropTypes.func,
onRest: PropTypes.func
};
static defaultProps = {
onWork... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.