path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
app/src/App.js
supernova-at/media-bias
/* * Imports. */ // NPM. import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { DragDropContext } from 'react-dnd'; import HTML5Backend from 'react-dnd-html5-backend'; // Local. import './App.css'; import './common.css'; import Pager from './components/pager'; import MobileView from ...
packages/expo-dev-menu/vendored/react-native-gesture-handler/src/touchables/TouchableNativeFeedback.android.js
exponent/exponent
import { Platform } from 'react-native'; import React, { Component } from 'react'; import PropTypes from 'prop-types'; import GenericTouchable from './GenericTouchable'; /** * TouchableNativeFeedback behaves slightly different than RN's TouchableNativeFeedback. * There's small difference with handling long press rip...
packages/icons/src/md/image/Brightness4.js
suitejs/suitejs
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdBrightness4(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M39.63 17l6.63 6.63-6.63 6.63v9.37h-9.37l-6.63 6.63L17 39.63H7.63v-9.37L1 23.63 7.63 17V7.63H17L23.63 1l6.63 6.63h9.37V17zm-16 18.63c6.63 0 12-5....
src/components/polls.js
KoushikKumar/TakeAPoll_Client
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { getAllPolls, submitPollByUnauthorizedUser, submitPollByAuthorizedUser, getIpAddress, getUserRelatedPolls, getUserId, deletePoll, getPollDataByPollId } from '../actions'; import { VOTING_APP_CLIENT_URL } from...
app/index.js
BenGoldstein88/hitch-frontend
import React from 'react'; import { render } from 'react-dom'; import routes from '../config/routes'; render( routes, document.getElementById('app') );
src/routes/error/index.js
fvalencia/react-vimeo
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import ErrorPage from './Err...
views/components/CustomerViewUi.js
gvaldambrini/madam
import React from 'react'; import { Link, IndexLink } from 'react-router'; // The main customer presentational component. export default React.createClass({ propTypes: { infoPath: React.PropTypes.string.isRequired, appPath: React.PropTypes.string.isRequired, appLinkDisabled: React.PropTypes.bool.isRequi...
examples/next-js/pages/index.js
brandondoran/rollbar-sourcemap-webpack-plugin
import React from 'react' import Head from 'next/head' import Nav from '../components/nav' const Home = () => ( <div> <Head> <title>Home</title> <link rel="icon" href="/favicon.ico" /> </Head> <Nav /> <div className="hero"> <h1 className="title">Welcome to Next.js!</h1> <p c...
client/src/components/Landing/index.js
stanographer/aloft
import React from 'react'; const App = () => ( <div> <h1>App</h1> </div> ); export default App;
server/sonar-web/src/main/js/apps/permission-templates/permission-template-defaults.js
abbeyj/sonarqube
import _ from 'underscore'; import React from 'react'; import QualifierIcon from '../../components/shared/qualifier-icon'; export default React.createClass({ propTypes: { permissionTemplate: React.PropTypes.object.isRequired, topQualifiers: React.PropTypes.array.isRequired }, renderIfSingleTopQualifier(...
packages/television/src/components/AdContainer.js
accosine/poltergeist
import React from 'react'; import PropTypes from 'prop-types'; import { styled } from 'styletron-react'; const Container = styled('div', { display: 'flex', justifyContent: 'center', position: 'relative', '@media screen and (min-width: 1024px)': { top: 0, }, }); const AdContainer = ({ adnetwork, adconfig...
src/svg-icons/editor/vertical-align-center.js
w01fgang/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorVerticalAlignCenter = (props) => ( <SvgIcon {...props}> <path d="M8 19h3v4h2v-4h3l-4-4-4 4zm8-14h-3V1h-2v4H8l4 4 4-4zM4 11v2h16v-2H4z"/> </SvgIcon> ); EditorVerticalAlignCenter = pure(EditorVerticalAlig...
packages/react/src/components/UIShell/__tests__/SideNavItems-test.js
carbon-design-system/carbon-components
/** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import { mount } from 'enzyme'; import { SideNavItems, SideNavItem } from '../'; describe('SideNavItems', () => {...
src/components/ImportButton.js
GeorgioWan/Oi
import React, { Component } from 'react'; import {Button, Glyphicon, Tooltip, OverlayTrigger} from 'react-bootstrap'; import {step} from '../types/step'; export default class ImportButton extends Component { constructor(props){ super(props); } componentDidMount(){ let {addSteps} = this.props; se...
src/DropdownMenu.js
deerawan/react-bootstrap
import React from 'react'; import keycode from 'keycode'; import classNames from 'classnames'; import RootCloseWrapper from 'react-overlays/lib/RootCloseWrapper'; import ValidComponentChildren from './utils/ValidComponentChildren'; import createChainedFunction from './utils/createChainedFunction'; class DropdownMenu e...
src/js/modules/Boards/components/BoardForm/BoardForm.js
jmlavoier/task-tool
import React from 'react'; import PropTypes from 'prop-types'; import style from './BoardForm.sass'; class BoardForm extends React.Component { static focusElement(el) { el.focus(); } constructor(props) { super(props); this.state = { name: props.name, }; this.onChangeName = this.onCha...
src/AW_.js
corbig/AfterWorkManager
import React from 'react'; // Composant vierge par défaut // A copier pour créer un nouveau composant // C'est un aide mémoire export default class AW_ extends React.Component { constructor(props) { console.log("AW_.constructor() : Début"); super(props); this.state = {index:1}; // Les variables loca...
mob5/src/components/Home/CalendarList/Footer.js
leGoupil/mob5
import React from 'react'; import { View, Text, StyleSheet, TouchableOpacity } from 'react-native'; const styles = StyleSheet.create({ container: { flex: 1, padding: 8, alignItems: 'center', justifyContent: 'center', }, button: { borderColor: '#8E8E8E', borderWidth: StyleSheet.hairlineWid...
src/components/Leaderboard.js
M-Woo/BeQ
import React from 'react' import Leaders from '../components/Leaders' import { graphql } from 'react-apollo' import gql from 'graphql-tag' class Leaderboard extends React.Component { static propTypes = { data: React.PropTypes.object, } render(){ if (this.props.data.loading){ return(<div>Loading...
test/specs/collections/Table/TableBody-test.js
Semantic-Org/Semantic-UI-React
import React from 'react' import * as common from 'test/specs/commonTests' import TableBody from 'src/collections/Table/TableBody' describe('TableBody', () => { common.isConformant(TableBody) common.rendersChildren(TableBody, { rendersContent: false, }) it('renders as a tbody by default', () => { sha...
packages/material-ui-icons/src/NavigateBefore.js
cherniavskii/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" /></g> , 'NavigateBefore');
src/components/common/header/Header.js
great-design-and-systems/cataloguing-app
import '../../../images/profile.jpg'; import * as actions from '../../../actions/HeaderActions'; import { APP_NAME, LABEL_BOOKS, LABEL_LIBRARY, LABEL_SETTINGS } from '../../../labels/'; import FontAwesome from 'react-fontawesome'; import { HeaderControls } from './HeaderControls'; import Nav from 'react-bootstrap/li...
src/components/ViewReport/ReportCatalogList.js
RegOpz/RegOpzWebApp
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { connect } from 'react-redux'; import { bindActionCreators, dispatch } from 'redux'; import _ from 'lodash'; import DatePicker from 'react-datepicker'; import moment from 'moment'; require('react-datepicker/dist/react-datepicker.css'); ...
es/components/style/content-title.js
cvdlab/react-planner
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 = {...
js/components/checkbox/index.js
soltrinox/MarketAuth.ReactNative
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Container, Header, Title, Content, Button, Icon, List, ListItem, CheckBox, Text } from 'native-base'; import { openDrawer } from '../../actions/drawer'; import styles from './styles'; class NHCheckbox extends Component { sta...
examples/huge-apps/routes/Course/routes/Assignments/components/Sidebar.js
buddhike/react-router
import React from 'react'; import { Link } from 'react-router'; class Sidebar extends React.Component { render () { var assignments = COURSES[this.props.params.courseId].assignments return ( <div> <h3>Sidebar Assignments</h3> <ul> {assignments.map(assignment => ( ...
local-cli/templates/HelloWorld/__tests__/index.ios.js
formatlos/react-native
import 'react-native'; import React from 'react'; import Index from '../index.ios.js'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( <Index /> ); });
src/Composite/InputAreaWithLabelComposite/InputAreaWithLabelComposite.driver.js
skyiea/wix-style-react
import React from 'react'; import ReactDOM from 'react-dom'; import $ from 'jquery'; import fieldLabelAttributesDriverFactory from '../../FieldLabelAttributes/FieldLabelAttributes.driver'; const inputAreaWithLabelCompositeDriverFactory = ({element, wrapper, component}) => { const label = element.childNodes[0].childN...
src/components/SignOut.js
hszeto/askout-react-native
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { signOutUser } from '../actions'; import { Container, Content } from 'native-base'; class SignOut extends Component { componentWillMount() { const { email } = this.props; this.props.signOutUser( email ); } render()...
packages/showcase/plot/area-chart-elevated.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...
web/src/app/components/user/items.js
sokoow/teleport
import React from 'react'; const U2F_ERROR_CODES_URL = 'https://developers.yubico.com/U2F/Libraries/Client_error_codes.html'; export const ErrorMessage = ({ message }) => { message = message || ''; if(message.indexOf('U2F') !== -1 ) { return ( <label className="grv-invite-login-error"> {message} ...
client/src/Pages/Landing.js
ciex/mietlimbo
// @flow import React from 'react' import { NavLink } from 'react-router-dom' import { defineMessages, FormattedMessage } from 'react-intl' import RaisedButton from 'material-ui/RaisedButton' const style = { wrapper: { fontFamily: ['Open Sans', 'sans-serif'] }, title: { margin: '3em auto' }, okay: {...
src/svg-icons/av/queue-music.js
rhaedes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvQueueMusic = (props) => ( <SvgIcon {...props}> <path d="M15 6H3v2h12V6zm0 4H3v2h12v-2zM3 16h8v-2H3v2zM17 6v8.18c-.31-.11-.65-.18-1-.18-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3V8h3V6h-5z"/> </SvgIcon> ); AvQu...
docs/src/app/components/pages/get-started/RequiredKnowledge.js
hwo411/material-ui
import React from 'react'; import Title from 'react-title-component'; import MarkdownElement from '../../MarkdownElement'; import requiredKnowledge from './required-knowledge.md'; const RequiredKnowledge = () => ( <div> <Title render={(previousTitle) => `Required Knowledge - ${previousTitle}`} /> <MarkdownEl...
src/svg-icons/av/library-add.js
frnk94/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvLibraryAdd = (props) => ( <SvgIcon {...props}> <path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/> </S...
src/v2/util/provideChildrenWithProps.js
aredotna/ervell
import React from 'react' export default (children, props) => { if (!children) throw new Error('children is undefined') // If we have a bare string just return it. // Nothing can be provided to it. if (typeof children === 'string') { return children } // If we have a function, render it if (typeof ...
src/app/pages/Home.js
skratchdot/react-file-processor
/*eslint no-console:0 */ import React, { Component } from 'react'; import { Row, Col, Button, Jumbotron, Table } from 'react-bootstrap'; import { Link } from 'react-router'; import { connect } from 'react-redux'; import { setSelectedFiles } from '../actions/selectedFiles'; import FileProcessor from '../../lib/index'; ...
src/components/__tests__/TableHeadingTest.js
GriddleGriddle/Griddle
import React from 'react'; import test from 'ava'; import { shallow } from 'enzyme'; import TableHeading from '../TableHeading'; test('renders', (t) => { const wrapper = shallow(<TableHeading />); t.true(wrapper.matchesElement(<thead><tr /></thead>)); }); test('renders with style', (t) => { const style = { ba...
blueocean-dashboard/src/main/js/components/stories/RunDetailsHeaderStories.js
ModuloM/blueocean-plugin
/* eslint-disable */ import React from 'react'; import {storiesOf, action} from '@kadira/storybook'; import { ModalView, ModalBody, ModalHeader, PageTabs, Progress, TabLink, } from '@jenkins-cd/design-language'; import WithContext from '@jenkins-cd/design-language/dist/js/stories/WithContext'; i...
packages/material-ui-shell/src/providers/Theme/Context.js
TarikHuber/react-most-wanted
import React from 'react' export const Context = React.createContext(null) export default Context
interfaces/react-redux.d.js
TechnologyAdvice/flow-interfaces
import React from 'react'; declare module 'react-redux' { declare interface ConnectedReactClass extends ReactClass { static WrappedComponent: ReactClass; getWrappedInstance(): React.Component; } declare var Provider: React.Component; declare function connect(mapStateToProps?: (state: Object, ownProps: ...
src/components/Schemes/ThreadingElement/index.js
nobus/weaver
import React, { Component } from 'react'; import './style.css'; class ThreadingElement extends Component { constructor(props) { super(props); this.handleClick = this.handleClick.bind(this); } isEnabled() { const {threadingsState, row, col} = this.props; const state = threadingsState[col]; ...
src/Button.js
lako90/react-elements-pagination
import React, { Component } from 'react'; import PropTypes from 'prop-types'; class Button extends Component { static propTypes = { label: PropTypes.string, onClick: PropTypes.func, } static defaultProps = { label: '', onClick: () => null, } onClick = () => this.props.onClick; render() {...
node_modules/react-bootstrap/es/ModalHeader.js
FoxMessenger/nyt-react
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from ...
src/svg-icons/image/switch-camera.js
matthewoates/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageSwitchCamera = (props) => ( <SvgIcon {...props}> <path d="M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 11.5V13H9v2.5L5.5 12 9 8.5V11h6V8.5l3.5 3.5-3.5...
app/components/HowDoes2Diagram.js
gidich/votrient-kiosk
import React, { Component } from 'react'; import { browserHistory } from 'react-router'; import styles from './HowDoes2Diagram.css'; export default class HowDoes2Diagram extends Component { render() { return ( <div className={styles.container}> <div className={styles.close} onClick={browserHistor...
src/components/pages/splash/handler.js
jackblandin/react_express_template
import React from 'react' import { Link } from 'react-router' export default class SplashHandler extends React.Component { render() { return ( <div> <h1>Panoskin</h1> <h3>interactive sales tool</h3> <div> <div><Link to="client">Get Panoskin</Link></div> <div><Li...
src/components/author/AuthorForm.js
wowkin2/react-redux-sample
import React from 'react'; import TextInput from '../common/TextInput'; const AuthorForm = ({author, onSave, onChange, saving, errors}) => { return ( <form> <h1>Manage Author</h1> <TextInput name="firstName" label="First name" value={author.firstName} onChange={onChang...
src/svg-icons/action/build.js
barakmitz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionBuild = (props) => ( <SvgIcon {...props}> <path d="M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-...
client/extensions/woocommerce/app/settings/email/email-settings/components/notifications-origin.js
Automattic/woocommerce-connect-client
/** @format */ /** * External dependencies */ import PropTypes from 'prop-types'; import React from 'react'; import emailValidator from 'email-validator'; import { localize } from 'i18n-calypso'; /** * Internal dependencies */ import FormTextInput from 'components/forms/form-text-input'; import FormLabel from 'c...
app/components/comments/comment-box.js
tthew/react-tutorial-es2015
import React from 'react' import jQuery from 'jquery' import CommentList from './comment-list' import CommentForm from './comment-form' export default class CommentBox extends React.Component { constructor(props) { super(props) this.state = { url: props.url, data: [] } } loadCommentsFro...
internals/templates/containers/App/index.js
7ruth/PadStats2
/** * * App.react.js * * This component is the skeleton around the actual pages, and should only * contain code that should be seen on all pages. (e.g. navigation bar) * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If...
src/svg-icons/image/exposure-neg-2.js
hai-cea/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageExposureNeg2 = (props) => ( <SvgIcon {...props}> <path d="M15.05 16.29l2.86-3.07c.38-.39.72-.79 1.04-1.18.32-.39.59-.78.82-1.17.23-.39.41-.78.54-1.17s.19-.79.19-1.18c0-.53-.09-1.02-.27-1.46-.18-.44-.44-.81...
src/svg-icons/places/room-service.js
hwo411/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let PlacesRoomService = (props) => ( <SvgIcon {...props}> <path d="M2 17h20v2H2zm11.84-9.21c.1-.24.16-.51.16-.79 0-1.1-.9-2-2-2s-2 .9-2 2c0 .28.06.55.16.79C6.25 8.6 3.27 11.93 3 16h18c-.27-4.07-3.25-7.4-7.16-8.21z"...
app/javascript/mastodon/features/ui/components/mute_modal.js
Nyoho/mastodon
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Toggle from 'react-toggle'; import Button from '../../../components/button'; import { closeModal } from '../../../actions/modal'; import...
src/components/Link/Link.js
ACGNTaiwan/acgnFront
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import PropTypes from 'prop-...
src/core/components/Input.js
remy/jsconsole
import React, { Component } from 'react'; // TODO import Autocomplete from './Autocomplete'; import keycodes from '../lib/keycodes'; class Input extends Component { constructor(props) { super(props); // history is set in the componentDidMount this.state = { value: props.value || '', multili...
examples/todos/src/components/Footer.js
jayflaherty75/relax
import React from 'react' import FilterLink from '../containers/FilterLink' const Footer = () => ( <p> Show: {" "} <FilterLink filter="SHOW_ALL"> All </FilterLink> {", "} <FilterLink filter="SHOW_ACTIVE"> Active </FilterLink> {", "} <FilterLink filter="SHOW_COMPLETED">...
node_modules/react-bootstrap/es/MediaHeading.js
ASIX-ALS/asix-final-project-frontend
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from ...
src/components/buttons/InfoButton.js
kryptnostic/gallery
import React from 'react'; import styled from 'styled-components'; const InfoButton = styled.button` border-radius: 3px; background-color: #6124e2; color: #ffffff; font-family: 'Open Sans', sans-serif; font-size: 14px; padding: 10px; width: ${props => (props.fullSize ? '100%' : 'fit-content')}; &:hove...
packages/react-scripts/fixtures/kitchensink/src/features/env/FileEnvVariables.js
xiaohu-developer/create-react-app
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ import Rea...
client/admin/settings/inputs/AssetSettingInput.js
subesokun/Rocket.Chat
import { Button, Field, Icon } from '@rocket.chat/fuselage'; import { Random } from 'meteor/random'; import React from 'react'; import { useMethod } from '../../../contexts/ServerContext'; import { useToastMessageDispatch } from '../../../contexts/ToastMessagesContext'; import { useTranslation } from '../../../context...
examples/js/basic/demo.js
rolandsusans/react-bootstrap-table
/* eslint max-len: 0 */ import React from 'react'; import BasicTable from './basic-table'; import SingleColumnTable from './single-column-table'; import HoverStripedTable from './hover-striped-table'; import BorderlessTable from './borderless-table'; import ScrollTable from './scroll-table'; import LargeColumnTable fro...
GameOfLife.Client/src/routes/Admin/components/Admin.js
Stelmashenko-A/GameOfLife
import React from 'react' import { Row, Col, Table } from 'react-bootstrap' import HostsInfo from './HostsInfo' import './Admin.scss' export const Admin = (props) => { var hosts = props.hosts.map(function (host, index) { return ( <tr key={index}> <td>{host.RouteId}</td> <td>{host.Hos...
tests/Rules-isFloat-spec.js
lei-clearsky/temp
import React from 'react'; import TestUtils from 'react-addons-test-utils'; import Formsy from './..'; import { InputFactory } from './utils/TestInput'; const TestInput = InputFactory({ render() { return <input value={this.getValue()} readOnly/>; } }); const TestForm = React.createClass({ render() { re...
content/gocms/src/admin/containers/loginPage/loginPage.routes.js
gocms-io/gocms
import React from 'react' import {Route} from 'react-router' import LoginPage from './loginPage.container'; let injectedRoutes = []; let routes = <Route> {injectedRoutes} </Route>; export function registeredLoginRoutes() { if (injectedRoutes.length != 0) { return routes; } else {...
examples/with-babel-macros/pages/_document.js
BlancheXu/test
import React from 'react' import Document, { Head, Main, NextScript } from 'next/document' export default class MyDocument extends Document { render () { return ( <html> <Head> <style dangerouslySetInnerHTML={{ __html: this.props.css }} /> </Head> <body> <Main />...
app/javascript/mastodon/containers/account_container.js
mimumemo/mastodon
import React from 'react'; import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { makeGetAccount } from '../selectors'; import Account from '../components/account'; import { followAccount, unfollowAccount, blockAccount, unblockAccount, muteAc...
docs/app/Examples/views/Card/Types/CardExampleGroups.js
ben174/Semantic-UI-React
import React from 'react' import { Button, Card, Image } from 'semantic-ui-react' const CardExampleGroups = () => ( <Card.Group> <Card> <Card.Content> <Image floated='right' size='mini' src='http://semantic-ui.com/images/avatar/large/steve.jpg' /> <Card.Header> Steve Sanders ...
src/svg-icons/communication/phonelink-setup.js
ruifortes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationPhonelinkSetup = (props) => ( <SvgIcon {...props}> <path d="M11.8 12.5v-1l1.1-.8c.1-.1.1-.2.1-.3l-1-1.7c-.1-.1-.2-.2-.3-.1l-1.3.4c-.3-.2-.6-.4-.9-.5l-.2-1.3c0-.1-.1-.2-.3-.2H7c-.1 0-.2.1-.3.2l-.2 1...
clients/packages/admin-client/src/components/layout/settings-page-layout.spec.js
nossas/bonde-client
import React from 'react' import { shallow } from 'enzyme' import { expect } from 'chai' import { SettingsPageLayout } from '../../components/layout' describe('client/components/layout/settings-page-layout', () => { let wrapper beforeEach(() => { wrapper = shallow( <SettingsPageLayout> <h1>Foo ...
admin/client/components/Forms/CreateForm.js
pswoodworth/keystone
import React from 'react'; import Fields from '../../fields'; import InvalidFieldType from './InvalidFieldType'; import { Alert, Button, Form, Modal } from 'elemental'; var CreateForm = React.createClass({ displayName: 'CreateForm', propTypes: { err: React.PropTypes.object, isOpen: React.PropTypes.bool, list: ...
app/components/List/index.js
itimofeev/hustledb-ui
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...
src/inputs/components/input-types/text-input.js
juttle/juttle-client-library
import React, { Component } from 'react'; const ENTER_KEY = 13; class TextInput extends Component { constructor(props) { super(props); this.state = { value: props.input.value }; } getType() { return 'text'; } _onChange(event) { this.setState({ value: even...
app/assets/javascripts/components/story/StoryHistoryLocation.js
Codeminer42/cm42-central
import React from 'react'; import StoryActionButton from './StoryActionButton' const StoryHistoryLocation = ({ id, url }) => <div className="col-xs-12 form-group input-group input-group-sm"> <input className="form-control input-sm" id={`story-link-${id}`} readOnly="readonly" value={url} ...
ui/js/pages/emailList/EmailLists.js
ericsoderberg/pbc-web
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import List from '../../components/List'; const Item = (props) => { const { className, item: emailList } = props; const classNames = ['item__container', className]; return ( <Link className={classNames.joi...
react/features/room-lock/components/PasswordRequiredPrompt.web.js
KalinduDN/kalindudn.github.io
/* global APP */ import AKFieldText from '@atlaskit/field-text'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import UIEvents from '../../../../service/UI/UIEvents'; import { setPassword } from '../../base/conference'; import { Dialog } from '../../base/dialog'; import { translate...
src/components/Tab/Tab.js
Zoomdata/nhtsa-dashboard
import flowRight from 'lodash.flowright'; import { observer, inject } from 'mobx-react'; import React from 'react'; import ComponentScatterplot from '../ComponentScatterplot/ComponentScatterplot'; import Map from '../Map/Map'; const Tab = function({ chart, store }) { const { activeTab } = store.controls; const tab...
internals/templates/homePage.js
StrikeForceZero/react-typescript-boilerplate
/* * HomePage * * This is the first thing users see of our App, at the '/' route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a neccessity for you then you can refactor it and remove * the ...
src/Parser/Hunter/Marksmanship/Modules/Talents/PiercingShot.js
enragednuke/WoWAnalyzer
import React from 'react'; import Analyzer from 'Parser/Core/Analyzer'; import Enemies from 'Parser/Core/Modules/Enemies'; import Combatants from 'Parser/Core/Modules/Combatants'; import SPELLS from 'common/SPELLS'; import SpellIcon from "common/SpellIcon"; import { formatPercentage } from "common/format"; import Spe...
src/index.js
mazairaj/thejulianmaz
import React from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter } from 'react-router-dom'; import App from './components/app'; ReactDOM.render( <BrowserRouter > <App /> </BrowserRouter>, document.getElementById('root'), );
src/client/me/page.react.js
sljuka/portfolio-este
import Component from '../components/component.react'; import DocumentTitle from 'react-document-title'; import Logout from '../auth/logout.react'; import React from 'react'; import requireAuth from '../auth/requireauth.react'; import {format} from '../intl/store'; @requireAuth export default class Page extends Compon...
HomeRange/app/pages/mine/Two.js
Onlyjson/yanShu_Project
/* *npm install --save react-native-popup-dialog * */ import React from 'react'; import { StyleSheet, Text, View, PixelRatio, TouchableOpacity, Image, StatusBar, ScrollView, } from 'react-native'; import ImagePicker from 'react-native-image-picker'; import {List,Button,Modal,Toast,DatePi...
app/javascript/mastodon/components/column_back_button_slim.js
danhunsaker/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'> ...
src/SvgIcon/SvgIcon.spec.js
mmrtnz/material-ui
/* eslint-env mocha */ import React from 'react'; import {spy} from 'sinon'; import {shallow} from 'enzyme'; import {assert} from 'chai'; import SvgIcon from './SvgIcon'; import getMuiTheme from '../styles/getMuiTheme'; describe('<SvgIcon />', () => { const muiTheme = getMuiTheme(); const shallowWithContext = (nod...
src/stories/index.js
bjackson/bjGrid
import React from 'react'; import { storiesOf } from '@kadira/storybook'; import Grid from '../Grid'; import _ from 'lodash'; import 'font-awesome-loader'; storiesOf('Grid', module) .add('default view', () => { const AppContainer = React.createClass({ getInitialState() { return { options:...
src/page/pageList/pageList.js
zonghuan/xzs-amp
import React from 'react' import {render} from 'react-dom' import _ from 'underscore' var content = document.getElementById('content') import Nav from 'widget/nav/nav-react.js' import List from './list.js' render(( <div> <Nav select="make"/> <List /> </div> ),content)
src/decorators.js
daversm/nuka-carousel
'use strict'; import React from 'react'; const DefaultDecorators = [ { component: React.createClass({ render() { return ( <button style={this.getButtonStyles(this.props.currentSlide === 0)} onClick={this.props.previousSlide}>PREV</button> ) }, ...
packages/react-ui-core/src/Photo/__tests__/BackgroundPhoto-test.js
rentpath/react-ui
import React from 'react' import { shallow } from 'enzyme' import renderer from 'react-test-renderer' import ThemedBackgroundPhoto from '../BackgroundPhoto' const BackgroundPhoto = ThemedBackgroundPhoto.WrappedComponent describe('BackgroundPhoto', () => { it('passes extra props through', () => { const wrapper =...
src/server.js
fallrisk/Nightlife
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import 'babel-polyfill'; import session from 'express-sess...
src/app/component/icon-link/icon-link.js
all3dp/printing-engine-client
import PropTypes from 'prop-types' import React from 'react' import propTypes from '../../prop-types' import cn from '../../lib/class-names' import Icon from '../icon' const IconLink = ({classNames, icon, disabled = false, href = '#', onClick = () => {}}) => ( <a className={cn('IconLink', {}, classNames)} ...
src/index.js
kidylee/Front-end-boilerplate
import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { App } from './App'; import configureStore from './store/configureStore' const store = configureStore({}) const Root = () => (<Provider store={store} > <App /> </Provider>) render( <Root/> , docu...
app/containers/ArticleApp/components/CreateArticleModal.react.js
cabloo/react-graphql-test
import React from 'react'; import Button from 'react-bootstrap/lib/Button'; import Modal from 'react-bootstrap/lib/Modal'; import PropTypes from 'prop-types'; export default class CreateArticleModal extends React.Component { constructor(props) { super(props); this.state = { author: '', title: '...
examples/basic/src/components/CounterButton/CounterButton.js
bluetidepro/react-styleguidist
import React, { Component } from 'react'; /** * Button that counts how many times it was pressed and exposes a `@public` method to reset itself. */ export default class CounterButton extends Component { constructor() { super(); this.state = { value: 0, }; } /** * Sets the counter to a particular value...
assets/javascripts/kitten/components/structure/cards/contribution-card/components/input.js
KissKissBankBank/kitten
import React from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import { TextInputWithUnit } from '../../../../form/input/text-input-with-unit' import { Context } from '../context' export const Input = ({ valid, onChange, className, ...props }) => { return ( <Context.Consumer> ...
src/screens/App/shared/components/Breadcrumbs.js
savitri/savitri-web
import ChevronRight from 'material-ui/lib/svg-icons/navigation/chevron-right'; import FlatButton from 'material-ui/lib/flat-button'; import React from 'react'; import { amber50 } from 'material-ui/lib/styles/colors'; const styles = { breadcrumb: { textAlign: 'left', backgroundColor: amber50, ...
examples/todomvc/src/components/Credits.js
lore/lore
import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; export default createReactClass({ render: function () { return ( <footer className="info"> <p>Double-click to edit a todo</p> <p> {"Modified version of the "} ...
examples/huge-apps/components/App.js
AnSavvides/react-router
import React from 'react'; import Dashboard from './Dashboard'; import GlobalNav from './GlobalNav'; class App extends React.Component { render() { var courses = COURSES; return ( <div> <GlobalNav /> <div style={{ padding: 20 }}> {this.props.children || <Dashboard courses={co...
src/components/common/icons/Sort.js
goodjoblife/GoodJobShare
import React from 'react'; /* eslint-disable */ export default props => ( <svg {...props} version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" enableBackground="new 0 0 24 24"> <g> <path d="M9,0C8.7,0,8.5,0.1,8.3,0.3l-8,8C0.1,8.5,0,8.7,0,9c0,0.3,0.1,0.5,0.3,0.7l1.4,1.4c0.2,0.2,0.5,0.3,0.7,0...
src/components/Summary/Summary.js
LeraSavchenko/Maysternia
import React from 'react'; import withStyles from 'isomorphic-style-loader/lib/withStyles'; import s from './Summary.css'; import Link from '../Link'; const Links = [ { to: '/catalog', name: 'Каталог продукції', }, { to: '/', name: 'Про нас', }, { to: '/catalog', name: 'Наші роботи', ...