path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
zip/src/src/components/Header/Header.js
vbdoug/ISOReStack
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React from 'react'; import styles from './Header.css'; import withStyles from '../../decorators/withStyles'; import Link from '../../utils/Link'; import Navigation from '../Navigation'; @withStyles(styles) class Header { render() { ...
src/ProgressBar.js
karolbarkowski/react-native-progress-bar-modest
import React from 'react'; import { View, Text, StyleSheet, Animated } from 'react-native'; const VALUE_SIZE = 25; export default class ProgressBarMini extends React.Component { static propTypes = { value: React.PropTypes.number, borderRadius: React.PropTypes.number, reachedBarHeight: Reac...
src/app/components/Root.js
meedan/check-web
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Provider } from 'react-redux'; import { Router, Route, browserHistory, IndexRoute } from 'react-router'; import ReactGA from 'react-ga'; import { IntlProvider } from 'react-intl'; import config from 'config'; // eslint-disable-line r...
src/home/index.js
marchisbogdan/licenta-front
/** * React Static Boilerplate * https://github.com/kriasoft/react-static-boilerplate * * Copyright © 2015-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'; ...
client2/src/components/Video/components/video_list.js
ibulmer/Board
import React from 'react'; import VideoListItem from './video_list_item'; import Slider from 'react-slick' export default (props) => { const videoItems = props.videos.map((video) => { return ( <VideoListItem onVideoSelect={props.onVideoSelect} key={video.etag} video={video} /> ) }) cons...
src/components/Table/__tests__/Row.spec.js
propertybase/react-lds
import React from 'react'; import { shallow } from 'enzyme'; import Row from '../Row'; describe('<Row />', () => { let mounted = null; const table = document.createElement('table'); const tbody = document.createElement('tbody'); beforeEach(() => { const frag = table.appendChild(tbody); mounted = sha...
app/javascript/mastodon/components/icon_with_badge.js
h3zjp/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import Icon from 'mastodon/components/icon'; const formatNumber = num => num > 40 ? '40+' : num; const IconWithBadge = ({ id, count, className }) => ( <i className='icon-with-badge'> <Icon id={id} fixedWidth className={className} /> {count > 0 &...
src/svg-icons/editor/format-underlined.js
w01fgang/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorFormatUnderlined = (props) => ( <SvgIcon {...props}> <path d="M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"/> </SvgIcon> ); EditorF...
tests/layouts/CoreLayout.spec.js
chenfanggm/steven-mern-starter-kit
import React from 'react' import TestUtils from 'react-addons-test-utils' import CoreLayout from 'layouts/CoreLayout/CoreLayout' function shallowRender (component) { const renderer = TestUtils.createRenderer() renderer.render(component) return renderer.getRenderOutput() } function shallowRenderWithProps (props...
src/packages/@ncigdc/modern_components/RepoCasesTable/RepoCasesTable.js
NCI-GDC/portal-ui
/* @flow */ import React from 'react'; import { branch, compose, renderComponent, setDisplayName, } from 'recompose'; import { connect } from 'react-redux'; import Pagination from '@ncigdc/components/Pagination'; import Showing from '@ncigdc/components/Pagination/Showing'; import { Row } from '@ncigdc/uikit/Fl...
main.js
joeyschroeder/speedometer-app
import Expo, { AppLoading, Asset, Font } from 'expo'; import React, { Component } from 'react'; import App from './app/components/app'; import { DEBUG_MODE } from './app/config/config'; import { Provider } from 'react-redux'; import { configureStore } from './app/util/configure-store'; if (!DEBUG_MODE) console.disabl...
client/screens/components/table/Components/ExactFilters.js
francixcoag/trace_packages
import React from 'react'; let ExactFilter = require('./ExactFilter.js'); class ExactFilters extends React.Component { constructor(props) { super(props) } render() { let { exactFilters, removeExactFilter } = this.props; let filters = exactFilters.map((filter, i) => { return <ExactFilter fil...
src/server.js
utkdigitalinitiatives/ibu
import 'babel-polyfill'; import path from 'path'; import express from 'express'; import React from 'react'; import ReactDOM from 'react-dom/server'; import Router from './routes'; import Html from './components/Html'; import assets from './assets'; import { port } from './config'; import controller from './tap/control...
examples/src/components/Virtualized.js
submittable/react-select
import React from 'react'; import createClass from 'create-react-class'; import VirtualizedSelect from 'react-virtualized-select'; const DATA = require('../data/cities'); var CitiesField = createClass({ displayName: 'CitiesField', getInitialState () { return {}; }, updateValue (newValue) { this.setState({ ...
src/svg-icons/device/airplanemode-inactive.js
ichiohta/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceAirplanemodeInactive = (props) => ( <SvgIcon {...props}> <path d="M13 9V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v3.68l7.83 7.83L21 16v-2l-8-5zM3 5.27l4.99 4.99L2 14v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L1...
src/containers/DevToolsWindow.js
hirako2000/react-hackathon-board
import React from 'react'; import { createDevTools } from 'redux-devtools'; import LogMonitor from 'redux-devtools-log-monitor'; export default createDevTools( <LogMonitor /> );
src/pages/tuart.js
vitorbarbosa19/ziro-online
import React from 'react' import BrandGallery from '../components/BrandGallery' export default () => ( <BrandGallery brand='Tuart' /> )
src/svg-icons/editor/pie-chart.js
hwo411/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorPieChart = (props) => ( <SvgIcon {...props}> <path d="M11 2v20c-5.07-.5-9-4.79-9-10s3.93-9.5 9-10zm2.03 0v8.99H22c-.47-4.74-4.24-8.52-8.97-8.99zm0 11.01V22c4.74-.47 8.5-4.25 8.97-8.99h-8.97z"/> </SvgIco...
src/svg-icons/alert/add-alert.js
IsenrichO/mui-with-arrows
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AlertAddAlert = (props) => ( <SvgIcon {...props}> <path d="M10.01 21.01c0 1.1.89 1.99 1.99 1.99s1.99-.89 1.99-1.99h-3.98zm8.87-4.19V11c0-3.25-2.25-5.97-5.29-6.69v-.72C13.59 2.71 12.88 2 12 2s-1.59.71-1.59 1.59v...
node_modules/react-bootstrap/src/CarouselItem.js
gitoneman/react-soc
import React from 'react'; import classSet from 'classnames'; import TransitionEvents from './utils/TransitionEvents'; const CarouselItem = React.createClass({ propTypes: { direction: React.PropTypes.oneOf(['prev', 'next']), onAnimateOutEnd: React.PropTypes.func, active: React.PropTypes.bool, caption...
docs/src/app/components/pages/components/IconButton/ExampleTouch.js
barakmitz/material-ui
import React from 'react'; import IconButton from 'material-ui/IconButton'; import ActionGrade from 'material-ui/svg-icons/action/grade'; const IconButtonExampleTouch = () => ( <div> <IconButton tooltip="bottom-right" touch={true} tooltipPosition="bottom-right"> <ActionGrade /> </IconButton> <IconB...
system/src/routes/PurchaseOrder/containers/NewPurchaseOrderViewContainer/index.js
axmatthew/react
import React, { Component } from 'react'; import { connect } from 'react-redux'; import purchaseOrderModule from '../../../../modules/purchase-orders'; import NewPurchaseOrderView from '../../components/NewPurchaseOrderView'; import { baseMapStateToProps } from '../../../../common/container-helpers'; class NewPurchase...
nCoda-win32-x64/resources/app/js/react/svg_icons.js
nCoda/Windows
// -*- coding: utf-8 -*- // ------------------------------------------------------------------------------------------------ // Program Name: Julius // Program Description: User interface for the nCoda music notation editor. // // Filename: js/react/svg_icons.js // Purpose: SVG...
src/frontend/screens/Customer/add.js
Koleso/invoicer
import React from 'react'; // Components import { Grid, GridColumn } from 'components/Grid'; import Screen from 'components/Screen'; import Box from 'components/Box'; // Forms import CustomerContainer from 'containers/CustomerContainer'; const AddCustomer = () => ( <Screen title="Subjekty"pageTitle="Vytvoření novéh...
examples/sidebar/app.js
zipongo/react-router
import React from 'react' import { render } from 'react-dom' import { createHistory, useBasename } from 'history' import { Router, Route, Link } from 'react-router' import data from './data' require('./app.css') const history = useBasename(createHistory)({ basename: '/sidebar' }) class Category extends React.Compo...
test/InputSpec.js
Lucifier129/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import ReactDOM from 'react-dom'; import Button from '../src/Button'; import DropdownButton from '../src/DropdownButton'; import Glyphicon from '../src/Glyphicon'; import Input from '../src/Input'; import MenuItem from '../src/MenuItem';...
src/test/MainPage.spec.js
kikaxa42/server-pirsing-shop
import React from 'react'; import { mount, shallow } from 'enzyme'; import { expect } from 'chai'; import MainPage from '../components/MainPage'; import configureStore from '../redux/configureStore'; import { dataRequest, DATA_REQUEST_FINISHED, DATA_REQUEST_STARTED } from '../redux/actions/dataActions'; const...
spec/javascripts/jsx/gradezilla/GradebookSpec.js
venturehive/canvas-lms
/* * Copyright (C) 2017 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
src/Filter.js
tanbo800/react-ui
'use strict' import React from 'react' import classnames from 'classnames' //import { forEach } from '../utils/objects' import Button from './Button' import FilterItem from './FilterItem' import clickAway from './higherorder/clickaway' import { requireCss } from './themes' requireCss('filter') import {getLang, setLa...
client/src/pages/Login.js
alexandernanberg/luncha
import React from 'react' import { observer, inject } from 'mobx-react' import { Redirect } from 'react-router-dom' import queryString from 'query-string' import Form from '../components/common/Form' import Link from '../components/common/Link' import TextField from '../components/common/TextField' import Button from '...
client/node_modules/uu5g03/doc/main/client/src/data/source/uu5-common-color-schema-mixin.js
UnicornCollege/ucl.itkpd.configurator
import React from 'react'; import Environment from '../environment/environment.js' import './color-schema.less'; import './color-schema/default.less'; import './color-schema/yellow.less'; import './color-schema/yellow-rich.less'; import './color-schema/orange.less'; import './color-schema/orange-rich.less'; import './...
frontend/app/js/components/board/extractorselect.js
serverboards/serverboards
import React from 'react' import i18n from 'app/utils/i18n' import ServiceSelect from 'app/containers/service/select' import HoldButton from 'app/components/holdbutton' import GenericForm from 'app/components/genericform' import {object_is_equal, to_map} from 'app/utils' import Icon from '../iconicon' const ID_LIST="A...
src/js/components/icons/base/VmMaintenance.js
linde12/grommet
// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import CSSClassnames from '../../../utils/CSSClassnames'; import Intl from '../../../utils/Intl'; import Props from '../../../utils/Pro...
src/Parser/ElementalShaman/TALENT_DESCRIPTIONS.js
Yuyz0112/WoWAnalyzer
// import React from 'react'; // import SPELLS from 'common/SPELLS'; // import SpellLink from 'common/SpellLink'; export default { descriptions: { // [SPELLS.BESTOW_FAITH_TALENT.id]: <span><SpellLink id={SPELLS.BESTOW_FAITH_TALENT.id} /> is the default choice for most encounters in raids. The 5-second delay req...
packages/material-ui-icons/src/BusinessCenter.js
cherniavskii/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M10 16v-1H3.01L3 19c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2v-4h-7v1h-4zm10-9h-4.01V5l-2-2h-4l-2 2v2H4c-1.1 0-2 .9-2 2v3c0 1.11.89 2 2 2h6v-2h4v2h6c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm-6 0h-4V5h4v2z" /></g...
examples/js/manipulation/multi-search-table.js
dana2208/react-bootstrap-table
/* eslint max-len: 0 */ import React from 'react'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; const products = []; function addProducts(quantity) { const startId = products.length; const fruits = [ 'banana', 'apple', 'orange', 'tomato', 'strawberries', 'cherries' ]; for (let i =...
src/TimeColumn.js
elationemr/react-big-calendar
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import cn from 'classnames'; import dates from './utils/dates'; import { elementType } from './utils/propTypes'; import BackgroundWrapper from './BackgroundWrapper'; import TimeSlotGroup from './TimeSlotGroup' export default class TimeColum...
src/components/Line/InputLine.js
guokeke/myblog
import React from 'react'; // import withStyles from 'isomorphic-style-loader/lib/withStyles'; // import s from './style.css'; import Cursor from '../Cursor'; import { parserText } from './Line'; import BaseComponent from '../BaseComponent'; export default class InputLine extends BaseComponent { render() { const...
src/components/Compare/index.js
Rhymond/product-compare-react
import React from 'react' import './styles.css' const Compare = ({products}) => <div className="row compare"> <div className="col-12 mt-5 text-center"> <table className="table"> <thead className="thead-default"> <tr> <th /> {products.map(product => <t...
src/index.js
lujinming1/gallery-by-react
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './index.css'; window.onresize = function(){ window.location.reload(); window.location.href = ""; } ReactDOM.render( <App />, document.getElementById('root') );
javascript/src/views/Dropzone.js
unclecheese/silverstripe-kickassets
import React from 'react'; import Dropzone from 'dropzone'; import assign from 'object-assign'; Dropzone.prototype.getActiveFiles = function() { return this.files; }; const DropzoneComponent = React.createClass({ getDefaultProps () { return { disabled: false }; }, componentDidMount () { if(!t...
resources/js/components/Team/SearchMemberFormComponent.js
Stasgar/BugWall_Visual_Bugtracker
import React, { Component } from 'react'; import axios from "axios"; class SearchForm extends React.Component { constructor(props) { super(props); this.props = props; this.state = {users:[]}; this.api = this.props.api; } // Search users on input change updateInputValue(...
src/client.js
marduke182/react-redux-universal-hot-example
/* global __DEVTOOLS__ */ import React from 'react'; import BrowserHistory from 'react-router/lib/BrowserHistory'; import Location from 'react-router/lib/Location'; import createStore from './redux/create'; import ApiClient from './ApiClient'; import universalRouter from './universalRouter'; const history = new Browser...
src/decorators/initializer.js
cfsghost/lantern
import React from 'react'; import ReactDOM from 'react-dom'; function doAllActions(flux, actions) { for (var action in actions) { args = actions[action]; var _args = [ 'action.' + action ]; if (args instanceof Array) _args = _args.concat(args); flux.dispatch.apply(flux, _args); } } function doAction(...
src/svg-icons/action/book.js
skarnecki/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionBook = (props) => ( <SvgIcon {...props}> <path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"/> </SvgIcon> ); ActionBook = pure(ActionBook); Ac...
src/pages/la-folie.js
vitorbarbosa19/ziro-online
import React from 'react' import BrandGallery from '../components/BrandGallery' export default () => ( <BrandGallery brand='La Folie' /> )
src/components/Feedback/Feedback.js
SOCLE15/carpoule
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import withStyles from 'isom...
client/tests/components/dashboardNavbar.spec.js
3m3kalionel/PostIt
import React from 'react'; import { shallow } from 'enzyme'; import 'materialize-css/dist/js/materialize'; import DashboardNavbar from '../../components/dashboard/DashboardNavbar'; const enzymeWrapper = shallow(<DashboardNavbar />, { lifecycleExperimental: true }); describe('DashboardNavbar Component', () => { it...
frontend/app/blog/pages/TagDetail/TagDetail.js
briancappello/flask-react-spa
import React from 'react' import Helmet from 'react-helmet' import { compose } from 'redux' import { connect } from 'react-redux' import { bindRoutineCreators } from 'actions' import { PageContent } from 'components' import { injectReducer, injectSagas } from 'utils/async' import { loadTagDetail } from 'blog/actions'...
src/routes/ToDo/components/ToDo.js
MichalObi/redux-to-do-app
import React from 'react' let input; export const ToDo = (props) => ( <div> <h2>ToDo</h2> <div id='to-do'> <div id='add-to-do'> <input type='text' placeholder='add to do' ref={(node) => input = node} /> <button onClick={() => props.addTodo(input.value)}>Add to do</button> </div> ...
app/containers/DevTools.js
simongfxu/sync-editor
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 /> </Dock...
src/containers/NotFound/NotFound.js
martinval/boiler2
import React from 'react'; export default function NotFound() { return ( <div className="container"> <h1>Doh! 404!</h1> <p>These are <em>not</em> the droids you are looking for!</p> </div> ); }
docs/src/SupportPage.js
modulexcite/react-bootstrap
import React from 'react'; import NavMain from './NavMain'; import PageHeader from './PageHeader'; import PageFooter from './PageFooter'; export default class Page extends React.Component { render() { return ( <div> <NavMain activePage="support" /> <PageHeader title="Nee...
packages/enzyme-test-suite/test/_helpers/version.js
airbnb/enzyme
import React from 'react'; import semver from 'semver'; export const VERSION = React.version; export function is(range) { if (/&&/.test(range)) { throw new RangeError('&& may not work properly in ranges, apparently'); } return semver.satisfies(VERSION, range); } export const REACT16 = is('16');
example/examples/DefaultMarkers.js
jrichardlai/react-native-maps
import React from 'react'; import { StyleSheet, View, Text, Dimensions, } from 'react-native'; import MapView from 'react-native-maps'; const { width, height } = Dimensions.get('window'); const ASPECT_RATIO = width / height; const LATITUDE = 37.78825; const LONGITUDE = -122.4324; const LATITUDE_DELTA = 0.092...
src/svg-icons/action/invert-colors.js
mmrtnz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionInvertColors = (props) => ( <SvgIcon {...props}> <path d="M17.66 7.93L12 2.27 6.34 7.93c-3.12 3.12-3.12 8.19 0 11.31C7.9 20.8 9.95 21.58 12 21.58c2.05 0 4.1-.78 5.66-2.34 3.12-3.12 3.12-8.19 0-11.31zM12 1...
src/svg-icons/image/straighten.js
lawrence-yu/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageStraighten = (props) => ( <SvgIcon {...props}> <path d="M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z"/> </SvgIcon> ); ImageStr...
CoreCRM/ClientApp/src/views/Customer/router.js
holmescn/CoreCRM
import React from 'react'; import { Router, Route, IndexRoute } from 'dva/router'; import Layout from '../Layout'; import Index from './Index'; import Add from './Add'; import Edit from './Edit'; import Care from './Care'; import View from './View'; import Pool from './Pool'; import Statistics from './Statistics'; imp...
docs/src/PageFooter.js
albertojacini/react-bootstrap
import React from 'react'; import packageJSON from '../../package.json'; let version = packageJSON.version; if (/docs/.test(version)) { version = version.split('-')[0]; } const PageHeader = React.createClass({ render() { return ( <footer className="bs-docs-footer" role="contentinfo"> <div c...
src/routes/login/index.js
foxleigh81/foxweb
/** * 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 Layout from '../../co...
scanomatic/ui_server_data/js/src/containers/ImageUploadContainer.spec.js
Scan-o-Matic/scanomatic
import { mount } from 'enzyme'; import React from 'react'; import '../components/enzyme-setup'; import ImageUploadContainer from '../../src/containers/ImageUploadContainer'; import * as helpers from '../../src/helpers'; import cccMetadata from '../fixtures/cccMetadata'; import FakePromise from '../helpers/FakePromise'...
src/svg-icons/hardware/speaker.js
frnk94/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareSpeaker = (props) => ( <SvgIcon {...props}> <path d="M17 2H7c-1.1 0-2 .9-2 2v16c0 1.1.9 1.99 2 1.99L17 22c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5 2c1.1 0 2 .9 2 2s-.9 2-2 2c-1.11 0-2-.9-2-2s.89-2 2-2zm0 16c...
studio/ElectronPdfProperties.js
bjrmatos/jsreport-electron-pdf
import React, { Component } from 'react'; import Studio from 'jsreport-studio'; class ElectronPdfProperties extends Component { constructor(props) { super(props); this.state = { customPaperFormat: false, paperWidth: null, paperHeight: null }; } getStandardFormats() { return [...
src/app.js
YonasBerhe/randomface
import React from 'react'; import ReactDOM from 'react-dom'; import Todo from './components/Todo'; class App extends React.Component { helloWorld() { console.log("hello"); } render(){ console.log(this.helloWorld()); return( <div><Todo /> </div> ); } } ReactDOM.render(<App />, document.ge...
test/NavbarSpec.js
glenjamin/react-bootstrap
import React from 'react'; import { mount } from 'enzyme'; import Nav from '../src/Nav'; import Navbar from '../src/Navbar'; describe('<Navbar>', () => { it('Should create nav element', () => { mount(<Navbar />).assertSingle('nav.navbar.navbar-light'); }); it('Should add "navigation" role when not using a ...
src/js/components/settings/panel/Header.js
barumel/ultritium-radio-player
import React from 'react'; export class SettingsPanelHeader extends React.Component { constructor() { super(); } render() { const locked = this.props.locked ? 'lock' : 'unlock'; return( <div class="row"> <div class="col-md-10 col-xs-10" onClick={this.props.toggle}> <h4 class...
client/components/setupWizard/StepHeader.stories.js
subesokun/Rocket.Chat
import { number, text } from '@storybook/addon-knobs'; import React from 'react'; import { StepHeader } from './StepHeader'; export default { title: 'setupWizard/StepHeader', component: StepHeader, }; export const _default = () => <StepHeader number={number('number', 1)} title={text('title', 'Title')} />;
lib/cli/generators/REACT_NATIVE_SCRIPTS/template/storybook/index.js
rhalff/storybook
import React, { Component } from 'react'; import { AppRegistry } from 'react-native'; import { getStorybookUI, configure } from '@storybook/react-native'; // import stories configure(() => { require('./stories'); }, module); // This assumes that storybook is running on the same host as your RN packager, // to set m...
src/redux/utils/createDevToolsWindow.js
adrienhobbs/redux-glow
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import DevTools from '../../containers/DevToolsWindow'; export default function createDevToolsWindow (store) { const win = window.open( null, 'redux-devtools', // give it a name so it reuses the same window ...
examples/src/components/CustomRenderField.js
benchrise/react-select
import React from 'react'; import Select from 'react-select'; function logChange() { console.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments))); } var CustomRenderField = React.createClass({ displayName: 'CustomRenderField', propTypes: { delimiter: React.PropTypes.st...
stories/global-state.js
wmzy/formsy-antd
import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import { withState } from '@dump247/storybook-state'; import { Input, FormItem, Form } from 'formsy-antd'; import './styles.css'; function GlobalStateForm({store}) { const handleChange = data =...
source/containers/VideoPage/PageTab.js
mikey1384/twin-kle
import PropTypes from 'prop-types'; import React from 'react'; import FilterBar from 'components/FilterBar'; PageTab.propTypes = { onQuestionTabClick: PropTypes.func.isRequired, onWatchTabClick: PropTypes.func.isRequired, questions: PropTypes.array.isRequired, watchTabActive: PropTypes.bool.isRequired }; expo...
src/Views/CalendarView/MesoCalendar.js
herman113/workouts
import React, { Component } from 'react'; import CalendarWidget from '../../Components/vendor/BigCalendar'; export default class MesoCalendar extends Component { render() { return ( <div> <p>This is the meso calendar view.</p> <CalendarWidget view={'month'}/> </div> ); } }
frontend/js/components/admin/DeclineButton.js
roman901/Overheard
import React from 'react'; import axios from 'axios'; import UIButton from '../../ui/button/component'; export default class DeclineButton extends React.Component { constructor(props) { super(props); this.handleClick = this.handleClick.bind(this); } handleClick(e) { e.preventDefa...
loc_frontend/node_modules/react-router/es6/Lifecycle.js
marka2g/loc
'use strict'; import React from 'react'; import invariant from 'invariant'; var object = React.PropTypes.object; /** * The Lifecycle mixin adds the routerWillLeave lifecycle method to a * component that may be used to cancel a transition or prompt the user * for confirmation. * * On standard transitions, router...
examples/login/app.js
bitgaming/formsy-react
import React from 'react'; import ReactDOM from 'react-dom'; import { Form } from 'formsy-react'; import MyInput from './../components/Input'; const App = React.createClass({ getInitialState() { return { canSubmit: false }; }, submit(data) { alert(JSON.stringify(data, null, 4)); }, enableButton() { ...
test/app/components/Footer.spec.js
halumz/githubSearch
import { expect } from 'chai'; import sinon from 'sinon'; import React from 'react'; import TestUtils from 'react-addons-test-utils'; import Footer from '../../../app/components/Footer'; import style from '../../../app/components/Footer.css'; import { SHOW_ALL, SHOW_ACTIVE } from '../../../app/constants/TodoFilters'; ...
local-cli/templates/HelloNavigation/views/welcome/WelcomeText.ios.js
hoastoolshop/react-native
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! </Text> <...
src/components/Detail/children/Info.js
zhaohuanwener/company-search-react
import React from 'react' import axios from 'axios' import { message, Card, Table} from 'antd' import { parseUrl } from '../../../libs/utils' import './info.css' class Info extends React.Component { constructor(props) { super(props) this.state = { pagination: false }; } ...
react/src/components/buttons/SprkButton.js
sparkdesignsystem/spark-design-system
import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import SprkSpinner from '../spinners/SprkSpinner'; // TODO: Remove loading, spinningAriaLabel and disabled on next release #3557 const SprkButton = ({ additionalClasses, analyticsString, children, disabled, is...
local-cli/templates/HelloNavigation/views/welcome/WelcomeText.android.js
negativetwelve/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! </...
test/fixtures/webpack-message-formatting/src/AppCss.js
mangomint/create-react-app
import React, { Component } from 'react'; import './AppCss.css'; class App extends Component { render() { return <div className="App" />; } } export default App;
src/server.js
yomolify/customer-webserver
import Express from 'express'; import React from 'react'; import Location from 'react-router/lib/Location'; import config from './config'; import favicon from 'serve-favicon'; import compression from 'compression'; import httpProxy from 'http-proxy'; import path from 'path'; import createStore from './redux/create'; im...
src/shared/components/AccountEditForm/index.js
rvboris/financebutler
import React from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { push } from 'react-router-redux'; import { reduxForm, Field, SubmissionError, formValueSelector } from 'redux-form'; import { mapValues, pick, invert, get, isUndefined } from 'lodash'; import { defineMe...
src/components/common/svg-icons/image/add-to-photos.js
abzfarah/Pearson.NAPLAN.GnomeH
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageAddToPhotos = (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"/> ...
public/src/product/ProductRow.js
codelegant/react-action
/** * Author: CodeLai * Email: codelai@dotdotbuy.com * DateTime: 2016/7/14 16:46 */ import React from 'react'; export default class ProductRow extends React.Component { render() { const name = this.props.product.stocked ? this.props.product.name : <span style={{color: 'red'}}> {this.pr...
app/javascript/mastodon/components/icon_with_badge.js
tri-star/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import Icon from 'mastodon/components/icon'; const formatNumber = num => num > 40 ? '40+' : num; const IconWithBadge = ({ id, count, issueBadge, className }) => ( <i className='icon-with-badge'> <Icon id={id} fixedWidth className={className} /> ...
src/.stories/App.js
kctang/mdl-ui
import React from 'react'; import { storiesOf, action } from '@kadira/storybook'; import { App, assets } from '../index'; const { avatar } = assets; storiesOf('App', module) .add('title', () => { const props = { title: 'App', }; return <App {...props} />; }) .add('menuItems, onClickMenuItem', ...
app/components/PropertyNavButton/index.js
koofka/singleproperty_redux
import React from 'react'; import PropTypes from 'prop-types'; import { Map } from 'immutable'; import IconWrapper from './IconWrapper'; import Wrapper from './Wrapper'; import H1 from './H1'; import SVGIcon from '../SVGIcon'; const CARETUPICON = Map({ height: '1em', width: '1em', viewBox: '0 0 40 40', ddata: ...
src/svg-icons/device/screen-lock-portrait.js
hai-cea/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceScreenLockPortrait = (props) => ( <SvgIcon {...props}> <path d="M10 16h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1v-1c0-1.11-.9-2-2-2-1.11 0-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1zm.8-6c0-.66.54-1.2 1.2-1....
node_modules/rebass/src/Card.js
HasanSa/hackathon
import React from 'react' import Base from './Base' import config from './config' /** * Styled box with border */ const Card = ({ width, ...props }, { rebass }) => { const { scale, borderColor } = { ...config, ...rebass } const sx = { width, padding: scale[1], marginBottom: scale[2], borde...
example/src/app/class_decorator/code.js
glortho/react-keydown
import React from 'react'; import ReactDOM from 'react-dom'; const code = `<code> import React from &#x27;react&#x27;; import keydown from &#x27;react-keydown&#x27;; @keydown class MyComponent extends React.Component { constructor( props ) { super( props ); this.state = { key: &#x27;n/a&#x27; };...
src/index.js
IvanDart1001/C_gallery
import 'core-js/fn/object/assign'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/Main'; // Render the main component into the dom ReactDOM.render(<App />, document.getElementById('app'));
docs/src/app/components/pages/components/Tabs/ExampleSimple.js
rscnt/material-ui
import React from 'react'; import {Tabs, Tab} from 'material-ui/Tabs'; import Slider from 'material-ui/Slider'; const styles = { headline: { fontSize: 24, paddingTop: 16, marginBottom: 12, fontWeight: 400, }, }; function handleActive(tab) { alert(`A tab with this route property ${tab.props.route...
app/javascript/mastodon/components/relative_timestamp.js
ikuradon/mastodon
import React from 'react'; import { injectIntl, defineMessages } from 'react-intl'; import PropTypes from 'prop-types'; const messages = defineMessages({ today: { id: 'relative_time.today', defaultMessage: 'today' }, just_now: { id: 'relative_time.just_now', defaultMessage: 'now' }, seconds: { id: 'relative_time...
src/Demo.js
interaction-matters/component-structure-demo
import React, { Component } from 'react'; import Button from 'components/Button/Button'; export default class Demo extends Component { render() { return ( <div> <Button type="default">Default</Button>&nbsp; <Button type="primary">Primary</Button>&nbsp; <Button type="success">Success</Bu...
demo/react-0.14.3/React-Learning/react-notebook/js/hello.js
waterbolik/prestudy
import React from 'react'; let Hello = React.createClass({ render(){ return ( <div>Hello World!</div> ); } }); export default Hello;
app/js/components/Navbar.js
schlosser/shortener-web
'use strict'; import React from 'react'; import PropTypes from 'prop-types'; class Navbar extends React.Component { static get propTypes() { return { onSignOut: PropTypes.func, onToggleNav: PropTypes.func, }; } constructor(props) { super(props); } render() { return ( <na...
src/date-picker/SKRangePicker.js
ShaneKing/sk-antd
import {DatePicker} from 'antd'; import PropTypes from 'prop-types'; import React from 'react'; import {Mesgs, Proxy0, SK} from 'sk-js'; import CommonPicker from './CommonPicker'; import AntdComp from '../AntdComp'; let {RangePicker} = DatePicker; RangePicker.defaultProps = SK.extends(true, {}, {}, CommonPicker.defau...
src/static/index.js
Seedstars/django-react-redux-jwt-base
import React from 'react'; import ReactDOM from 'react-dom'; import createHistory from 'history/createBrowserHistory'; import { authLoginUserSuccess } from './actions/auth'; import Root from './containers/Root/Root'; import configureStore from './store/configureStore'; const initialState = {}; const target = documen...