path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
src/components/Widgets/UnknownPreview.js
radekzz/netlify-cms-test
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import previewStyle from './defaultPreviewStyle'; export default function UnknownPreview({ field }) { return <div style={previewStyle}>No preview for widget “{field.get('widget')}”.</div>; } UnknownPreview.propTypes = { field: ...
packages/react-router-native/examples/BasicExample.js
d-oliveros/react-router
import React from 'react' import { StyleSheet, Text, View } from 'react-native' import { NativeRouter, Route, Link } from 'react-router-native' const Home = () => ( <Text style={styles.header}> Home </Text> ) const About = () => ( <Text style={styles.header}> About </Text> ) const Topic = ({ match })...
js/components/LoadingIndicator.react.js
kkka/asd
/** * LoadingIndicator.react.js * * A loading indicator, copied from https://github.com/tobiasahlin/SpinKit * */ import React from 'react'; // Since this component doesn't need any state, make it a stateless component function LoadingIndicator() { return ( <div>Loading <div className="sk-fading-circl...
examples/index.android.js
mayuur/react-native-callout
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, TouchableHighlight, Animated, View, Dimensions, } from 'react-native'; let { screenWidth, screenHeight } = Dimensions.get('window') va...
www/imports/component/Namer.js
ucscHexmap/hexagram
// Namer.js // A modal to prompt the user to name something. // If you want something more complex use Modal.js instead. import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Modal from './Modal.js'; export default class Namer extends Component { constructor (props) { supe...
src/Fade.js
cgvarela/react-bootstrap
import React from 'react'; import Transition from 'react-overlays/lib/Transition'; import CustomPropTypes from './utils/CustomPropTypes'; import deprecationWarning from './utils/deprecationWarning'; class Fade extends React.Component { render() { let timeout = this.props.timeout || this.props.duration; retu...
src/modules/pages/PushLeft.js
lenxeon/react
require('../../css/drawer.less') import React from 'react'; const ReactPropTypes = React.PropTypes; class Drawer extends React.Component { constructor(props) { super(props); this.state = { open: props.open }; this.props.width = 600; } state: { } componentWillUpdate() {} compo...
examples/esp-chat-react-es6/js/app.js
raybooysen/esp-js
import esp from 'esp-js' import espDevTools from 'esp-js-devtools'; import React from 'react'; import ReactDOM from 'react-dom'; import model from './model'; import components from './components'; import services from './services'; // export for http://fb.me/react-devtools window.React = React; espDevTools.registerDe...
src/parser/priest/shadow/modules/spells/VoidformsTab.js
ronaldpereira/WoWAnalyzer
import React from 'react'; import PropTypes from 'prop-types'; import VoidformGraph from './VoidformGraph'; const VoidformsTab = ({ voidforms = [], insanityEvents, ...modules }) => { if (voidforms.length === 0) { return null; } return ( <div className="voidforms"> {voidforms.map((voidform, i) => ...
packages/mineral-ui-icons/src/IconLocalDrink.js
mineral-ui/mineral-ui
/* @flow */ import React from 'react'; import Icon from 'mineral-ui/Icon'; import type { IconProps } from 'mineral-ui/Icon/types'; /* eslint-disable prettier/prettier */ export default function IconLocalDrink(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconPro...
kit/lib/routing.js
Mahi22/MedTantra
/* eslint-disable no-param-reassign */ // ---------------------- // IMPORTS import React from 'react'; import PropTypes from 'prop-types'; import { Route, Redirect as ReactRouterRedirect } from 'react-router-dom'; // ---------------------- // <Status code="xxx"> component. Updates the context router's context, wh...
src/views/components/ThermostatCard.js
physiii/open-automation
import React from 'react'; import PropTypes from 'prop-types'; import ServiceCardBase from './ServiceCardBase.js'; import {connect} from 'react-redux'; import './ThermostatCard.css'; export class ThermostatCard extends React.Component { constructor (props) { super(props); const temp = this.props.service.state.ge...
project-my-demos/src/downloadList/views/downloadList.js
renhongl/Summary
import React from 'react'; import Card from 'antd/lib/card'; import Icon from 'antd/lib/icon'; import '../style.css'; import Tooltip from 'antd/lib/tooltip'; const downloadList = [ { title: '爱听播放器', url: 'https://renhongl.github.io/other/AiTing.zip', desc: '一个简洁、好看、功能丰富的播放器,相当于音乐播放器和听书软件的...
examples/Advanced/__tests__/index.android.js
larsvinter/react-native-awesome-button
import 'react-native'; import React from 'react'; import Index from '../index.android.js'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( <Index /> ); });
src/svg-icons/action/http.js
xmityaz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionHttp = (props) => ( <SvgIcon {...props}> <path d="M4.5 11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5v2zm2.5-.5h1.5V15H10v-4.5h1.5V9H7v1.5zm5.5 0H14V15h1.5v-4.5H17V9h-4.5v1.5zm9-1.5H18v6h1.5v-2h2c.8 0 1.5-.7 1.5-1.5v-...
src/components/data/DataCreator.js
dherault/Oso
import React from 'react'; import { connect } from 'react-redux'; import definitions from '../../models/'; import ac from '../../state/actionCreators'; import { capitalize } from '../../utils/text'; class DataCreator extends React.Component { constructor() { super(); const inputs = {}; const modelLis...
src/docs/layout/DocumentComponent.js
reactstrap/component-template
import React from 'react'; import { PrismCode } from 'react-prism'; import { dedent } from 'dentist'; const DocumentProptypes = (props) => { const { name, proptypes } = props.component; return ( <div className="docs-component-props mt-5"> <h3>{name} - PropTypes</h3> <pre> <PrismCo...
src/icons/AndroidArrowDown.js
fbfeix/react-icons
import React from 'react'; import IconBase from './../components/IconBase/IconBase'; export default class AndroidArrowDown extends React.Component { render() { if(this.props.bare) { return <g> <g id="Icon_8_"> <g> <path d="M277.375,85v259.704l119.702-119.702L427,256L256,427L85,256l29.924-29.922l119.701,118.626...
rest-ui-scripts/fixtures/kitchensink/src/features/webpack/SvgInclusion.js
RestUI/create-rest-ui-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...
node_modules/babel-plugin-react-transform/test/fixtures/code-ignore/actual.js
vinicius-ov/Livefy
import React from 'react'; const First = React.createNotClass({ displayName: 'First' }); class Second extends React.NotComponent {}
projects/starter/src/index.js
ebemunk/blog
import React from 'react' import ReactDOM from 'react-dom' import 'react-vis/dist/style.css' const render = (component, selector) => ReactDOM.render(component, document.querySelector(selector)) import A from './A' render(<A />, '#hi')
packages/javascript/reactjs/react-getstart/react-contact-manager/src/components/contact-card.js
sharkspeed/dororis
// src/components/contact-card.js import React from 'react' import { Link } from 'react-router-dom' import PropTypes from 'prop-types' // React v15+ 挪到额外模块中了 import { Card, Button, Icon } from 'semantic-ui-react' import { deleteContact } from '../actions/contact-actions' class ContactCard extends React.Component { ...
examples/js/basic/borderless-table.js
AllenFang/react-bootstrap-table
/* eslint max-len: 0 */ import React from 'react'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; const products = []; function addProducts(quantity) { const startId = products.length; for (let i = 0; i < quantity; i++) { const id = startId + i; products.push({ id: id, ...
docs/src/app/components/pages/components/Slider/ExampleStep.js
lawrence-yu/material-ui
import React from 'react'; import Slider from 'material-ui/Slider'; /** * By default, the slider is continuous. * The `step` property causes the slider to move in discrete increments. */ const SliderExampleStep = () => ( <Slider step={0.10} value={0.5} /> ); export default SliderExampleStep;
src/svg-icons/notification/confirmation-number.js
tan-jerene/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationConfirmationNumber = (props) => ( <SvgIcon {...props}> <path d="M22 10V6c0-1.11-.9-2-2-2H4c-1.1 0-1.99.89-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2...
rest-ui-scripts/template/src/resources/Post/crud/list/Filter.js
RestUI/create-rest-ui-app
import React from 'react'; import { Filter as CrudFilter, TextInput } from 'rest-ui/lib/mui'; import { translate } from 'rest-ui'; import Chip from 'material-ui/Chip'; const QuickFilter = translate(({ label, translate }) => <Chip style={{ marginBottom: 8 }}>{translate(label)}</Chip>); const Filter = ({ ...props }) =>...
src/svg-icons/communication/import-contacts.js
nathanmarks/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationImportContacts = (props) => ( <SvgIcon {...props}> <path d="M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 2...
src/routes/index.js
dfalling/todo
import React from 'react'; import { Route, IndexRoute, Redirect } from 'react-router'; // NOTE: here we're making use of the `resolve.root` configuration // option in webpack, which allows us to specify import paths as if // they were from the root of the ~/src directory. This makes it // very easy to navigate to file...
app/components/Info/index.js
anthonyjillions/anthonyjillions
import React from 'react'; import Icon from '../Icon'; import styles from './styles.css'; export default function Info() { const list = [ 'MERN stack dev', '3rd party API integrations', 'Custom JS/CSS/HTML for tools like Tumblr, Shopify, Square etc.', ]; const list1 = [ 'Full service music produc...
src/ActivitySwitcher.js
siiptuo/tiima-spa
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { startActivity } from './actions'; import * as activity from './activity'; export class ActivitySwitcher extends React.Component { static propTypes = { onActivityStart: PropTypes.func.isRequired, lo...
pages/blog/test-article-one.js
b1alpha/sdj
/** * React Static Boilerplate * https://github.com/koistya/react-static-boilerplate * Copyright (c) Konstantin Tarkus (@koistya) | MIT license */ import React, { Component } from 'react'; export default class extends Component { render() { return ( <div> <h1>Test Article 1</h1> <p>Co...
react/react-hn2/src/ItemList/ItemList.js
weaponhe/weaponhe.github.io
import React from 'react' import PropTypes from 'prop-types' import querystring from 'querystring' import ItemStore from '../store/itemStore' import Item from './Item' import Spinner from '../Spinner/Spinner' import Pager from '../pager/pager' import './ItemList.css' export default class ItemList extends React.Compon...
packages/react-scripts/fixtures/kitchensink/template/src/features/webpack/SassModulesInclusion.js
facebookincubator/create-react-app
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import styles from './assets/sass-styles.module.sass'; import indexStyles from './assets/index.module.sass'; ...
src/ui/components/EndpointsList.js
BE-Webdesign/wp-rest-api-reference
/** * External dependecies. */ import React from 'react' /** * Internal dependecies. */ import ReferenceEndpoint from './ReferenceEndpoint' const EndpointsList = ( { endpoints } ) => { return ( <div className="endpoints-list"> <h3 className="endpoints-list__title">Endpoints:</h3> <ul> { endpoints.map...
src/svg-icons/navigation/close.js
spiermar/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NavigationClose = (props) => ( <SvgIcon {...props}> <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/> </SvgIcon> ); NavigationClose = pure(Navig...
ui/src/core/components/Navigation.js
erlanglab/erlangpl
// @flow import React from 'react'; import { Link, Route } from 'react-router-dom/'; import './Navigation.css'; const NavigationLink = ({ to, icon }) => ( <Route path={to} exact={false} children={({ match }) => ( <div className={`item ${match ? 'active' : ''}`}> <Link to={to}> {i...
frontend/src/courses/components/header.js
OptimusCrime/youkok2
import React from 'react'; import { HeaderColumn } from './header-column'; import {COLUMN_CODE, COLUMN_NAME} from "../constants"; import {formatNumber} from "../../common/utils"; export const Header = ({ column, order, changeOrder, numCourses }) => ( <div className="course-row course-row__header"> <HeaderColumn...
04-mybooks-lab4/src/Header.js
iproduct/course-node-express-react
import React from 'react'; export default function Header() { return ( <React.Fragment> <h2 className="header center orange-text">My Library</h2> <div className="row center"> <h5 className="header col s12 light">Bookmark your favourite books</h5> </div> <div className="row center"...
pnpm-offline/.pnpm-store-offline/1/registry.npmjs.org/react-bootstrap/0.31.0/es/MediaList.js
Akkuma/npm-cache-benchmark
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 ...
docs/app/Examples/collections/Message/Variations/MessageExampleInfo.js
aabustamante/Semantic-UI-React
import React from 'react' import { Message } from 'semantic-ui-react' const MessageExampleInfo = () => ( <Message info> <Message.Header>Was this what you wanted?</Message.Header> <p>Did you know it's been a while?</p> </Message> ) export default MessageExampleInfo
docs/client/components/pages/Sticker/gettingStarted.js
koaninc/draft-js-plugins
// It is important to import the Editor which accepts plugins. import Editor from 'draft-js-plugins-editor'; // eslint-disable-line import/no-unresolved import createStickerPlugin from 'draft-js-sticker-plugin'; // eslint-disable-line import/no-unresolved import React from 'react'; import { fromJS } from 'immutable'; ...
docs/src/pages/blog.js
Gisto/Gisto
import React from 'react'; import { Helmet } from 'react-helmet'; import { graphql, Link } from 'gatsby'; import Header from 'components/header'; import Footer from 'components/footer'; const Blog = ({ data }) => ( <React.Fragment> <Helmet> <title>Blog</title> </Helmet> <Header/> <h1>Blog</h...
threeforce/node_modules/react-bootstrap/es/MediaRight.js
wolfiex/VisACC
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 ...
examples/with-url-object-routing/pages/index.js
arunoda/next.js
import React from 'react' import Link from 'next/link' const href = { pathname: '/about', query: { name: 'next' } } const as = { pathname: '/about/next', hash: 'title-1' } export default () => ( <div> <h1>Home page</h1> <Link href={href} as={as}> <a>Go to /about/next</a> </Link> </div> ...
src/svg-icons/notification/tap-and-play.js
rscnt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationTapAndPlay = (props) => ( <SvgIcon {...props}> <path d="M2 16v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0 4v3h3c0-1.66-1.34-3-3-3zm0-8v2c4.97 0 9 4.03 9 9h2c0-6.08-4.92-11-11-11zM17 1.01L7 1c-1.1 0-2...
src/views/pages/home/index.js
raycent/ARWM_Exercise_Redux
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Loader } from 'semantic-ui-react'; import { stockActions } from 'core/stock'; import { Dashboard } from 'views/components/Dashboard'; import { NotFound } from 'views/components/notFound'; class StockPage extends Component { co...
app/components/Dash.js
scalegray/scalegray
import React from 'react'; import AuthenticatedComponent from './AuthenticatedComponent' export default AuthenticatedComponent(class Dash extends React.Component { render() { return (<h1>Hello user!!</h1>); } });
test/specs/elements/Button/Button-test.js
clemensw/stardust
import React from 'react' import Button from 'src/elements/Button/Button' import ButtonContent from 'src/elements/Button/ButtonContent' import ButtonGroup from 'src/elements/Button/ButtonGroup' import ButtonOr from 'src/elements/Button/ButtonOr' import * as common from 'test/specs/commonTests' import { sandbox } from ...
frontend/scripts/components/common/TextInput.js
jakubzloczewski/react-exercise
import React from 'react'; class TextInput extends React.Component { render() { const {onChange, placeholder} = this.props; const style = this.getStyle(); return (<input style={style} type="text" placeholder={placeholder} onChange={onChange}/>); } ...
src/pages/home/index.js
joefraley/ratticusscript
'use strict' import Helmet from 'react-helmet' import { ListOfPosts } from '../../components/blog/list-of-posts' import Path from 'path-browserify' import { ProfilePhoto } from '../../components/profile-photo' import React from 'react' import { getPosts } from '../../utilities' export const HomePage = props => { ret...
internals/templates/homePage/homePage.js
adoveil/max
/* * 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...
generators/component/templates/4/components/StatelessCssModules.js
react-webpack-generators/generator-react-webpack
import React from 'react'; import cssmodules from 'react-css-modules'; import styles from '<%= style.webpackPath %>'; const <%= component.className %> = () => ( <div className="<%= style.className %>" styleName="<%= style.className %>"> Please edit <%= component.path %><%= component.fileName %> to update this co...
app/javascript/mastodon/components/__tests__/autosuggest_emoji-test.js
cobodo/mastodon
import React from 'react'; import renderer from 'react-test-renderer'; import AutosuggestEmoji from '../autosuggest_emoji'; describe('<AutosuggestEmoji />', () => { it('renders native emoji', () => { const emoji = { native: '💙', colons: ':foobar:', }; const component = renderer.create(<Autos...
src/components/Markdown/Markdown.js
nolawi/champs-dialog-sg
/** * Copyright 2017 dialog LLC <info@dlg.im> * @flow */ import React, { Component } from 'react'; import classNames from 'classnames'; import { parse, parseInline, decorators } from '@dlghq/markdown'; import { renderBlocks, renderText } from './render'; import styles from './Markdown.css'; export type Props = { ...
src/entypo/ChevronSmallRight.js
cox-auto-kc/react-entypo
import React from 'react'; import EntypoIcon from '../EntypoIcon'; const iconClass = 'entypo-svgicon entypo--ChevronSmallRight'; let EntypoChevronSmallRight = (props) => ( <EntypoIcon propClass={iconClass} {...props}> <path d="M11,10L7.859,6.58c-0.268-0.27-0.268-0.707,0-0.978c0.268-0.27,0.701-0.27,0.969,0...
public/components/tehtPage/tabsComponents/tehtava/Kohdekortti.js
City-of-Vantaa-SmartLab/kupela
import React from 'react'; import Showcase from '../reusables/templates/Showcase'; import { connect } from 'react-redux'; const Kohdekortti = (props) => ( <div className="kohdekortti"> <h2>Kohdekortti:</h2> {props.kohdekortit.map((card) => <Showcase src={card.url}/> )} </div...
src/index.js
udfalkso/react-redux
import React from 'react'; import createAll from './components/createAll'; export const { Provider, connect } = createAll(React);
website/src/AppFrame.js
kkamperschroer/react-navigation
import React from 'react'; import Link from './Link'; import Footer from './Footer'; import { addNavigationHelpers, } from 'react-navigation'; const NavigationLinks = ({navigation, className, reverse}) => { let links = [ ...navigation.state.routes.map((route, i) => { if (route.routeName === 'Home' || ro...
src/svg-icons/notification/phone-paused.js
manchesergit/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationPhonePaused = (props) => ( <SvgIcon {...props}> <path d="M17 3h-2v7h2V3zm3 12.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C...
CompositeUi/src/views/component/__tests__/CardExtended.js
kreta/kreta
/* * This file is part of the Kreta package. * * (c) Beñat Espiña <benatespina@gmail.com> * (c) Gorka Laucirica <gorka.lauzirika@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ import React from 'react'; import {shallo...
collect-webapp/frontend/src/datamanagement/components/NewRecordParametersDialog.js
openforis/collect
import React from 'react' import PropTypes from 'prop-types' import { Button, Dialog, DialogTitle, DialogActions, Table, TableBody, TableCell, TableHead, TableRow, } from '@mui/material' import L from 'utils/Labels' import Dates from 'utils/Dates' const NewRecordParametersDialog = (props) => { con...
src/parser/deathknight/unholy/modules/features/ClawingShadowsEfficiency.js
fyruna/WoWAnalyzer
import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import SpellLink from 'common/SpellLink'; import { formatPercentage } from 'common/format'; import Analyzer from 'parser/core/Analyzer'; import Enemies from 'parser/shared/modules/Enemies'; import StatisticBox, { ...
src/svg-icons/action/backup.js
IsenrichO/mui-with-arrows
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionBackup = (props) => ( <SvgIcon {...props}> <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z...
components/page-title.js
bukinoshita/open-source
import React from 'react' const PageTitle = () => ( <div> <h1 className="page__title">Embrace Open Source</h1> <h2 className="page__subtitle">A list of GitHub issues to help beginners make their first pull request.</h2> <style jsx>{` .page__title { color: #3d4752; font-weight: 400;...
src/components/MaterialPicker.js
JedWatson/react-color
'use strict' /* @flow */ import React from 'react' import ReactCSS from 'reactcss' import merge from 'merge' import isPlainObject from 'lodash.isplainobject' import debounce from 'lodash.debounce' import color from '../helpers/color' import Material from './material/Material' class ColorPicker extends ReactCSS.Compo...
src/Input/Input.spec.js
nirhart/wix-style-react
import React from 'react'; import ReactTestUtils from 'react-addons-test-utils'; import inputDriverFactory from './Input.driver'; import Input from './Input'; import sinon from 'sinon'; import {createDriverFactory} from '../test-common'; import {inputTestkitFactory} from '../../testkit'; import {inputTestkitFactory as ...
src/containers/Asians/Published/_AppBar/SmallAppBar/BreakRoundsButtons/index.js
westoncolemanl/tabbr-web
import React from 'react' import { connect } from 'react-redux' import Instance from './Instance' export default connect(mapStateToProps)(({ breakCategories, toggle }) => { return ( <div> {breakCategories.sort((a, b) => b.default).map(breakCategory => <Instance key={breakCategory._id...
src/svg-icons/hardware/tv.js
pomerantsev/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareTv = (props) => ( <SvgIcon {...props}> <path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12z"/> </SvgIcon> ); HardwareTv = pure(Hardwar...
src/views/HeaderTitle.js
Steviey/win-react-navigation
/* @flow */ import React from 'react'; import { Platform, StyleSheet, Text, } from 'react-native'; import type { Style, } from '../TypeDefinition'; type Props = { tintColor?: ?string; style?: Style, }; const HeaderTitle = ({ style, ...rest }: Props) => ( <Text numberOfLines={1} {...rest} style={[styl...
client/src/components/Join/Join.js
jenovs/bears-team-14
import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import api from '../../api'; import './style.css'; import Flash from '../Flash'; class Join extends Component { state = { errorStatus: '', busy: false, }; componentDidMount() { if (this.props.loggedIn) { this...
client/index.js
BostonGlobe/elections-2017
// This is the app's client-side entry point. Webpack starts here when // bundling the entire codebase. /* eslint-disable global-require, no-unused-vars */ import React from 'react' import ReactDOM from 'react-dom' import { browserHistory } from 'react-router' import configureStore from './../common/store/configureSto...
app/containers/HomePage/index.js
tarioto/Portfolio
/* * 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...
packages/material-ui-icons/src/Filter6.js
AndriusBil/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let Filter6 = 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 16H7V3h14v14zm-8-2h2c1.1 0 2-.89 2-2v-2c0-...
docs/src/app/components/pages/components/Card/ExampleControlled.js
verdan/material-ui
import React from 'react'; import {Card, CardActions, CardHeader, CardMedia, CardTitle, CardText} from 'material-ui/Card'; import FlatButton from 'material-ui/FlatButton'; import Toggle from 'material-ui/Toggle'; export default class CardExampleControlled extends React.Component { constructor(props) { super(pro...
app/components/Log.js
L-A/Little-Jekyll
import React, { Component } from 'react'; var Log = React.createClass({ render: function () { return ( <li className={this.props.log.logType}><p className="log-data">{this.props.log.logData}</p></li> ); } }) module.exports = Log;
src/SvgIcon/SvgIcon.spec.js
kittyjumbalaya/material-components-web
/* eslint-env mocha */ import React from 'react'; import {spy} from 'sinon'; import {shallow} from 'enzyme'; import {assert} from 'chai'; import SvgIcon from './SvgIcon'; import getMuiTheme from '../styles/getMuiTheme'; describe('<SvgIcon />', () => { const muiTheme = getMuiTheme(); const shallowWithContext = (nod...
examples/huge-apps/routes/Course/routes/Grades/components/Grades.js
RobertKielty/react-router
import React from 'react'; class Grades extends React.Component { render () { var assignments = COURSES[this.props.params.courseId].assignments; return ( <div> <h3>Grades</h3> <ul> {assignments.map(assignment => ( <li key={assignment.id}>{assignment.grade} - {assi...
example/TestLibQuickblox/ContactList.js
ttdat89/react-native-video-quickblox
/** * Created by Dat Tran on 9/27/17. */ import React from 'react'; import { StyleSheet, Text, TextInput, View, LayoutAnimation, TouchableOpacity, FlatList } from 'react-native'; import QuickbloxManager from './QuickbloxManager'; export default class ContactList extends React.Component { constructor...
react-src/catalog/components/FilterTheme.js
gabzon/experiensa
import React from 'react'; import CatalogFilterButton from './filters/CatalogFilterButton' export default class FilterTheme extends React.Component { constructor(){ super() } renderThemesButtons(){ if(this.props.themes) { return this.props.themes.map((theme) => { ...
app/Resources/js/index.js
shempignon/podcast-api
import React from 'react' import ReactDOM from 'react-dom' import { AppContainer } from 'react-hot-loader' import routes from './routes' import injectTapEventPlugin from 'react-tap-event-plugin' injectTapEventPlugin() const render = (Component) => { ReactDOM.render( <AppContainer> <Component/> <...
src/routes/system/Role/ModalForm.js
daizhen256/i5xwxdoctor-web
import React from 'react' import PropTypes from 'prop-types' import { Form, Input, Modal, Icon } from 'antd' import UserPower from './UserPower' import styles from './ModalForm.less' const FormItem = Form.Item const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 14 } } const ModalForm ...
src/components/secure/show_book.js
haki-projects/mapping-feminism-v2
import React, { Component } from 'react'; import { fetchBooks } from '../../actions/books'; import { connect } from 'react-redux'; import { Link } from 'react-router'; class BookShow extends Component { constructor(props) { super(props); } componentDidMount() { this.props.fetchBooks(); } rende...
index.ios.js
jokunhe/react-native-ee-camera
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; export default class chuanzhang extends Component { render() { return ( <View style={styles.containe...
src/components/ControllerUnit.js
budunwang/React-Gallery
import React from 'react'; class ControllerUnit extends React.Component { constructor(props) { super(props); this.handleClick = this.handleClick.bind(this); } //索引点击事件 handleClick(e) { if(this.props.arrange.isCenter) { this.props.inverse(); } else { this.props.center(); } e...
src/components/RevealAuction/RevealAuctionInfo.js
PhyrexTsai/ens-bid-dapp
import React from 'react'; import {shortFormatHash, momentFromNow} from '../../lib/util'; import Button from 'material-ui/Button'; import Card from 'material-ui/Card'; import Divider from 'material-ui/Divider'; import './RevealAuctionInfo.css'; const FinalizeAuctionOn = (props) => <div className='FinalizeAuctionOn'>...
pootle/static/js/admin/components/Language/LanguageController.js
pavels/pootle
/* * Copyright (C) Pootle contributors. * * This file is a part of the Pootle project. It is distributed under the GPL3 * or later license. See the LICENSE file for a copy of the license and the * AUTHORS file for copyright and authorship information. */ import React from 'react'; import Search from '../Search'...
src/svg-icons/image/add-to-photos.js
ArcanisCz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageAddToPhotos = (props) => ( <SvgIcon {...props}> <path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/> ...
docs/index.js
casesandberg/reactcss
'use strict' import ReactDOM from 'react-dom' import React from 'react' import '../node_modules/normalize.css/normalize.css' import Docs from './components/docs/Docs' ReactDOM.render( React.createElement(Docs), document.getElementById('root') )
src/svg-icons/av/shuffle.js
ArcanisCz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvShuffle = (props) => ( <SvgIcon {...props}> <path d="M10.59 9.17L5.41 4 4 5.41l5.17 5.17 1.42-1.41zM14.5 4l2.04 2.04L4 18.59 5.41 20 17.96 7.46 20 9.5V4h-5.5zm.33 9.41l-1.41 1.41 3.13 3.13L14.5 20H20v-5.5l-2....
test/NavbarSpec.js
andrew-d/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Navbar from '../src/Navbar'; import Nav from '../src/Nav'; describe('Nav', function () { it('Should create nav element', function () { let instance = ReactTestUtils.renderIntoDocument( <Navbar /> ); let nav = ...
src/components/GameListItemComponent.js
noraeb/tictactoe
import React from 'react'; const containerStyle = { fontFamily: "Roboto" } class GameListItemComponent extends React.Component { selectGame() { this.props.onClick(this.props.game); } render() { return ( <li style={containerStyle} onClick={this.selectGame.bind(this)}>Game by {this.props.game.pla...
src/index.js
raghu666/Reactapp
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import ReduxPromise from 'redux-promise'; import App from './components/app'; import reducers from './reducers'; import { BrowserRouter } from 'react-router...
docs/app/Examples/collections/Grid/ResponsiveVariations/GridExampleReversedComputer.js
vageeshb/Semantic-UI-React
import React from 'react' import { Grid } from 'semantic-ui-react' const GridExampleReversedComputer = () => ( <Grid reversed='computer' columns='equal'> <Grid.Row> <Grid.Column>Computer A Fourth</Grid.Column> <Grid.Column>Computer A Third</Grid.Column> <Grid.Column>Computer A Second</Grid.Colu...
react/components-test/src/App.js
MarioCodes/Desarrollo_Proyectos_Clase
import React, { Component } from 'react'; import './App.css'; import HelloWorld from './component/HelloWorld' class App extends Component { render() { return ( <div className="App"> <HelloWorld/> </div> ); } } export default App;
src/app.js
dahtuska/tekstiilit
import React from 'react'; import ReactDOM from 'react-dom'; import {Router, useRouterHistory} from 'react-router'; import injectTapEventPlugin from 'react-tap-event-plugin'; import {createHashHistory} from 'history'; import AppRoutes from './AppRoutes'; // Helpers for debugging window.React = React; window.Perf = req...
src/router.js
Arinono/uReflect_POC_Electron01
import React from 'react'; import { Router, Route, browserHistory, IndexRoute } from 'react-router'; // Pages import App from './containers/App'; var routes = ( <Route path="/" component={App}> </Route> ); export default routes;
src/js/components/icons/base/BrandGrommetPath.js
kylebyerly-hp/grommet
// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import CSSClassnames from '../../../utils/CSSClassnames'; import Intl from '../../../utils/Intl'; import Props from '../../../utils/Pro...
app/src/containers/Services/SectionOne/ServicesSectionOne.js
RyanCCollins/ryancollins.io
import React from 'react'; import './ServicesSectionOne.scss'; import { Column, Row, Button } from 'react-foundation'; import { Divider } from '../../../components'; const paragraph1P1 = `Through the `; const paragraph1P2 = ` platform, we have proven that working collaboratively on meaningful open sources pr...
web/src/routes.js
doeg/plantly-graphql
import makeRouteConfig from 'found/lib/makeRouteConfig' import Route from 'found/lib/Route' import React from 'react' import AllSpeciesPage from './components/AllSpeciesPage' import App from './components/App' import AuthCallback from './components/AuthCallback' import AuthRenewCallback from './components/AuthRenewCal...
src/TimePicker/TimePicker.spec.js
owencm/material-ui
/* eslint-env mocha */ import React from 'react'; import {shallow} from 'enzyme'; import {assert} from 'chai'; import TimePicker from './TimePicker'; import {addHours, formatTime} from './timeUtils'; import getMuiTheme from '../styles/getMuiTheme'; import TextField from '../TextField'; describe('<TimePicker />', () =...