path
stringlengths
5
195
repo_name
stringlengths
5
79
content
stringlengths
25
1.01M
packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectSpread.js
TondaHack/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...
examples/sidebar/app.js
rkaneriya/react-router
import React from 'react' 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.Component { render() { const categ...
examples/basic/index.js
hhhonzik/react-createjs
import React from 'react'; import { render } from 'react-dom'; import { App } from './App'; render(<App />, document.getElementById('main'));
app/components/ItemInput.js
dxu/electric-trumpet
import React from 'react' // renders a single list, handles the list of lists const ItemInput = React.createClass({ onKeyAddContent: function(evt) { if (evt.keyCode === 13 && !evt.shiftKey) { evt.preventDefault() this.props.dispatchAddItem({ // NOTE: ASSUMING CLIENT ONLY, no xss sanitization ...
src/client.js
sandfox/webdebs-links
import React from 'react'; import Router from 'react-router'; import routes from './routes'; import fetchData from './utils/fetch-data'; let first = true; const rehydrate = () => { const data = window.DATA; delete window.DATA; return data; }; const render = (Root, state, data) => { React.render(<Root data={...
src/app.js
vk92kokil/My-react-boilerplate
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ /* eslint-disable */ import 'babel/polyfill'; import React from 'react'; import Router from 'react-router'; var Redirect = Router.Redirect; import FastClick from 'fastclick'; import App from './components/App'; import HomePage from './components/...
src/browser/createRoutes.js
jks8787/react-redux-yay
import App from './app/App.react'; import Auth from './auth/Page.react'; import Firebase from './firebase/Page.react'; import Home from './home/Page.react'; import Me from './me/Page.react'; import NotFound from './notfound/Page.react'; import Profile from './me/Profile.react'; import React from 'react'; import Setting...
visualizations/mapWidgets/source/scripts/MapWidgetComponent.js
EITIorg/eiti
import React, { Component } from 'react'; import { renderToString } from 'react-dom/server'; import { Map, Marker, Popup, TileLayer, GeoJson } from 'react-leaflet'; import { countryGeoJson } from './data/countries.js'; //import { countryInfo } from './data/implementing_country.js'; import { helpers } from './helpers....
frontend/app/components/Phrasebook/edit.js
First-Peoples-Cultural-Council/fv-web-ui
import React from 'react' import PropTypes from 'prop-types' import Immutable from 'immutable' import ProviderHelpers from 'common/ProviderHelpers' import StateLoading from 'components/Loading' import StateErrorBoundary from 'components/ErrorBoundary' import StateSuccessEdit from './states/successEdit' import StateSucc...
client/Pets.js
lizraeli/react-personal-boilerplate
import React from 'react' import { Card, CardImage, Text, Heading, Section } from 'rebass' import { Grid, Row, Col } from 'react-flexbox-grid'; const Pets = () => ( <Section> <Row center="xs"> <Col xs={12} sm={3}> <Card> <CardImage width={256} src={require('./photos/fred.jpeg'...
src/components/topic/UpdateForStorySearchWarning.js
mitmedialab/MediaCloud-Web-Tools
import React from 'react'; import { FormattedMessage, FormattedHTMLMessage } from 'react-intl'; import { WarningNotice } from '../common/Notice'; const localMessages = { title: { id: 'errors.storySwitchover.title', defaultMessage: 'Update for Story-Level Searches' }, intro: { id: 'errors.storySwitchover.intro', de...
resources/js/react/search/SearchResultListItem.js
chekun/spore
import React from 'react'; var Avatar = require('../Avatar'); //<SearchResultListItem item=[] /> class SearchResultListItem extends React.Component { render() { var item = this.props.item; if (item["title"]) { item.type = 3; } else if (item["intro"]) { item.type = 2...
create-react-app/src/router.js
wumouren/react-demo
// import React, { Component } from 'react'; import React from 'react'; import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; import App from './components/app/App'; import Home from './components/home/Home'; // 两种写法都可以 // export default class Routers extends Component { // render() { // re...
src/componentOrElement.js
react-bootstrap/prop-types-extra
import React from 'react'; import createChainableTypeChecker from './utils/createChainableTypeChecker'; function validate(props, propName, componentName, location, propFullName) { const propValue = props[propName]; const propType = typeof propValue; if (React.isValidElement(propValue)) { return new Error( ...
demo/containers/badges-icons.js
nbonamy/react-native-app-components
import React, { Component } from 'react'; import { StyleSheet, ScrollView, View, Text } from 'react-native'; import { theme, Badge, Icon } from 'react-native-app-components'; export default class BadgesIcons extends Component { constructor(props) { super(props); } render() { return ( <ScrollView...
app/javascript/mastodon/containers/admin_component.js
Kirishima21/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { IntlProvider, addLocaleData } from 'react-intl'; import { getLocale } from '../locales'; const { localeData, messages } = getLocale(); addLocaleData(localeData); export default class AdminComponent extends React.PureComponent { static propType...
4.2.0/src/routes.js
erikras/redux-form-docs
import React from 'react' import { Router, Route, hashHistory } from 'react-router' import markdownPage from 'components/markdownPage' import App from 'pages/App' import Home from 'pages/Home' import Simple from 'pages/examples/Simple' import ComplexValues from 'pages/examples/ComplexValues' import File from 'pages/exa...
src/containers/ProductHotItem/ProductHotItem.js
kingpowerclick/kpc-web-backend
import React, { Component } from 'react'; import classNames from 'classnames'; import { FilterPage, Breadcrumb } from 'components'; import { DropdownButton, MenuItem, Modal } from 'react-bootstrap'; export default class ProductHotItem extends Component { state = { displayCompleteModal: false, displayLineProduc...
packages/docs/pages/plugin/emoji/index.js
nikgraf/draft-js-plugin-editor
/* eslint-disable no-template-curly-in-string */ import React, { Component } from 'react'; // eslint-disable-next-line import/no-unresolved import gettingStarted from '!!raw-loader!../../../components/Examples/emoji/gettingStarted'; // eslint-disable-next-line import/no-unresolved // eslint-disable-next-line import/no...
src/index.js
justinkahrs/portfolio
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import '../node_modules/bootstrap/dist/css/bootstrap.css'; import '../node_modules/bootstrap/dist/css/bootstrap-theme.css'; import './index.css'; ReactDOM.render( <App />, document.getElementById('root'), );
client/src/components/calculateButton.js
BukhariH/finimizeChallenge
import React, { Component } from 'react'; import 'bootstrap/dist/css/bootstrap.css'; import '../App.css'; import PropTypes from 'prop-types'; class CalculateButton extends Component { render() { return ( <button id="calc-btn" name="calc-btn" className="btn btn-success" onClick={this.props.calcFunc}>Figur...
src/components/WebResults/TotalResults.js
nicolas-adamini/littleblue
import React from 'react'; export default function TotalResults(props) { const number = props.number; function format(num) { let n = num.toString(), p = n.indexOf('.'); return n.replace(/\d(?=(?:\d{3})+(?:\.|$))/g, function ($0, i) { return p < 0 || i < p ? ($0 + ',') : $0; }); } return (...
springboot/GReact/src/main/resources/static/app/components/forms/wizards/Wizard.js
ezsimple/java
import React from 'react' export default class Wizard extends React.Component { componentDidMount() { let self = this; let element = $(this.refs.wizard); var stepsCount = $('[data-smart-wizard-tab]').length; var currentStep = 1; var validSteps = []; var $form = element.closest('form'); ...
src/client/app/boot.js
jsilvestre/tasky
import Application from './components/application'; import logger from 'debug'; import React from 'react'; import { Provider } from 'react-redux'; import startRouter from './router'; import { configureStore } from './store.js'; import en from './locales/en'; import fr from './locales/fr'; const debug = logger('app:bo...
src/components/ChallengeList.js
quintel/etmobile
import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import Challenge from './Challenge'; const sortChallenges = (left, right) => ( left.name.toLowerCase() < right.name.toLowerCase() ? 0 : 1 ); class ChallengeList extends React.Component { constructor() { ...
app/javascript/mastodon/components/attachment_list.js
pixiv/mastodon
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; const filename = url => url.split('/').pop().split('#')[0].split('?')[0]; export default class AttachmentList extends Immutabl...
src/components/Header/Header.js
langpavel/react-starter-kit
/** * 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 { defineMessages, For...
source/PhoneInputBrowser.js
halt-hammerzeit/react-phone-number-input
import React from 'react' import PropTypes from 'prop-types' import PhoneInput_ from './PhoneInput' import InputSmart from './InputSmart' import InputBasic from './InputBasic' export function createInput(defaultMetadata) { function PhoneInput({ smartCaret, ...rest }, ref) { return ( <PhoneInput_ {...re...
src/js/components/widget/Overview.js
kukua/dashboard
import _ from 'underscore' import React from 'react' import ControlsWidget from './Controls' import DevicePickerWidget from './DevicePicker' import AlertOverviewWidget from './AlertOverview' import FilterGraphWidget from './FilterGraph' import DownloadWidget from './Download' import NotFoundWidget from './NotFound' co...
client/src/javascript/components/icons/FeedIcon.js
stephdewit/flood
import React from 'react'; import BaseIcon from './BaseIcon'; export default class FeedIcon extends BaseIcon { render() { return ( <svg className={`icon icon--feed ${this.props.className}`} viewBox={this.getViewBox()}> <path d="M18.47,47.88A6.49,6.49,0,1,0,12,54.38,6.5,6.5,0,0,0,18.47,47.88Zm18,3....
client/pages/examples/threejs/sph/sph.js
fdesjardins/webgl
import React from 'react' import * as THREE from 'three' import { MarchingCubes } from 'three/examples/jsm/objects/MarchingCubes' import tinygradient from 'tinygradient' import { createAxes, addControls, createParticle, addAxesLabels, } from '../graphing/utils' // import { buildCells, buildCellNeighbors, assi...
packages/react-jsx-highcharts/src/components/FunnelSeries/FunnelSeries.js
AlexMayants/react-jsx-highcharts
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Series from '../Series'; class FunnelSeries extends Component { static propTypes = { id: PropTypes.string.isRequired }; render () { return ( <Series {...this.props} type="funnel" /> ); } } export default Fu...
packages/material-ui-icons/src/SettingsInputAntenna.js
dsslimshaddy/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let SettingsInputAntenna = props => <SvgIcon {...props}> <path d="M12 5c-3.87 0-7 3.13-7 7h2c0-2.76 2.24-5 5-5s5 2.24 5 5h2c0-3.87-3.13-7-7-7zm1 9.29c.88-.39 1.5-1.26 1.5-2.29 0-1.38-1.12-2.5-2.5-2.5S9.5 10.6...
src/app/User.js
halhenke/life-letters
import React from 'react'; import classnames from 'classnames'; import styles from './User.css'; import {GeneSequence, SequenceKey} from './Genetics.js'; import {Card, CardHeader, Avatar, CardMedia, CardTitle} from 'material-ui'; import {Paper} from 'material-ui'; import Colors from 'material-ui/src/styles/colors'; imp...
node_modules/babel-preset-react-hmre/test/Test.js
ajames72/MovieDBReact
import React from 'react' export default class Test extends React.Component { render() { return ( <div>Winning?</div> ) } }
docs/examples/Checkbox/Example1.js
romagny13/react-form-validation
import React from 'react'; import { Checkbox } from 'romagny13-react-form-validation'; const Example1 = () => { let values = ['a','c']; return ( <div> <h4>Direct check</h4> <Checkbox checked name="g1" /> <h4>Grouped by name (all checked are checked)</h4> ...
server/sonar-web/src/main/js/apps/system/section.js
joansmith/sonarqube
/* * 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/container/navigator/header.js
PangPangPangPangPang/react-blog
/** * Created by wangyefeng on 2017-03-31 11:26 */ import React from 'react' import { hashHistory } from 'react-router' import './header.css' import NormalButton from '../../compontent/normal_button' import Logo from '../../resource/svg/diamond.svg' class Header extends React.Component { constructor(props) { s...
blueocean-material-icons/src/js/components/svg-icons/image/hdr-strong.js
kzantow/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const ImageHdrStrong = (props) => ( <SvgIcon {...props}> <path d="M17 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zM5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/> </SvgIcon> ); ...
src/containers/Home.js
pjkarlik/Radial
import React from 'react'; import { withRouter } from 'react-router'; import { resolve } from '../styles'; import SiteStyles from '../styles/Site.less'; import RadialNav from '../components/RadialNav'; import RadialStyles from '../components/RadialNav.less'; class Home extends React.Component { static displayName =...
src/App.js
SpencerCornish/gong-web
import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; class App extends Component { render() { return ( <div className="App"> <header className="App-header"> <img src={logo} className="App-logo" alt="logo" /> <h1 className="App-title">Welco...
example/src/screens/types/LightBox.js
inalist/react-native-navigation
import React from 'react'; import {StyleSheet, View, Text, Dimensions, Button} from 'react-native'; class Lightbox extends React.Component { render() { return ( <View style={styles.container}> <View style={{flex: 8}}> <Text style={styles.title}>{this.props.title}</Text> <Text s...
app/components/Toggle/index.js
Dmitry-N-Medvedev/motor-collection
/** * * LocaleToggle * */ import React from 'react'; import Select from './Select'; import ToggleOption from '../ToggleOption'; function Toggle(props) { let content = (<option>--</option>); // If we have items, render them if (props.values) { content = props.values.map((value) => ( <ToggleOption key...
imports/api/interests/interests.js
howlround/worldtheatremap
// Meteor import { TAPi18n } from 'meteor/tap:i18n'; // Utilities import React from 'react'; import ReactSelect from 'react-select'; import { FormattedMessage } from 'react-intl'; import t from 'tcomb-form'; import Checkboxes from '../../ui/components/Checkboxes.jsx'; class InterestsCollection extends TAPi18n.Collect...
demo-docs-website/src/theme/DocItemFooter/index.js
dimsemenov/PhotoSwipe
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import clsx from 'clsx'; import LastUpdated from '@theme/LastUpdated'; import EditThisPage from '@theme/...
src/svg-icons/notification/airline-seat-legroom-extra.js
mtsandeep/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationAirlineSeatLegroomExtra = (props) => ( <SvgIcon {...props}> <path d="M4 12V3H2v9c0 2.76 2.24 5 5 5h6v-2H7c-1.66 0-3-1.34-3-3zm18.83 5.24c-.38-.72-1.29-.97-2.03-.63l-1.09.5-3.41-6.98c-.34-.68-1.03-1....
server/sonar-web/src/main/js/apps/web-api/components/Params.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...
entry_types/scrolled/package/src/frontend/inlineEditing/TextPlaceholder.js
codevise/pageflow
import React from 'react'; import styles from './TextPlaceholder.module.css'; export function TextPlaceholder({text, visible}) { if (!text || !visible) { return null; } return ( <div className={styles.placeholder}> <div>{text}</div> </div> ); }
editor/components/ButtonGroups.js
VishalRohra/chroma-tone
import React from 'react' import Toolbar from './Toolbar' export default class ButtonGroups extends React.Component { render() { return ( <Toolbar className={this.props.className}> {['left', 'middle', 'right'].map( position => <div key={position} className='toolbar-group'> { t...
src/server/frontend/Html.js
VigneshRavichandran02/3io
/* @flow */ /* eslint-disable react/no-danger */ import React from 'react'; const GoogleAnalytics = ({ id }) => ( <script dangerouslySetInnerHTML={{ __html: ` (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.cr...
src/common/containers/Profile.js
strekmann/samklang
import React from 'react'; import { Grid, Row, Col } from 'react-bootstrap'; import { connect } from 'react-redux'; import Immutable from 'immutable'; class Profile extends React.Component { render() { const user = this.props.users.get(this.props.user.get('id')); return ( <Grid> ...
src/routes/index.js
corydolphin/kanban-github
import React from 'react' import { Route, IndexRoute, Redirect } from 'react-router' // NOTE: here we're making use of the `resolve.root` configuration // option in webpack, which allows us to specify import paths as if // they were from the root of the ~/src directory. This makes it // very easy to navigate to files ...
src/Parser/Core/Modules/Items/Legion/Legendaries/SephuzsSecret.js
enragednuke/WoWAnalyzer
import React from 'react'; import SPELLS from 'common/SPELLS'; import ITEMS from 'common/ITEMS'; import { formatPercentage } from 'common/format'; import Analyzer from 'Parser/Core/Analyzer'; import Combatants from 'Parser/Core/Modules/Combatants'; const PASSIVE_HASTE = 0.02; const ACTIVE_HASTE = 0.25; /* * Sephuz...
Skins/VetoccitanT3/ReactSrc/node_modules/react-awesome-slider/src/core/bullets.js
MAN-IN-WAN/Kob-Eye
import React from 'react'; import PropTypes from 'prop-types'; import { getClassName } from '../helpers/components'; export default class Bullets extends React.Component { static propTypes = { cssModule: PropTypes.object, rootElement: PropTypes.string.isRequired, media: PropTypes.array, onClick: Prop...
src/components/Footer.js
elamperti/OpenWebScrobbler
import React from 'react'; import { Trans } from 'react-i18next'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faTwitter, faFacebook, faGithub } from '@fortawesome/free-brands-svg-icons'; import './Footer.css'; function Footer() { return ( <footer> <div className="container ...
src/with-feature-toggles.js
paralleldrive/react-feature-toggles
import React from 'react'; import { FeatureToggles } from './feature-toggles'; export const withFeatureToggles = ({ features } = {}) => Component => props => ( <FeatureToggles features={features}> <Component {...props} /> </FeatureToggles> );
src/propTypes/PointPropType.js
dingbat/react-native-mock
/** * https://github.com/facebook/react-native/blob/master/Libraries/StyleSheet/PointPropType.js */ import React from 'react'; const { PropTypes } = React; const PointPropType = PropTypes.shape({ x: PropTypes.number, y: PropTypes.number, }); module.exports = PointPropType;
src/shared/components/HistoricTime/index.js
CharlesMangwa/Chloe
/* @flow */ import React from 'react' import { Text, View } from 'react-native' import { getPeriodColor, getPeriodName } from '@helpers/periods' import Icon from '@components/Icon' import styles from './styles' type Props = { value: 'preHistory' | 'antiquity' | 'middleAge' | 'modernTimes' | 'contemporaryTimes', p...
src/js/components/App.js
nathanbrennan/redux-todo
import React from 'react' import Footer from './Footer' import AddTodo from '../containers/AddTodo' import VisibleTodolist from '../containers/VisibleTodoList' const App = () => ( <div> <AddTodo /> <VisibleTodolist /> <Footer /> </div> ) export default App
packages/material-ui-icons/src/PermDataSetting.js
dsslimshaddy/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let PermDataSetting = props => <SvgIcon {...props}> <path d="M18.99 11.5c.34 0 .67.03 1 .07L20 0 0 20h11.56c-.04-.33-.07-.66-.07-1 0-4.14 3.36-7.5 7.5-7.5zm3.71 7.99c.02-.16.04-.32.04-.49 0-.17-.01-.33-.04-.4...
src/server/createSSR.js
jcoreio/crater
import React from 'react' import makeStore from '../universal/redux/makeStore' import {match as _match} from 'react-router' import Html from './Html' import {push} from 'react-router-redux' import {renderToStaticMarkup} from 'react-dom-stream/server' import fs from 'fs' import path from 'path' import {join} from 'path'...
app/components/Player/PlayerControls.js
Nurasael/WeWatch
import React from 'react' import styles from './PlayerControls.css' const PlayerControls = (props) => { const {seekValue, handleSeekChange, prepareTestVideo, togglePause, duration, showTimer} = props return ( <div className={styles.component}> <input type="range" min="0" max={duration} value={seekValue} ...
client/vehicle-finder-spa/src/containers/messages/all-message-threads.js
Del7a/vehicle-finder
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { requestAllMessageThreads, changeCurrentMessageThread } from '../../actions/messages/'; import { getUserProfile } from '../../actions/user/'; import MessageThreadListComponent from '../.....
modules/dreamview/frontend/src/components/common/PortalModal.js
ApolloAuto/apollo
import 'styles/Modal.scss'; import React from 'react'; import ReactDOM from 'react-dom'; class Modal extends React.Component { constructor(props) { super(props); this.setOkButtonRef = (element) => { this.okButton = element; }; } componentDidMount() { // .focus() has browser restrictions ...
src/components/Header.js
jamescchu/jameschu-v5
import React from 'react' import Link from 'gatsby-link' import styled from 'styled-components' import { rhythm } from '../utils/typography' import { media } from '../utils/media' const Header = styled.header` width: ${rhythm(2)}; margin: ${rhythm(1 / 2)} ${rhythm(1)}; position: initial; ${media.desktop` p...
packages/react-scripts/template/src/App.js
dpoineau/create-react-app
import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; class App extends Component { render() { return ( <div className="App"> <div className="App-header"> <img src={logo} className="App-logo" alt="logo" /> <h2>Welcome to React</h2> ...
src/client/js/Layout.js
JMJustas/todolist
/** * Layout for the whole page */ import React from 'react'; import EntryService from './services/EntryService'; import Header from './Header'; import TodosApp from './components/TodosApp'; export default class Layout extends React.Component { constructor(props) { super(props); } render() { return (...
src/components/CategoryCard/CategoryCard.js
hologram-io/docs
import React from 'react' import {Link} from '../' class CategoryCard extends React.Component { constructor(props) { super(props); } render() { const { header = "", title = "", image = "", blurb = "", cta = "", ctaLink = "" } = this.props; return ( <d...
client/modules/Post/__tests__/components/PostList.spec.js
BingeTrackr/BingeTrackr
import React from 'react'; import test from 'ava'; import { shallow } from 'enzyme'; import PostList from '../../components/PostList'; const posts = [ { name: 'Prashant', title: 'Hello Mern', slug: 'hello-mern', cuid: 'f34gb2bh24b24b2', content: "All cats meow 'mern!'" }, { name: 'Mayank', title: 'Hi Mern', slug: ...
src/component/Dashboard.js
hustlrb/yjbAdmin
/** * Created by yangyang on 2017/9/11. */ import React from 'react' import {connect} from 'react-redux' import {withRouter} from 'react-router-dom' import { Button } from 'antd' import {configAction, configSelector} from '../util/config' class Dashboard extends React.Component { constructor(props) { super(pro...
packages/react/src/components/atoms/buttons/Button/index.js
massgov/mayflower
/** * Button module. * @module @massds/mayflower-react/Button */ import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; const Button = (button) => { const buttonClasses = classNames({ ma__button: true, [`ma__button--${button.usage}`]: button.usage, [`ma__bu...
src/svg-icons/notification/no-encryption.js
kasra-co/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationNoEncryption = (props) => ( <SvgIcon {...props}> <path d="M21 21.78L4.22 5 3 6.22l2.04 2.04C4.42 8.6 4 9.25 4 10v10c0 1.1.9 2 2 2h12c.23 0 .45-.05.66-.12L19.78 23 21 21.78zM8.9 6c0-1.71 1.39-3.1 3.1...
client/util/react-intl-test-helper.js
eantler/simmeme-client
/** * 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, * English-locale intl context around them. */ import React from 'react'; import { IntlProvider, intlSha...
src/layouts/CoreLayout/CoreLayout.js
TriPSs/react-esc-example
import React from 'react' import { Route, Switch } from 'react-router' import 'styles/core.scss' import Header from 'components/Header' import Home from 'routes/Home' import Counter from 'routes/Counter' import Async from 'routes/Async' import classes from './CoreLayout.scss' export const CoreLayout = () => ( <div...
renderer/components/Channels/ChannelsViewButtons.js
LN-Zap/zap-desktop
import React from 'react' import PropTypes from 'prop-types' import { useIntl } from 'react-intl' import { SwitchButton } from 'components/UI' import LayoutCards from 'components/Icon/LayoutCards' import LayoutList from 'components/Icon/LayoutList' import { CHANNEL_LIST_VIEW_MODE_SUMMARY, CHANNEL_LIST_VIEW_MODE_CARD } ...
docs/app/Examples/elements/Image/States/index.js
ben174/Semantic-UI-React
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' const ImageStatesExamples = () => ( <ExampleSection title='States'> <ComponentExample title='Hidden' description='An ...
browser/components/relationships/relationships-single-bubble.component.js
smanwaring/relationship-visualizer
import React, { Component } from 'react'; import { Link } from 'react-router'; import { connect } from 'react-redux'; import Popover, { PopoverAnimationVertical } from 'material-ui/Popover'; import Menu from 'material-ui/Menu'; import MenuItem from 'material-ui/MenuItem'; import AddActivityForm from '../forms/add-activ...
fixtures/attribute-behavior/src/index.js
nhunzaker/react
import './index.css'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render(<App />, document.getElementById('root'));
client/src/pages/Routes/Routes.js
patferguson/solitaire-react
import React, { Component } from 'react'; import { Router, Route, IndexRoute, browserHistory } from 'react-router' import App from '../App' import NotFound from '../NotFound' import Home from '../Home' import About from '../About' import Testing from '../Testing' class Routes extends Component { render() { retu...
app/jsx/external_apps/components/AppDetails.js
venturehive/canvas-lms
/* * Copyright (C) 2014 - 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...
js/Search.js
aramay/complete-intro-to-react-v2
import React from 'react' import ShowCard from './ShowCard' import Header from './Header' import { connect } from 'react-redux' const { arrayOf, shape, string } = React.PropTypes // import preload from '../public/data.json' const Search = React.createClass({ propTypes: { shows: arrayOf(shape({ title: strin...
app/index.js
fullPistol/React-demo
import React from 'react'; import {render} from 'react-dom'; import App from './js/containers/App'; import './css/reset.css' import './css/index.less'; render( <App />, document.getElementById('root') );
src/svg-icons/image/photo-size-select-small.js
matthewoates/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImagePhotoSizeSelectSmall = (props) => ( <SvgIcon {...props}> <path d="M23 15h-2v2h2v-2zm0-4h-2v2h2v-2zm0 8h-2v2c1 0 2-1 2-2zM15 3h-2v2h2V3zm8 4h-2v2h2V7zm-2-4v2h2c0-1-1-2-2-2zM3 21h8v-6H1v4c0 1.1.9 2 2 2zM3 7H...
packages/ui-toolkit/src/styleguide/tabs.js
geek/joyent-portal
import React from 'react'; import PropTypes from 'prop-types'; import Styled from 'react-styleguidist/lib/rsg-components/Styled'; import cx from 'classnames'; export const styles = ({ space, color, fontFamily, fontSize, buttonTextTransform }) => ({ button: { padding: [[space[1], 0]], fontFamily: fo...
test/test_helper.js
quebez/react_todolist
import _$ from 'jquery'; import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import jsdom from 'jsdom'; import chai, { expect } from 'chai'; import chaiJquery from 'chai-jquery'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import...
src/components/error-screen.js
gitpoint/git-point
import React, { Component } from 'react'; import { colors, fonts, normalize } from 'config'; import { t } from 'utils'; import styled from 'styled-components'; const ViewWrapper = styled.View` align-items: center; align-content: center; height: 100%; justify-content: center; `; const TextStyled = styled.Text`...
src/component/Template.js
NHAAHNA/hms
import React, { Component } from 'react'; import '../containers/App.css'; export default class Template extends Component{ render(){ return( <div className="container"> <div className="row"> <div className="col-md-12 twelveDiv"> <h2>12 </h2> ...
src/components/Bottom/Bottom.js
Zoomdata/nhtsa-dashboard-2.2
import styles from './Bottom.css'; import React from 'react'; import image from '../../images/slot-bottom.png' const Bottom = () => { return ( <img className={styles.root} width="120" height="3.5" src={image} /> ) }; export default Bottom;
src/index.js
yfruan/react-simple
import React from 'react'; import ReactDom from 'react-dom'; import App from 'app'; ReactDom.render( <App />, document.getElementById('content') );
examples/redirect-using-index/app.js
okcoker/react-router
import React from 'react'; import { Router, Route, IndexRoute, Link } from 'react-router'; var App = React.createClass({ render() { return ( <div> {this.props.children} </div> ); } }); var Index = React.createClass({ render () { return ( <div> <h1>You should not se...
src/svg-icons/action/perm-phone-msg.js
pomerantsev/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionPermPhoneMsg = (props) => ( <SvgIcon {...props}> <path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.2...
client/src/javascript/components/icons/Ratio.js
jfurrow/flood
import React from 'react'; import BaseIcon from './BaseIcon'; export default class Ratio extends BaseIcon { render() { return ( <svg className={`icon icon--ratio ${this.props.className}`} viewBox={this.getViewBox()}> <path d="M54.57,15.76a28.56,28.56,0,1,0-10.45,39A28.56,28.56,0,0,0,54.57,15.76ZM9...
src/svg-icons/editor/format-paint.js
skarnecki/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorFormatPaint = (props) => ( <SvgIcon {...props}> <path d="M18 4V3c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6h1v4H9v11c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-9h8V4h-3z"/> </SvgIco...
public/jspm_packages/npm/react-router@2.0.0/modules/Redirect.js
nayashooter/ES6_React-Bootstrap
/* */ "format cjs"; import React from 'react' import invariant from 'invariant' import { createRouteFromReactElement } from './RouteUtils' import { formatPattern } from './PatternUtils' import { falsy } from './PropTypes' const { string, object } = React.PropTypes /** * A <Redirect> is used to declare another URL p...
src/svg-icons/file/cloud-off.js
ngbrown/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-...
packages/react-dom/src/server/ReactPartialRenderer.js
anushreesubramani/react
/** * Copyright (c) 2013-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 type {ReactElement} from 'shared/ReactElementType'; import React from 'react'; import emptyFunction from 'fbjs/lib/e...
node_modules/antd/es/input-number/index.js
prodigalyijun/demo-by-antd
import _extends from 'babel-runtime/helpers/extends'; import _defineProperty from 'babel-runtime/helpers/defineProperty'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _createClass from 'babel-runtime/helpers/createClass'; import _possibleConstructorReturn from 'babel-runtime/helpers/possib...
docs/src/app/components/pages/components/TextField/ExampleSimple.js
tan-jerene/material-ui
import React from 'react'; import TextField from 'material-ui/TextField'; const TextFieldExampleSimple = () => ( <div> <TextField hintText="Hint Text" /><br /> <br /> <TextField hintText="The hint text can be as long as you want, it will wrap." /><br /> <TextField id="text-f...
src/CitySearchPanel.js
cqqccqc/city-picker
import React, { Component } from 'react'; import { List } from 'immutable'; import './CitySearchPanel.css'; const classnames = require('classnames'); class CitySearchPanel extends Component { constructor(props) { super(props); } render() { return ( <div> <div c...
src/components/DevIcon.js
abdulhannanali/github-organization-repos
import React from 'react'; import classnames from 'classnames'; const DevIcon = ({ language, colored, wikiLink }) => { if (!language) { throw new Error('`language` option is required for `DevIcon` component'); } const devIconClasses = getDevIcon(language, colored); let iTag = (<i className={devIconClass...