path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
site/header.js
wangzuo/feng-ui
import React from 'react'; import { Link } from 'react-router'; module.exports = () => ( <div className="m-header"> <div className="g-c"> <h1> <Link to="/">feng-ui</Link> </h1> <nav className="f-fr"> <Link activeClassName="is-active" to="/">Getting started</Link> <Link ...
docs/app/Examples/collections/Grid/ResponsiveVariations/GridExampleReversedComputer.js
ben174/Semantic-UI-React
import React from 'react' import { Grid } from 'semantic-ui-react' const GridExampleReversedComputer = () => ( <Grid reversed='computer' columns='equal'> <Grid.Row> <Grid.Column>Computer A Fourth</Grid.Column> <Grid.Column>Computer A Third</Grid.Column> <Grid.Column>Computer A Second</Grid.Colu...
src/components/Group.js
PsychoLlama/luminary
import { TouchableWithoutFeedback, Vibration } from 'react-native'; import styled from 'styled-components/native'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import R from 'ramda'; import * as colors from '../constants/colors'; import * as actio...
src/client/viewer.components/Viewer.Extensions/Viewing.Extension.ScreenShotManager/Viewing.Extension.ScreenShotManager.js
jeremytammik/forgefader
///////////////////////////////////////////////////////// // Viewing.Extension.ScreenShotManager // by Philippe Leefsma, March 2017 // ///////////////////////////////////////////////////////// import './Viewing.Extension.ScreenShotManager.scss' import ContentEditable from 'react-contenteditable' import ExtensionBase fr...
components/admin/playerdata/PlayerData.js
nvbf/pepper
import React from 'react'; import styled from 'styled-components'; import { transparentize } from 'polished'; import { gql, graphql } from 'react-apollo'; import TableHead from './TableHead'; import PlayerLine from './PlayerLine'; import color from '../../../libs/color'; import type { Team as TeamType } from '../../../...
packages/reactor-kitchensink/src/examples/Charts/Line/SplineMarkers/SplineMarkers.js
dbuhrman/extjs-reactor
import React, { Component } from 'react'; import { Container } from '@extjs/ext-react'; import { Cartesian } from '@extjs/ext-react-charts'; import ChartToolbar from '../../ChartToolbar'; import storeData from './storeData'; export default class SplineMarkers extends Component { store = Ext.create('Ext.data.Store...
docs/src/app/components/pages/components/CircularProgress/Page.js
pancho111203/material-ui
import React from 'react'; import Title from 'react-title-component'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import circleProgressReadmeText from './README'; import circleProgressCode from ...
server/uiamsd.js
IveWong/uiams
import 'babel-core/polyfill'; import path from 'path'; import express from 'express'; import React from 'react'; import ReactDOM from 'react-dom/server'; import Router from './router/routes'; import Html from '../src/components/Html'; import { _SERVER } from '../src/config/conf'; const server = global.server = expres...
node_modules/react-slick/src/track.js
hong1012/FreePay
'use strict'; import React from 'react'; import assign from 'object-assign'; import classnames from 'classnames'; var getSlideClasses = (spec) => { var slickActive, slickCenter, slickCloned; var centerOffset, index; if (spec.rtl) { index = spec.slideCount - 1 - spec.index; } else { index = spec.index...
stories/Welcome.js
jesperancinha/buy-odd-react
import React from 'react'; const styles = { main: { margin: 15, maxWidth: 600, lineHeight: 1.4, fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif', }, logo: { width: 200, }, link: { color: '#1474f3', textDecoration: 'none', borderBottom: '1px ...
BackUp FIrebase/IQApp/src/components/common/ButtonLoginPage.js
victorditadi/IQApp
import React from 'react'; import { Text, TouchableOpacity, Dimensions } from 'react-native'; import { Button } from 'native-base'; var width = Dimensions.get('window').width; var height = Dimensions.get('window').height; const ButtonHome = ({ onPress, children, color}) => { const styles = { buttonStyle: { ...
app/components/TenantCard/index.js
medevelopment/UMA
import React from 'react'; import {Link, browserHistory} from 'react-router'; import FloatingActionButton from 'material-ui/FloatingActionButton'; import ModeEdit from 'material-ui/svg-icons/editor/mode-edit'; import TextField from 'material-ui/TextField'; import LoadingIndicator from '../LoadingIndicator'; import axio...
src/propTypes.es6.js
gynsolomon/reddit-mobile
import React from 'react'; var _listingSource = React.PropTypes.shape({ url: React.PropTypes.string.isRequired, }); var _listingResolutions = React.PropTypes.arrayOf(React.PropTypes.shape({ width: React.PropTypes.number.isRequired, height: React.PropTypes.number.isRequired, url: React.PropTypes.string.isRequi...
src/screens/MyPage/MuteSettings/MuteTagsSettings.js
alphasp/pxview
import React from 'react'; import { connect } from 'react-redux'; import { connectLocalization } from '../../../components/Localization'; import TagSettings from '../../../containers/TagsSettings'; import * as muteTagsActionCreators from '../../../common/actions/muteTags'; const MuteTagSettings = ({ muteTags, i18n, ad...
src/icon-button/test.js
twilson63/t63
import React from 'react' import test from 'tape' import { shallow } from 'enzyme' import IconButton from './' import MdMenu from 'react-icons/lib/md/menu' test('<IconButton />', t => { const wrapper = shallow( <IconButton> <MdMenu /> </IconButton> ) t.ok(wrapper.contains(<MdMenu />)) t.end() })
docs/src/app/components/pages/components/DropDownMenu/ExampleSimple.js
rhaedes/material-ui
import React from 'react'; import DropDownMenu from 'material-ui/DropDownMenu'; import MenuItem from 'material-ui/MenuItem'; const styles = { customWidth: { width: 200, }, }; export default class DropDownMenuSimpleExample extends React.Component { constructor(props) { super(props); this.state = {va...
tests/Octicon-test.js
insin/react-octicon
import expect from 'expect' import React from 'react' import {render, unmountComponentAtNode} from 'react-dom' import {Simulate} from 'react-dom/test-utils' import Octicon from 'src/' let {click} = Simulate describe('Octicon', () => { let node beforeEach(() => { node = document.createElement('div') }) ...
examples/with-redux-saga/components/clock.js
BlancheXu/test
import React from 'react' const pad = n => (n < 10 ? `0${n}` : n) const format = t => { const hours = t.getUTCHours() const minutes = t.getUTCMinutes() const seconds = t.getUTCSeconds() return `${pad(hours)}:${pad(minutes)}:${pad(seconds)}` } function Clock ({ lastUpdate, light }) { return ( <div class...
packages/react/examples/redux/src/index.js
hyoshizumi/hig
import {createStore, compose, applyMiddleware } from 'redux'; import { Provider } from 'react-redux' import React from 'react'; import ReactDOM from 'react-dom'; import thunk from 'redux-thunk'; import './index.css'; import 'hig-react/lib/hig-react.css'; import App from './containers/App'; import rootReducer from './...
js/react-redux-todos/components/App.js
xiecg/record
/* container 组件 component 目的 如何工作? (数据获取,状态更新) 如何显示 ?(样式,布局) 是否在数据流中? 是 否 读取数据 从 Redux 中获取 state 从 props 获取数据 修改数据 从 Redux 派发 action 从 props 调用回调函数 实现方式 由 react-dedux 生成 手写 */ import React from 'react'; import AddTodo from "../containers/AddTodo"; import VisibleTodoList fro...
app/pages/LocalVideoPage.js
360ls/desktop
import React from 'react'; import VideoPlayer from '../containers/VideoPlayer'; import VideoInfo from '../containers/VideoInfo'; import VideoNav from '../containers/VideoNav'; import VideoList from '../containers/VideoList'; const LocalVideoPage = () => ( <div> <VideoNav /> <VideoPlayer /> <div id="loca...
node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js
loveDstyle/angularExample
import React from 'react'; import { render } from 'react-dom'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; render(<HelloWorld />, document.getElementById('react-root'));
lib/widgets/TogglePanel/index.js
Kitware/light-viz
import clone from 'mout/src/lang/clone'; import intersection from 'mout/src/array/intersection'; import SvgIcon from 'paraviewweb/src/React/Widgets/SvgIconWidget'; import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import style from 'LightVizStyle/TogglePanel.mcss...
examples/immutable/src/components/NavBar.js
supasate/connected-react-router
import React from 'react' import { Link } from 'react-router-dom' const NavBar = () => ( <div> <div><Link to="/">Home</Link> <Link to="/hello">Hello</Link> <Link to="/counter">Counter</Link></div> </div> ) export default NavBar
app/containers/home/HomeContainer.js
m0t0r/duckr-redux-app
import React from 'react'; import {Home} from 'components'; const HomeContainer = React.createClass({ render () { return ( <Home/> ); } }); export default HomeContainer;
src/admin.js
livinglab/webwork-for-wordpress
import ReactDOM from 'react-dom'; import React from 'react'; import ComponentLibrary from './components/component-library'; ReactDOM.render( <ComponentLibrary />, document.getElementById( 'wp-react-component-library' ) );
fixtures/attribute-behavior/src/index.js
facebook/react
import './index.css'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render(<App />, document.getElementById('root'));
docs-ui/components/charts-breakdownBars.stories.js
beeftornado/sentry
import React from 'react'; import {withInfo} from '@storybook/addon-info'; import BreakdownBars from 'app/components/charts/breakdownBars'; export default { title: 'Charts/BreakdownBars', }; export const Default = withInfo('Horizontal bar chart with labels')(() => { const data = [ {label: 'unknown', value: 9...
src/components/StrongMessageBrick/index.js
line64/landricks-components
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import styles from './styles'; import { ThemePropagator, GenericBrick } from '../../'; class StrongMessageBrick extends Component { renderMessageLevel1(styles, props) { if (props.renderMessageLevel1) { return props.renderMessag...
docs/src/app/components/pages/components/Stepper/HorizontalLinearStepper.js
mmrtnz/material-ui
import React from 'react'; import { Step, Stepper, StepLabel, } from 'material-ui/Stepper'; import RaisedButton from 'material-ui/RaisedButton'; import FlatButton from 'material-ui/FlatButton'; /** * Horizontal steppers are ideal when the contents of one step depend on an earlier step. * Avoid using long step ...
src/client/routes.js
ngnono/hello-babel
/** * Created by ngnono on 16-12-30. */ import React from 'react'; import {Router,Redirect, Route, IndexRoute, hashHistory, browserHistory} from 'react-router'; import Counter from './containers/CounterContainer'; import App from './containers/AppContainer'; import Home from './containers/HomeContainer'; import Show ...
src/app_components/app_text_input.js
Dewire/dehub-react-native
import { View, TextInput } from 'react-native'; import PropTypes from 'prop-types'; import React from 'react'; import * as globalStyles from '../styles/global'; const AppTextInput = ({ children, style, containerFlex, ...rest }) => ( // We wrap the text input in a View here to remove inconsistencies that exist betwe...
packages/components/src/HttpError/HttpError.stories.js
Talend/ui
import React from 'react'; import { action } from '@storybook/addon-actions'; import HttpError from './HttpError.component'; const commonStyle = { height: '60rem', backgroundPosition: 'left bottom', backgroundRepeat: 'no-repeat', }; const forbiddenStyle = { ...commonStyle, backgroundPositionX: '10rem', backgro...
app/javascript/mastodon/main.js
masto-donte-com-br/mastodon
import * as registerPushNotifications from './actions/push_notifications'; import { setupBrowserNotifications } from './actions/notifications'; import { default as Mastodon, store } from './containers/mastodon'; import React from 'react'; import ReactDOM from 'react-dom'; import ready from './ready'; const perf = requ...
app/javascript/mastodon/components/loading_indicator.js
yi0713/mastodon
import React from 'react'; import { FormattedMessage } from 'react-intl'; const LoadingIndicator = () => ( <div className='loading-indicator'> <div className='loading-indicator__figure' /> <FormattedMessage id='loading_indicator.label' defaultMessage='Loading...' /> </div> ); export default LoadingIndicat...
src/components/header.js
JakeGinnivan/Drone
import React from 'react' import { Link } from 'react-router' export default () => ( <div> <Link to="/repositories">Repositories</Link> <Link to="/issues">Issues</Link> </div> )
modules/__tests__/isActive-test.js
ksivam/react-router
/*eslint-env mocha */ import expect from 'expect' import React from 'react' import createHistory from 'history/lib/createMemoryHistory' import IndexRoute from '../IndexRoute' import Router from '../Router' import Route from '../Route' describe('isActive', function () { let node beforeEach(function () { node =...
client/pages/sharepage.js
mickael-kerjean/nuage
import React from 'react'; import { Redirect } from 'react-router'; import { Share } from '../model/'; import { notify, basename, filetype, findParams } from '../helpers/'; import { Loader, Input, Button, Container, ErrorPage, Icon, NgIf } from '../components/'; import './error.scss'; import './sharepage.scss'; @Erro...
admin/src/components/ListHeaderTitle.js
developer-prosenjit/keystone
import classnames from 'classnames'; import CurrentListStore from '../stores/CurrentListStore'; import Popout from './Popout'; import PopoutList from './PopoutList'; import React from 'react'; import vkey from 'vkey'; import { FormNote } from 'elemental'; const Transition = React.addons.CSSTransitionGroup; var ListHe...
src/Components/CoffeeFilter.js
Zangriev/SampleApplication
import React, { Component } from 'react'; import CoffeeStore from "../Stores/Coffee"; let getState = () => { return { processings: CoffeeStore.getProcessings(), filter: CoffeeStore.getFilter() }; }; class CoffeeFilter extends Component { constructor(props) { super(props); this.state = getState(...
src/index.js
tiberiuc/react-redux-minimal-starter
import styles from './css/style.scss' import React from 'react' import ReactDOM from 'react-dom' import createBrowserHistory from 'history/lib/createBrowserHistory' import App from './pages/App' import configureStore from './stores' const store = configureStore() const targetEl = document.getElementById('root') c...
src/checkbox/__tests__/CheckBox.js
fengshanjian/react-native-komect-uikit
import React from 'react'; import { shallow } from 'enzyme'; import toJson from 'enzyme-to-json'; import CheckBox from '../CheckBox'; describe('CheckBox Component', () => { it('should render without issues', () => { const component = shallow(<CheckBox />); expect(component.length).toBe(1); expect(toJson...
fields/types/money/MoneyField.js
pswoodworth/keystone
import Field from '../Field'; import React from 'react'; import { FormInput } from 'elemental'; module.exports = Field.create({ displayName: 'MoneyField', valueChanged (event) { var newValue = event.target.value.replace(/[^\d\s\,\.\$€£¥]/g, ''); if (newValue === this.props.value) return; this.props.onChange(...
src/routes/Spots/components/SpotEdit.js
ZeusTheTrueGod/WindsurfingNetwork-client
// @flow import React from 'react'; import SpotEditForm from './SpotEditForm'; import { Grid } from 'react-bootstrap'; import { type SpotForm, type Values } from '../modules/spotEdit'; export type StateProps = {| form: ?SpotForm, |}; export type DispatchProps = {| onSubmit: (values: Values) => any, onCancel: () ...
__tests__/index.ios.js
wm4n/mcdonald-tw
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 /> ); });
client/admin/settings/inputs/IntSettingInput.js
subesokun/Rocket.Chat
import { Box, Field, Flex, InputBox } from '@rocket.chat/fuselage'; import React from 'react'; import { ResetSettingButton } from '../ResetSettingButton'; export function IntSettingInput({ _id, label, value, placeholder, readonly, autocomplete, disabled, onChangeValue, hasResetButton, onResetButtonClick, })...
src/routes.js
JeremyJonas/react-redux-universal-hot-example
import React from 'react'; import {Route} from 'react-router'; import { App, Home, Widgets, About, Login, RequireLogin, LoginSuccess, Survey, NotFound, } from 'containers'; export default function(store) { return ( <Route component={App}> <Route path="/" component={Hom...
tests/NavPath-test.js
KirillYoYo/Banks
import React from 'react'; import { expect } from 'chai'; import { shallow, mount, render } from 'enzyme'; import { Breadcrumb } from 'antd'; import NavPath from '../src/components/NavPath/index.jsx'; describe("<NavPath />", function() { const navpath = [ { key: '1', name: '面包屑1' }, { k...
src/widgets/Rectangle.js
sussol/mobile
import React from 'react'; import { View } from 'react-native'; import PropTypes from 'prop-types'; import { DANGER_RED } from '../globalStyles'; const SIZES = { large: { width: 120, height: 40 }, }; export const Rectangle = ({ children, colour, size }) => { const dimensions = SIZES[size]; const background = {...
app/static/scripts/layout/header/main.js
joshleeb/WordpressPylon
import AuthActions from '../../auth/actions.js'; import AuthStore from '../../auth/store.js'; import AuthConstants from '../../auth/constants.js'; import {IndexLink} from 'react-router'; import React from 'react'; require('./styles.scss'); export default class Header extends React.Component { constructor() { s...
src/components/App.js
vvinhas/react-redux-boilerplate
/** * This is your main component. Feel free to change it however you want. */ import React from 'react'; const App = () => ( <div className="hero is-success is-bold is-fullheight"> <div className="hero-body"> <div className="container has-text-centered"> <h1 className="title is-1">You made it!</h1> </d...
definitions/npm/redux-form_v5.x.x/flow_>=v0.22.1/redux-form_v5.x.x.js
LegNeato/flow-typed
// @flow import React from 'react'; declare module 'redux-form' { declare type InputProps = { name: string, value: string | number | boolean, valid: boolean, invalid: boolean, dirty: boolean, pristine: boolean, active: boolean, touched: boolean, visited: boolean, autofilled: b...
docs/Documentation/IconPage.js
reactivers/react-mcw
/** * Created by muratguney on 29/03/2017. */ import React from 'react'; import {Card, CardHeader,Icon,Table, TableRow, TableHeaderColumn, TableHeader, TableRowColumn, TableBody} from '../../lib'; import HighLight from 'react-highlight.js' export default class CardPage extends React.Component { state = {open: f...
src/svg-icons/file/cloud-off.js
mmrtnz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let FileCloudOff = (props) => ( <SvgIcon {...props}> <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-...
client/src/components/layouts/GuideLayout.js
pahosler/freecodecamp
import React from 'react'; import PropTypes from 'prop-types'; import { StaticQuery, graphql } from 'gatsby'; import { Col, Row } from '@freecodecamp/react-bootstrap'; import { NavigationContext } from '../../contexts/GuideNavigationContext'; import DefaultLayout from './Default'; import SideNav from './components/gui...
src/svg-icons/image/burst-mode.js
nathanmarks/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageBurstMode = (props) => ( <SvgIcon {...props}> <path d="M1 5h2v14H1zm4 0h2v14H5zm17 0H10c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zM11 17l2.5-3.15L15.29 16l2.5-3.22L21 17H11z"/...
src/components/login.js
hlebbobulka/react-cart
import React from 'react'; import axios from 'axios'; import Form from "react-jsonschema-form"; const log = (type) => console.log.bind(console, type); const loginForm = { "title": "Войти", "description": "Уже зарегистрированы? Войдите:", "type": "object", "required": [ "email", "password" ], "prope...
src/containers/Asians/TabControls/_components/AdjudicatorsAddMany/EvaluateComponent/index.js
westoncolemanl/tabbr-web
import React from 'react' import { connect } from 'react-redux' import Button from 'material-ui/Button' import Instance from './Instance' import findInvalidInstitutions from './findInvalidInstitutions' import onSubmit from './onSubmit' export default connect(mapStateToProps)(({ draft, onChange, institutions, ...
src/components/Contentful/StaticContent/Sidebar/presenter.js
ndlib/usurper
// Presenter component for a Floor content type from Contentful import React from 'react' import PropTypes from 'prop-types' import 'static/css/global.css' import LibMarkdown from 'components/LibMarkdown' import PageLink from '../../PageLink' import Librarians from 'components/Librarians' import Related from '../../Rel...
packages/xo-web/src/common/xo/import-vdi-modal/index.js
vatesfr/xo-web
import _ from 'intl' import Component from 'base-component' import Dropzone from 'dropzone' import React from 'react' export default class ImportVdiModalBody extends Component { get value() { return this.state.file } render() { const { file } = this.state return ( <Dropzone onDrop={thi...
4-add-universal/src/layout/index.js
chemoish/react-universal-tutorial
import React from 'react'; import { Link } from 'react-router'; export default function Layout(props) { return ( <div> <header> <nav> <ul> <li> <Link to="/">Home</Link> </li> <li> <Link to="/about">About</Link> ...
app/app/components/Dashboard/DashboardHeader.js
lycha/masters-thesis
import React from 'react'; class DashboardHeader extends React.Component { constructor(props) { super(props); this.displayName = 'DashboardHeader'; this.title = ""; } componentWillUpdate(nextProps, nextState) { if (typeof nextProps.product != 'undefined' && typeof nextProps.entity !=...
node_modules/react-router/es6/Lifecycle.js
ZSMingNB/react-news
import warning from './routerWarning'; 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 stan...
src/components/Card.js
henrytao-me/react-native-mdcore
import React from 'react' import { View } from 'react-native' import PropTypes from './PropTypes' import PureComponent from './PureComponent' import StyleSheet from './StyleSheet' export default class Card extends PureComponent { static contextTypes = { theme: PropTypes.any } render() { const { theme ...
packages/@lyra/default-layout/src/components/ErrorBorkImage.js
VegaPublish/vega-studio
import React from 'react' const ErrorBorkImage = () => ( <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 680 680"> <path fill="#f85040" d="M223 190c-3 2-3 3-2 12a2299 2299 0 0 1 11 119l1 5 13 4 17 5c6 0 20 3 41 7 17 4 31 6 50 8a304 304 0 0 1 48 8c6 0 24 2 30 4 6 1 26 3 30 2l4-2c1-4-1-25-3-40l-7-...
fields/types/date/DateFilter.js
BlakeRxxk/keystone
import _ from 'underscore'; import classNames from 'classnames'; import React from 'react'; import { FormField, FormInput, FormRow, FormSelect, SegmentedControl } from 'elemental'; const TOGGLE_OPTIONS = [ { label: 'Matches', value: false }, { label: 'Does NOT Match', value: true } ]; const MODE_OPTIONS = [ { lab...
fields/types/geopoint/GeoPointField.js
jacargentina/keystone
import Field from '../Field'; import React from 'react'; import { FormRow, FormField, FormInput } from 'elemental'; module.exports = Field.create({ displayName: 'GeopointField', focusTargetRef: 'lat', valueChanged (which, event) { this.props.value[which] = event.target.value; this.props.onChange({ path: t...
src/js/components/dialogs/dialog-operation-button/dialog-operation-button.js
ucev/blog
import React from 'react' import './dialog-operation-button.style.scss' export default ({ buttonType = '', title = '', click = () => {} }) => { let className = 'dialog-operation-button' if (buttonType) { className += ` dialog-${buttonType}-button` } return ( <button className={className} onClick={clic...
client/component/result/column/context-value.js
johngodley/search-regex
/** * External dependencies */ import React from 'react'; import { translate as __ } from 'i18n-calypso'; /** * Internal dependencies */ import ContextType from '../context-type'; function ContextValue( { context, rowId, column, schema, setReplacement, className } ) { if ( context.type === 'keyvalue' ) { ret...
blueprints/form/files/__root__/forms/__name__Form/__name__Form.js
SurfaceW/connectify_client
import React from 'react' import { reduxForm } from 'redux-form' export const fields = [] const validate = (values) => { const errors = {} return errors } type Props = { handleSubmit: Function, fields: Object, } export class <%= pascalEntityName %> extends React.Component { props: Props; defaultProps = ...
src/routes/notFound/NotFound.js
OlegVitiuk/Majsternia
/** * 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-...
docs/src/Root.js
aabenoja/react-bootstrap
import React from 'react'; import Router from 'react-router'; const Root = React.createClass({ statics: { /** * Get the doctype the page expects to be rendered with * * @returns {string} */ getDoctype() { return '<!doctype html>'; }, /** * Get the list of pages that a...
packages/icons/src/md/action/Backup.js
suitejs/suitejs
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdBackup(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M38.71 20.07C43.89 20.44 48 24.72 48 30c0 5.52-4.48 10-10 10H12C5.37 40 0 34.63 0 28c0-6.19 4.69-11.28 10.7-11.93C13.21 11.28 18.22 8 24 8c7.28 0 13.3...
test/specs/collections/Message/MessageList-test.js
mohammed88/Semantic-UI-React
import React from 'react' import MessageList from 'src/collections/Message/MessageList' import * as common from 'test/specs/commonTests' describe('MessageList', () => { common.isConformant(MessageList) common.implementsCreateMethod(MessageList) common.rendersChildren(MessageList) it('renders an ul tag', () =>...
wrappers/md.js
Slava/ats-website
import React from 'react' import 'css/markdown-styles.css' import Helmet from 'react-helmet' import { config } from 'config' module.exports = React.createClass({ propTypes () { return { router: React.PropTypes.object, } }, render () { const post = this.props.route.page.d...
examples/pubsub/src/components/Posts.js
quandhz/resaga
import React from 'react'; import PropTypes from 'prop-types'; const Posts = ({ posts }) => { const list = posts.map((post, i) => <li key={i}>{post.title}</li>); return <ul>{list}</ul>; }; Posts.propTypes = { posts: PropTypes.array, }; Posts.defaultProps = { posts: [], }; export default Posts;
wrappers/md.js
eleacrockett/portfolio
import React from 'react' import 'css/markdown-styles.css' import Helmet from 'react-helmet' import { config } from 'config' module.exports = React.createClass({ propTypes () { return { router: React.PropTypes.object, } }, render () { const post = this.props.route.page.data return ( <...
src/screens/gists/gists_component.js
Dewire/dehub-react-native
import React, { Component } from 'react'; import { View, Text, StyleSheet, SectionList, TouchableHighlight, } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; import ContainerView from '../../app_components/container_view'; import SeparatorLine from '../../app_components/separator_...
src/components/electorates/ResultTwoPartyPreferredByCandidate.js
deepak-kapoor/react-elections-dashboard
import React, { Component } from 'react'; import 'whatwg-fetch'; export class ResultTwoPartyPreferredByCandidate extends Component { constructor(props) { super(props); this.state = {votes: {}}; this.getVotes = this.getVotes.bind(this); } componentDidMount() { this.getVotes(); } getVotes() {...
src/containers/Details.spec.js
rak2112/movie-base
import React from 'react'; import {shallow} from 'enzyme'; import chai, {expect} from 'chai'; import sinon from 'sinon'; import sinonChai from 'sinon-chai'; import MovieModal from '../components/Modal'; import MovieDetails from '../components/MovieDetails'; import Loader from '../components/Loader'; import Error from ...
src/Editor/index.js
jpuri/react-draft-wysiwyg
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Editor, EditorState, RichUtils, convertToRaw, convertFromRaw, CompositeDecorator, getDefaultKeyBinding, } from 'draft-js'; import { changeDepth, handleNewLine, blockRenderMap, getCustomStyleMap, extractInlineS...
react-semi-theme/src/greetings/Hello.js
tsupol/semi-starter
import React from 'react'; // Since this component is simple and static, there's no parent container for it. const Hello = () => { return ( <div> <h2>Hello from semi theme!</h2> </div> ); }; export default Hello;
app/javascript/mastodon/features/ui/components/column_link.js
MitarashiDango/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import Icon from 'mastodon/components/icon'; const ColumnLink = ({ icon, text, to, href, method, badge }) => { const badgeElement = typeof badge !== 'undefined' ? <span className='column-link__badge'>{badge}</span...
src/layouts/PageLayout/PageLayout.js
ZachShaw/portfolio-react
import React from 'react' import { IndexLink, Link } from 'react-router' import PropTypes from 'prop-types' import Navbar from '../../components/Navbar' import { CSSTransitionGroup } from 'react-transition-group'; import './PageLayout.scss' export const PageLayout = ({ children, location }) => { let displayNav = () ...
Client/src/modules/auth/AuthDispatcher.js
Aldarov/StudentEmployment
import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { Redirect } from 'react-router-dom'; export default (ChildComponent) => { class AuthDispatcher extends Component { render() { return ( this.props.isAuth ? <ChildCom...
app/components/svg-image.spec.js
parrish/Panoptes-Front-End
import React from 'react' import assert from 'assert' import SVGImage from './svg-image' import {shallow, render} from 'enzyme' describe('SVGImage', function(){ it('should render without crashing', function(){ shallow(<SVGImage src="barfoo.png" width={100} height={100} />) }); it('it should contain an image...
node_modules/react-sparklines/__tests__/fixtures.js
TheeSweeney/ComplexReactReduxMiddlewareReview
// This file is auto-updated by ../bootstrap-tests.js import React from 'react'; import { Sparklines, SparklinesBars, SparklinesLine, SparklinesCurve, SparklinesNormalBand, SparklinesReferenceLine, SparklinesSpots } from '../src/Sparklines'; import { sampleData, sampleData100 } from './sampleData'; export default { ...
client/components/icons/icon-components/exit-white.js
HelpAssistHer/help-assist-her
import React from 'react' export default function ExitWhite(props) { return ( <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" {...props} > {/* Generator: Sketch 46.2 (44496) - http://www.bohemian...
packages/node_modules/@webex/react-component-cover/src/index.js
adamweeks/react-ciscospark-1
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import styles from './styles.css'; const propTypes = { message: PropTypes.string.isRequired }; function Cover({message}) { return ( <div className={classNames('webex-cover-message', styles.message)}> <di...
src/components/ChatBox/ChatBoxCard/ChatBoxCard.js
renesansz/react-chat
import React from 'react'; import './ChatBoxCard.css'; class ChatBoxCard extends React.Component { render() { let className = 'ChatBoxCard'; if (this.props.isUserAuthor) className += ' me'; else if (this.props.author === 'System') className += ' system'; r...
src/common/components/Paragraph.js
TheoMer/este
// @flow import type { TextProps } from './Text'; import type { Theme } from '../themes/types'; import Text from './Text'; import React from 'react'; type ParagraphContext = { theme: Theme, }; const Paragraph = (props: TextProps, { theme }: ParagraphContext) => { const { marginBottom = theme.paragraph.marginB...
app/app.js
rodrigoTrespalacios/project-bank
/** * app.js * * This is the entry file for the application, only setup and boilerplate * code. */ import 'babel-polyfill'; /* eslint-disable import/no-unresolved */ // Load the manifest.json file and the .htaccess file import '!file?name=[name].[ext]!./manifest.json'; import 'file?name=[name].[ext]!./.htaccess';...
app/containers/LoginProgressModal/index.js
VonIobro/ab-web
/** * Created by helge on 09.03.17. */ import React from 'react'; import { connect } from 'react-redux'; import { formValueSelector } from 'redux-form/immutable'; import Radial from '../../components/RadialProgress'; export function LoginProgressWrapper(props) { return ( <div> <h2>Waiting to login ... <...
src/components/ScopedNotification/__tests__/ScopedNotifcation.spec.js
propertybase/react-lds
import React from 'react'; import { mount } from 'enzyme'; import ScopedNotification from '../ScopedNotification'; import { Icon } from '../../Icon'; import { MediaObject } from '../../MediaObject'; const getComponent = (props = {}) => mount( <ScopedNotification {...props}> <div className="test">Test</div> </...
src/Accordion.js
thealjey/react-bootstrap
import React from 'react'; import PanelGroup from './PanelGroup'; const Accordion = React.createClass({ render() { return ( <PanelGroup {...this.props} accordion> {this.props.children} </PanelGroup> ); } }); export default Accordion;
src/interface/icons/Warning.js
sMteX/WoWAnalyzer
import React from 'react'; // https://thenounproject.com/search/?q=warning&i=976488 // Warning by Gregor Cresnar from the Noun Project const Icon = ({ ...other }) => ( <svg xmlns="http://www.w3.org/2000/svg" viewBox="15 15 70 70" className="icon" {...other}> <path d="M52.64,21a3,3,0,0,0-5.28,0L16.08,75.23a3.5,3....
actor-apps/app-web/src/app/components/modals/create-group/Form.react.js
it33/actor-platform
import _ from 'lodash'; import Immutable from 'immutable'; import keymirror from 'keymirror'; import React from 'react'; import { Styles, TextField, FlatButton } from 'material-ui'; import CreateGroupActionCreators from 'actions/CreateGroupActionCreators'; import ContactStore from 'stores/ContactStore'; import Cont...
web/components/screens/GameFull/index.fixture.js
skidding/flatris
// @flow import React from 'react'; import GameFull from '.'; export default { default: ( <GameFull disabled={false} onWatch={() => console.log('Just watch')} /> ), disabled: ( <GameFull disabled={true} onWatch={() => console.log('Just watch')} /> ), };
src/List/List.js
react-fabric/react-fabric
import React from 'react' import elementType from 'react-prop-types/lib/elementType' // import ListItem from '../ListItem' import fabricComponent from '../fabricComponent' import style from './List.scss' const List = ({ children, componentClass: Component, selectable, ...props }) => ( <Component data-fabric="List"...
src/layouts/FooteredLayout/FooteredLayout.spec.js
diMosellaAtWork/GeoWeb-FrontEnd
import React from 'react'; import FooteredLayout from './FooteredLayout'; import { shallow } from 'enzyme'; import { Col } from 'reactstrap'; describe('(Layout) FooteredLayout', () => { it('Renders a Reactstrap Container', () => { const _component = shallow(<FooteredLayout route={{}} />); expect(_component.t...