path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
packages/docs/components/Examples/counter/gettingStarted.js
nikgraf/draft-js-plugin-editor
// It is important to import the Editor which accepts plugins. import Editor from '@draft-js-plugins/editor'; import createCounterPlugin from '@draft-js-plugins/counter'; import React from 'react'; // Creates an Instance. At this step, a configuration object can be passed in // as an argument. const counterPlugin = cr...
app/app.js
asconwe/formulate
import React from 'react'; import ReactDOM from 'react-dom'; import Main from './components/Main.js' // const appRoot = document.getElementById('app'); ReactDOM.render(<Main />, document.querySelector("#app"));
docs/src/components/UseInput.js
HsuTing/cat-components
'use strict'; import React from 'react'; import PropTypes from 'prop-types'; import radium from 'radium'; import Button from 'cat-components/lib/button'; import Input, {inputConnect, inputCheck} from 'cat-components/lib/input-redux'; import * as style from './style/useInput'; const rules = [{ validator: 'isEmpty',...
src/app/containers/Search.js
blobor/skipass.site
import React from 'react' import { connect } from 'react-redux' import CardNumberForm from './CardNumberForm' import AddSkipassButton from './AddSkipassButton' import Skipass from '../components/Skipass' const Search = ({ error, skipass, isFetching }) => { return ( <section className='buka-skipass-search__conta...
modules/Redirect.js
jdelight/react-router
import React from 'react'; import invariant from 'invariant'; import { createRouteFromReactElement } from './RouteUtils'; import { formatPattern } from './PatternUtils'; import { falsy } from './PropTypes'; var { string, object } = React.PropTypes; /** * A <Redirect> is used to declare another URL path a client shou...
components/MainSection.spec.js
VadimKhoroshiltsev/resolve-boilerplate
import React from 'react'; import { createRenderer } from 'react-test-renderer/shallow'; import MainSection from './MainSection'; import TodoItem from './TodoItem'; import Footer from './Footer'; import { SHOW_ALL, SHOW_COMPLETED } from '../constants/TodoFilters'; const setup = propOverrides => { const props = Objec...
__tests__/app_test.js
SashaKoro/redux-tic-tac-toe
/* eslint-disable no-undef */ import React from 'react'; import { shallow } from 'enzyme'; import App from '../src/components/app'; describe('App', () => { it('is selectable by class name', () => { const wrapper = shallow(<App />); expect(wrapper.is('.App')).toBe(true); }); });
techstack/src/components/LibraryList.js
diegopoli/sample-react-native-projects
import React, { Component } from 'react'; import { ListView } from 'react-native'; import { connect } from 'react-redux'; import ListItem from './ListItem'; class LibraryList extends Component { // Initializes a datasource for the listview. componentWillMount() { const ds = new ListView.DataSource({ rowH...
test/ModalSpec.js
bvasko/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Modal from '../src/Modal'; import { render, shouldWarn } from './helpers'; describe('Modal', () => { let mountPoint; beforeEach(() => { mountPoint = document.createElement('div'); document.body.appendChild(mountPoint)...
src/client/app.js
summanerd/react-mortgage
import 'babel-polyfill'; import React from 'react'; import {render} from 'react-dom'; import {CompareCalculator} from './ui/widgets/calculator-comparison.jsx'; class App extends React.Component { render() { return ( <div> <CompareCalculator /> </div> ); ...
src/mixins/style-propable.js
Syncano/material-ui
import React from 'react'; import {mergeStyles, mergeAndPrefix} from '../utils/styles'; /** * This mixin isn't necessary and will be removed soon. DO NOT USE! * * All internal components that use this mixin should be switched to the * `styleUtils` that this mixin now wraps. Notice the method signature of * the `p...
client/acp/src/view/display/image-manager.js
NicolasSiver/nodebb-plugin-ns-awards
import classNames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; import * as LoaderEvents from '../../model/loader-events'; import RoundButton from './round-button'; import UploadService from '../../service/upload-service'; export default class ImageManager extends React.Component {...
local-cli/templates/HelloNavigation/views/welcome/WelcomeText.ios.js
htc2u/react-native
'use strict'; import React, { Component } from 'react'; import { StyleSheet, Text, View, } from 'react-native'; export default class WelcomeText extends Component { render() { return ( <View style={styles.container}> <Text style={styles.welcome}> Welcome to React Native! </...
examples/star-wars/js/app.js
tmitchel2/relay
/** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ import 'babel/pol...
src/svg-icons/device/battery-charging-50.js
ngbrown/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceBatteryCharging50 = (props) => ( <SvgIcon {...props}> <path d="M14.47 13.5L11 20v-5.5H9l.53-1H7v7.17C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V13.5h-2.53z"/><path fillOpacity=".3" d="M15.67 4H14V...
src/components/Header.js
pshrmn/cryptonite
import React from 'react'; import { Link } from '@curi/react'; import { connect } from 'react-redux'; import { graphql } from 'react-apollo'; import { USER_QUERY } from 'api/queries'; import LogoutLink from 'components/auth/LogoutLink'; import { star } from 'components/symbols'; import 'scss/header.scss'; function H...
src/containers/Root.js
panayi/calculator
import React from 'react' import { Provider } from 'react-redux' import { Router } from 'react-router' import ThemeManager from 'containers/ThemeManager' export default class Root extends React.Component { static propTypes = { history: React.PropTypes.object.isRequired, routes: React.PropTypes.element.isRequ...
desktop/apps/auction2/components/header/index.js
dblock/force
import { toggleListView, updateSort } from '../../actions' import classNames from 'classnames' import Grid from '../../../../components/main_layout/public/icons/grid.svg' import List from '../../../../components/main_layout/public/icons/list.svg' import FilterSort from '../filter_sort' import React from 'react' import ...
Demo/index.ios.js
githubdelegate/RNDemo
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, PixelRatio } from 'react-native'; var IndexView = require('./code/indexview'); var Navi = require('./code/navigator/navigatorDemo');...
modules/dreamview/frontend/src/components/StatusBar/Gears.js
ycool/apollo
import React from 'react'; import { observer } from 'mobx-react'; @observer export default class Gears extends React.Component { render() { const { electricityPercentage, currentGear, } = this.props; const gearAlphabet = (currentGear && currentGear !== 'GEAR_NONE') ? currentGear.charAt(5) :...
app/javascript/mastodon/features/compose/components/character_counter.js
3846masa/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { length } from 'stringz'; class CharacterCounter extends React.PureComponent { static propTypes = { text: PropTypes.string.isRequired, max: PropTypes.number.isRequired, }; checkRemainingText (diff) { if (diff < 0) { return...
app/javascript/mastodon/components/column_back_button_slim.js
tateisu/mastodon
import React from 'react'; import { FormattedMessage } from 'react-intl'; import ColumnBackButton from './column_back_button'; import Icon from 'mastodon/components/icon'; export default class ColumnBackButtonSlim extends ColumnBackButton { render () { return ( <div className='column-back-button--slim'> ...
front-end/src/component/home-photo/api-photo.js
axelmichael11/website
import './_home-photo.scss' import React from 'react' import {connect} from 'react-redux' import {Redirect} from 'react-router-dom' import Unsplash, {toJson} from 'unsplash-js' import {isLoadingAction, authorsAction, authorLinksAction, locationsAction, photosAction} from '../../actions/unsplash-photo.js' import * as ut...
src/js/components/Pokemons.js
ilken/PokePower
import React from 'react'; import Pokemon from './Pokemon'; import PokemonStore from '../stores/pokemon'; import * as PokemonActions from '../actions/PokemonActions'; import { initFireBaseConfig } from '../firebase'; export default class Pokemons extends React.Component { constructor () { super(); this.state = { ...
src/components/app.js
jamiller619/stockbar
import React, { Component } from 'react'; import { ipcRenderer } from 'electron'; import RhHelper from '../robinhood'; import FuzzyDate from '../assets/date'; import '../assets/styles/app.scss'; const opts = { API_UPDATE_INTERVAL: { MARKET_OPEN: 1000 * 10, // 10 seconds MARKET_CLOSED: 1000 * 60 * 5 ...
client/app/CommentList/components/QuestionForm_test.js
initiatived21/d21
import React from 'react' import { shallow } from 'enzyme' import QuestionForm from './QuestionForm' import { Form } from 'rform' describe('<QuestionForm />', function () { const props = { formData: {}, id: 5, isSubmitting: false, handleResponse: () => {}, afterResponse: () => {}, } it('shou...
src/layouts/index.js
clarkcarter/clark-carter
import React from 'react' import Link from 'gatsby-link' import Navigation from './Navigation' const Header = () => ( <div> <div> <h1 style={{display: 'inline', fontFamily: 'arial', fontWeight: 400, marginLeft: 2,}}>Clark Carter</h1> <Navigation /> </div> </div> ) const TemplateWrapper = ({ ch...
docs/src/app/components/pages/components/Chip/ExampleArray.js
pomerantsev/material-ui
import React from 'react'; import Chip from 'material-ui/Chip'; /** * An example of rendering multiple Chips from an array of values. Deleting a chip removes it from the array. * Note that since no `onTouchTap` property is defined, the Chip can be focused, but does not gain depth * while clicked or touched. */ exp...
test/DropdownMenuSpec.js
aparticka/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import DropdownMenu from '../src/DropdownMenu'; import MenuItem from '../src/MenuItem'; describe('DropdownMenu', function () { it('Should render menu correctly', function () { let Parent = React.createClass({ render(){ ...
tests/routes/Home/components/HomeView.spec.js
kolyaka006/imaginarium
import React from 'react' import { HomeView } from 'routes/Home/components/HomeView' import { render } from 'enzyme' describe('(View) Home', () => { let _component beforeEach(() => { _component = render(<HomeView />) }) it('Renders a welcome message', () => { const welcome = _component.find('h4') ...
src/sites/people.js
cosmowiki/cosmowiki
import React from 'react'; import PeopleComponent from '../components/people'; import Grouper from './helper/grouper'; export default class People { static fromRawData(rawData) { return rawData.map(raw => Person.fromRawData(raw)) } static componentWithData(people) { const groups = new Grouper(people).b...
components/Footer/index.js
incodeit/incodeit.github.io
import React from 'react' import { Link } from 'react-router' import { prefixLink } from 'gatsby-helpers' import style from './Footer.module.css' const now = new Date().getFullYear() const Footer = () => ( <footer className={style.container}> <span className={style.left}> <strong>&copy;2007-{now} Incode ...
router_tutorial/06-params/modules/Repo.js
Muzietto/react-playground
import React from 'react'; import Repos from './Repos'; export default React.createClass({ render() { return ( <div> {/* fucker paints like Repo was nested inside Repos (which is NOT!!!)*/} <Repos/> <h6>here under comes the repo name</h6> <h4>{this.props.params.repoName}</h4> ...
packages/reactor-conference-app/src/index.js
sencha/extjs-reactor
import 'babel-polyfill'; import React from 'react'; import App from './App'; // app components import { launch } from '@extjs/reactor'; import * as d3 from 'd3'; window.d3 = d3; // needed for ExtReact/D3 components launch(<App/>);
client/components/Header.js
caiquecaleiro/react-graphql-auth
import React, { Component } from 'react'; import { graphql } from 'react-apollo'; import { Link } from 'react-router'; import currentUserQuery from '../queries/currentUser'; import logoutMutation from '../mutations/logout'; class Header extends Component { onLogoutClick() { this.props.mutate({ refetchQuer...
app/containers/NotFoundPage/index.js
shafeeqonline/xt-quiz-app
/** * NotFoundPage * * This is the page we show when the user visits a url that doesn't have a route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a necessity for you then you can refactor it...
docs/src/app/components/pages/components/IconMenu/ExampleSimple.js
mtsandeep/material-ui
import React from 'react'; import IconMenu from 'material-ui/IconMenu'; import MenuItem from 'material-ui/MenuItem'; import IconButton from 'material-ui/IconButton'; import MoreVertIcon from 'material-ui/svg-icons/navigation/more-vert'; /** * Simple Icon Menus demonstrating some of the layouts possible using the `anc...
src/components/ShareUrl/ShareUrl.js
MinisterioPublicoRJ/inLoco-2.0
import React from 'react' import ClipboardButton from 'react-clipboard.js' /** * Filters layers using the `selected` property * @param {Object[]} layers - layers array * @returns {Object[]} - returns all layers that are selected */ const selectedLayers = (layers) => { if (!Array.isArray(layers)) { retu...
modules/react-markdown/src/helpers/getComponent.js
casesandberg/react-docs
'use strict' import React from 'react' import ReactCSS from 'reactcss' class H1 extends ReactCSS.Component { render() { return <h1>{ this.props.children }</h1> } } class H3 extends ReactCSS.Component { render() { return <h3>{ this.props.children }</h3> } } class P extends ReactCSS.Component { rend...
Paths/React/05.Building Scalable React Apps/1-react-boilerplate-building-scalable-apps-m1-exercise-files/Before/app/components/LoadingIndicator/index.js
phiratio/Pluralsight-materials
import React from 'react'; import styles from './styles.css'; function LoadingIndicator() { return ( <div> <div className={styles['sk-fading-circle']}> <div className={styles.skCircle}></div> <div className={styles['sk-circle2']}></div> <div className={styles['sk-circle3']}></div> ...
src/index.js
dr2009/demo-webpack2-react
/** * Created by dr2009 on 2017/1/24. */ import React from 'react' import ReactDOM from 'react-dom' // AppContainer is a necessary wrapper component for HMR import { AppContainer } from 'react-hot-loader' import App from './components/App' const render = (Component) => { ReactDOM.render( <AppContainer> ...
src/lib/headers/CustomDateHeader.js
namespace-ee/react-calendar-timeline
import React from 'react' import Interval from './Interval' export function CustomDateHeader({ headerContext: { intervals, unit }, getRootProps, getIntervalProps, showPeriod, data: { style, intervalRenderer, className, getLabelFormat, unitProp, headerData } }) { return ( <div ...
fields/types/localfile/LocalFileField.js
kwangkim/keystone
import Field from '../Field'; import React from 'react'; import { Button, FormField, FormInput, FormNote } from 'elemental'; module.exports = Field.create({ shouldCollapse () { return this.props.collapse && !this.hasExisting(); }, fileFieldNode () { return this.refs.fileField.getDOMNode(); }, changeFile ()...
src/svg-icons/toggle/check-box-outline-blank.js
mmrtnz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ToggleCheckBoxOutlineBlank = (props) => ( <SvgIcon {...props}> <path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/> </SvgIcon> ); ToggleCheckBoxOutlineBlank =...
src/Col.js
thealjey/react-bootstrap
import React from 'react'; import classNames from 'classnames'; import styleMaps from './styleMaps'; import CustomPropTypes from './utils/CustomPropTypes'; const Col = React.createClass({ propTypes: { /** * The number of columns you wish to span * * for Extra small devices Phones (<768px) * ...
src/containers/DevTools/DevTools.js
cellva/alluminate-temp-setup
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 /...
HomeRange/app/pages/home/achievement/component/achievement_middle.js
Onlyjson/yanShu_Project
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, Button, Image, TouchableOpacity, FlatList } from 'react-native'; import request from '../../../../utils/Request'...
app/containers/SettingsPage/index.js
zebbra-repos/Zeiterfassung-medi
/* * * SettingsPage * */ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { bindRoutineCreators } from 'redux-saga-routines'; import { createStructuredSelector } from 'reselect'; import Loader from 'react-loader...
src/routes/crmaccount/Modal.js
vincentdd/crm
import React from 'react' import PropTypes from 'prop-types' import moment from 'moment'; import { Form, Input, InputNumber, Radio, Modal, Cascader, DatePicker } from 'antd'; const { RangePicker } = DatePicker; const FormItem = Form.Item const formItemLayout = { labelCol: { span: 6, }, wrapp...
examples/export-image/app.js
boundlessgeo/sdk
/* global saveAs */ /** Demo of using the drawing, modify, and select interactions. * */ import {createStore, combineReducers, applyMiddleware} from 'redux'; import createSagaMiddleware from 'redux-saga'; import React from 'react'; import ReactDOM from 'react-dom'; import {Provider} from 'react-redux'; import Sdk...
frontend/src/js/test/components/pages/InGamePage.spec.js
udontknowmeapp/udontknowme
import expect from 'expect'; import React from 'react'; import TestUtils from 'react-addons-test-utils'; import { bindActionCreators } from 'redux'; import { setupShallowRender, setupRender } from '../../helpers'; import states from '../../../constants/stateConstants'; import InGamePage from '../../../pages/InGamePage'...
RNPublisherBanner.js
sbugert/react-native-admob
import { arrayOf, func, string } from 'prop-types'; import React, { Component } from 'react'; import { findNodeHandle, requireNativeComponent, UIManager, ViewPropTypes, } from 'react-native'; import { createErrorFromErrorData } from './utils'; class PublisherBanner extends Component { constructor() { sup...
node_modules/react-router-dom/es/Link.js
amosdesigns/fmintroreact
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; }; function _objectWithoutProperties(obj, keys) { var target = {...
app/javascript/mastodon/features/account_timeline/components/header.js
Kirishima21/mastodon
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import InnerHeader from '../../account/components/header'; import ImmutablePureComponent from 'react-immutable-pure-component'; import MovedNote from './moved_note'; import { FormattedMessage } fro...
src/routes/admin/Components/FroalaEditor/index.js
luanlv/comhoavang
/* global CKEDITOR */ import React from 'react'; import ReactResizeDetector from 'react-resize-detector'; import VisibilitySensor from 'react-visibility-sensor' class FroalaEditor extends React.Component { constructor(props) { super(props); this.state = { oldEditorSize: 0, isEndEditor: false ...
src/components/Checkbox/Checkbox.stories.js
austinknight/ui-components
import React from "react"; import { ThemeProvider } from "styled-components"; import { storiesOf } from "@storybook/react"; import Checkbox from "./"; import { colors } from "../styles/colors.js"; import { generateFlexedThemeBackground } from "../styles/index.js"; function wrapComponentWithContainerAndTheme(theme, C...
app/components/HotelAmenities/index.js
seanng/web-server
/** * * HotelAmenities * */ import React from 'react'; import styled from 'styled-components'; import { FormattedMessage } from 'react-intl'; import RightContainer from 'components/RightContainer' import services from './services.json'; import messages from './messages'; const containerStyle = { height: '170px', ...
src/containers/ComponentsLibrary.js
OssamaZ/canvas-play
import React from 'react'; import { connect } from 'react-redux'; import classnames from 'classnames'; import _ from 'lodash'; // Actions import { changeTheDrawingComponent } from '../actions/canvasActions'; const ComponentsLibrary = ({componentsList, activeDrawingComponent, changeTheDrawingComponent}) => <ul cla...
src/containers/Asians/TabControls/_components/RoomTypeChips/RoomTypeChip.js
westoncolemanl/tabbr-web
import React from 'react' import withStyles from 'material-ui/styles/withStyles' import Avatar from 'material-ui/Avatar' import Chip from 'material-ui/Chip' import * as utils from 'utils' const styles = theme => ({ root: { marginBottom: theme.spacing.unit }, irrelevantChip: { backgroundColor: theme.pal...
src/components/pickers/BankPicker.js
dkadrios/zendrum-stompblock-client
import React from 'react' import PropTypes from 'prop-types' import { withStyles, Radio, RadioGroup, FormControl, FormControlLabel } from '@material-ui/core' const styles = theme => ({ formControl: { margin: 0, }, group: { margin: `${theme.spacing.unit}px 0`, display: 'flex', flexFlow: 'row noWra...
nlyyAPP/component/MLActivityIndicatorView/MLActivityIndicatorView.js
a497500306/nlyy_APP
/** * Created by maoli on 16/10/9. */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, Image, TouchableOpacity, Platform, Switch, ActivityIndicator } from 'react-native'; var Dimensions = require('Dimensions'); var {width, height} = Dimension...
app/containers/LanguageProvider/index.js
be-oi/beoi-training-client
/* * * LanguageProvider * * this component connects the redux state language locale to the * IntlProvider component and i18n messages (loaded from `app/translations`) */ import React from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { IntlProvider } from 'reac...
docs/src/app/components/pages/components/Chip/ExampleSimple.js
ichiohta/material-ui
import React from 'react'; import Avatar from 'material-ui/Avatar'; import Chip from 'material-ui/Chip'; import FontIcon from 'material-ui/FontIcon'; import SvgIconFace from 'material-ui/svg-icons/action/face'; import {blue300, indigo900} from 'material-ui/styles/colors'; const styles = { chip: { margin: 4, },...
components/PokeRecord.js
intfrr/PokeMap
import React from 'react'; export default class PokeRecord extends React.Component{ render(){ return <li>{this.props.name}</li> } }
docs/app/Examples/elements/Step/States/StepExampleActive.js
mohammed88/Semantic-UI-React
import React from 'react' import { Icon, Step } from 'semantic-ui-react' const StepExampleActive = () => ( <Step.Group> <Step active> <Icon name='credit card' /> <Step.Content> <Step.Title>Billing</Step.Title> <Step.Description>Enter billing information</Step.Description> </Step...
src/ui/sidebar/component-selection/ArtWrapper.js
circuitsim/circuit-simulator
import React from 'react'; import {initCanvas, clearCanvas} from '../../diagram/render'; import Vector from 'immutable-vector2d'; const W = 50, H = W, S = 0.6; class ArtWrapper extends React.Component { constructor(props) { super(props); this.renderCanvas = this.renderCanvas.bind(this); } r...
demo-react/src/components/footer/footer.js
devonhackley/reacttt
import React, { Component } from 'react'; class Footer extends Component { render() { return ( <footer> BLAAAAH </footer> ); } } export default Footer;
node_modules/rc-switch/es/Switch.js
ZSMingNB/react-news
import _extends from 'babel-runtime/helpers/extends'; import _defineProperty from 'babel-runtime/helpers/defineProperty'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _createClass from 'babel-runtime/help...
src/svg-icons/device/access-alarm.js
rscnt/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-...
app/components/LoadingIndicator/index.js
react-boilerplate/react-boilerplate
import React from 'react'; import Circle from './Circle'; import Wrapper from './Wrapper'; const LoadingIndicator = () => ( <Wrapper> <Circle /> <Circle rotate={30} delay={-1.1} /> <Circle rotate={60} delay={-1} /> <Circle rotate={90} delay={-0.9} /> <Circle rotate={120} delay={-0.8} /> <Cir...
test/specs/shape/SymbolsSpec.js
sdoomz/recharts
import React from 'react'; import { expect } from 'chai'; import { Surface, Symbols } from 'recharts'; import { mount, render } from 'enzyme'; describe('<Symbols />', () => { it('Render 1 symbol', () => { const wrapper = render( <Surface width={400} height={400}> <Symbols cx={100} cy={100} size={10...
app/javascript/mastodon/features/follow_requests/index.js
KnzkDev/mastodon
import React from 'react'; import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debou...
app/components/Preschool/PreschoolActions.js
klpdotorg/tada-frontend
import React from 'react'; import PropTypes from 'prop-types'; const PreschoolActions = ({ toggleClassModal, showTeachers, hasPermissions }) => { return ( <div className="row"> <h4 className="text-primary col-md-9"> {!hasPermissions ? 'Modify Details' : 'View Details'} </h4> <div classN...
src/components/todo/TodoItem.js
ldimitrov/todo_react
import React from 'react'; import PropTypes from 'prop-types'; export const TodoItem = (properties) => { return ( <li> <input type="checkbox" defaultChecked={properties.isComplete} />{properties.name} </li> ) } TodoItem.protoTypes = { name: PropTypes.string.isRequired, isCo...
examples-native/crna-kitchen-sink/storybook/stories/Knobs/index.js
storybooks/react-storybook
import React from 'react'; import { View, Text } from 'react-native'; import { text, number, boolean, color, select, radios, array, date, object, } from '@storybook/addon-knobs'; export default () => { const name = text('Name', 'Storyteller'); const age = number('Age', 70, { range: true, min: 0,...
app/javascript/mastodon/containers/admin_component.js
yi0713/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { IntlProvider, addLocaleData } from 'react-intl'; import { getLocale } from '../locales'; const { localeData, messages } = getLocale(); addLocaleData(localeData); export default class AdminComponent extends React.PureComponent { static propType...
pages/api/tab.js
AndriusBil/material-ui
// @flow import React from 'react'; import withRoot from 'docs/src/modules/components/withRoot'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import markdown from './tab.md'; function Page() { return <MarkdownDocs markdown={markdown} />; } export default withRoot(Page);
internals/templates/languageProvider/languageProvider.js
activedecay/musical-meme
/* * * LanguageProvider * * this component connects the redux state language locale to the * IntlProvider component and i18n messages (loaded from `app/translations`) */ import React from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { IntlProvider } from 'reac...
assets/javascripts/kitten/components/form/input/location-input/test.js
KissKissBankBank/kitten
import React from 'react' import renderer from 'react-test-renderer' import { LocationInput } from './index' import { setupGoogleMock } from '../../../../config/__mocks__/googleMock' beforeAll(() => { setupGoogleMock() return true }) describe('<LocationInput />', () => { it('should match its snapshot with props...
src/routes/index.js
KNMI/GeoWeb-FrontEnd
// We only need to import the modules necessary for initial render import React from 'react'; // import Async from 'react-code-splitting'; import managementCategoriesConfig from './management-categories'; import { BaseLayout, HeaderedLayout, SidebarredLayout, FooteredLayout, withCategoryConfiguration } from '../layouts...
app/components/elements/navbar.js
allecsro/dynotool
import React from 'react'; const Navbar = () => ( <div className="container s-toolbar"> <header className="columns"> <section className="column col-xs-8 s-navbar-actions"> <button className="btn btn-primary">Create table</button> { '\u00a0' } <div className="dropdown"> <a ...
index.ios.js
magus/react-native-facebook-login
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { View, ViewPropTypes, StyleSheet, NativeModules, NativeMethodsMixin, DeviceEventEmitter, requireNativeComponent } from 'react-native'; const FBLoginManager = NativeModules.MFBLoginManager; const RCTMFBLogin = requireNa...
src/components/Leaderboard.js
HackDFW/hackdfw-game-frontend
import React from 'react' import {connect} from 'react-redux'; import { bindActionCreators } from 'redux'; import * as actionCreators from '../actions' const Row = (props) => ( <tr key={props.key} className={(props.email == props.me) ? 'bold' : ''}> <td className="id">{props.rank}</td> <td>{props.score} pts<...
src/encoded/static/components/navigation/components/BigDropdown/BigDropdownPageLoader.js
hms-dbmi/fourfront
'use strict'; import React from 'react'; import PropTypes from 'prop-types'; import { console, ajax, layout, logger } from '@hms-dbmi-bgm/shared-portal-components/es/components/util'; export class BigDropdownPageLoader extends React.PureComponent { static defaultProps = { 'treeURL': '/pages/311d0f4f-56e...
app/components/Tab/Tab.js
zchen9/DonutTab
import React from 'react'; import SearchBox from '../SearchBox/SearchBox.js'; import Bookmark from '../Bookmark/Bookmark.js'; import Tools from '../Tools/Tools.js'; import Clock from '../Clock/Clock.js'; import Theme from '../Theme/Theme.js'; require('./Tab.scss'); // Thanks for ihuan.me const BG_LINK = 'http://7xr6b...
app/components/SummaryBox/index.js
seanng/web-server
/** * * SummaryBox * */ import React from 'react'; import styled from 'styled-components'; import { FormattedMessage } from 'react-intl'; import messages from './messages'; import H3 from 'components/H3' import SectionWrapper from 'components/SectionWrapper'; const SummaryBox = ({ summary }) => { const { inbound, ...
src/svg-icons/action/check-circle.js
rhaedes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionCheckCircle = (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 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/> </SvgIcon> ); ActionChec...
packages/react-ui-components/src/Dialog/index.story.js
neos/neos-ui
import React from 'react'; import {storiesOf, action} from '@storybook/react'; import {withKnobs, text, boolean} from '@storybook/addon-knobs'; import {StoryWrapper} from './../_lib/storyUtils'; import Dialog from '.'; import Button from './../Button'; storiesOf('Dialog', module) .addDecorator(withKnobs) .addW...
src/svg-icons/action/turned-in.js
barakmitz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionTurnedIn = (props) => ( <SvgIcon {...props}> <path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"/> </SvgIcon> ); ActionTurnedIn = pure(ActionTurnedIn); ActionTurnedIn.displayName = 'Ac...
techCurriculum/ui/solutions/2.4/src/index.js
jennybkim/engineeringessentials
/** * Copyright 2017 Goldman Sachs. * 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 in writ...
.storybook/Animate_.stories.js
constelation/monorepo
import React from 'react' import raf from 'raf' import { storiesOf, action } from '@kadira/storybook' import View from '../packages/View' import Text from '../packages/Text' import Style_ from '../packages/Style_' import Animate_ from '../packages/Animate_' import Event_ from '../packages/Event_' const stories = stori...
src/PageItem.js
cgvarela/react-bootstrap
import React from 'react'; import classNames from 'classnames'; import SafeAnchor from './SafeAnchor'; const PageItem = React.createClass({ propTypes: { href: React.PropTypes.string, target: React.PropTypes.string, title: React.PropTypes.string, disabled: React.PropTypes.bool, previous: React.Pr...
src/UserManagement/index.js
bolshchikov-public/wazzapp
import React from 'react'; import PropTypes from 'prop-types'; import './UserManagement.css'; import ProfileImage from '../ProfileImage'; import Logout from '../Logout'; const UserManagement = ({ onLogout }, { currentUser }) => { return ( <div className="user-management-container"> <ProfileImage user={curr...
packages/react-vis/src/sunburst/index.js
uber/react-vis
// Copyright (c) 2016 - 2017 Uber Technologies, Inc. // // 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 use, copy, modify...
project/react/src/components_common/ScrollToTop/index.js
FFF-team/generator-earth
import { withRouter } from 'react-router-dom' import React from 'react'; //需要保留滚动位置的页面 const LISTS = ['/site']; class ScrollToTop extends React.PureComponent { componentDidUpdate(prevProps) { //当前路由path let newPathName = this.props.location.pathname; //长列表页面 保留滚动位置 if (LISTS.inde...
app/MnmSections.js
alvaromb/mnm
import React from 'react' import { StyleSheet } from 'react-native' import { NavigatorWrapper } from 'react-native-navigator-wrapper' import mnmRouteMapper, { AboutUsButton } from './MnmRouteMapper' import MnmNewsList from './MnmNewsList' export function MnmSectionPortada({openMenu}) { return ( <NavigatorWrapp...
client/components/flash/FlashMessage.js
andela-fmustapha/document-management
import React from 'react'; import classnames from 'classnames'; /** * * * @class FlashMessage * @extends {React.Component} */ class FlashMessage extends React.Component { /** * Creates an instance of FlashMessage. * @param {any} props * * @memberof FlashMessage */ constructor(props) { super...
spec/support/setup.mocha.js
FlammableHairnet/HireOrbit
import jsdom from 'jsdom'; import jquery from 'jquery'; import TestUtils from 'react-addons-test-utils'; import ReactDOM from 'react-dom'; import chai, { expect } from 'chai'; import React from 'react'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import reducers from '../../client/reduc...
client/main.js
ZeHiro/kresus
import React from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter, Route, Switch, Link, Redirect, useRouteMatch, useParams, useLocation } from 'react-router-dom'; import { connect, Provider } from 'react-redux'; import throttle from 'lodash.throttle'; import { ToastCont...
app/components/OfferHelp.js
blooprint/output
import React from 'react' import styles from './OfferHelp.css' export default function OfferHelp(){ return( <h1 className={styles.offerHelp}>PRESS: <span className={styles.q}>?</span></h1> ) }