path
stringlengths
5
195
repo_name
stringlengths
5
79
content
stringlengths
25
1.01M
components/date_picker_all/Calendar.js
zooshgroup/react-toolbox-components
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import CssTransitionGroup from 'react-transition-group/CSSTransitionGroup'; import { range, getAnimationModule } from '../utils/utils'; import time from '../utils/time'; import CalendarMonth from './CalendarMonth'; const DIRECTION_STEPS = { ...
loc8-react-redux-front-end/src/components/Home/index.js
uberslackin/django-redux-loc8-ARweb
import Banner from './Banner'; import MainView from './MainView'; import React from 'react'; import Tags from './Tags'; import agent from '../../agent'; import { connect } from 'react-redux'; const Promise = global.Promise; const mapStateToProps = state => ({ ...state.home, appName: state.common.appName, token:...
src/components/LifeCycleDemo.js
GuoYongfeng/react-fundamental
import React, { Component } from 'react'; import LifeCycle from './LifeCycle'; class LifeCycleDemo extends Component { state = { value:1, destroyed:false } increase = () => { this.setState({ value: this.state.value + 1 }); } destroy = () => { this.setState({ destroyed: true...
sub-packs/themes/zealder-default-theme/src/components/Header.js
Zealder/zealder-cms
// @flow /* this is so similar to ContentWrapper we may have to merge together in the future */ import React from 'react'; import { Grid } from 'react-bootstrap'; export default class Header extends React.Component { render() { const { content, getComponent, contentFillsWindow } = this.props; const scConte...
src/App.js
emilng/l-system-explorer
import React, { Component } from 'react'; import './App.css'; import Examples from './ui/Examples'; import Start from './ui/Start'; import Iterations from './ui/Iterations'; import Axiom from './ui/Axiom'; import InstructionsContainer from './ui/InstructionsContainer'; import RulesContainer from './ui/RulesContainer'; ...
packages/core/tocco-ui/src/Table/StaticCell.js
tocco/tocco-client
import PropTypes from 'prop-types' import React from 'react' import {js} from 'tocco-util' import {Typography} from '../index' import {columnPropType, rowDataPropType} from './propTypes' import {StyledTableCell} from './StyledComponents' const StaticCell = React.memo(({column, rowData, rowIdx}) => ( <StyledTableCel...
frontend/modules/browse/components/Loading.js
RyanNoelk/OpenEats
import React from 'react' import Spinner from 'react-spinkit'; const Loading = () => { return ( <div className="row"> <div className="col-xs-12"> <div id="browse" className="row"> <div className="spinner"> <Spinner className="spinner-obj" spinnerName="circle" noFadeIn /> ...
com/jessewarden/contacts/NewContactView.js
JesterXL/react-bootstrap-express-cassandra-contacts
import React from 'react'; import ReactDOM from 'react-dom'; import ContactsModel from './models/ContactsModel'; import classNames from 'classnames'; import EventBus from './EventBus'; import ImageView from './contactClasses/ImageView'; import PhoneForm from './contactClasses/PhoneForm'; import NewImageView from './con...
src/app/screens/Anonymous/screens/Home/components/Home.js
docgecko/react-alt-firebase-starter
/*! React Alt Firebase Starter */ import './Home.less'; import React from 'react'; export default class Home extends React.Component { render() { return ( <div className='home'> <h1>Welcome to the Home page...</h1> </div> ); } }
styleguide/screens/Patterns/Tabs/Tabs.js
rdjpalmer/bloom
import React from 'react'; import { Link } from 'react-router-dom'; import cx from 'classnames'; import dedent from 'dedent'; import Specimen from '../../../components/Specimen/Specimen'; import { D, H, T, C } from '../../../components/Scaffold/Scaffold'; import Tabs from '../../../../components/Tabs/Tabs'; import Tab...
src/index.js
postazure/redux-helloworld
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import { Provider } from 'react-redux' import configureStore from '../store/configureStore' const store = configureStore(); ReactDOM.render( <Provider store={store}> <App /> </Provider>, document.getElementById('root') );
docs/app/Examples/collections/Form/GroupVariations/FormExampleEvenlyDividedGroup.js
aabustamante/Semantic-UI-React
import React from 'react' import { Form, Input } from 'semantic-ui-react' const FormExampleEvenlyDividedGroup = () => ( <Form> <Form.Group widths='equal'> <Form.Field> <label>First name</label> <Input placeholder='First name' /> </Form.Field> <Form.Field> <label>Middle n...
modules/dreamview/frontend/src/components/common/Background.js
xiaoxq/apollo
import React from 'react'; import PropTypes from 'prop-types'; const Image = (props) => { const { image, style, ...otherProps } = props; const finalStyle = { ...(style || {}), backgroundImage: `url(${image})`, backgroundSize: 'cover', }; return <div className="dreamview-background" style={finalStyl...
pact/pact-react-consumer/src/App.js
thombergs/code-examples
import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; class App extends Component { render() { return ( <div className="App"> <header className="App-header"> <img src={logo} className="App-logo" alt="logo" /> <p> Edit <code>src/...
src/js/components/player/Html.js
barumel/ultritium-radio-player
import React from 'react'; import { Grid, Row, Col } from 'react-bootstrap'; export class PlayerHtml extends React.Component { constructor() { super(); this.state = { audio: false, playing: false } } play() { const { audio, playing } = this.state; if (audio.paused) { audio....
node_modules/rc-tabs/es/TabPane.js
ZSMingNB/react-news
import _defineProperty from 'babel-runtime/helpers/defineProperty'; import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import classnames from 'classnames'; var TabPane = createReactClass({ displayName: 'TabPane', propTypes: { className: PropTypes.s...
site/src/components/Demo.js
appbaseio/reactivesearch
import React, { Component } from 'react'; import { ThemeProvider } from 'emotion-theming'; import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import { Navbar, Logo, Button, H1, Title, Grid } from '@appbaseio/designkit'; import { Base, Layout, SecondaryLink, Section, titleText, showMobileFlex ...
src/icons/IosFlaskOutline.js
fbfeix/react-icons
import React from 'react'; import IconBase from './../components/IconBase/IconBase'; export default class IosFlaskOutline extends React.Component { render() { if(this.props.bare) { return <g> <g> <path d="M436.912,370.441L320,175V48h16V32h-16.009H304v16v131.418l2.514,3.791l116.575,194.834 c6.75,12.818,9.314,25...
src/pages/about-me/About.js
chtefi/golb
import React from 'react' import { graphql } from 'gatsby' export default () => <div /> export const blockImageFragment = graphql` fragment BlockImage on File { childImageSharp { fixed( width: 540 height: 200 cropFocus: CENTER quality: 50 duotone: { highlight: "#028...
lib/cli/generators/WEBPACK_REACT/template-csf/stories/0-Welcome.stories.js
storybooks/react-storybook
import React from 'react'; import { linkTo } from '@storybook/addon-links'; import { Welcome } from '@storybook/react/demo'; export default { title: 'Welcome', component: Welcome, }; export const ToStorybook = () => <Welcome showApp={linkTo('Button')} />; ToStorybook.story = { name: 'to Storybook', };
src/components/wrapper/standalone-box-decrypt.js
josuerangel/signandencrypt
import React from 'react' import BoxDecrypt from '../box-decrypt/index.jsx'; /** * Options example, boxencrypt need the next structure */ /* const options = { publicKeys: { key1 : 'http://localhost:8080/apps2012/filesPublication/QApgp1.gpg', key2 : 'http://localhost:8080/apps2012/filesPublication/QApgp2.gpg' }...
node_modules/react-icons/fa/wheelchair.js
bairrada97/festival
import React from 'react' import Icon from 'react-icon-base' const FaWheelchair = props => ( <Icon viewBox="0 0 40 40" {...props}> <g><path d="m24.8 26.5l2.3 4.5q-1.3 4-4.7 6.5t-7.5 2.5q-3.5 0-6.5-1.7t-4.7-4.7-1.7-6.5q0-4 2.3-7.3t6.2-4.7l0.3 2.9q-2.7 1.2-4.3 3.7t-1.6 5.4q0 4.2 2.9 7.1t7.1 2.9q2.8 0 5.1-1....
src/svg-icons/image/navigate-before.js
w01fgang/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageNavigateBefore = (props) => ( <SvgIcon {...props}> <path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/> </SvgIcon> ); ImageNavigateBefore = pure(ImageNavigateBefore); ImageNavigateBefore.displayName...
src/components/App.js
rpowelll/universal-react-boilerplate
/* @flow */ import React from 'react' import { renderRoutes } from 'react-router-config' import styles from './App.css' import NavigationLink from './NavigationLink' import routes from '../routes' type Props = { title?: string } const App = ({ title }: Props) => ( <div className={styles.app}> <h1 className={s...
app/components/List/index.js
hieubq90/react-boilerplate-3.4.0
import React from 'react'; import PropTypes from 'prop-types'; import Ul from './Ul'; import Wrapper from './Wrapper'; function List(props) { const ComponentToRender = props.component; let content = <div />; // If we have items, render them if (props.items) { content = props.items.map((item, index) => ...
src/components/groupings/collapsable.js
nutgaard/react-storybook-addon-sections
import React, { Component } from 'react'; import { default as PT } from 'prop-types'; import Collapse from 'react-collapse'; import './collapsable.css'; import { factory } from './utils'; import { classNames } from './../utils'; class Collapsable extends Component { constructor(props) { super(props); ...
node_modules/react-bootstrap/es/InputGroupButton.js
superKaigon/TheCave
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from ...
src/app/src/components/Landing.js
istreight/eggbeatr
/** * FILENAME: Landing.js * AUTHOR: Isaac Streight * START DATE: October 19th, 2016 * * This file contains the Landing class for the landing * page content of the lesson calendar web application. */ import React from 'react'; import ReactDOM from 'react-dom'; import Anchor from 'utils/Anchor'; impor...
src/svg-icons/av/note.js
rhaedes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvNote = (props) => ( <SvgIcon {...props}> <path d="M22 10l-6-6H4c-1.1 0-2 .9-2 2v12.01c0 1.1.9 1.99 2 1.99l16-.01c1.1 0 2-.89 2-1.99v-8zm-7-4.5l5.5 5.5H15V5.5z"/> </SvgIcon> ); AvNote = pure(AvNote); AvNote....
src/index.js
jiangjiyun/jjy-music
import React from 'react'; import ReactDOM from 'react-dom'; import { createStore, applyMiddleware } from 'redux'; import { Provider } from 'react-redux'; import { composeWithDevTools } from 'redux-devtools-extension'; import thunk from 'redux-thunk'; import createLogger from 'redux-logger'; import { ConnectedRouter, r...
src/Radio/Radio.js
AndriusBil/material-ui
// @flow weak import React from 'react'; import type { Node } from 'react'; import withStyles from '../styles/withStyles'; import createSwitch from '../internal/SwitchBase'; import RadioButtonCheckedIcon from '../svg-icons/RadioButtonChecked'; import RadioButtonUncheckedIcon from '../svg-icons/RadioButtonUnchecked'; ...
src/app/components/Home.js
stevemu/qi-ern-stack-starter
import React, { Component } from 'react'; class Home extends Component { render() { return ( <div className=""> <p>Hello Home!</p> <p>234234</p> </div> ); } } export default Home;
src/components/Toolbar/Toolbar-story.js
carbon-design-system/carbon-components-react
/** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import Filter16 f...
src/demo/stories/options_items/allow_to_drop_readonly.js
chybatronik/react_sortable
import React, { Component } from 'react'; import {default_order} from "../demo_data"; import SortableReact from '../../../lib/SortableReact'; import Markdown from 'react-markdown'; const code = ` \`\`\`js <SortableReact mode={mode} isDropOnEmptyAreaAllowed={this.state.isDropOnEmptyAreaAllowed} isGridLocked={this...
tests/react/createElementRequiredProp_string.js
jeffmo/flow
// @flow import React from 'react'; class Bar extends React.Component { props: { test: number, }; render() { return ( <div> {this.props.test} </div> ) } } class Foo extends React.Component { render() { const Cmp = Math.random() < 0.5 ? 'div' : Bar; return (<Cmp/>); ...
source/client/components/UserProfile.js
achobanov/ReactJS-Fundamentals-lab
import React from 'react'; import UserStore from '../stores/UserStore'; import UserInfo from './sub-components/UserInfo'; import UserVotedMovies from './sub-components/UserRatedMovies'; import UserReviews from './sub-components/UserReviews'; export default class UserProfile extends React.Component { const...
src/components/HomePage.js
jojoee/whitt
import React from 'react'; const HomePage = () => { return ( <div> <h2>HomePage</h2> </div> ); }; export default HomePage;
src/pages/login/LoginPage.js
TimothyBom/react-redux-instagram
import React from 'react' import { connect } from 'react-redux' import LoginForm from './LoginForm' import { getUserLogin } from '../../actions/login' const LoginPage = props => ( <div className="container mt-10"> <h1 className="text-center mb-4">Login Page</h1> <div className="row justify-content-...
src/components/containers/register-active-container.js
HuangXingBin/goldenEast
import React from 'react'; import { Button, Input, message } from 'antd'; import RegisterActiveTable from '../views/register-active-table'; import { getRegisterActiveData } from '../../api/app-interaction-api'; import { mergeDeep} from '../../helpers/helpers'; const RegisterActiveContainer = React.createClass({ getIn...
examples/counter/containers/App.js
ErrorPro/redux
import React, { Component } from 'react'; import CounterApp from './CounterApp'; import { createRedux } from 'redux'; import { Provider } from 'redux/react'; import * as stores from '../stores'; const redux = createRedux(stores); export default class App extends Component { render() { return ( <Provider r...
src/view/greeting.js
MoonlightOwl/hel-site
import React from 'react' class Greeting extends React.Component { render() { return ( <div className="ui negative message"> <i className="close icon"></i> <div className="header"> Welcome to Hel Package Repository! </div> <p></p> </div> ); } } export ...
ui/src/components/workflow/executions/WorkflowList.js
grfeng/conductor
/* eslint-disable no-restricted-globals */ import React, { Component } from 'react'; import PropTypes from "prop-types"; import { connect } from 'react-redux'; import { createSelector } from 'reselect' import {changeSearch, fetchSearchResults} from '../../../actions/search'; import { performBulkOperation } from '../.....
client/app/components/ContentEditor/customPlugins/media-plugin/components/AddMediaButton.js
bryanph/Geist
import React from 'react'; import { insertDataBlock } from '../../../utils/block' import { Entity } from 'draft-js' import { getType, transformSrc } from '../utils/getMediaType' import { InputText } from '../../../../Input' import RaisedButton from 'material-ui/RaisedButton'; const addMedia = (editorState, setEdito...
scripts/experiences/Dmlf.js
storfarmand/dmlf
import React from 'react'; import Header from '../components/Header'; import Mainstage from '../components/Mainstage'; import * as KeyboardActions from '../actions/KeyboardActions'; import NavigationStore from '../stores/NavigationStore'; import TypographyStore from '../stores/TypographyStore'; export default class...
node_modules/react-native-router-flux/src/LightboxNavigator.js
gunaangs/Feedonymous
/* @flow */ import React from 'react'; import { createNavigationContainer, createNavigator, TabRouter } from 'react-navigation'; import { View } from 'react-native'; const LightboxNavigator = ( routeConfigs, tabsConfig = {} ) => { const router = TabRouter(routeConfigs, tabsConfig); const navigator = createNa...
SwipComponent/FacebookTabBar.js
MisterZhouZhou/ReactNativeLearing
import React from 'react'; import { StyleSheet, Text, View, TouchableOpacity, } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; const FacebookTabBar = React.createClass({ tabIcons: [], propTypes: { goToPage: React.PropTypes.func, activeTab: React.PropTypes.number, t...
jqwidgets/jqwidgets-react/react_jqxfileupload.js
UCF/IKM-APIM
/* jQWidgets v5.6.0 (2018-Feb) Copyright (c) 2011-2017 jQWidgets. License: https://jqwidgets.com/license/ */ import React from 'react'; const JQXLite = window.JQXLite; export const jqx = window.jqx; export default class JqxFileUpload extends React.Component { componentDidMount() { let options = this.man...
src/components/featured/feature-who.js
Vision100IT/v100it-template
import React from 'react'; import {Link} from 'react-router-dom'; import FaBank from 'react-icons/lib/fa/bank'; import FaUsers from 'react-icons/lib/fa/group'; import FaServer from 'react-icons/lib/fa/server'; import FaGraduationCap from 'react-icons/lib/fa/graduation-cap'; import FaAngleDown from 'react-icons/lib/fa/a...
lib/beaver.js
dpkshrma/beaver
'use babel'; import React from 'react'; import ReactDOM from 'react-dom'; import { CompositeDisposable } from 'atom'; import AppView from './AppView'; import beaverDB from './helpers/db'; import { dBPath } from './config'; // console.log('Lib Versions: '); // console.log(process.versions); // process.env.NODE_ENV = ...
app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js
d6rkaiz/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; import { EmojiPicker as EmojiPickerAsync } from '../../ui/util/async-components'; import Overlay from 'react-overlays/lib/Overlay'; import classNames from 'classnames'; import ImmutablePropTypes from ...
client/pages/Contribute/Contribute.js
b3j0f/lechangement
import './Contribute.css'; import React, { Component } from 'react'; class Contribute extends Component { render() { return <div>Contribute</div>; } } export default Contribute;
webapp/app/components/SaveCreation/Form/Frequency/index.js
EIP-SAM/SAM-Solution-Node-js
// // FrequencyFormGroup in form for page SaveCreation // import React from 'react'; import { FormGroup, ControlLabel, FormControl } from 'react-bootstrap'; import Option from 'components/Option'; import styles from 'components/SaveCreation/styles.css'; /* eslint-disable react/prefer-stateless-function */ export defa...
examples/dom-bindings/src/index.js
elpic/react-pdf
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './index.css'; ReactDOM.render(<App />, document.getElementById('root'));
example/src/bits/Image.js
RafalFilipek/just-box
import React from 'react'; import { Image } from 'react-native'; import { Box } from 'just-box' export default ({ src, ...rest }) => ( <Box as={Image} source={{uri: src}} top={0} left={0} right={0} bottom={0} position="absolute" style={{ resizeMode: 'cover' }} {...rest} /> );
fields/types/relationship/RelationshipColumn.js
snowkeeper/keystone
import React from 'react'; import ItemsTableCell from '../../components/ItemsTableCell'; import ItemsTableValue from '../../components/ItemsTableValue'; const moreIndicatorStyle = { color: '#bbb', fontSize: '.8rem', fontWeight: 500, marginLeft: 8, }; var RelationshipColumn = React.createClass({ displayName: 'Rel...
src/components/Navigation/Navigation.js
buildbreakdo/react-starter-kit
/** * React Starter Kit (https://www.reactstarterkit.com/) * * 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 cx from 'classnames';...
app/app/components/AdminPanel/Products/EditProduct.js
lycha/masters-thesis
import React from 'react'; import bootstrap from 'bootstrap'; class EditProduct extends React.Component { constructor(props) { super(props); this.displayName = 'EditProduct'; } getQuery(e) { e.preventDefault(); let product = { id: this.refs.id.value, name: this.refs....
browser/app/js/components/SideBar.js
dvstate/minio
/* * Minio Cloud Storage (C) 2016 Minio, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
internals/templates/containers/HomePage/index.js
vinhtran19950804/procure_react
/* * HomePage * * This is the first thing users see of our App, at the '/' route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a necessity for you then you can refactor it and remove * the l...
resources/assets/js/components/admin/ListItemTeacher.js
jrm2k6/i-heart-reading
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { showModal } from '../../actions/modals/modalActions'; import { deleteTeacher } from '../../actions/admin/adminDashboardActions'; import UpdateTeacherModal from './modals/UpdateTeacherModal'; const mapStateToProps = (state) => { ...
examples/auth-with-shared-root/components/Logout.js
nvartolomei/react-router
import React from 'react' import auth from '../utils/auth' const Logout = React.createClass({ componentDidMount() { auth.logout() }, render() { return <p>You are now logged out</p> } }) export default Logout
src/components/Header/Header.js
loganfreeman/react-is-fun
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 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 withStyles from 'isomorp...
src/components/LabeledContainer.js
mikebarkmin/gestyled
import React from 'react'; import PropTypes from 'prop-types'; import withStyle from './Base'; const LabeledContainer = props => <div> {props.children} </div>; LabeledContainer.propTypes = { /** Label which will be used for the tab */ label: PropTypes.oneOfType([PropTypes.string, PropTypes.element]) }; e...
src/js/Scroller/ScrollArea.js
AlejandroHerr/fotoxjs
// @flow import React from 'react'; import Measure from 'react-measure'; import type { Dimensions } from './types'; type ScrollAreaProps = { children: typeof React.Component, height: number, position: number, styles: { [key: string]: string }, onMeasure: (Dimensions) => void, }; const ScrollArea = ({ chi...
app/containers/Wall.js
Salomari1987/client-wall-app
import React from 'react'; import Message from '../components/Message'; import MessageInput from '../components/MessageInput'; import WallStore from '../stores/WallStore'; import WallActions from '../actions/WallActions'; import ReactDOM from 'react-dom'; class Wall extends React.Component { constructor(props) { ...
client/src/components/Admin/AdminSidebar.js
hutchgrant/react-boilerplate
import _ from 'lodash'; import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import MyRoutes from './adminRoutes'; import $ from 'jquery'; const ResizeSensor = require('css-element-queries/src/ResizeSensor.js'); const EQ = require('css-element-queries/src/ElementQueries.js'); EQ.init(); ...
react-flux-mui/js/material-ui/docs/src/app/components/pages/components/DatePicker/Page.js
pbogdan/react-flux-mui
import React from 'react'; import Title from 'react-title-component'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import datePickerReadmeText from './README'; import DatePickerExampleSimple from...
test/helpers/shallowRenderHelper.js
pptp/tile-calc
/** * Function to get the shallow output for a given component * As we are using phantom.js, we also need to include the fn.proto.bind shim! * * @see http://simonsmith.io/unit-testing-react-components-without-a-dom/ * @author somonsmith */ import React from 'react'; import TestUtils from 'react-addons-test-utils'...
src/js/components/Grommet/stories/Messages.js
HewlettPackard/grommet
import React from 'react'; import { Box, FileInput, Form, FormField, Grommet, Heading } from 'grommet'; const messageBundle = { 'form.required': '必填项目', 'fileInput.browse': '浏览', }; const customMessages = { messages: { form: { required: 'necesario', }, fileInput: { browse: 'navegar', ...
src/mixins/controllable.js
tyfoo/material-ui
import React from 'react'; export default { propTypes: { onChange: React.PropTypes.func, value: React.PropTypes.oneOfType([ React.PropTypes.string, React.PropTypes.array, ]), valueLink: React.PropTypes.shape({ value: React.PropTypes.string.isRequired, requestChange: React.Pro...
examples/parameterized-routing/pages/blog.js
BlancheXu/test
import React from 'react' export default class extends React.Component { static getInitialProps ({ query: { id } }) { return { id } } render () { return ( <div> <h1>My {this.props.id} blog post</h1> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do ...
client/src/components/utils/FormActions.js
DjLeChuck/recalbox-manager
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { translate } from 'react-i18next'; import Button from 'react-bootstrap/lib/Button'; import Glyphicon from 'react-bootstrap/lib/Glyphicon'; class FormActions extends Component { static propTypes = { t: PropTypes.func.isRequired,...
modules/server.js
yuanziyuer/yuanzi-share
import http from 'http'; import React from 'react'; import { renderToString } from 'react-dom/server'; import { match, RouterContext } from 'react-router'; import fs from 'fs'; import { createPage, write, writeError, writeNotFound, redirect } from './utils/server-utils'; import routes from './routes/RootRoute'; const w...
studenttable/src/index.js
balaSpyrus/wave11
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import {Provider} from 'react-redux'; import {createStore, combineReducers} from 'redux'; import registerServiceWorker from './registerServiceWorker'; import dataReducer from './reducers/datareducer'; const allr...
src/containers/NotFound/NotFound.js
Shenseye/fccpinterest
import React from 'react'; export default function NotFound() { return ( <div className="container"> <h1>Doh! 404!</h1> <p>These are <em>not</em> the droids you are looking for!</p> </div> ); }
addons/knobs/src/components/WrapStory.js
nfl/react-storybook
/* eslint no-underscore-dangle: 0 */ import PropTypes from 'prop-types'; import React from 'react'; export default class WrapStory extends React.Component { constructor(props) { super(props); this.knobChanged = this.knobChanged.bind(this); this.resetKnobs = this.resetKnobs.bind(this); this.setPaneKn...
docs/src/app/components/pages/components/Slider/Page.js
spiermar/material-ui
import React from 'react'; import Title from 'react-title-component'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import sliderReadmeText from './README'; import SliderExampleSimple from './Exam...
internals/templates/utils/injectSaga.js
mxstbr/react-boilerplate
import React from 'react'; import hoistNonReactStatics from 'hoist-non-react-statics'; import { ReactReduxContext } from 'react-redux'; import getInjectors from './sagaInjectors'; /** * Dynamically injects a saga, passes component's props as saga arguments * * @param {string} key A key of the saga * @param {funct...
examples/FacebookTabsExample/SimpleExample.js
iancanderson/react-native-scrollable-tab-view
import React from 'react'; import { Text, } from 'react-native'; import ScrollableTabView, {DefaultTabBar, } from 'react-native-scrollable-tab-view'; export default React.createClass({ render() { return <ScrollableTabView style={{marginTop: 20, }} renderTabBar={() => <DefaultTabBar />} > ...
src/Toolbar/LocationSearch.js
woutervh-/cancun-react
import {IconButton, Input, List, ListItem} from 'react-toolbox'; import classNames from 'classnames'; import React from 'react'; import style from './style'; import {Autocomplete} from './Autocomplete'; import Geocoding from '../Geocoding'; import shallowEqual from 'shallowequal'; export default class LocationSearch e...
app/src/components/NoteToolbar.js
zhanglun/fist
import React, { Component } from 'react'; // https://github.com/olahol/react-tagsinput/blob/master/src/index.js class NoteToolbarComponent extends Component { constructor(props) { super(props); this.state = { tags: props.tags, } } _addTags(tag) { let { tags } = this.state; let {maxTa...
src/svg-icons/action/date-range.js
pomerantsev/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionDateRange = (props) => ( <SvgIcon {...props}> <path d="M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0...
src/docs/components/AppDoc.js
grommet/grommet-docs
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import App from 'grommet/components/App'; import Box from 'grommet/components/Box'; import Split from 'grommet/components/Split'; import Sidebar from 'grommet/components/Sidebar'; import Article from 'grommet...
src/views/Button/index.js
pnicolli/demo-calculator
import React from 'react'; import { func, string } from 'prop-types'; import './styles.css'; const Button = ({ className, onClick, text, }) => ( <button className={'button'.concat(className ? ` ${className}` : '')} onClick={onClick} > <span>{text}</span> </button> ); Button.propTypes = { cla...
app/javascript/mastodon/features/reblogs/index.js
pixiv/mastodon
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import LoadingIndicator from '../../components/loading_indicator'; import { fetchReblogs } from '../../actions/interactions'; import { ScrollContainer } from ...
src/parser/hunter/beastmastery/modules/talents/DireBeast.js
sMteX/WoWAnalyzer
import React from 'react'; import Analyzer from 'parser/core/Analyzer'; import SPELLS from 'common/SPELLS'; import { formatPercentage } from 'common/format'; import TalentStatisticBox from 'interface/others/TalentStatisticBox'; import ResourceIcon from 'common/ResourceIcon'; import RESOURCE_TYPES from 'game/RESOURCE_TY...
src/component/layout/SideBar.js
babizhu/webApp
/** * 可伸缩,自适应边栏 * * 此边栏有两种显示模式 * iconMode 只显示图标 * normal 正常模式 * * 另外还有个miniMode的显示模式,用于处理此sidebar的显示宽度,当屏幕宽度太小, * 如手机等设备时,需要强制显示模式为正常模式,并100%屏幕宽度 * * 此边栏有两种选择模式 * one 每次只允许展开一个子菜单 * muti 允许展开多个子菜单 * * 问题: * 当显示模式为iconMode的时候,如果采用muti的选择模式,会感觉有点奇怪(可模拟自行测试),目前未处理 * * * Crea...
src/main.js
embengineering/react-md-crud
import 'file?name=[name].[ext]!./index.html'; import 'babel-polyfill'; import 'fastclick'; import 'font-awesome-sass-loader'; import './scss/main.scss'; import React from 'react'; import ReactDOM from 'react-dom'; import {Provider} from 'react-redux'; import injectTapEventPlugin from 'react-tap-event-plugin'; import co...
cdap-ui/app/cdap/components/HeaderBrand/index.js
caskdata/cdap
/* * Copyright © 2016 Cask Data, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed t...
fields/types/html/HtmlField.js
mikaoelitiana/keystone
import _ from 'underscore'; import Field from '../Field'; import React from 'react'; import tinymce from 'tinymce'; import { FormInput } from 'elemental'; /** * TODO: * - Remove dependency on underscore */ var lastId = 0; function getId() { return 'keystone-html-' + lastId++; } module.exports = Field.create({ ...
server/main.js
Anomen/universal-react-redux-starter-kit
global.__CLIENT__ = false; global.__SERVER__ = true; import express from 'express'; import cookieParser from 'cookie-parser'; import _debug from 'debug'; import config from '../config'; import webpackProxyMiddleware from './middleware/webpack-proxy'; Object.keys(config.globals).map((key) => { global[key] = config.g...
b_stateMachine/complex_templates/jsx/wizard/footer.js
Muzietto/react-playground
'use strict'; import React from 'react'; export default function footer(props) { props.cancelButton.className += (!props.cancelButton.disabled) ? ' enabled' : ''; props.restartButton.className += (!props.restartButton.disabled) ? ' enabled' : ''; props.saveButton.className += (!props.saveButton.disabled) ...
src/svg-icons/device/battery-charging-80.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceBatteryCharging80 = (props) => ( <SvgIcon {...props}> <path fillOpacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V9h4.93L13 7v2h4V5.33C17 4.6 16.4 4 15.67 4z"/><path d="M13 12.5h2L11 20v-5.5H9L11...
src/components/form/agreement.js
n7best/react-weui
import React from 'react'; import classNames from '../../utils/classnames'; /** * Agreement style checkbox * */ const Agreement = (props) => { const { className, children, id, ...others } = props; const cls = classNames({ 'weui-agree': true, [className]: className }); return ( ...
docs/src/sections/ResponsiveEmbedSection.js
SSLcom/Bootsharp
import React from 'react'; import Anchor from '../Anchor'; import PropTable from '../PropTable'; import ReactPlayground from '../ReactPlayground'; import Samples from '../Samples'; export default function ResponsiveEmbedSection() { return ( <div className="bs-docs-section"> <h2 className="page-header"> ...
client/src/app-components/ticket-list.js
opensupports/opensupports
import React from 'react'; import _ from 'lodash'; import {connect} from 'react-redux'; import queryString from 'query-string'; import i18n from 'lib-app/i18n'; import DateTransformer from 'lib-core/date-transformer'; import TicketInfo from 'app-components/ticket-info'; import DepartmentDropdown from 'app-components/...
src/components/toolbar.js
bahattincinic/pharmacyonduty-mobile
'use strict' import React, { Component } from 'react'; import { View, Text } from 'react-native'; import Button from './button' class Toolbar extends Component { _handleBack() { this.props.navigator.pop() } _renderBackButton() { if (this.props.navigator.getCurrentRoutes().length > 1) { return (...
public/js/components/Auth/index.js
nowordforfree/react-cv
import React from 'react'; import { Tabs, Tab } from 'material-ui/Tabs'; import LoginForm from '../../containers/LoginForm'; import RegistrationForm from '../../containers/RegistrationForm'; export default () => ( <div className="row"> <div className="col-md-offset-2 col-md-8"> <Tabs> <Tab title="S...
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/LifecycleMethodsInferred.js
ylu1317/flow
// @flow import React from 'react'; class MyComponent1 extends React.Component { componentWillReceiveProps(nextProps) {} } class MyComponent2 extends React.Component { shouldComponentUpdate(prevProps, prevState) {} } class MyComponent3 extends React.Component { componentWillUpdate(prevProps, prevState) {} } ...
components/TabPage2.js
s1hit/react-onsenui-redux-weather-edited
import React from 'react'; import { Page, Navigator } from 'react-onsenui'; import CustomPage from './CustomPage'; const renderPage = (route, navigator) => ( <route.component key={route.key} navigator={navigator} /> ); const TabPage2 = () => ( <Page> <Navigator renderPage={renderPage} initia...