path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
src/svg-icons/editor/vertical-align-bottom.js
ichiohta/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorVerticalAlignBottom = (props) => ( <SvgIcon {...props}> <path d="M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"/> </SvgIcon> ); EditorVerticalAlignBottom = pure(EditorVerticalAlignBottom); EditorVertical...
examples/counter/index.js
actano/redux
import React from 'react'; import { Provider } from 'react-redux'; import App from './containers/App'; import configureStore from './store/configureStore'; const store = configureStore(); React.render( <Provider store={store}> {() => <App />} </Provider>, document.getElementById('root') );
TGMeituan/Components/Home/GuessLike.js
targetcloud/Meituan
/** * Created by targetcloud on 2016/12/21. * http://blog.csdn.net/callzjy/article/details/53856163 */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, ListView, Image, TouchableOpacity } from 'react-native'; var CommonCell = require('../Common/Comm...
docs/src/app/components/pages/components/Slider/ExampleAxis.js
kasra-co/material-ui
import React from 'react'; import Slider from 'material-ui/Slider'; /** * The orientation of the slider can be reversed and rotated using the `axis` prop. */ const SliderExampleAxis = () => ( <div style={{display: 'flex', height: 124, flexDirection: 'row', justifyContent: 'space-around'}}> <Slider style={{heig...
src/MenuItem.js
apisandipas/react-bootstrap
import React from 'react'; import classnames from 'classnames'; import CustomPropTypes from './utils/CustomPropTypes'; import SafeAnchor from './SafeAnchor'; export default class MenuItem extends React.Component { constructor(props) { super(props); this.handleClick = this.handleClick.bind(this); } hand...
src/main.js
gauravnagar1981/ecommerce
import React from 'react' import ReactDOM from 'react-dom' import createStore from './store/createStore' import AppContainer from './containers/AppContainer' // ======================================================== // Store Instantiation // ======================================================== const initialState...
src/components/TextArea/Textarea-story.js
joshblack/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 { withKno...
src/containers/viewer/RepoViewer/index.js
mydearxym/mastani
/* * * RepoViewer * */ import React from 'react' // import { THREAD } from '@/constant' import { buildLog } from '@/utils/logger' import { pluggedIn } from '@/utils/mobx' import Comments from '@/containers/unit/Comments' import GithubRepoPage from '@/widgets/GithubRepoPage' import { CommentsWrapper } from './st...
renderer/components/Syncing/OldWalletHeader.js
LN-Zap/zap-desktop
import React from 'react' import { FormattedMessage } from 'react-intl' import { Header } from 'components/UI' import messages from './messages' const OldWalletHeader = () => ( <Header subtitle={<FormattedMessage {...messages.sync_description} />} title={<FormattedMessage {...messages.sync_title} />} /> ) ...
src/components/NodeZoneTree.js
alexravs/midgar
import React, { Component } from 'react'; import ContainerNodeZoneTree from '../containers/ContainerNodeZoneTree'; import styled from 'styled-components'; import { Collapse, } from '@blueprintjs/core'; const Wrapper = styled.li` list-style: none; cursor: pointer; `; export default class NodeZoneTree extends C...
themes/genius/Genius 2.3.1 Bootstrap 4/React_Starter/src/index.js
davidchristie/kaenga-housing-calculator
import React from 'react'; import ReactDOM from 'react-dom'; import { Router, hashHistory } from 'react-router'; import routes from './routes'; ReactDOM.render( <Router routes={routes} history={hashHistory} />, document.getElementById('root') );
packages/react/src/components/base/Colors/index.js
massgov/mayflower
import React from 'react'; import PropTypes from 'prop-types'; import ButtonCopy from 'MayflowerReactButtons/ButtonCopy'; const ColorSwatch = ({ name, value, variable }) => { const hexValue = value.toUpperCase(); return( <li style={{ width: 300, margin: 10, padding: 10 }}> <h3 className="ma__sidebar-head...
calculator/src/App.js
florinpop17/chingu-speedrun-may
import React, { Component } from 'react'; import Calculator from './Calculator'; class App extends Component { render() { return ( <div className="container-fluid"> <div className="row"> <div className="col-md-12"> <Calculator /> </div> <footer className="nav navbar-inverse navbar-fixe...
app/forms/components/SubmitButtonInput.js
Evyy/cffs-ui
'use strict'; import React from 'react'; // import {Link} from 'react-router'; import classnames from "classnames"; class SubmitButtonInput extends React.Component { constructor (props) { super(props); this.onSubmit = this .onSubmit .bind(this); } static propType...
src/Collapse.js
nkbt/react-collapse
import React from 'react'; import PropTypes from 'prop-types'; export class Collapse extends React.Component { static propTypes = { theme: PropTypes.shape({ collapse: PropTypes.string, content: PropTypes.string }), isOpened: PropTypes.bool.isRequired, initialStyle: PropTypes.shape({ ...
src/routes/NotFound/NotFound.js
taikongfeizhu/webpack-develop-startkit
import React from 'react' import { browserHistory } from 'react-router' import './NotFound.less' import img404 from './404.png' import cloud404 from './cloud_404.png' const goBack = (e) => { e.preventDefault() return browserHistory.goBack() } export const NotFound = () => ( <div style={{ background:'#f6f6f6', m...
pages/about.js
jackosaurus/bigworld
import React from 'react'; import stylesheet from 'styles/index.scss'; import { BigcommerceLogo, Map, Navigation, Results, } from '../components/index'; export default () => ( <div className="layout"> <style dangerouslySetInnerHTML={{ __html: stylesheet }} /> <main className="layout__main--full"> ...
src/app/component/upload-model-list/upload-model-list.js
all3dp/printing-engine-client
import PropTypes from 'prop-types' import React from 'react' import propTypes from '../../prop-types' import cn from '../../lib/class-names' const UploadModelList = ({classNames, children, header}) => ( <div className={cn('UploadModelList', {}, classNames)}> <div className="UploadModelList__header">{header}</di...
src/components/seo.js
codenetwork/CodeNetwork.co
/** * SEO component that queries for data with * Gatsby's useStaticQuery React hook * * See: https://www.gatsbyjs.org/docs/use-static-query/ */ import React from 'react' import PropTypes from 'prop-types' import Helmet from 'react-helmet' import { useStaticQuery, graphql } from 'gatsby' function SEO({ descripti...
fields/types/password/PasswordFilter.js
codevlabs/keystone
import React from 'react'; import { SegmentedControl } from 'elemental'; const TOGGLE_OPTIONS = [ { label: 'Is Set', value: true }, { label: 'Is NOT Set', value: false }, ]; function getDefaultValue () { return { exists: true, }; } var PasswordFilter = React.createClass({ statics: { getDefaultValue: getDe...
client/src/components/Tag/tests/Tag-test.js
silverstripe/silverstripe-admin
/* global jest, describe, it, expect */ import React from 'react'; import Tag from '../Tag'; import Enzyme, { shallow, mount } from 'enzyme'; import Adapter from 'enzyme-adapter-react-16/build/index'; Enzyme.configure({ adapter: new Adapter() }); describe('Tag', () => { beforeEach(() => { }); describe('Test v...
src/applications/static-pages/health-care-manage-benefits/schedule-view-va-appointments-page/components/App/index.js
department-of-veterans-affairs/vets-website
// Node modules. import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { isEmpty } from 'lodash'; // Relative imports. import AuthContent from '../AuthContent'; import UnauthContent from '../UnauthContent'; import { selectPatientFacilities } from 'platform/user/sel...
src/containers/Home/HomePage.js
franciskim722/crypy
import React from 'react'; import PropTypes from 'prop-types'; import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; import * as homeActions from '../../actions/HomeActions'; import './Home.scss'; import NavBar from '../../components/common/NavBar/NavBar'; import PortfolioPage from '../Portfo...
fixtures/packaging/systemjs-builder/prod/input.js
cpojer/react
import React from 'react'; import ReactDOM from 'react-dom'; ReactDOM.render( React.createElement('h1', null, 'Hello World!'), document.getElementById('container') );
client/omnichannel/installation/Installation.js
Sing-Li/Rocket.Chat
import React from 'react'; import { Box } from '@rocket.chat/fuselage'; import { useSetting } from '../../contexts/SettingsContext'; import { useTranslation } from '../../contexts/TranslationContext'; import Page from '../../components/basic/Page'; import RawText from '../../components/basic/RawText'; import TextCopy ...
src/lib/reactors/Legend/PointLegend.js
EsriJapan/photospot-finder
// Copyright (c) 2016 Yusuke Nunokawa (https://ynunokawa.github.io) // // 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 us...
src/svg-icons/image/filter-b-and-w.js
rhaedes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageFilterBAndW = (props) => ( <SvgIcon {...props}> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16l-7-8v8H5l7-8V5h7v14z"/> </SvgIcon> ); ImageFilterBAndW = pure(Im...
admin/client/App/screens/Item/components/EditForm.js
webteckie/keystone
import React from 'react'; import { findDOMNode } from 'react-dom'; import moment from 'moment'; import { Button, Col, Form, FormField, FormInput, ResponsiveText, Row, Spinner, } from 'elemental'; import AlertMessages from '../../../shared/AlertMessages'; import ConfirmationDialog from './../../../shared/Confi...
src/HOCs/SetTextHOC.js
VGraupera/1on1tracker
import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import * as headerActions from '../actions/header'; /** * @description High Order Component for set Header * @param {XML} WrappedComponent * @param text * @return {XML} return react component * @c...
examples/with-devcert-https/src/client.js
jaredpalmer/razzle
import React from 'react'; import { hydrate } from 'react-dom'; import App from './App'; hydrate(<App />, document.getElementById('root')); if (module.hot) { module.hot.accept(); }
src/parser/monk/mistweaver/modules/talents/ManaTea.js
fyruna/WoWAnalyzer
// Modified from Original Code by Blazyb and his Innervate module. import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import { formatNumber, formatThousands, formatPercentage } from 'common/format'; import TalentStatisticBox from 'interface/others/TalentStatisticBo...
__tests__/index.android.js
flasco/Reader_X
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/js/containers/App.js
pablo-puga/webpack-react-electron-minimal-setup
import React from 'react'; import { ConnectedRouter } from 'react-router-redux'; import { Provider } from 'react-redux'; import MainRoutes from '../routes'; const App = ({store, history}) => { return ( <Provider store={store}> <ConnectedRouter history={history}> <MainRoutes/> ...
static/src/components/islands/IslandSmall.js
andribja/airhornbot
// @flow import React from 'react'; import Constants from '../../Constants'; const islands = [ Constants.Image.ISLAND_SMALL_1, Constants.Image.ISLAND_SMALL_2, Constants.Image.ISLAND_SMALL_3, Constants.Image.ISLAND_SMALL_4, Constants.Image.ISLAND_SMALL_5, Constants.Image.ISLAND_SMALL_6 ]; type Props = { ...
__tests__/index.ios.js
connectordb/connectordb-android
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 /> ); });
BUILD/js/components_js/comments/img-comments.js
kevincaicedo/MyStore-Front-end
import React from 'react' export default class IconComment extends React.Component { constructor(props){ super(props) } render(){ return <div className="thumbnail"> <img className="img-responsive user-photo" src={this.props.urlimg} /> </div> } }
Libraries/CustomComponents/Navigator/Navigator.js
cosmith/react-native
/** * Copyright (c) 2013-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. * * Facebook,...
fixtures/ssr/src/components/Chrome.js
jordanpapaleo/react
import React, { Component } from 'react'; import './Chrome.css'; export default class Chrome extends Component { render() { const assets = this.props.assets; return ( <html lang="en"> <head> <meta charSet="utf-8" /> <meta name="viewport" content="width=device-width, initial...
src/client/main.js
nefa/Leeact
import React from 'react'; import Router from 'react-router'; import ReactDOM from 'react-dom'; import routes from './routes'; // TODO: break the css into multiple, per-component styles // require('../../assets/styles/main.scss') Router.run(routes, Router.HistoryLocation, (Handler) => { ReactDOM.render(<Handler /...
tests/components/ClientRow.spec.js
idealgardens/codeword
import React from 'react' import ClientRow from 'components/ClientRow/ClientRow' describe('(Component) ClientRow', () => { it('should exist', () => { }) })
src/Well.js
xiaoking/react-bootstrap
import React from 'react'; import classNames from 'classnames'; import BootstrapMixin from './BootstrapMixin'; const Well = React.createClass({ mixins: [BootstrapMixin], getDefaultProps() { return { bsClass: 'well' }; }, render() { let classes = this.getBsClassSet(); return ( <di...
packages/icons/src/md/image/Tune.js
suitejs/suitejs
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdTune(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M6 34v4h12v-4H6zm0-24v4h20v-4H6zm20 32v-4h16v-4H26v-4h-4v12h4zM14 18v4H6v4h8v4h4V18h-4zm28 8v-4H22v4h20zm-12-8h4v-4h8v-4h-8V6h-4v12z" /> </IconBase>...
fields/types/number/NumberFilter.js
codevlabs/keystone
import React from 'react'; import ReactDOM from 'react-dom'; import { FormField, FormInput, FormRow, FormSelect } from 'elemental'; const CONTROL_OPTIONS = [ { label: 'Exactly', value: 'equals' }, { label: 'Greater Than', value: 'gt' }, { label: 'Less Than', value: 'lt' }, { label: 'Between', value: 'between' } ]...
tests/view/components/dropdown.js
salesforce/refocus
/** * Copyright (c) 2016, salesforce.com, inc. * All rights reserved. * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or * https://opensource.org/licenses/BSD-3-Clause */ /** * tests/view/components/dropdown.js */ import { expect } from 'chai'; import R...
src/parser/shared/modules/spells/bfa/azeritetraits/UnstableCatalyst.js
fyruna/WoWAnalyzer
import React from 'react'; import SPELLS from 'common/SPELLS'; import { formatPercentage } from 'common/format'; import { calculateAzeriteEffects } from 'common/stats'; import AzeritePowerStatistic from 'interface/statistics/AzeritePowerStatistic'; import BoringSpellValueText from 'interface/statistics/components/Bori...
src/components/Sigmet/SigmetsCategory.spec.js
KNMI/GeoWeb-FrontEnd
import React from 'react'; import SigmetsCategory from './SigmetsCategory'; import { mount, shallow } from 'enzyme'; import { Card } from 'reactstrap'; describe('(Component) SigmetsCategory', () => { it('mount renders a SigmetsCategory', () => { const parameters = { location_indicator_mwo: 'EHDB', ac...
webapp/app/components/Users/Filters/TypeUser/index.js
EIP-SAM/SAM-Solution-Server
// // Radio button type user filters page user // import React from 'react'; import { ControlLabel, FormGroup, Col } from 'react-bootstrap'; import RadioGroup from 'components/RadioGroup'; import styles from 'components/Users/Filters/styles.css'; /* eslint-disable react/prefer-stateless-function */ export default cla...
src/containers/DevTools/DevTools.js
delwiv/saphir
import React from 'react'; import { createDevTools } from 'redux-devtools'; import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; export default createDevTools( <DockMonitor toggleVisibilityKey="ctrl-H" changePositionKey="ctrl-Q"> <LogMonitor /> </D...
node_modules/react-bootstrap/es/MenuItem.js
Chen-Hailin/iTCM.github.io
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 ...
app/javascript/mastodon/features/account_gallery/index.js
RobertRence/Mastodon
import React from 'react'; import { connect } from 'react-redux'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import { fetchAccount } from '../../actions/accounts'; import { refreshAccountMediaTimeline, expandAccountMediaTimeline } from '../../actions/timelines'; impo...
examples/js/sort/manage-sort-external-table.js
rolandsusans/react-bootstrap-table
/* eslint max-len: 0 */ /* eslint no-console: 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; prod...
packages/wix-style-react/src/StatusIndicator/test/StatusIndicator.visual.js
wix/wix-style-react
import React from 'react'; import { storiesOf } from '@storybook/react'; import StatusIndicator from '../StatusIndicator'; import { Cell, Layout } from '../../Layout'; storiesOf('StatusIndicator', module).add('default', () => ( <Layout cols={3}> <Cell span={1}> <StatusIndicator status="error" /> </Cell...
frontend/src/components/customStepper/StepButton.js
unicef/un-partner-portal
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { withStyles } from 'material-ui/styles'; import ButtonBase from 'material-ui/ButtonBase'; import StepLabel from './StepLabel'; const isLabel = child => child && child.type && child.type.muiName === 'StepLabel'...
src/components/common/svg-icons/notification/personal-video.js
abzfarah/Pearson.NAPLAN.GnomeH
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationPersonalVideo = (props) => ( <SvgIcon {...props}> <path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12z"/> </SvgIcon> ); Notifi...
src/index.js
SCantan/Typhoon
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import * as serviceWorker from './serviceWorker'; ReactDOM.render(<App />, document.getElementById('root')); // If you want your app to work offline and load faster, you can change // unregister() to register()...
ui/util/lazyImport.js
lbryio/lbry-app
import React from 'react'; let localStorageAvailable; try { localStorageAvailable = Boolean(window.localStorage); } catch (e) { localStorageAvailable = false; } export const lazyImport = (componentImport) => React.lazy(async () => { const pageHasAlreadyBeenForceRefreshed = localStorageAvailable ? JSON...
app/react-native/src/preview/index.js
nfl/react-storybook
/* eslint no-underscore-dangle: 0 */ import React from 'react'; import addons from '@storybook/addons'; import createChannel from '@storybook/channel-websocket'; import { EventEmitter } from 'events'; import StoryStore from './story_store'; import StoryKindApi from './story_kind'; import StoryView from './components/S...
src/index.js
danielzy95/mechanic-finder
import React from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter } from 'react-router-dom'; import './index.css'; import MechanicFinder from './MechanicFinder'; ReactDOM.render(( <BrowserRouter> <MechanicFinder /> </BrowserRouter> ), document.getElementById("app"));
app/components/footer/index.js
izonder/connect-4
import Style from './style.pcss'; import React from 'react'; export default class Footer extends React.Component { render() { return( <div className="footer"> <p>Copyright &copy; D. Morgachev, 2016</p> <p>izonder@gmail.com</p> </div> ); } ...
src/js/main.js
gonebusy/sample-react-app
import React from 'react'; import { render } from 'react-dom'; import App from './components/app'; render(<App />, document.getElementById('root'));
packages/react/src/components/ContentSwitcher/ContentSwitcher-test.js
carbon-design-system/carbon-components
/** * 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 ContentSwitcher from '../ContentSwitcher'; import Switch from '../Switch'; import { mount, shallow } from '...
app/javascript/mastodon/features/ui/components/compare_history_modal.js
cobodo/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import { FormattedMessage } from 'react-intl'; import { closeModal } from 'mastodon/actions/modal'; import emojify from 'mastodon/features/emoji/emoji'; impor...
EduChainApp/js/tabs/tasks/TaskList.js
bkrem/educhain
/** * TODO add partial FB src * * @flow */ 'use strict'; import React from 'react'; import { Text, View, Navigator, StyleSheet } from 'react-native'; import Header from '../../common/Header'; import GlobalStyles from '../../common/GlobalStyles'; import Loader from '../../common/Loader'; import Tas...
test/test_helper.js
dcpete/qtube-react
import _$ from 'jquery'; import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import jsdom from 'jsdom'; import chai, { expect } from 'chai'; import chaiJquery from 'chai-jquery'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import...
src/components/Header/Header.js
tlin108/chaf
/** * 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 withStyles from 'isom...
src/svg-icons/maps/directions-bus.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsDirectionsBus = (props) => ( <SvgIcon {...props}> <path d="M4 16c0 .88.39 1.67 1 2.22V20c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h8v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1.78c.61-.55 1-1.34 1-2.22V6c0-3.5-3.58-4-8...
definitions/npm/react-redux_v7.x.x/flow_v0.142.x-/test_useDispatch.js
splodingsocks/FlowTyped
// @flow import { describe, it } from 'flow-typed-test'; import React from 'react'; import { useDispatch } from 'react-redux'; type Action = {| type: 'action', |}; type Dispatch = Action => Action; describe('useDispatch', () => { it('returns type `Dispatch` which accepts only type `Action` as param', () => { ...
test/mapTree-test.js
KyleAMathews/react-motion
import mapTree from '../src/mapTree'; import React from 'react'; describe('mapTree', () => { it('should map numbers leaves correctly', () => { const add1 = (_, a) => a + 1; expect(mapTree(add1, 1)).toEqual(2); expect(mapTree(add1, [])).toEqual([]); expect(mapTree(add1, {})).toEqual({}); expect(ma...
src/svg-icons/communication/import-export.js
frnk94/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationImportExport = (props) => ( <SvgIcon {...props}> <path d="M9 3L5 6.99h3V14h2V6.99h3L9 3zm7 14.01V10h-2v7.01h-3L15 21l4-3.99h-3z"/> </SvgIcon> ); CommunicationImportExport = pure(CommunicationImpo...
modules/IndexRoute.js
chf2/react-router
import React from 'react' import invariant from 'invariant' import warning from 'warning' import { createRouteFromReactElement } from './RouteUtils' import { component, components, falsy } from './PropTypes' const { bool, func } = React.PropTypes /** * An <IndexRoute> is used to specify its parent's <Route indexRout...
lib/react/components/MarkdownEditor/MarkdownInput.js
bwyap/ptc-amazing-g-race
import React from 'react'; import PropTypes from 'prop-types'; import autobind from 'core-decorators/es/autobind'; @autobind class MarkdownInput extends React.Component { static propTypes = { onChange: PropTypes.func, readOnly: PropTypes.bool, src: PropTypes.string, disabled: PropTypes.bool } render() { ...
src/svg-icons/action/view-stream.js
hai-cea/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionViewStream = (props) => ( <SvgIcon {...props}> <path d="M4 18h17v-6H4v6zM4 5v6h17V5H4z"/> </SvgIcon> ); ActionViewStream = pure(ActionViewStream); ActionViewStream.displayName = 'ActionViewStream'; Acti...
src/components/Header.js
LopatkinEvgeniy/reduxTestSite
import React, { Component } from 'react'; import { Link } from 'react-router'; export default class Header extends Component { render() { return ( <ul className="menu"> <li> <Link className="menu__link" activeClassName="menu__link_active" to="/">Главная</Link> </li> <li> ...
client/components/project/project.js
cungen/itface
import * as $ from 'jquery'; import React, { Component } from 'react'; import Colors from 'material-ui/lib/styles/colors'; import Paper from 'material-ui/lib/paper'; import SelectField from 'material-ui/lib/select-field'; import MenuItem from 'material-ui/lib/menus/menu-item'; import TextField from 'material-ui/lib/tex...
app/demo/ChatScreen.js
1598692232/rn-xcf
/** * Created by bll on 2017/7/18. */ import React from 'react'; import { Button, Image, View, Text } from 'react-native'; class ChatScreen extends React.Component { static navigationOptions = { title:'聊天', }; render() { const {params} = this.props.navigation.state; return ( <View style={{background...
client/src/App.js
kvago36/graphql-relay
import React, { Component } from 'react'; import { Switch, Route } from 'react-router-dom' import HomePage from './modules/HomePage/HomePage'; import SinglePlace from './modules/SinglePlace/SinglePlace'; import RegistrationPage from './modules/Registration/RegistrationPage/RegistrationPage'; import UserPage from './mod...
node_modules/react-router/es6/withRouter.js
mbestwick/medication-search
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; import invariant from 'invariant'; import React from 'react';...
src/components/AppliedRoute.js
matapang/virtualraceph2
import React from 'react'; import { Route } from 'react-router-dom'; export default ({ component: C, props: cProps, ...rest }) => ( <Route {...rest} render={ props => <C {...props} {...cProps} /> } /> );
carbon-sample-v2/src/main/javascript/spa/src/routes.js
ShotaOd/Carbon
import React, { Component } from 'react'; import { Route, browserHistory } from 'react-router'; import App from './base/container/App'; import Todo from './todo/TodoContainer'; import { NotFoundContainer } from './error/index'; const rootRedirectTo = '/sample/rest'; class Redirect extends Component { transfer() { ...
classic/src/scenes/wbfa/generated/FASCloudUpload.pro.js
wavebox/waveboxapp
import React from 'react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faCloudUpload } from '@fortawesome/pro-solid-svg-icons/faCloudUpload' export default class FASCloudUpload extends React.Component { render () { return (<FontAwesomeIcon {...this.props} icon={faCloudUpload} />) } ...
src/components/AddRecipe.js
collinstommy/fcc-recipe-box
import React from 'react'; import { browserHistory } from 'react-router'; import IngredientList from './IngredientList'; import TextField from 'material-ui/TextField'; export default class AddRecipe extends React.Component { constructor(props) { super(props); this.addIngredient = this.addIngredient.bind(thi...
app/containers/HotelProfile/InputFieldRow.js
projectcashmere/admin
import React from 'react'; import styled from 'styled-components'; import { FormattedMessage } from 'react-intl'; import Input from 'components/Input'; import messages from 'containers/App/messages'; import RowWrapper from './RowWrapper'; import Label from './Label'; const ValidationErrorMessage = styled.div` font-s...
src/styled/SiteHeader.js
carlpeaslee/tictacturing
import React from 'react' import styled from 'styled-components' import {cyan500} from 'material-ui/styles/colors' const Container = styled.header` margin: auto; display: flex; flex-direction: row; justify-content: center; margin-bottom: 10px; ` const TextPart = styled.h1` display: flex; border-top: 2px...
src/components/Map.js
Tanachi/PollerBears
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { connect } from 'react-redux'; import { changeTraining, changeTime } from '../reducers/' import { bindActionCreators } from 'redux' import { Map, TileLayer, Marker, Popup } from 'react-leaflet'; import AddToCalendar from 'react-add-to-c...
packages/bonde-admin/src/components/editor-wysihtml/wysihtml-toolbar-create-link.js
ourcities/rebu-client
import PropTypes from 'prop-types' import React from 'react' import { connect } from 'react-redux' // // The content widget module it is not the perfect module to provide these actions. // Needs to refact to more abstract component like global reusable components module. // import * as ContentActions from '@/mobilizat...
app/javascript/flavours/glitch/features/composer/textarea/index.js
vahnj/mastodon
// Package imports. import PropTypes from 'prop-types'; import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { defineMessages, FormattedMessage, } from 'react-intl'; import Textarea from 'react-textarea-autosize'; // Components. import EmojiPicker from 'flavours/glitch/fe...
App/src/features/links/Links.js
DupK/dashboard-epitech
/** * Created by jules on 04/02/17. */ import React, { Component } from 'react'; import { observer } from 'mobx-react/native'; import { View, } from 'react-native'; import Link from './Link'; import Cell from './Cell'; /* L84 : Hack with size(0.01) */ @observer export default class Links extends Compo...
springboot/GReact/src/main/resources/static/app/components/calendar/components/DraggableEvent.js
ezsimple/java
import React from 'react' export default class DraggableEvent extends React.Component { componentDidMount() { $(this.refs.elementRef) .data('eventObject', this.props.event) .draggable({ zIndex: 999, revert: true, // will cause the event to go back to its revertDuration: 0 // ...
ui/src/js/common/footer/pages/Imprint.js
Dica-Developer/weplantaforest
import axios from 'axios'; import counterpart from 'counterpart'; import React, { Component } from 'react'; import EditLink from '../../../common/components/EditLink'; require('./imprint.less'); export default class Imprint extends Component { constructor() { super(); this.state = { imprint: [] };...
src/components/MiniInput/MiniInput.stories.js
InsideSalesOfficial/insidesales-components
import React from "react"; import styled from "styled-components"; import { storiesOf, action } from "@storybook/react"; import MiniInput from "./MiniInput"; import { renderThemeIfPresentOrDefault, wrapComponentWithContainerAndTheme, colors } from "../styles"; const Wrapper = styled.div` background-color: ${...
src/components/UnorderedList/UnorderedList-test.js
joshblack/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 UnorderedList from '../UnorderedList'; import ListItem from '../ListItem'; import { shallow } from 'enzyme'...
docs/app/Examples/collections/Message/Variations/MessageExampleFloatingProps.js
clemensw/stardust
import React from 'react' import { Message } from 'semantic-ui-react' const MessageExampleFloatingProps = () => ( <Message floating content='Way to go!' /> ) export default MessageExampleFloatingProps
src/components/Contentful/ContactPoint/index.js
ndlib/usurper
import React from 'react' import PropTypes from 'prop-types' import Image from 'components/Image' import PageLink from '../PageLink' import Librarians from 'components/Librarians' import ServicePoint from '../ServicePoint' import Related from '../Related' import { withErrorBoundary } from 'components/ErrorBoundary' co...
src/components/Auth/ChangePassword/ChangePassword.react.js
madhavrathi/chat.susi.ai
import React, { Component } from 'react'; import Paper from 'material-ui/Paper'; import RaisedButton from 'material-ui/RaisedButton'; import $ from 'jquery'; import './ChangePassword.css'; import PasswordField from 'material-ui-password-field'; import Dialog from 'material-ui/Dialog'; import PropTypes from 'prop-types'...
app/javascript/mastodon/features/compose/components/autosuggest_account.js
3846masa/mastodon
import React from 'react'; import Avatar from '../../../components/avatar'; import DisplayName from '../../../components/display_name'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; class AutosuggestAccount extends ImmutablePureComponen...
src/components/ReplOutputCrypto.js
boneskull/Mancy
import React from 'react'; import ReplCommon from '../common/ReplCommon'; import _ from 'lodash'; export default class ReplOutputCrypto extends React.Component { constructor(props) { super(props); this.state = { lock: true }; this.toggleLock = this.toggleLock.bind(this); this.encodeId = _.u...
src/parser/hunter/marksmanship/modules/talents/Volley.js
sMteX/WoWAnalyzer
import React from 'react'; import Analyzer from 'parser/core/Analyzer'; import SPELLS from 'common/SPELLS/index'; import SpellLink from "common/SpellLink"; import ItemDamageDone from 'interface/others/ItemDamageDone'; import { formatPercentage } from 'common/format'; import TalentStatisticBox from 'interface/others/T...
docs/src/examples/elements/Label/Groups/LabelExampleGroupTag.js
Semantic-Org/Semantic-UI-React
import React from 'react' import { Label } from 'semantic-ui-react' const LabelExampleGroupTag = () => ( <Label.Group tag> <Label as='a'>$10.00</Label> <Label as='a'>$19.99</Label> <Label as='a'>$24.99</Label> <Label as='a'>$30.99</Label> <Label as='a'>$10.25</Label> </Label.Group> ) export de...
src/Components/SectionTitle.js
jefferydutra/TestableModularReactTalk
import React from 'react'; require('./SectionTitle.css'); function SectionTitle({ children }) { return ( <h2 className="section-title">{children}</h2> ); } SectionTitle.propTypes = { children: React.PropTypes.string.isRequired }; module.exports = SectionTitle;
src/App.js
muchachada/crossword
import React, { Component } from 'react'; import { Button } from 'react-toolbox/lib/button' import { spring, Motion, presets } from 'react-motion' import { Board } from './crossword' import Controls from './components/Controls' import BoardComponent from './components/Board' import AppBar from 'react-toolbox/lib/app_ba...