path
stringlengths
5
195
repo_name
stringlengths
5
79
content
stringlengths
25
1.01M
frontend-semantic-ui-react/app/js/components/Menu.js
lusarz/todos-manager
import React from 'react'; import { Header, Menu as SemanticMenu, Input } from 'semantic-ui-react'; export default class Menu extends React.Component { state = { activeItem: 'home' } handleItemClick = (e, { name }) => this.setState({ activeItem: name }) render() { const { activeItem } = this.state re...
docs/app/Examples/elements/List/Variations/ListExampleRelaxed.js
aabustamante/Semantic-UI-React
import React from 'react' import { Image, List } from 'semantic-ui-react' const ListExampleRelaxed = () => ( <List relaxed> <List.Item> <Image avatar src='/assets/images/avatar/small/daniel.jpg' /> <List.Content> <List.Header as='a'>Daniel Louise</List.Header> <List.Description>Last s...
src/components/core/post-share.js
meherranjan/aerosailor
import React from 'react' import facebook from '../../../static/social/facebook-dark.svg' import twitter from '../../../static/social/twitter-dark.svg' import linkedin from '../../../static/social/linkedin-dark.svg' import './post-share.scss' const sharerList = [ { alt: 'Share Article on Facebook', icon: fac...
js/jqwidgets/demos/react/app/scheduler/defaultfunctionality/app.js
luissancheza/sice
import React from 'react'; import ReactDOM from 'react-dom'; import JqxScheduler from '../../../jqwidgets-react/react_jqxscheduler.js'; class App extends React.Component { componentDidMount () { this.refs.myScheduler.ensureAppointmentVisible('id1'); } render () { let appointments = new Array...
examples/04 Sortable/Stress Test/index.js
cesarandreu/react-dnd
import React, { Component } from 'react'; import Container from './Container'; export default class SortableStressTest extends Component { constructor(props) { super(props); // Avoid rendering on server because the big data list is generated this.state = { shouldRender: false }; } componentDidMount(...
stories/features.stories.js
ja0n/sticky
import React from 'react'; import { storiesOf } from '@storybook/react'; import { Container } from '../src/react/components'; import zoomFlows from './flows/zoom-flows.json'; storiesOf('Features', module) .add('Zoom In and Out', () => ( <div id="container"> <div id="test"> <Container onLo...
src/components/Assistance.js
umgauper/USDA-UX-Challenge
import React, { Component } from 'react'; import { Link } from 'react-router'; export default class Assistance extends Component { constructor(props) { super(props); } render() { return ( <div> <h3>Assistance Section </h3> {this.props.children} </div> ) } }
examples/js/expandRow/custom-expand-indicator.js
powerhome/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; for (let i = 0; i < quantity; i++) { const id = startId + i; if (i < 3) { products.push...
src/components/InteractiveElement/InteractiveElement.stories.js
austinknight/ui-components
import React from 'react'; import { storiesOf, action } from '@storybook/react'; import InteractiveElement from './'; import { wrapComponentWithContainerAndTheme, colors, } from "../styles"; function renderChapterWithTheme(theme) { return { info: ` Usage ~~~ import React from 'react'; ...
packages/components/src/Typeahead/Typeahead.stories.js
Talend/ui
import React from 'react'; import { action } from '@storybook/addon-actions'; import Typeahead from './Typeahead.component'; const items = [ { title: 'Search in', hint: true, suggestions: [ { title: 'First hint example', }, { title: 'Second hint example', }, ], }, { title: 'category 1'...
ui/js/components/TextHelp.js
ericsoderberg/pbc-web
import React, { Component } from 'react'; const HELP = `# Heading ## Heading * list item *italic* **bold** [link label](link url) > quote `; export default class TextHelp extends Component { constructor() { super(); this._onToggle = this._onToggle.bind(this); this.state = { active: false }; } _onT...
src/components/LeagueList.js
wdavew/king-pong
import React, { Component } from 'react'; import LeagueOption from './LeagueOption.js' function LeagueList({leagues, enterLeague}) { const liLeagues = leagues.map((league, index) => <LeagueOption clickHandler={enterLeague} leagueName={league} key={index} />); return ( <div className='container'> <div cla...
src/svg-icons/av/volume-down.js
skarnecki/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvVolumeDown = (props) => ( <SvgIcon {...props}> <path d="M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 5V4L9 9H5z"/> </SvgIcon> ); AvVolumeDown = pure(AvVolumeDown); AvVolumeD...
packages/material-ui-icons/src/FormatLineSpacing.js
AndriusBil/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let FormatLineSpacing = props => <SvgIcon {...props}> <path d="M6 7h2.5L5 3.5 1.5 7H4v10H1.5L5 20.5 8.5 17H6V7zm4-2v2h12V5H10zm0 14h12v-2H10v2zm0-6h12v-2H10v2z" /> </SvgIcon>; FormatLineSpacing = pure(Form...
src/lib/statusHelper.js
katima-g33k/blu-react-desktop
import React from 'react'; import { Label } from 'react-bootstrap'; import Item from './models/Item'; const statusHelper = { getLabel: (item) => { let style; switch (item.getStatus()) { case Item.STATUS.VALID: style = 'success'; break; case Item.STATUS.OUTDATED: style = '...
app/auth/containers/AuthPage/LoginPage.js
in42/internship-portal
import React from 'react'; import PropTypes from 'prop-types'; import _ from 'lodash'; import { withRouter } from 'react-router-dom'; import Auth from '../../modules/Auth'; import User from '../../modules/User'; import LoginForm from '../../components/AuthPage/LoginForm'; class LoginPage extends React.Component { co...
react-components/src/library/components/assigments/index.js
concord-consortium/rigse
import React from 'react' import ClassAssignments from './class-assignments' import { reportableActivityMapping, studentMapping } from '../common/offering-progress/helpers' import sortByName from '../../helpers/sort-by-name' import OfferingsTable from './offerings-table' import { arrayMove } from 'react-sortable-hoc' ...
src/js/components/icon/index.js
JetMixTech/CallBack
import React from 'react'; import PropTypes from 'prop-types'; import CN from 'classnames'; import styles from 'styles/blocks/icon'; const Icon = ({ view }) => ( <i className={ CN(styles.icon, styles[view]) } aria-hidden="true"></i> ); Icon.propTypes = { view: PropTypes.string }; export default Icon;
src/svg-icons/editor/pie-chart-outlined.js
mtsandeep/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorPieChartOutlined = (props) => ( <SvgIcon {...props}> <path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm1 2.07c3.61.45 6.48 3.33 6.93 6.93H13V4.07zM4 12c0-4.06 3.07-7.44 7-7.93v15.87c-...
src/components/common/svg-icons/content/content-cut.js
abzfarah/Pearson.NAPLAN.GnomeH
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentContentCut = (props) => ( <SvgIcon {...props}> <path d="M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-...
src/scripts/SidebarCategories.js
Ribeiro/yoda
'use strict'; import React from 'react'; import Join from 'react/lib/joinClasses'; import {Link} from 'react-router'; import Constants from './Constants'; export default React.createClass({ renderChannelTitle(title){ return title.charAt(0).toUpperCase() + title.slice(1); }, renderLink(channel){ let hre...
src/svg-icons/image/looks-4.js
rscnt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageLooks4 = (props) => ( <SvgIcon {...props}> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 14h-2v-4H9V7h2v4h2V7h2v10z"/> </SvgIcon> ); ImageLooks4 = pure(ImageLoo...
app/components/Send.js
seungha-kim/grade-sms
import React, { Component } from 'react'; import Dialog from 'material-ui/Dialog'; import LinearProgress from 'material-ui/LinearProgress'; import FlatButton from 'material-ui/FlatButton'; type Props = { open: boolean, close: () => void, log: ?{id: string, text: string}, done: boolean, total: ?number, coun...
imports/ui/components/tags/TagList.js
ctagroup/home-app
import React, { Component } from 'react'; // import DataTable from '/imports/ui/components/dataTable/DataTable'; // import { removeClientTagButton } from '/imports/ui/dataTable/helpers.js'; import TagItem from './TagItem'; class TagList extends Component { constructor() { super(); this.state = { name: '', sc...
app/components/AppTabs/index_REMOVE.js
typesettin/manuscript
import React, { Component } from 'react'; import { StyleSheet, View, ScrollView, Navigator, TouchableHighlight } from 'react-native'; import { Text, Button, // SocialIcon, List, ListItem, ListView, PricingCard } from 'react-native-elements'; import Tabs from 'react-native-tabs'; import sty...
src/components/Separator.js
nikgraf/belle
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { omit } from '../utils/helpers'; import style from '../style/separator'; const separatorPropTypes = { children: PropTypes.oneOfType([ PropTypes.arrayOf(PropTypes.node), PropTypes.node, ]), style: PropTypes.object, }; /...
src/Main/ExpandableStatisticBox.js
hasseboulen/WoWAnalyzer
import React from 'react'; import PropTypes from 'prop-types'; class ExpandableStatisticBox extends React.PureComponent { static propTypes = { icon: PropTypes.node.isRequired, value: PropTypes.node.isRequired, label: PropTypes.node.isRequired, expanded: PropTypes.bool, children: PropTypes.node, ...
pollard/containers/Pollard.js
spencerliechty/pollard
import React, { Component } from 'react'; import NavBar from '../components/NavBar.js'; export default class Pollard extends Component { render() { const { children, } = this.props; return ( <div> <NavBar /> <div style={{paddingTop: 70}} className="containe...
components/page-sections.js
CarlRosell/glamorous-website
import React from 'react' import glamorous, {Div} from 'glamorous' import Hero from './hero' import {withContent} from './locale' import interactiveMarkdown from './interactive-markdown' import ClickToRender from './click-to-render' import CodeSandboxEmbed from './code-sandbox-embed' import {Anchor} from './styled-link...
examples/dev/src/components/Ghidorah.js
carteb/carte-blanche
/* @flow */ import React, { Component } from 'react'; type Hairs = { length: number, } type Fur = { color: string, density: number, hairs: Hairs, } type Props = { isDangerous: boolean, age?: number, description?: string, fur?: Fur, teeth?: Array<number>, teethOfTeeth?: Array<Array<number>>, to...
docs/src/app/components/pages/components/List/ExamplePhone.js
pomerantsev/material-ui
import React from 'react'; import MobileTearSheet from '../../../MobileTearSheet'; import {List, ListItem} from 'material-ui/List'; import Divider from 'material-ui/Divider'; import CommunicationCall from 'material-ui/svg-icons/communication/call'; import CommunicationChatBubble from 'material-ui/svg-icons/communicatio...
examples/sidebar/app.js
BerkeleyTrue/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...
client/component/redirect-edit/match/header.js
johngodley/redirection
/** * External dependencies */ import React from 'react'; import { translate as __ } from 'i18n-calypso'; import PropTypes from 'prop-types'; /** * Internal dependencies */ import { ExternalLink } from 'wp-plugin-components'; import TableRow from '../table-row'; class MatchHeader extends React.Component { stat...
src/svg-icons/av/pause-circle-outline.js
IsenrichO/mui-with-arrows
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvPauseCircleOutline = (props) => ( <SvgIcon {...props}> <path d="M9 16h2V8H9v8zm3-14C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm1-4h2...
app/javascript/mastodon/features/ui/components/mute_modal.js
pointlessone/mastodon
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { injectIntl, FormattedMessage } from 'react-intl'; import Toggle from 'react-toggle'; import Button from '../../../components/button'; import { closeModal } from '../../../actions/modal'; import { muteAccount }...
src/svg-icons/image/linked-camera.js
igorbt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageLinkedCamera = (props) => ( <SvgIcon {...props}> <circle cx="12" cy="14" r="3.2"/><path d="M16 3.33c2.58 0 4.67 2.09 4.67 4.67H22c0-3.31-2.69-6-6-6v1.33M16 6c1.11 0 2 .89 2 2h1.33c0-1.84-1.49-3.33-3.33-3.3...
packages/cf-component-checkbox/src/Checkbox.js
mdno/mdno.github.io
import React from 'react'; import PropTypes from 'prop-types'; class Checkbox extends React.Component { render() { let className = 'cf-checkbox'; if (this.props.checked) { className += ' cf-checkbox--checked'; } return ( <label htmlFor={this.props.name} className={className}> <...
examples/huge-apps/components/Dashboard.js
egobrightan/react-router
import React from 'react' import { Link } from 'react-router' class Dashboard extends React.Component { render() { const { courses } = this.props return ( <div> <h2>Super Scalable Apps</h2> <p> Open the network tab as you navigate. Notice that only the amount of you...
src/svg-icons/device/access-alarm.js
tan-jerene/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceAccessAlarm = (props) => ( <SvgIcon {...props}> <path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-...
js/components/menus/UserMenu.js
Sacret/githubify
'use strict'; import React from 'react'; import Rebase from 're-base'; import _ from 'lodash'; // import UserActions from '../../actions/UserActions'; // import Config from '../../config/Config'; // import History from '../../history/History'; const base = Rebase.createClass(Config.FirebaseUrl); /** * User menu di...
packages/react-scripts/fixtures/kitchensink/src/features/webpack/CssInclusion.js
paweljedrzejczyk/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...
server/sonar-web/src/main/js/apps/background-tasks/components/Stats.js
Builders-SonarSource/sonarqube-bis
/* * SonarQube * Copyright (C) 2009-2016 SonarSource SA * mailto:contact AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License...
src/pages/about.js
bretafinley/site
import React from 'react'; import Link from 'gatsby-link'; import {LINK_EMAIL, LINK_RESUME, LINK_LINKEDIN, LINK_GITHUB, LINK_TWITTER, LINK_FACEBOOK} from '../util/constants'; import IconFactory from '../components/icon-factory'; function About() { return ( <div> <h2 className="page-title card">About</h2>...
src/common/ui/Link/index.js
MadeInHaus/react-redux-webpack-starter
import React from 'react'; import { string } from 'prop-types'; import { Link as RouterLink, NavLink } from 'react-router-dom'; import styles from './Link.scss'; const Link = ({ to, activeClassName, ...props }) => { if (to) { return activeClassName ? ( <NavLink activeClassName=...
app/jsx/bundles/assignment_show.js
djbender/canvas-lms
/* * Copyright (C) 2013 - 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...
lib-es/elements/forms/radio.js
bokuweb/re-bulma
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; }; import React, { Component } from 'react'; import PropTypes fr...
src/containers/DevTools/DevTools.js
PitayaX/pitayax-web
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="H" changePositionKey="Q"> <LogMonitor /> </DockMoni...
client/common/components/AppBarNavMenu.js
Haaarp/geo
import React from 'react'; import AppBarNavMenuItem from './AppBarNavMenuItem'; import { Navbar, Nav, NavItem } from 'react-bootstrap'; class AppBarNavMenu extends React.Component { _getClassName(){ return (this.props.className ? this.props.className : ""); } render(){ return( ...
node_modules/react-select/src/Value.js
darklilium/Factigis_2
import React from 'react'; import classNames from 'classnames'; const Value = React.createClass({ displayName: 'Value', propTypes: { children: React.PropTypes.node, disabled: React.PropTypes.bool, // disabled prop passed to ReactSelect id: React.PropTypes.string, // Unique id ...
src/icons/LockOutlineIcon.js
kiloe/ui
import React from 'react'; import Icon from '../Icon'; export default class LockOutlineIcon extends Icon { getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M24 34c2.2 0 4-1.8 4-4s-1.8-4-4-4-4 1.8-4 4 1.8 4 4 4zm12-18h-2v-4c0-5.52-4.48-10-10-10S14 6.48 14 12v...
node_modules/native-base/src/smart/SButton.js
tausifmuzaffar/bisApp
/* @flow */ import React, { Component } from 'react'; import { TouchableOpacity, View } from 'react-native'; import { Text } from '../basic/Text'; import { Button } from '../basic/Button'; import { connectStyle } from '@shoutem/theme'; import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; class SButton ...
src/components/App.js
EyEder/TM-Shop
import React from 'react'; import ReactDOM from 'react-dom' import Sidebar from './sidebar/Sidebar' import MainPanel from './mainPanel/MainPanel' require('../style/main.css'); class App extends React.Component { constructor(props) { super(props); this.state = { checkedList : {"3~5": true, "5~8": true, "8~12"...
src/components/AccountTable.js
davidoevans/react-redux-dapp
import React from 'react' import ReactTable from 'react-table' import 'react-table/react-table.css' const columns = [{ header: 'Public Address', accessor: 'address' // String-based value accessors! }, // { // header: 'Name', // accessor: 'name' // }, { header: 'Balance', columns: [{ header: 'Intrinsic ...
admin/client/App/screens/List/components/Filtering/ListFiltersAddForm.js
andrewlinfoot/keystone
import React from 'react'; import { findDOMNode } from 'react-dom'; import Popout from '../../../../shared/Popout'; import { Filters } from 'FieldTypes'; var ListFiltersAddForm = React.createClass({ propTypes: { field: React.PropTypes.object.isRequired, maxHeight: React.PropTypes.number, onApply: React.PropTyp...
ReduxReactToDo/app/containers/NotFoundPage/index.js
michaelgichia/TODO-List
/** * NotFoundPage * * This is the page we show when the user visits a url that doesn't have a route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a necessity for you then you can refactor it...
src/index.js
likeDoMine/gallery-by-react
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'));
src/components/withViewport.js
erichardson30/react-starter
/** * React Starter (https://github.com/erichardson30/react-starter) * * Copyright © 2016 Eric Richardson. 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, { Component } from 'react'; // eslint...
examples/admin/components/PageContainer.js
amazeui/amazeui-react
import React from 'react'; import { Link, } from 'react-router'; import { Breadcrumb, Icon, } from 'amazeui-react'; const BreadCrumbLink = React.createClass({ render() { const { active, ...props, } = this.props; return ( <Breadcrumb.Item active={active} linkComp...
packages/react-error-overlay/src/components/CloseButton.js
lolaent/create-react-app
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* @flow */ import React from 'react'; import { black } from '../styles'; const closeButtonStyle = { color: black, lineHeight: '1re...
src/components/MenuIcon.js
sheminusminus/dealz
import React from 'react'; var MenuIcon = React.createClass({ render() { return ( <div className="icon menuIcon" onClick={this.props.iconClick}> </div> ) } }); export default MenuIcon;
modules/dreamview/frontend/src/components/PNCMonitor/PlanningScenarioTable.js
jinghaomiao/apollo
import React from 'react'; import { timestampMsToTimeString } from 'utils/misc'; class PlanningScenarioItem extends React.Component { render() { const { scenario } = this.props; const type = scenario.scenarioType; const stage = scenario.stageType ? scenario.stageType.replace(`${type}_`, '') : '-'; ...
packages/my-joy-instances/src/routes.js
geek/joyent-portal
import React from 'react'; import { Redirect, Route, Switch } from 'react-router-dom'; import get from 'lodash.get'; import { PageContainer, ViewContainer, Message, MessageDescription, MessageTitle, Footer } from 'joyent-ui-toolkit'; import { Breadcrumb, Menu } from '@containers/navigation'; import Create...
fusion/Button.js
pagesource/fusion
import { css } from 'emotion'; import PropTypes from 'prop-types'; import React from 'react'; import { withTheme } from 'theming'; import theme from '../theme'; const Button = ({ children, onClick, disabled, theme }) => { const buttonStyle = css` background-color: ${theme.buttonColor}; color: ${theme.buttonT...
examples/cra/src/components/Placeholder.js
sapegin/react-styleguidist
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import './Placeholder.css'; /** * Image placeholders. */ export default class Placeholder extends Component { static propTypes = { type: PropTypes.oneOf([ 'animal', 'bacon', 'beard', 'bear', 'cat', 'food', 'city', ...
client/modules/App/components/__tests__/Footer.spec.js
bjoberg/social-pulse
import React from 'react'; import test from 'ava'; import { shallow } from 'enzyme'; import { Footer } from '../Footer/Footer'; import { Link } from 'react-router'; test('renders footer properly', t => { const wrapper = shallow( <Footer /> ); t.is(wrapper.find(Link).length, 8); });
docs-ui/components/emptyMessage.stories.js
mvaled/sentry
import React from 'react'; import {Flex, Box} from 'grid-emotion'; import {Panel, PanelHeader} from 'app/components/panels'; import {storiesOf} from '@storybook/react'; import {withInfo} from '@storybook/addon-info'; import Button from 'app/components/button'; import EmptyMessage from 'app/views/settings/components/em...
client/app/scripts/components/sidebar.js
alban/scope
import React from 'react'; export default function Sidebar({children, classNames}) { const className = `sidebar ${classNames}`; return ( <div className={className}> {children} </div> ); }
client/reactComponents/PlayerDriver.js
ourvrisrealerthanyours/tanks
import React from 'react'; import TankBody from './TankBody'; import Turret from './Turret'; import Barrel from './Barrel'; import { TANK_RADIUS } from '../../simulation/constants'; class PlayerDriver extends React.Component { constructor(props) { super(props); this.position = props.position || `0 ${TANK_RA...
shared/app/Tms/components/Icons/FavoriteOn.js
pebie/react-universally-node-config
import PropTypes from 'prop-types'; import React from 'react'; /** * FavoriteOn icon * * @return {jsx} */ const FavoriteOn = ({ svgClass, pathClass }) => (<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 54 55" className={svgClass} aria-labelledby="title desc" tabIndex="0" role="img" ...
client/modules/Results/__tests__/components/PostCreateWidget.spec.js
eantler/google
import React from 'react'; import test from 'ava'; import sinon from 'sinon'; import { FormattedMessage } from 'react-intl'; import { PostCreateWidget } from '../../components/PostCreateWidget/PostCreateWidget'; import { mountWithIntl, shallowWithIntl } from '../../../../util/react-intl-test-helper'; const props = { ...
docs/app/Examples/elements/Rail/Types/RailInternalExample.js
jamiehill/stardust
import React from 'react' import { Image, Rail, Segment } from 'stardust' const RailInternalExample = () => ( <Segment className='center aligned'> <Image src='http://semantic-ui.com/images/wireframe/paragraph.png' /> <Rail internal position='left'> <Segment>Left Rail Content</Segment> </Rail> ...
app/javascript/mastodon/features/status/components/detailed_status.js
nonoz/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Avatar from '../../../components/avatar'; import DisplayName from '../../../components/display_name'; import StatusContent from '../../../components/status_content'; import MediaGallery from...
ui/src/pages/PeopleManagePage/AttributesEditor/SavedRow.js
LearningLocker/learninglocker
import React from 'react'; import { compose, withProps } from 'recompose'; import { withModel } from 'ui/utils/hocs'; import SavedRowEditor from './SavedRowEditor'; import SavedRowViewer from './SavedRowViewer'; const enhance = compose( withProps({ schema: 'personaAttribute' }), withModel ); const render = ({ id,...
src/common/routes.js
canonical-ols/javan-rhino
import AddCard from './containers/add-card.js'; import App from './containers/app.js'; import React from 'react'; import TermsOfService from './containers/terms.js'; import { Route, Redirect } from 'react-router'; export default ( <Route component={App}> <Route path="/payment/edit" component={AddCard}/> <Rou...
ajax/libs/react-instantsearch/4.1.1/Connectors.js
tholu/cdnjs
/*! ReactInstantSearch 4.1.1 | © Algolia, inc. | https://community.algolia.com/react-instantsearch/ */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react")); else if(typeof define === 'function' && define....
demo/src/index.js
clauderic/react-infinite-calendar
import React from 'react'; import {render} from 'react-dom'; import InfiniteCalendar from '../../src'; import '../../styles.css'; import './demo.css'; render( <InfiniteCalendar width={Math.min(window.innerWidth, 400)} /> , document.querySelector('#demo'));
lib/containers/PreviewContainer.js
sjliang/sparks
import React from 'react' import {connect} from 'react-redux' import Preview from '../components/Preview' const PreviewContainer = React.createClass({ render() { const {html} = this.props return ( <Preview htmlText={html} /> ) } }); const mapStateToProps = (state) => { return { html: state...
src/containers/About/About.js
prakash-u/react-redux
import React, { Component } from 'react'; import Helmet from 'react-helmet'; import MiniInfoBar from 'components/MiniInfoBar/MiniInfoBar'; import { isLoaded as isInfoLoaded, load as loadInfo } from 'redux/modules/info'; import { asyncConnect } from 'redux-connect'; @asyncConnect([ { promise: ({ store: { dispatch...
webpack/components/Content/ContentTable.js
mccun934/katello
import React from 'react'; import PropTypes from 'prop-types'; import { translate as __ } from 'foremanReact/common/I18n'; import { Table } from '../../move_to_foreman/components/common/table'; import { LoadingState } from '../../move_to_pf/LoadingState'; const ContentTable = ({ content, tableSchema, onPaginationChan...
tests/flow/react/createElement_string.js
danharper/prettier
// @flow import React from 'react'; class Bar extends React.Component {} class Foo extends React.Component { render() { const Cmp = Math.random() < 0.5 ? 'div' : Bar; return (<Cmp/>); } }
src/icons/SettingsInputComponentIcon.js
kiloe/ui
import React from 'react'; import Icon from '../Icon'; export default class SettingsInputComponentIcon extends Icon { getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M10 4c0-1.1-.89-2-2-2s-2 .9-2 2v8H2v12h12V12h-4V4zm8 28c0 2.61 1.68 4.81 4 5.63V46h4v-8.37c...
src/client/components/Document.js
fervorous/fervor
import PropTypes from 'prop-types'; import React from 'react'; export default class Document extends React.Component { componentDidMount() { // eslint-disable-next-line console.warn('The Document component in Fervor is now deprecated and will be removed in the future. Please use `Meta` instead. See https://...
app/containers/HomePage/components/earthquake-bubble-map/index.js
athmangude/react-d3-test-drive
/* * Line Chart */ import React from 'react'; import { LineChart } from 'react-d3-basic'; // import topojson from 'topojson'; // var topojson = require('topojson'); import * as topojson from 'topojson-client'; import MapBubble from './map-bubble'; var css= require('./bubble.scss'); const styles = { header: { ...
src/component/navbar/index.js
Spwahle/Narcan-Now-Frontend
import React from 'react'; import * as utils from '../../lib/utils'; import {connect} from 'react-redux'; import {Link} from 'react-router-dom'; import {tokenDeleteRequest} from '../../action/auth-actions'; import AppBar from 'material-ui/AppBar'; import Drawer from 'material-ui/Drawer'; import MenuItem from 'material-...
blueocean-material-icons/src/js/components/svg-icons/action/system-update-alt.js
kzantow/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const ActionSystemUpdateAlt = (props) => ( <SvgIcon {...props}> <path d="M12 16.5l4-4h-3v-9h-2v9H8l4 4zm9-13h-6v1.99h6v14.03H3V5.49h6V3.5H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2z"/> </SvgIcon> ); ActionSystemUpdateA...
src/parser/shared/modules/resources/mana/ManaUsageChartComponent.js
ronaldpereira/WoWAnalyzer
import React from 'react'; import PropTypes from 'prop-types'; import { TooltipElement } from 'common/Tooltip'; import ManaUsageGraph from './ManaUsageGraph'; class HealingDoneGraph extends React.PureComponent { static propTypes = { start: PropTypes.number.isRequired, end: PropTypes.number.isRequired, ...
docs/src/NotFoundPage.js
rapilabs/react-bootstrap
import React from 'react'; import NavMain from './NavMain'; import PageHeader from './PageHeader'; import PageFooter from './PageFooter'; const NotFoundPage = React.createClass({ render() { return ( <div> <NavMain activePage='' /> <PageHeader title='404' subT...
src/svg-icons/image/timer-10.js
pradel/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageTimer10 = (props) => ( <SvgIcon {...props}> <path d="M0 7.72V9.4l3-1V18h2V6h-.25L0 7.72zm23.78 6.65c-.14-.28-.35-.53-.63-.74-.28-.21-.61-.39-1.01-.53s-.85-.27-1.35-.38c-.35-.07-.64-.15-.87-.23-.23-.08-.41-...
.history/src/components/InstaCelebs/index_20171001010822.js
oded-soffrin/gkm_viewer
import React from 'react'; import { connect } from 'react-redux' import _ from 'lodash' import '../../styles/insta-stats.scss' const imgMap = { d: 'https://instagram.ftlv1-2.fna.fbcdn.net/t51.2885-19/s150x150/18095129_753964814784600_2717222797960019968_a.jpg', e: 'https://instagram.ftlv1-2.fna.fbcdn.net/t51.2885...
src/js/components/ui/TopRightLink.js
nekuno/client
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import shouldPureComponentUpdate from 'react-pure-render/function'; export default class TopRightLink extends Component { static propTypes = { icon : PropTypes.string, secondIcon : PropTypes.string, text : PropType...
src/index.js
dkadrios/zendrum-stompblock-client
import React from 'react' import ReactDOM from 'react-dom' import { Provider } from 'react-redux' import configureStore from './store' import App from './components/App' const store = configureStore({}) ReactDOM.render( <Provider store={store}> <App /> </Provider>, document.getElementById('react-container')...
actor-apps/app-web/src/app/components/dialog/ComposeSection.react.js
boyley/actor-platform
import _ from 'lodash'; import React from 'react'; import ReactMixin from 'react-mixin'; import addons from 'react/addons'; const {addons: { PureRenderMixin }} = addons; import ActorClient from 'utils/ActorClient'; import { Styles, FlatButton } from 'material-ui'; import { KeyCodes } from 'constants/ActorAppConstant...
docs/src/CodeExample.js
pivotal-cf/react-bootstrap
import React from 'react'; export default class CodeExample extends React.Component { render() { return ( <pre className="cm-s-solarized cm-s-light"> <code> {this.props.codeText} </code> </pre> ); } componentDidMount() { if (CodeMirror === undefined) { ret...
examples/counter/index.js
mvanlonden/redux
import React from 'react'; import { Provider } from 'react-redux'; import App from './containers/App'; import configureStore from './store/configureStore'; const store = configureStore(); React.render( <Provider store={store}> {() => <App />} </Provider>, document.getElementById('root') );
src/MediaRight.js
mmarcant/react-bootstrap
import classNames from 'classnames'; import React from 'react'; import Media from './Media'; import { bsClass, getClassSet, prefix, splitBsProps } from './utils/bootstrapUtils'; const propTypes = { /** * Align the media to the top, middle, or bottom of the media object. */ align: React.PropTypes.oneOf(['t...
src/CheckBox/index.js
christianalfoni/ducky-components
import React from 'react'; import PropTypes from 'prop-types'; import Icon from '../Icon'; import classNames from 'classnames'; import styles from './styles.css'; function CheckBox(props) { return ( <div className={classNames(styles.default, {[styles.checked]: props.checked}, {[...
test/unit/helpers/intl-test.js
meedan/check-web
// from: https://gist.github.com/mirague/c05f4da0d781a9b339b501f1d5d33c37/#file-intl-enzyme-test-helper-js /** * Components using the react-intl module require access to the intl context. * This is not available when mounting single components in Enzyme. * These helper functions aim to address that and wrap a valid...
src/Donate/index.js
reinaldoferreira/macmillan-gamification
import React, { Component } from 'react'; import serialize from 'form-serialize'; import { Link } from 'react-router-dom'; import './Donate.css'; class Donate extends Component { render() { return ( <form> <h1>Donate</h1> <div> <label htmlFor="donate">I would like to donate</labe...
ui/src/containers/Visualisations/TemplateStreamLearnerInteractionsByDateAndVerb/Viewer.js
LearningLocker/learninglocker
import React from 'react'; import PropTypes from 'prop-types'; import SourceResults from 'ui/containers/VisualiseResults/SourceResults'; import ColumnChartResults from 'ui/containers/VisualiseResults/ColumnChartResults'; /** * @param {string} props.visualisationId * @param {boolean} props.showSourceView */ const V...
server/sonar-web/src/main/js/components/ui/OrganizationIcon.js
lbndev/sonarqube
/* * SonarQube * Copyright (C) 2009-2017 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, o...