path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
ui/src/components/settings/SettingRow.js
yahoo/athenz
/* * Copyright 2020 Verizon Media * * 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...
src/routes.js
mihailgaberov/media-library
/** * Created by Mihail on 1/6/2017. */ import React from 'react' import { IndexRoute, Route } from 'react-router' import App from './components/App' import PhotosPage from './components/PhotosPage' import VideosPage from './components/VideosPage' export default ( <Route path="/" component={App}> <IndexRoute c...
code/workspaces/web-app/src/containers/adminResources/ProjectResources.spec.js
NERC-CEH/datalab
import React from 'react'; import { render } from '@testing-library/react'; import ProjectResources from './ProjectResources'; jest.mock('./ProjectNotebooks', () => props => (<>ProjectNotebooks Mock {JSON.stringify(props)}</>)); jest.mock('./ProjectSites', () => props => (<>ProjectSites Mock {JSON.stringify(props)}</>...
docs/src/app/components/pages/components/Drawer/Page.js
rscnt/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 drawerReadmeText from './README'; import DrawerSimpleExample from './Exam...
components/src/__tests__/MyProject.js
agrcrobles/react-native-web-workspace
import React from 'react'; import MyProject from './MyProject.js'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( <MyProject /> ); });
modules/__tests__/IndexRoute-test.js
Dodelkin/react-router
/*eslint-env mocha */ /*eslint react/prop-types: 0*/ import expect from 'expect' import React from 'react' import createHistory from 'history/lib/createMemoryHistory' import IndexRoute from '../IndexRoute' import Router from '../Router' import Route from '../Route' describe('an <IndexRoute/>', function () { const P...
front_end/src/pages/Reporting/Reporting-Reports.js
mozilla/splice
import React from 'react'; import {connect} from 'react-redux'; import moment from 'moment'; import Select from 'react-select'; import {Table} from 'react-tabular'; import {fetchCampaigns, fetchCampaign, campaignSetFilter} from 'actions/Campaigns/CampaignActions'; import {fetchAccounts} from 'actions/Accounts/Account...
app/javascript/mastodon/components/relative_timestamp.js
amazedkoumei/mastodon
import React from 'react'; import { injectIntl, defineMessages } from 'react-intl'; import PropTypes from 'prop-types'; const messages = defineMessages({ just_now: { id: 'relative_time.just_now', defaultMessage: 'now' }, seconds: { id: 'relative_time.seconds', defaultMessage: '{number}s' }, minutes: { id: 'relat...
src/svg-icons/hardware/gamepad.js
pancho111203/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareGamepad = (props) => ( <SvgIcon {...props}> <path d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z"/> </SvgIcon> ); HardwareGamepad = pure(Hardw...
src/component.js
jxnblk/cxs
import _cxs from './index' import PropTypes from 'prop-types' import React from 'react' const h = React.createElement function cxs (C) { return (...args) => { const Comp = (props, context = {}) => { const stylePropKeys = [ ...Object.keys(Comp.propTypes || {}), 'css' ] const sty...
node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js
bps-in/photo-share
import React from 'react'; import { render } from 'react-dom'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; render(<HelloWorld />, document.getElementById('react-root'));
docs/site/src/demos/tabs/IconTabs.js
und3fined/material-ui
// @flow weak import React, { Component } from 'react'; import Paper from 'material-ui/Paper'; import Tabs from 'material-ui/Tabs'; import Tab from 'material-ui/Tabs/Tab'; import PhoneIcon from 'material-ui/svg-icons/phone'; import FavoriteIcon from 'material-ui/svg-icons/favorite'; import PersonPinIcon from 'material...
src/scripts/ui/components/pages/login/form.js
ziflex/react-app-starter
import React from 'react'; import cn from 'classnames'; import DataSourceMixin from '../../mixins/data-source-mixin'; import { signin as signinCss } from './form.css'; const USERNAME_PATH = ['data', 'username']; const IS_DONE_PATH = ['data', 'authenticated']; export default React.createClass({ propTypes: { ...
docs/src/app/components/pages/components/List/ExampleSimple.js
rscnt/material-ui
import React from 'react'; import MobileTearSheet from '../../../MobileTearSheet'; import {List, ListItem} from 'material-ui/List'; import ContentInbox from 'material-ui/svg-icons/content/inbox'; import ActionGrade from 'material-ui/svg-icons/action/grade'; import ContentSend from 'material-ui/svg-icons/content/send'; ...
packages/faceted-search/src/components/FacetedManager/FacetedManager.component.js
Talend/ui
import React from 'react'; import PropTypes from 'prop-types'; import { useTranslation } from 'react-i18next'; import { I18N_DOMAIN_FACETED_SEARCH } from '../../constants'; import { FacetedSearchProvider } from '../context/facetedSearch.context'; const FacetedManager = ({ children, id, inProgress, error }) => { const...
packages/xo-web/src/xo-app/jobs/edit/index.js
vatesfr/xo-web
import New from '../new' import React from 'react' export default props => <New id={props.routeParams.id} />
src/components/Blog/BlogAuthor/BlogAuthor/BlogAuthor.js
easingthemes/notamagic
import React from 'react'; /** * React pure component. * * @author dfilipovic * @namespace ReactApp * @class BlogAuthor * @extends ReactApp */ export const BlogAuthor = (props) => ( <div className="blog-post-author mb50 pt30 bt-solid-1"> <img src={props.author.avatar} className="img-circle" alt={pro...
examples/todomvc/index.js
bnwan/redux
import 'babel-core/polyfill'; import React from 'react'; import { Provider } from 'react-redux'; import App from './containers/App'; import configureStore from './store/configureStore'; import 'todomvc-app-css/index.css'; const store = configureStore(); React.render( <Provider store={store}> {() => <App />} ...
library/src/pivotal-ui-react/expander/expander.js
sjolicoeur/pivotal-ui
import React from 'react'; import PropTypes from 'prop-types'; import {Collapsible} from 'pui-react-collapsible'; export class ExpanderTrigger extends React.Component { constructor(props, context) { super(props, context); this.state = {}; } setTarget = target => this.setState({target}) toggleExpander...
index.android.js
ihor/ReactNativeCodeReuseExample
import React from 'react'; import { AppRegistry } from 'react-native'; import App from './app/components/App'; AppRegistry.registerComponent('ReactNativeCodeReuse', () => App);
src/elements/List/ListList.js
shengnian/shengnian-ui-react
import cx from 'classnames' import PropTypes from 'prop-types' import React from 'react' import { childrenUtils, customPropTypes, getElementType, getUnhandledProps, META, useKeyOnly, } from '../../lib' /** * A list can contain a sub list. */ function ListList(props) { const { children, className, cont...
imports/ui/components/mes-can-fine.js
gagpmr/app-met
import React from 'react'; import ReactDOM from 'react-dom'; import { Loading } from './loading.js'; export const MesCanFine = React.createClass({ getInitialState() { return null; }, getFine() { var seltext = this.refs.month_dd.selectedOptions[0].innerText; for (var i = 0; i < this.props.fines.length; i+...
src/js/Containers/NavigationContainer.js
RoyalSix/myBiolaApp
import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, Image, TextInput, ListView, TouchableHighlight } from 'react-native'; const timer = require('react-native-timer'); import { connect } from 'react-redux' import ChapelContainer from './C...
frontend/src/app/components/ExperimentCardList.js
mathjazz/testpilot
import React from 'react'; import ExperimentRowCard from './ExperimentRowCard'; import Loading from './Loading'; import LayoutWrapper from './LayoutWrapper'; export default class ExperimentCardList extends React.Component { getExperiments() { if (!this.props.except) { return this.props.experiments; } ...
Paths/React/05.Building Scalable React Apps/1-react-boilerplate-building-scalable-apps-m1-exercise-files/Before/app/components/List/index.js
phiratio/Pluralsight-materials
import React from 'react'; import styles from './styles.css'; function List(props) { const ComponentToRender = props.component; let content = (<div></div>); // If we have items, render them if (props.items) { content = props.items.map((item, index) => ( <ComponentToRender key={`item-${index}`} item...
packages/p2p-chat/src/layouts/DevTools.js
dgeibi/p2p-chat
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 theme="tomorrow" /> ...
examples/ssr-caching/pages/blog.js
nahue/next.js
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 eiusmod tem...
app/jsx/grading/SearchGradingPeriodsField.js
djbender/canvas-lms
/* * Copyright (C) 2016 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
src/js/components/ui/forms/HorizontalTextarea.js
knowncitizen/tripleo-ui
/** * Copyright 2017 Red Hat 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 to...
src/components/input.spec.js
cskeppstedt/kartografen
import React from 'react' import Input from './input' import { shallow } from 'enzyme' describe('input', () => { it('should be a div', () => { const wrapper = shallow(<Input />) expect(wrapper.type()).toEqual('div') }) it('should have correct class names', () => { const wrapper = shallow(<Input />) ...
packages/bonde-admin/src/community/components/dns/domain-step/index.js
ourcities/rebu-client
import PropTypes from 'prop-types' import React from 'react' if (require('exenv').canUseDOM) require('./styles.scss') const DomainStep = ({ children, title, step, isValid }) => { const icon = isValid ? ( <span className='circle valid'><i className='fa fa-check' /></span> ) : ( <span className='circle bg-p...
rest-ui-scripts/template/src/resources/Comment/crud/list/Grid.js
RestUI/create-rest-ui-app
import React from 'react'; import { DateField, EditButton, ReferenceField, TextField } from 'rest-ui/lib/mui'; import { Card, CardActions, CardHeader, CardText } from 'material-ui/Card'; import PersonIcon from 'material-ui/svg-icons/social/person'; import Avatar from 'material-ui/Avatar'; import { translate } from 'res...
docs/src/components/CodeSnippet/CodeSnippet.js
fpoumian/react-devicon
import React from 'react' import PropTypes from 'prop-types' import Highlight from 'react-highlight' import 'highlight.js/styles/dracula.css' const CodeSnippet = ({ children, className }) => { return <Highlight className={className}> {children} </Highlight> } CodeSnippet.propTypes = { children: PropTypes.node, ...
app/javascript/mastodon/components/avatar.js
koba-lab/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { autoPlayGif } from '../initial_state'; export default class Avatar extends React.PureComponent { static propTypes = { account: ImmutablePropTypes.map.isRequired, size: PropType...
app/javascript/mastodon/features/ui/components/bundle_column_error.js
Craftodon/Craftodon
import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; import Column from './column'; import ColumnHeader from './column_header'; import ColumnBackButtonSlim from '../../../components/column_back_button_slim'; import IconButton from '../../../components/...
packages/ringcentral-widgets/components/Eula/index.js
u9520107/ringcentral-js-widget
import React from 'react'; import PropTypes from 'prop-types'; import i18n from './i18n'; function Eula(props) { let labelId = 'eula'; let link; const isFr = props.currentLocale.substr(0, 2).toLowerCase() === 'fr'; switch (props.brandId) { case '3420': // att link = 'https://asecare.att.com/tutorial...
imports/ui/admin/components/experts.js
dououFullstack/atomic
import React from 'react'; import { browserHistory } from 'react-router'; import Loading from '/imports/ui/loading'; import Table from './expert_table'; class _Component extends React.Component { constructor(props) { super(props); this.state = {type: this.props.type}; this.handleTab.bind(this); } ha...
src/icons/SocialYen.js
fbfeix/react-icons
import React from 'react'; import IconBase from './../components/IconBase/IconBase'; export default class SocialYen extends React.Component { render() { if(this.props.bare) { return <g> <path d="M448,32h-80L256,253.128L144,32H64l112.368,208H128v48h73.564L216,319v17h-88v48h88v96h80v-96h88v-48h-88v-17l14.891-31H384...
src/js/components/icons/base/Grid.js
linde12/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...
client/src/templates/select-field.js
brandiqa/open-lims
import React from 'react'; import { observer } from 'mobx-react'; import { Form } from 'semantic-ui-react'; import classnames from 'classnames'; export default observer(({field}) => ( <Form.Field className={classnames({error:field.error})}> <label htmlFor={field.id}> {field.label} {field.rules.indexOf('req...
examples/relay-treasurehunt/js/app.js
gabelevi/relay
/** * This file provided by Facebook is for non-commercial testing and evaluation * purposes only. Facebook reserves all rights not expressly granted. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNES...
app/javascript/mastodon/features/compose/components/character_counter.js
robotstart/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { length } from 'stringz'; class CharacterCounter extends React.PureComponent { checkRemainingText (diff) { if (diff < 0) { return <span className='character-counter character-counter--over'>{diff}</span>; } return <span classNa...
blueprints/view/files/__root__/views/__name__View/__name__View.js
murrayjbrown/react-redux-rxjs-stampit-babylon-universal
import React from 'react' type Props = { }; export class <%= pascalEntityName %> extends React.Component { props: Props; render () { return ( <div></div> ) } } export default <%= pascalEntityName %>
app/javascript/mastodon/components/domain.js
glitch-soc/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import IconButton from './icon_button'; import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; const messages = defineMessages({ unblockDomain: { id: 'account.unblock_domain', default...
src/website/app/BaselineGrid.js
mineral-ui/mineral-ui
/* @flow */ import styled from '@emotion/styled'; import React from 'react'; import { withRouter } from 'react-router'; type Props = { fontSize?: number, // px lineHeight?: number, // unitless, location?: any, offset?: number // px }; const Root = styled('div')(({ fontSize, lineHeight, offset, theme }) => { ...
src/collections/Form/FormSelect.js
Semantic-Org/Semantic-UI-React
import PropTypes from 'prop-types' import React from 'react' import { getElementType, getUnhandledProps } from '../../lib' import Select from '../../addons/Select' import Dropdown from '../../modules/Dropdown' import FormField from './FormField' /** * Sugar for <Form.Field control={Select} />. * @see Form * @see S...
src/components/VmDetails/cards/DetailsCard/CloudInit/SysprepForm.js
mareklibra/userportal
import React from 'react' import PropTypes from 'prop-types' import { FormControl, ControlLabel, FormGroup, } from 'patternfly-react' import { msg } from '_/intl' import SelectBox from '../../../../SelectBox' import timezones from '_/components/utils/timezones.json' const SysprepForm = ({ idPrefix, vm, onChange ...
react/features/base/toolbox/components/web/ToolboxButtonWithIconPopup.js
jitsi/jitsi-meet
// @flow import React from 'react'; import { Icon } from '../../../icons'; import { Popover } from '../../../popover'; type Props = { /** * Whether the element popup is expanded. */ ariaExpanded?: boolean, /** * The id of the element this button icon controls. */ ariaControls?: ...
src/screens/NewWorks/UserNewWorks.js
alphasp/pxview
import React, { Component } from 'react'; import { View, StyleSheet } from 'react-native'; import NewIllusts from './NewIllusts'; import NewMangas from './NewMangas'; import NewNovels from './NewNovels'; import { connectLocalization } from '../../components/Localization'; import Pills from '../../components/Pills'; imp...
tests/api-react/user/1-User.js
keystonejs/keystone-test-project
import Domify from 'react-domify'; import React from 'react'; import api from '../../../client/lib/api'; import styles from '../../../client/lib/styles'; const Test = React.createClass({ displayName: 'Create User', getInitialState () { return { action: 'Start Test', data: { name: '', email: '', ...
src/svg-icons/image/leak-add.js
barakmitz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageLeakAdd = (props) => ( <SvgIcon {...props}> <path d="M6 3H3v3c1.66 0 3-1.34 3-3zm8 0h-2c0 4.97-4.03 9-9 9v2c6.08 0 11-4.93 11-11zm-4 0H8c0 2.76-2.24 5-5 5v2c3.87 0 7-3.13 7-7zm0 18h2c0-4.97 4.03-9 9-9v-2c-...
jqwidgets/jqwidgets-react/react_jqxdraw.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 JqxDraw extends React.Component { componentDidMount() { let options = this.manageAtt...
test/CollapsibleNavSpec.js
cgvarela/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Navbar from '../src/Navbar'; import CollapsibleNav from '../src/CollapsibleNav'; import Nav from '../src/Nav'; import NavItem from '../src/NavItem'; describe('CollapsibleNav', () => { it('Should create div and add collapse class...
admin/client/App/screens/Item/components/EditFormHeader.js
Pop-Code/keystone
import React from 'react'; import { findDOMNode } from 'react-dom'; import { connect } from 'react-redux'; import Toolbar from './Toolbar'; import ToolbarSection from './Toolbar/ToolbarSection'; import EditFormHeaderSearch from './EditFormHeaderSearch'; import { Link } from 'react-router'; import Drilldown from './Dr...
src/main_prod.js
ShankarSumanth/lean-react
import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/App'; ReactDOM.render( <App />, document.getElementById( 'root' ) );
docs/app/Examples/views/Comment/Content/CommentExampleActions.js
aabustamante/Semantic-UI-React
import React from 'react' import { Comment, Icon } from 'semantic-ui-react' const CommentExampleActions = () => ( <Comment.Group> <Comment> <Comment.Avatar as='a' src='/assets/images/avatar/small/joe.jpg' /> <Comment.Content> <Comment.Author>Tom Lukic</Comment.Author> <Comment.Text> ...
lib/notebook-editor-view.js
jupyter/atom-notebook
'use babel'; import path from 'path'; import fs from 'fs-plus'; import File from 'pathwatcher'; import React from 'react'; import Immutable from 'immutable'; import {CompositeDisposable} from 'atom'; import {$, ScrollView} from 'atom-space-pen-views'; import NotebookCell from './notebook-cell'; export default class N...
shared/components/DemoApp/index.js
kennethtruong/react-webapp
import 'normalize.css/normalize.css'; import React from 'react'; import Switch from 'react-router-dom/Switch'; import Redirect from 'react-router-dom/Redirect'; import Route from 'react-router-dom/Route'; import './globals.scss'; import styles from './index.scss'; import AsyncHome from './AsyncHome'; import AsyncAbo...
es/components/PlaylistManager/SearchResults/index.js
welovekpop/uwave-web-welovekpop.club
import _jsx from "@babel/runtime/helpers/builtin/jsx"; import cx from 'classnames'; import React from 'react'; import PropTypes from 'prop-types'; import { translate } from 'react-i18next'; import { IDLE, LOADING, LOADED } from '../../../constants/LoadingStates'; import NoSearchResults from './NoSearchResults'; import ...
packages/material-ui-icons/src/RemoveCircle.js
dsslimshaddy/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let RemoveCircle = props => <SvgIcon {...props}> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z" /> </SvgIcon>; RemoveCircle = pure(RemoveCircle); RemoveCircle....
stories/PoweredBy.stories.js
algolia/react-instantsearch
import React from 'react'; import { storiesOf } from '@storybook/react'; import { PoweredBy } from 'react-instantsearch-dom'; import { WrapWithHits } from './util'; const stories = storiesOf('PoweredBy', module); stories.add('default', () => ( <WrapWithHits linkedStoryGroup="PoweredBy.stories.js"> <PoweredBy />...
node_modules/react-navigation/lib-rn/navigators/createNavigator.js
RahulDesai92/PHR
import React from 'react'; var babelPluginFlowReactPropTypes_proptype_NavigationRouteConfigMap = require('../TypeDefinition').babelPluginFlowReactPropTypes_proptype_NavigationRouteConfigMap || require('prop-types').any; var babelPluginFlowReactPropTypes_proptype_NavigationNavigatorProps = require('../TypeDefinition')...
docs/src/sections/CarouselSection.js
mmarcant/react-bootstrap
import React from 'react'; import Anchor from '../Anchor'; import PropTable from '../PropTable'; import ReactPlayground from '../ReactPlayground'; import Samples from '../Samples'; export default function CarouselSection() { return ( <div className="bs-docs-section"> <h2 className="page-header"> <...
docs/client/components/pages/Undo/CustomUndoEditor/index.js
dagopert/draft-js-plugins
import React, { Component } from 'react'; import { EditorState } from 'draft-js'; import Editor from 'draft-js-plugins-editor'; import createUndoPlugin from 'draft-js-undo-plugin'; import editorStyles from './editorStyles.css'; import buttonStyles from './buttonStyles.css'; const theme = { undo: buttonStyles.button,...
src/components/ActionParameters/index.js
DeveloperLaPoste/protagonist-react
import PropTypes from 'prop-types'; import React from 'react'; import { ActionParameter } from '../'; import './styles.css'; export default function ActionParameters({ parameters }) { const content = parameters && parameters.length ? ( <div className="ActionParameters-content"> <h4>Paramètres</h4> <...
src/svg-icons/maps/local-movies.js
frnk94/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalMovies = (props) => ( <SvgIcon {...props}> <path d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"/> </Svg...
6-material-ui/src/pages/Login.js
pirosikick/react-hands-on-20171023
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import RaisedButton from 'material-ui/RaisedButton'; import * as firebase from 'firebase'; class Login extends Component { static propTypes = { history: PropTypes.shape({ replace: PropTypes.func.isRequired, }).isRequired, }...
Realization/frontend/czechidm-acc/src/content/connectorserver/RemoteServerTable.js
bcvsolutions/CzechIdMng
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; // import { Advanced, Basic, Utils } from 'czechidm-core'; import uuid from 'uuid'; import { RemoteServerManager } from '../../redux'; const manager = new RemoteServerManager(); /** * Remote server with connectors. *...
src/components/common/CollectionTable.js
mitmedialab/MediaCloud-Web-Tools
import PropTypes from 'prop-types'; import React from 'react'; import { FormattedMessage, injectIntl } from 'react-intl'; import Link from 'react-router/lib/Link'; import FilledStarIcon from './icons/FilledStarIcon'; import LockIcon from './icons/LockIcon'; import messages from '../../resources/messages'; const Collec...
docs/app/Examples/collections/Menu/Content/Inputs.js
ben174/Semantic-UI-React
import React from 'react' import { Input, Menu } from 'semantic-ui-react' const Inputs = () => { return ( <Menu> <Menu.Item> <Input className='icon' icon='search' placeholder='Search...' /> </Menu.Item> <Menu.Item position='right'> <Input action={{ type: 'submit', content: 'Go'...
packages/react-scripts/fixtures/kitchensink/src/features/webpack/SvgInclusion.js
appier/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 logo from './assets/logo.svg'; export default () => <img id="feature-svg-inclusion" src={logo} alt="l...
index.android.js
stevenpan91/ChemicalEngineerHelper
import React, { Component } from 'react'; import { AppRegistry, Text, View, StyleSheet, Button, TouchableOpacity } from 'react-native'; import { StackNavigator } from 'react-navigation'; // Custom Components //import IosFonts from './app/components/IosFonts/IosFonts'; //unused import Logo from './app/compo...
redux-demo/todomvc/src/components/Header.spec.js
zhangjunhd/react-examples
import React from 'react' import TestUtils from 'react-addons-test-utils' import Header from './Header' import TodoTextInput from './TodoTextInput' const setup = () => { const props = { addTodo: jest.fn() } const renderer = TestUtils.createRenderer() renderer.render(<Header {...props} />) const output =...
src/views/App/App.spec.js
eyedea-io/mobx-react-leaf
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; it('renders', () => { const div = document.createElement('div'); ReactDOM.render(<App/>, div); });
internals/templates/app.js
haithemT/app-test
/** * app.js * * This is the entry file for the application, only setup and boilerplate * code. */ // Needed for redux-saga es6 generator support import 'babel-polyfill'; // Import all the third party stuff import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; impor...
examples/src/components/ListTodos.js
krasimir/hocbox
import React from 'react'; import { wire } from '../../../lib'; import Todo from './Todo'; class ListTodos extends React.Component { render() { const { todos } = this.props; return ( <div className='todoList'> { todos.map(todo => <Todo key={ todo.id} todo={ todo } />) } </div> ) } ...
app/javascript/mastodon/components/load_more.js
danhunsaker/mastodon
import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; export default class LoadMore extends React.PureComponent { static propTypes = { onClick: PropTypes.func, disabled: PropTypes.bool, visible: PropTypes.bool, } static defaultProps = { vi...
app/talk/discussion-preview.spec.js
zooniverse/Panoptes-Front-End
import React from 'react'; import assert from 'assert'; import {Link} from 'react-router'; import { shallow } from 'enzyme'; import DiscussionPreview from './discussion-preview'; const validProject = { id: 34, slug: 'test/project' }; const discussion = { id: 42, board_id: 3456, latest_comment: 1234 }; desc...
demo/src/index.js
subschema/subschema-devel
import React from 'react'; import { loader, ValueManager } from 'subschema'; import Index from './IndexPage.jsx'; import schema from './schema.json'; import createHistory from 'history/createHashHistory'; import { DynamicSchema } from 'subschema-plugin-demo'; import { NavigationForm } from 'subschema-plugin-navigation'...
src/components/GuideView/TriangleBar.js
recharts/recharts.org
import React from 'react'; import PropTypes from 'prop-types'; const getPath = (x, y, width, height) => `M${x},${y + height} C${x + width / 3},${y + height} ${x + width / 2},${y + height / 3} ${x + width / 2}, ${y} C${x + width / 2},${y + height / 3} ${x + (2 * width) / 3},${y + height} ${x + width}, ${y + hei...
packages/cf-component-label/src/Label.js
jroyal/cf-ui
import React from 'react'; import PropTypes from 'prop-types'; import { createComponent } from 'cf-style-container'; const styles = props => { const theme = props.theme; return { borderRadius: theme.borderRadius, color: theme.color, display: theme.display, fontSize: theme.fontSize, fontWeight: ...
src/js/components/SearchFilters/index.js
waagsociety/ams.datahub.client
import React from 'react' import { Feedback, SearchFiltersGroup, SearchTag } from '../' export default function SearchFilters({ props }) { const { search, view, route } = props.store const { focus } = view.FilterGroup const { metadata = [] } = search const className = ['content tags'].join(' ') const showSe...
frontend/src/Movie/MovieQuality.js
geogolem/Radarr
import PropTypes from 'prop-types'; import React from 'react'; import Label from 'Components/Label'; import { kinds } from 'Helpers/Props'; import formatBytes from 'Utilities/Number/formatBytes'; function getTooltip(title, quality, size, isMonitored, isCutoffNotMet) { const revision = quality.revision; if (revisi...
js/components/home/index.js
gectorat/react-native-app
import React, { Component } from 'react'; import { View, Text, TouchableOpacity, Modal } from 'react-native'; import { connect } from 'react-redux'; import firebase from 'firebase'; import Dimensions from 'Dimensions'; import NoItems from '../common/NoItemContentMsg'; import myTheme from '../../themes/base-theme'; im...
src/icons/SocialDropboxOutline.js
fbfeix/react-icons
import React from 'react'; import IconBase from './../components/IconBase/IconBase'; export default class SocialDropboxOutline extends React.Component { render() { if(this.props.bare) { return <g> <g> <path d="M177,77.1L64,151l78.3,63L256,143.2L177,77.1z M91.4,153.3l84.5-56.8l52.9,46L143.4,195L91.4,153.3z"></pat...
src/components/FeatureList/FeatureList.js
jhabdas/lumpenradio-com
import React from 'react'; import styles from './FeatureList.css'; import withStyles from '../../decorators/withStyles'; import Link from '../Link'; import FeatureItem from '../FeatureItem'; @withStyles(styles) class FeatureList extends React.Component { render() { let items = this.props.data.map((item, i) => {...
test/integration/Card/Card.spec.js
manchesergit/material-ui
/* eslint-env mocha */ import React from 'react'; import PropTypes from 'prop-types'; import {mount} from 'enzyme'; import {assert} from 'chai'; import getMuiTheme from 'src/styles/getMuiTheme'; import {Card, CardActions, CardHeader, CardText} from 'src/Card'; import FlatButton from 'src/FlatButton'; import OpenIcon fr...
src/pages/sections/Intro.js
andrewoh531/pristine-clean
import React from 'react' import styled from 'styled-components' import { Flex, Box } from '@rebass/grid' import { tablet, desktop } from '../../resources/media' const Container = styled(Flex)` height: 100vh; flex-direction: column; align-items: center; padding-top: 10rem; font-family: 'Raleway', sans-serif;...
app/javascript/mastodon/features/follow_recommendations/index.js
im-in-space/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import { FormattedMessage } from 'react-intl'; import { fetchSuggestions } from 'mastodon...
examples/babel-plugin-react-hot/index.js
LeoLeBras/redbox-react
import React from 'react' import App from './components/App' const root = document.getElementById('root') React.render(<App />, root)
src/components/ErrorAlert/__tests__/ErrorAlert.spec.js
instructure/canvas-planner
/* * Copyright (C) 2017 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
web/src/js/__tests__/components/FlowView/DetailsSpec.js
ddworken/mitmproxy
import React from 'react' import renderer from 'react-test-renderer' import Details, { TimeStamp, ConnectionInfo, CertificateInfo, Timing } from '../../../components/FlowView/Details' import { TFlow } from '../../ducks/tutils' let tflow = TFlow() describe('TimeStamp Component', () => { it('should render correctly...
node_modules/react-router/es/MemoryRouter.js
paul-brabet/tinkerlist
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call &...
src/js/axis.js
garygao12580/react_photo_wall
import React from 'react' import '../css/axis.less' import Rectangle from './rectangle' import Circle from './circle' class Axis extends React.Component { constructor(props) { super(props); } render() { let {items, offsetX, onLabelClick} = this.props; return <div className="axis"> ...
docs/client.js
jareth/react-materialize
import React from 'react'; import { Router } from 'react-router'; import ReactDOM from 'react-dom'; import createBrowserHistory from 'history/lib/createBrowserHistory'; import Root from './src/Root'; import routes from './src/Routes'; window.React = React; Root.propData = window.PROP_DATA; ReactDOM.render( <Route...
src/svg-icons/maps/add-location.js
IsenrichO/mui-with-arrows
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsAddLocation = (props) => ( <SvgIcon {...props}> <path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm4 8h-3v3h-2v-3H8V8h3V5h2v3h3v2z"/> </SvgIcon> ); MapsAddLocation = pure(Map...
src/components/postPanel/postPanel.js
BerndWessels/react-freezer-webpack
/** * Manapaho (https://github.com/manapaho/) * * Copyright © 2015 Manapaho. 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 Entities. */ import {getEntities, getC...
app/static/src/performer/FluidProfileForm.js
vsilent/Vision
import React from 'react'; import FormControl from 'react-bootstrap/lib/FormControl'; import FormGroup from 'react-bootstrap/lib/FormGroup'; import ControlLabel from 'react-bootstrap/lib/ControlLabel'; import Checkbox from 'react-bootstrap/lib/Checkbox'; import {findDOMNode} from 'react-dom'; import Panel from 'react-b...
react/EducationIcon/EducationIcon.js
seekinternational/seek-asia-style-guide
import svgMarkup from './EducationIcon.svg'; import React from 'react'; import Icon from '../private/Icon/Icon'; export default function EducationIcon(props) { return <Icon markup={svgMarkup} {...props} />; } EducationIcon.displayName = 'EducationIcon';
react/react-tutorial/src/components/App/App.js
xmementoit/practiseSamples
import React, { Component } from 'react'; import './App.css'; import Table from '../Table/Table'; import Form from '../Form/Form'; class App extends Component { state = { characters: [], } removeCharacter = index => { const { characters } = this.state this.setState({ characters: characters.f...