path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
src/svg-icons/device/access-alarm.js
andrejunges/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceAccessAlarm = (props) => ( <SvgIcon {...props}> <path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-...
src/index.js
ronaldpereira/WoWAnalyzer
import React from 'react'; import { render } from 'react-dom'; import { install as installAnalytics } from 'common/analytics'; import 'interface/static/bootstrap/css/bootstrap.css'; import Root from './Root'; installAnalytics(); render(<Root />, document.getElementById('app-mount'));
public/index.js
ygkn/DJ-YAGICHAN-SYSTEM
import 'react-hot-loader/patch'; import { AppContainer } from 'react-hot-loader'; import 'babel-polyfill'; import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { Router } from '../redux-tower/lib/react'; import configureStore from './store'; const store = con...
js/components/Header/index.js
mxstbr/postcss.parts
import React from 'react'; import styled from 'styled-components'; import { colors } from '../../constants'; import Wrapper from './Wrapper'; import Link from './Link'; import Title from './Title'; import Subtitle from './Subtitle'; import Anchor from './AbsoluteAnchor'; const Logo = styled(Anchor)` right: initial...
src/components/ExternalLink.js
codeforboston/cliff-effects
import React from 'react'; /** Link that opens new tab */ const ExternalLink = function ({ href, children, ...otherProps }) { return ( <a href = { href } target = { `_blank` } { ...otherProps }> { children } </a> ); }; export { ExternalLink };
client/main.js
jcbages/prisoners-dilemma
import React from 'react'; import { Meteor } from 'meteor/meteor'; import { render } from 'react-dom'; import App from '../imports/ui/App.jsx'; Meteor.startup(() => { WebFont.load({ google: { families: ['Josefin Slab'] }, active: () => { render(<App />, document.getElementById('render-target')); } }); });...
src/js/components/TicTacToe.js
pablo-puga/webpack-react-electron-minimal-setup
import React, { Component } from 'react'; import { X, O } from '../reducers/tictactoe'; import '../../css/components/tictactoe.css'; function Square(props) { return ( <button className="square" onClick={props.onClick}> {props.value} </button> ); } class Board extends Component { ...
src/js/components/Carousel/stories/WithoutControls.js
HewlettPackard/grommet
import React from 'react'; import { Attraction, Car, TreeOption } from 'grommet-icons'; import { Grommet, Box, Carousel } from 'grommet'; export const NoControls = () => ( <Grommet> <Box align="center" pad="large"> <Carousel controls={false} play={1500}> <Box pad="xlarge" background="accent-1"> ...
src/js/containers/DeckList.js
MarcusWasTaken/ArmelloCards
import React from 'react' import DeckTab from '../components/DeckTab' import DeckStore from '../stores/DeckStore' import DeckActions from '../actions/DeckActions' const getState = () => { return { decks: DeckStore.getAll(), activeName: DeckStore.getActiveName() } } const DeckList = React.createClass({ ...
examples/Reactnative.js
Adrianteri/hello-worlds
import React, { Component } from 'react'; import { Text } from 'react-native'; export default class HelloWorldApp extends Component { render() { return ( <Text>Hello world!</Text> ); } }
src/containers/tests/Film.spec.js
adrianha/swapii
import React from 'react'; import { shallow } from 'enzyme'; import { expect } from 'chai'; import { Film } from '../Film'; describe('<Film />', () => { it('should have a class .film', () => { const props = { films: { detail: { title: 'A New Hope' } } }; expect(shall...
src/app/components/public/Header.js
cherishstand/OA-react
import React, { Component } from 'react'; import AppBar from 'material-ui/AppBar'; import IconButton from 'material-ui/IconButton'; import ArrowBaclIcon from 'material-ui/svg-icons/navigation/arrow-back'; import Settings from 'material-ui/svg-icons/action/settings'; import AccessTime from 'material-ui/svg-icons/device/...
app/jsx/account_settings/index.js
djbender/canvas-lms
/* * Copyright (C) 2018 - 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...
components/InteriorLeftNavList.js
hellobrian/carbon-components-react
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import classnames from 'classnames'; import InteriorLeftNavItem from './InteriorLeftNavItem'; import Icon from './Icon'; class InteriorLeftNavList extends Component { static propTypes = { className: PropTypes.string, children: Prop...
src/components/TextInputBEM/TextInputBEM.js
tlraridon/ps-react-train-tlr
import React from 'react'; import PropTypes from 'prop-types'; import Label from '../Label'; /** Text input with integrated label to enforce consistency in layout, error display, label placement, and required field marker. */ function TextInput({htmlId, name, label, type = "text", required = false, onChange, placehold...
github-battle-es6/app/components/App.js
josedab/react-exercises
import React from 'react'; import Popular from './Popular'; import {BrowserRouter as Router,Route, Switch} from 'react-router-dom'; import Nav from './Nav'; import Home from './Home'; import Battle from './Battle'; import Results from './Results'; class App extends React.Component { render() { return ( <R...
src/svg-icons/notification/system-update.js
tan-jerene/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationSystemUpdate = (props) => ( <SvgIcon {...props}> <path d="M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14zm-1-6h-3V8h-2v5H8l4 4 4-4z"/> </Sv...
tests/framework.spec.js
SHBailey/echo-mvp
import assert from 'assert' import React from 'react' import {mount, render, shallow} from 'enzyme' class Fixture extends React.Component { render () { return ( <div> <input id='checked' defaultChecked /> <input id='not' defaultChecked={false} /> </div> ) } } describe('(Framewo...
src/containers/challenges/Card/CardContainer.js
OlivierVillequey/hackathon
/** * Individual Challenge Card Container * * React Native Starter App * https://github.com/mcnamee/react-native-starter-app */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Actions } from 'react-native-router-flux'; // Actions import...
components/chip/__test__/index.spec.js
VACO-GitHub/vaco-components-library
import expect from 'expect'; import React from 'react'; import ReactDOM from 'react-dom'; import ReactTestUtils from 'react-addons-test-utils'; import { themr } from 'react-css-themr'; import { CHIP } from '../../identifiers.js'; import { chipFactory } from '../Chip'; import { tooltipFactory } from '../../tooltip'; co...
app/javascript/mastodon/components/display_name.js
kagucho/mastodon
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import escapeTextContentForBrowser from 'escape-html'; import emojify from '../emoji'; export default class DisplayName extends React.PureComponent { static propTypes = { account: ImmutablePropTypes.map.isRequired, }; re...
packages/core/src/components/Form/StarRating/StarRating.js
appearhere/bloom
// @flow import React, { Component } from 'react'; import cx from 'classnames'; import css from './StarRating.css'; import starCss from '../Star/Star.css'; import Star from '../Star/Star'; import RadioGroup from '../RadioGroup/RadioGroup'; type Props = { name: string, ratings: Array<number>, value: number, } ex...
src/index.js
paulmusso/webpack-boilerplate
import React from 'react'; import ReactDom from 'react-dom'; import App from './App'; import styles from './assets/styles/styles.less'; ReactDom.render( <App />, document.getElementById('app') );
src/LinearProgress/LinearProgress.spec.js
igorbt/material-ui
/* eslint-env mocha */ import React from 'react'; import {shallow} from 'enzyme'; import {assert} from 'chai'; import LinearProgress from './LinearProgress'; import getMuiTheme from '../styles/getMuiTheme'; describe('<LinearProgress />', () => { const muiTheme = getMuiTheme(); const shallowWithContext = (node) => ...
src/components/video_detail.js
viniciusmichelutti/react-videos
import React from 'react' const VideoDetail = ({video}) => { if (!video) return <div>Loading...</div>; const videoId = video.id.videoId; const url = `https://www.youtube.com/embed/${videoId}`; return ( <div className="video-detail col-md-8"> <div className="embed-responsive em...
dev/src/entry.js
RealScout/redux-infinite-scroll
import React from 'react'; import ReactDOM from 'react-dom'; import InfScroller from '../../src/ReduxInfiniteScroll'; class App extends React.Component { state = { numOfItems: 40, loadingMore: false }; _createData(numOfItems=this.state.numOfItems) { const data = []; for (var i=0; i < numOfItems...
docs/index.js
jie/douban-editor
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import {DoubanEditor} from 'douban-editor'; import '../dist/style.css' class MyDoubanEditor extends React.Component { constructor(props) { super(props); } render() { return <div className="container"> <...
packages/babel-plugin-remove-graphql-queries/src/__tests__/index.js
mingaldrichgan/gatsby
const babel = require(`babel-core`) const plugin = require(`../`) function matchesSnapshot(query) { const { code } = babel.transform(query, { presets: [`@babel/preset-react`], plugins: [plugin], }) expect(code).toMatchSnapshot() } it(`Transforms queries in <StaticQuery>`, () => { matchesSnapshot(` i...
docs/src/app/components/pages/components/Paper/ExampleSimple.js
lawrence-yu/material-ui
import React from 'react'; import Paper from 'material-ui/Paper'; const style = { height: 100, width: 100, margin: 20, textAlign: 'center', display: 'inline-block', }; const PaperExampleSimple = () => ( <div> <Paper style={style} zDepth={1} /> <Paper style={style} zDepth={2} /> <Paper style={s...
Realization/frontend/czechidm-acc/src/content/system/SystemProvisioningBreakConfigRecipientTable.js
bcvsolutions/CzechIdMng
import PropTypes from 'prop-types'; import React from 'react'; import { connect } from 'react-redux'; import _ from 'lodash'; // import { Basic, Advanced, Utils, Managers, Domain } from 'czechidm-core'; const ROLE_TYPE = 'roleType'; const IDENTITY_TYPE = 'identityType'; /** * Table of provisioning break recipient * *...
app/javascript/mastodon/features/compose/components/privacy_dropdown.js
dunn/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { injectIntl, defineMessages } from 'react-intl'; import IconButton from '../../../components/icon_button'; import Overlay from 'react-overlays/lib/Overlay'; import Motion from '../../ui/util/optional_motion'; import spring from 'react-motion/lib/spr...
renderer/components/Tab.js
markmarcelo/reactide
import React from 'react'; import PropTypes from 'prop-types'; const Tab = ({ name, setActiveTab, id, closeTab }) => { return ( <li className="texteditor tab" onClick={setActiveTab.bind(null, id)}> <div className="title">{name}</div> <div className="close-icon" onClick={closeTab.bind(null, id)} /> ...
src/svg-icons/device/access-time.js
xmityaz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceAccessTime = (props) => ( <SvgIcon {...props}> <path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-1...
app/components/events/comments/CommentItem.js
alexko13/block-and-frame
import React from 'react'; const Comment = (props) => { return ( <div className="comment"> <div className="content"> <a className="author">{props.username}</a> <div className="metadata"> <span className="date">{props.timeCreated}</span> </div> <div className="text"...
client/app/scripts/components/node-details/node-details-info.js
paulbellamy/scope
import React from 'react'; import { Map as makeMap } from 'immutable'; import MatchedText from '../matched-text'; import ShowMore from '../show-more'; import { formatDataType } from '../../utils/string-utils'; export default class NodeDetailsInfo extends React.Component { constructor(props, context) { super(pr...
app/jsx/course_settings/renderCSPSelectionBox.js
djbender/canvas-lms
/* * Copyright (C) 2019 - 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...
public/src/admin/admin.js
SLedunois/personal-website
import './admin.css'; import initOpbeat, { wrapRouter } from 'opbeat-react'; import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { Route, Switch, HashRouter } from 'react-router-dom'; import createBrowserHistory from 'history/createBrowserHistory'; import AdminPanel from './AdminPanel.r...
src/components/header.js
baltazarparra/modal
import React from 'react' import PropTypes from 'prop-types' const Header = ({pageActive, handleBack}) => ( <header className="header"> {pageActive === 'checkout' && <button className="header__button header__button--back" onClick={handleBack}> 〈 </button>} <h1 className="header__title">Assine o Sexlog VIP</h...
stories/Breadcrubms/ExampleUsingURL.js
skyiea/wix-style-react
import React from 'react'; import styles from './ExampleBreadcrumbs.scss'; import Breadcrumbs, {breadcrumbsPathFactory} from '../../src/Breadcrumbs/Breadcrumbs'; const items = breadcrumbsPathFactory('aa/bb/cc/dd'); const itemsAbsolute = breadcrumbsPathFactory('domain/names', 'http://www.wix.com', 'wix'); export defau...
app/init/routes.js
spleenboy/pallium
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './App'; import ProjectPage from '../project/ProjectPage'; import SettingsPage from '../settings/SettingsPage'; export default ( <Route path="/" component={App}> <IndexRoute component={ProjectPage} /> <Route path="/...
fields/types/number/NumberColumn.js
ratecity/keystone
import React from 'react'; import numeral from 'numeral'; import 'whatwg-fetch' import FormData from 'form-data'; import ItemsTableCell from '../../components/ItemsTableCell'; import ItemsTableValue from '../../components/ItemsTableValue'; import { FormInput } from '../../../admin/client/App/elemental'; var NumberColu...
docs/app/Examples/elements/Label/Content/LabelExampleLink.js
ben174/Semantic-UI-React
import React from 'react' import { Icon, Label } from 'semantic-ui-react' const LabelExampleLink = () => ( <Label as='a'> <Icon name='mail' /> 23 </Label> ) export default LabelExampleLink
CompositeUi/src/views/component/PageHeader.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 './../../scss/components/_page-hea...
src/components/PasswordInput/PasswordInput.spec.js
ibenavides/ps-react-ibenavides
import React from 'react'; import renderer from 'react-test-renderer'; import PasswordInput from './PasswordInput'; import {shallow} from 'enzyme'; test('', () =>{ const wrapper = shallow(<PasswordInput htmlId="test" name="test" value="" onChange={() => {}} showVisibilityToggle /> ); exp...
fields/types/geopoint/GeoPointColumn.js
ONode/keystone
import React from 'react'; import ItemsTableCell from '../../components/ItemsTableCell'; import ItemsTableValue from '../../components/ItemsTableValue'; var GeoPointColumn = React.createClass({ displayName: 'GeoPointColumn', propTypes: { col: React.PropTypes.object, data: React.PropTypes.object, }, renderValue...
src/svg-icons/places/free-breakfast.js
nathanmarks/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let PlacesFreeBreakfast = (props) => ( <SvgIcon {...props}> <path d="M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM4 19h16v2H4z"/> </SvgIcon> ); PlacesFre...
src/default-props.js
hangarlabs/hangar-react-slick
import React from 'react'; var defaultProps = { className: '', accessibility: true, adaptiveHeight: false, arrows: true, autoplay: false, autoplaySpeed: 3000, centerMode: false, centerPadding: '50px', cssEase: 'ease', customPaging: function(i) { return <button>{i + 1}</b...
src/App.js
mboperator/fractalTodoExample
import React, { Component } from 'react'; import { ModuleProvider } from 'redux-modules'; import generateStore from './store'; import TodoList from './components/TodoList'; // import todoSaga from './sagas/todos'; const store = generateStore(); // store.runSaga(todoSaga); export default class App extends Component { ...
src/utils/createContextWrapper.js
zerkms/react-bootstrap
import React from 'react'; /** * Creates new trigger class that injects context into overlay. */ export default function createContextWrapper(Trigger, propName) { return function (contextTypes) { class ContextWrapper extends React.Component { getChildContext() { return this.props.context; }...
examples/complex/src/routes.js
rocjs/roc-package-web-app-react
import React from 'react'; import Route from 'react-router/lib/Route'; import IndexRoute from 'react-router/lib/IndexRoute'; import App from './components/app'; import Main from './components/main'; import About from './components/about'; import Long from './components/long'; import Simple from './components/simple'; ...
src/svg-icons/notification/vibration.js
w01fgang/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationVibration = (props) => ( <SvgIcon {...props}> <path d="M0 15h2V9H0v6zm3 2h2V7H3v10zm19-8v6h2V9h-2zm-3 8h2V7h-2v10zM16.5 3h-9C6.67 3 6 3.67 6 4.5v15c0 .83.67 1.5 1.5 1.5h9c.83 0 1.5-.67 1.5-1.5v-15c0...
static/programming-tutorials-backup/src/pages/About.js
EdwardRees/EdwardRees.github.io
import React from 'react'; const About = () => ( <div> <h2>About</h2> </div> ); export { About };
client/reactComponents/Wall.js
iandeboisblanc/wikiMuseumVR
import React from 'react'; class Wall extends React.Component { constructor(props) { super(props); this.position = props.position || '0 0 0'; this.rotation = props.rotation || '0 0 0'; this.height = Number(props.height) || 4; this.width = Number(props.width) || 5; this.wallThickness = Number...
src/components/app.js
AikChun/react-redux-testing
import React, { Component } from 'react'; import CommentBox from './comment_box'; import CommentList from './comment_list'; export default class App extends Component { render() { return ( <div> <CommentBox /> <CommentList /> </div> ); } }
library/src/pivotal-ui-react/checkbox-dropdown/checkbox-dropdown.js
sjolicoeur/pivotal-ui
import React from 'react'; import PropTypes from 'prop-types'; import {Dropdown, DropdownItem} from 'pui-react-dropdowns'; // import {default as mixin} from 'pui-react-mixins'; import {Checkbox} from 'pui-react-checkbox'; function doNothing() { }; export class CheckboxDropdown extends React.Component { constructor...
vendor/tacit/src/styles/theme-decorator.js
vanHeemstraSystems/components
import React from 'react'; export default (customTheme) => { return function(Component) { return React.createClass({ childContextTypes: { muiTheme: React.PropTypes.object, }, getChildContext() { return { muiTheme: customTheme, }; }, render() { ...
src/svg-icons/notification/phone-paused.js
rscnt/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...
src/svg-icons/maps/local-florist.js
w01fgang/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalFlorist = (props) => ( <SvgIcon {...props}> <path d="M12 22c4.97 0 9-4.03 9-9-4.97 0-9 4.03-9 9zM5.6 10.25c0 1.38 1.12 2.5 2.5 2.5.53 0 1.01-.16 1.42-.44l-.02.19c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2....
src/routes/SingleEvent/components/SignupButton/SignupButton.js
athenekilta/ilmomasiina
import React from 'react'; import _ from 'lodash'; import signupState from '../../../../utils/signupStateText'; import './SignupButton.scss'; export class SignupButton extends React.Component { render() { const isOpen = this.props.isOpen; return ( <p> <button disabled={!isOpen} ...
packages/lore-mixins-infinite-scrolling/src/InfiniteScrolling.js
lore/lore
/* eslint no-undef: "off" */ /* eslint no-unused-vars: "off" */ import React from 'react'; import PropTypes from 'prop-types'; import _ from 'lodash'; export default function(options = {}) { const propName = options.propName; const modelName = options.modelName; if (!propName) { throw new Error('propName i...
src/routes.js
avantcontra/react-redux-custom-starter
import React from 'react'; import {IndexRoute, Route} from 'react-router'; import { isLoaded as isAuthLoaded, load as loadAuth } from './redux/actions/auth'; import { App, Chat, Home, Widgets, About, Login, LoginSuccess, Survey, NotFound, } from 'containers'; export default (store...
es/components/toolbar/toolbar-save-button.js
dearkaran/react-planner
import React from 'react'; import PropTypes from 'prop-types'; import IconSave from 'react-icons/lib/fa/floppy-o'; import ToolbarButton from './toolbar-button'; import { browserDownload } from '../../utils/browser'; import { unselectAll } from '../../utils/layer-operations'; export default function ToolbarSaveButton(_...
src/svg-icons/navigation/chevron-left.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NavigationChevronLeft = (props) => ( <SvgIcon {...props}> <path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/> </SvgIcon> ); NavigationChevronLeft = pure(NavigationChevronLeft); NavigationChevronLeft.dis...
react/Radio/Radio.demo.js
seekinternational/seek-asia-style-guide
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Radio from './Radio'; import Text from '../Text/Text'; import * as sketch from './Radio.sketch'; import demoStyles from './Radio.demo.less'; import classnames from 'classnames'; class RadioContainer extends Component { static propTy...
app/components/browserwarning/browserwarning.js
tidepool-org/blip
/** * Copyright (c) 2016, Tidepool Project * * This program is free software; you can redistribute it and/or modify it under * the terms of the associated License, which is identical to the BSD 2-Clause * License as published by the Open Source Initiative at opensource.org. * * This program is distributed in the...
components/animals/krajtaKobercova.adult.js
marxsk/zobro
import React, { Component } from 'react'; import { Text } from 'react-native'; import styles from '../../styles/styles'; import InPageImage from '../inPageImage'; import AnimalText from '../animalText'; import AnimalTemplate from '../animalTemplate'; const IMAGES = [ require('../../images/animals/krajtaKobercova/01...
server/sonar-web/src/main/js/apps/project-admin/deletion/Form.js
Builders-SonarSource/sonarqube-bis
/* * SonarQube * Copyright (C) 2009-2016 SonarSource SA * mailto:contact AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License...
examples/layer-list/app.js
jjmulenex/sdk
/** Demo of layer list in an SDK map. * * Contains a Map and demonstrates adding many types of layers * And a layer list component to manage the layers * */ import {createStore, combineReducers} from 'redux'; import React from 'react'; import ReactDOM from 'react-dom'; import {DragSource, DropTarget} from 'rea...
app/components/MessageButton/index.js
MameeV/suzette
/** * * MessageButton * */ import React from 'react'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import RaisedButton from 'material-ui/RaisedButton'; import TextField from 'Material-ui/TextField'; class MessageButton extends React.PureComponent { constructor(props){ ...
test/specs/elements/Loader/Loader-test.js
vageeshb/Semantic-UI-React
import faker from 'faker' import React from 'react' import Loader from 'src/elements/Loader/Loader' import { SUI } from 'src/lib' import * as common from 'test/specs/commonTests' describe('Loader', () => { common.isConformant(Loader) common.hasUIClassName(Loader) common.rendersChildren(Loader) common.propKey...
src/templates/tags.js
JoshBarr/joshbarr.github.io
import React from 'react' import SEO from '../components/seo' import Layout from '../components/layout' import { Link, graphql } from 'gatsby' import PostListing from '../components/PostListing' export default function Template({ pageContext, data, // this prop will be injected by the GraphQL query we'll write in ...
src/svg-icons/content/weekend.js
kasra-co/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentWeekend = (props) => ( <SvgIcon {...props}> <path d="M21 10c-1.1 0-2 .9-2 2v3H5v-3c0-1.1-.9-2-2-2s-2 .9-2 2v5c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2zm-3-5H6c-1.1 0-2 .9-2 2v2.15c1.16.41 2 1.51...
packages/babel-plugin-transform-react-pure-annotations/test/fixtures/react/cloneElement/input.js
babel/babel
import React from 'react'; React.cloneElement(React.createElement('div'));
app/javascript/mastodon/components/intersection_observer_article.js
codl/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import scheduleIdleTask from '../features/ui/util/schedule_idle_task'; import getRectFromEntry from '../features/ui/util/get_rect_from_entry'; import { is } from 'immutable'; // Diff these props in the "rendered" state const updateOnPropsForRendered = ['id...
src/components/Account.js
chatch/stellarexplorer
import React from 'react' import Col from 'react-bootstrap/lib/Col' import Glyphicon from 'react-bootstrap/lib/Glyphicon' import Grid from 'react-bootstrap/lib/Grid' import Panel from 'react-bootstrap/lib/Panel' import Row from 'react-bootstrap/lib/Row' import Table from 'react-bootstrap/lib/Table' import Tab from 'rea...
src/components/BigCalendarWrapper/components/BigCalendarServicePicker/BigCalendarServicePicker.js
TheModevShop/craft-app
import React from 'react'; import FlyOut from 'components/uiElements/FlyOut/FlyOut'; import Select from 'react-select'; import _ from 'lodash'; import 'react-day-picker/lib/style.css'; import './big-calendar-service-picker.less'; class BigCalendarServicePicker extends React.Component { constructor(...args) { sup...
src/components/property_image/property_image.spec.js
thoiberg/frontend-coding-exercise
import React from 'react' import {shallow} from 'enzyme' import {random} from 'utils/test' import {PropertyImage} from 'components' describe('<PropertyImage />', () => { const cxt = {} beforeEach(() => { cxt.mainImageUrl = random.string() cxt.wrapper = shallow(<PropertyImage mainImageUrl={cxt.mainImageU...
app/javascript/mastodon/features/notifications/index.js
danhunsaker/mastodon
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Column from '../../components/column'; import ColumnHeader from '../../components/column_header'; import { expandNotifications, scrollTopNotificati...
src/components/grid.js
nordsoftware/react-foundation
import React from 'react'; import PropTypes from 'prop-types'; import { HorizontalAlignments, VerticalAlignments } from '../enums'; import { GeneralPropTypes, FlexboxPropTypes, createClassName, generalClassNames, removeProps, objectKeys, isDefined } from '../utils'; /** * Row component. * * @param {Object} props *...
src/js/components/Carousel/stories/Controlled.js
HewlettPackard/grommet
import React from 'react'; import { Attraction, Car, TreeOption } from 'grommet-icons'; import { Grommet, Box, Button, Carousel, Text } from 'grommet'; export const Controlled = () => { const [activeSlide, setActiveSlide] = React.useState(2); return ( <Grommet> <Box align="center" pad="large"> ...
client/src/containers/TagList.js
richb-hanover/reactathon
import React from 'react'; export const TagList = () => ( <section> <h1>TODO: Update me</h1> </section> );
src/containers/CustomerEdit/CustomerEdit.js
kingpowerclick/kpc-web-backend
import React, { Component } from 'react'; import classNames from 'classnames'; import { Link } from 'react-router'; import { FilterPage, Breadcrumb, CustomerDetail } from 'components'; import { Tabs, Tab, Collapse } from 'react-bootstrap'; export default class CustomerEdit extends Component { constructor(...args) ...
src/components/Accounts.js
chatch/stellarexplorer
import React from 'react' import Grid from 'react-bootstrap/lib/Grid' import Row from 'react-bootstrap/lib/Row' import AccountTable from './AccountTable' class Accounts extends React.Component { render() { return ( <Grid> <Row> <AccountTable limit={10} /> </Row> </Grid> ...
src/lib/plugins/battery/critical.js
Hyperline/hyperline
import React from 'react' import Component from 'hyper/component' import SvgIcon from '../../utils/svg-icon' export default class Critical extends Component { render() { return ( <SvgIcon> <g fillRule="evenodd"> <g className='cpu-critical-icon'> <path d="M7,1 L9,1 L9,2 L7,2 L7...
app/components/OnResult.js
elyamad/brocantelab
import React from 'react'; import { ListGroupItem, ListGroup } from 'react-bootstrap'; var OnResult = React.createClass({ propsType: { visible: React.PropTypes.bool, value: React.PropTypes.string, // "success", "warning", "danger" headerMsg: React.PropTypes.string, contentMsg: React.PropTypes.string ...
src/app/components/StreamWidget/StreamDropZone.js
smitch88/multi-stream-twitch
import React from 'react'; import CheckIcon from 'react-icons/lib/md/check'; import PropTypes from 'prop-types'; import uuid from 'uuidv4'; import theme from '../../theme'; /* * Returns a component tht handles dragging a link into the frame and passes back * the stream data configuration. * * Currently only supports y...
src/pages/startegy/StrategyDetail.js
i-July/footballgo
import React, { Component } from 'react'; import { withRouter } from 'react-router-dom'; class StrategyDetail extends Component { render() { const id = this.props.match.params.id; return ( <div> <h2>这是战略{id}</h2> </div> ); } } export default withRouter(StrategyDetail);
test/test_helper.js
alxDiaz/reactFirstProject
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...
client/main.js
srojas19/feedback
import React from 'react'; import { Meteor } from 'meteor/meteor'; import { render } from 'react-dom'; import '../imports/startup/accounts-config.js'; import App from '../imports/ui/App.jsx'; Meteor.startup(() => { render(<App />, document.getElementById('render-target')); });
src/Controls/ControlBool.js
rpominov/react-demo
import React from 'react' import createReactClass from 'create-react-class' import T from 'prop-types' import Group from './Group' import InputCheckbox from './InputCheckbox' export default createReactClass({ displayName: 'Demo.Controls.ControlBool', propTypes: { name: T.string.isRequired, value: T.bool....
src/components/partials/Elements.js
MattMcFarland/codepix-client
import React from 'react'; import { Collapse } from 'react-bootstrap'; export const Button = ({ children, onClick, kind = 'info' }) => ( <button onClick={onClick} type='button' className={'btn btn-' + kind}> {children} </button> ); export const Icon = ({ name }) => ( <span className={'icon icon-...
modules/genomic_browser/jsx/genomicBrowserIndex.js
kongtiaowang/Loris
import React from 'react'; import PropTypes from 'prop-types'; import {TabPane, Tabs} from 'jsx/Tabs'; import Profiles from './tabs_content/profiles'; import GWAS from './tabs_content/gwas'; import SNP from './tabs_content/snp'; import CNV from './tabs_content/cnv'; import Methylation from './tabs_content/methylation';...
components/Toggle/Toggle.js
zendesk/linksf
import React from 'react' import s from './Toggle.css' const Toggle = (props) => ( <div className={`${s.switch} ${props.disabled ? s.disabled : ''}`} tabIndex="0" onMouseUp={(e) => props.onMouseUp && props.onMouseUp(e)} > <div className={s.mask}> <div className={`${s.container} ${props.on ? s...
src/js/layout/MainPanel.js
Robert-W/esri-react-prerender
import {Map} from 'js/map/Map'; import React from 'react'; export class MainPanel extends React.Component { render () { return ( <div className='app-body'> <Map /> </div> ); } }
src/client/demo4/select.js
hihl/react-demo
import React from 'react'; import res from '../../data.json'; const adminPartners = res.data.adminPartners; export default function Select() { return ( <select> { adminPartners.map(partner => <option key={partner.partnerCode} value={partner.partnerCode}>{partner.displayName}</option>) } <...
src/CHANGELOG.js
enragednuke/WoWAnalyzer
import React from 'react'; import { Anomoly, blazyb, Dyspho, fasib, Fyruna, Gurupitka, Juko8, Mamtooth, sref, Versaya, Yuyz0112, Zerotorescue, Hartra344, Putro, Sharrq } from 'MAINTAINERS'; import Wrapper from 'common/Wrapper'; import ItemLink from 'common/ItemLink'; import ITEMS from 'common/ITEMS'; import SPELLS fro...
app/components/Toggle/index.js
rlagman/raphthelagman
/** * * LocaleToggle * */ import React from 'react'; import PropTypes from 'prop-types'; import Select from './Select'; import ToggleOption from '../ToggleOption'; function Toggle(props) { let content = <option>--</option>; // If we have items, render them if (props.values) { content = props.values.ma...
src/components/Tooltip/Tooltip.js
nolawi/champs-dialog-sg
/** * Copyright 2017 dialog LLC <info@dlg.im> * @flow */ import React, { Component } from 'react'; import { Text } from '@dlghq/react-l10n'; import Trigger from '../Trigger/Trigger'; import classNames from 'classnames'; import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'; import styles from '...
packages/react-devtools-shared/src/hooks/__tests__/__source__/ComponentWithExternalCustomHooks.js
facebook/react
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import React from 'react'; import useTheme from './useTheme'; export function Component() { const theme = useTheme(...
src/svg-icons/social/people-outline.js
owencm/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let SocialPeopleOutline = (props) => ( <SvgIcon {...props}> <path d="M16.5 13c-1.2 0-3.07.34-4.5 1-1.43-.67-3.3-1-4.5-1C5.33 13 1 14.08 1 16.25V19h22v-2.75c0-2.17-4.33-3.25-6.5-3.25zm-4 4.5h-10v-1.25c0-.54 2.56-1.7...