path
stringlengths
5
195
repo_name
stringlengths
5
79
content
stringlengths
25
1.01M
tosort/2016/jspm/lib_react_103/components/fab/index.js
Offirmo/html_tests
import React from 'react' import FloatingActionButton from 'material-ui/lib/floating-action-button' import ContentAdd from 'material-ui/lib/svg-icons/content/add' import './styles.css!' //////////////////////////////////// const FAB = ({ onClick }) => ( <div id="fab"> <FloatingActionButton onClick={onClick}> ...
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Create/WSDL/ApiCreateWSDL.js
thusithak/carbon-apimgt
/* * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
app/javascript/mastodon/features/compose/components/text_icon_button.js
amazedkoumei/mastodon
import React from 'react'; import PropTypes from 'prop-types'; export default class TextIconButton extends React.PureComponent { static propTypes = { label: PropTypes.string.isRequired, title: PropTypes.string, active: PropTypes.bool, onClick: PropTypes.func.isRequired, ariaControls: PropTypes.s...
docs/app/Examples/collections/Message/Variations/index.js
shengnian/shengnian-ui-react
import React from 'react' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' const MessageVariationsExamples = () => ( <ExampleSection title='Variations'> <ComponentExample title='Floating' desc...
zhihu/src/js/zhihuReact2/App2.js
fengnovo/webpack-react
import React, { Component } from 'react'; import fetch from 'isomorphic-fetch' // import Nav from './components/Nav' // import Banner from './components/Banner' // import LeftSlide from './components/LeftSlide' // import HomeList from './components/HomeList' class App extends Component { constructor(props) { ...
portfolio-site/src/scenes/home/home.js
dave5801/Portfolio
import React, { Component } from 'react'; import './home.css'; import Navbar from './navigation/navbar'; import Footer from './Footer/footer'; class Home extends Component { render() { return ( <div className="Home"> <Navbar></Navbar> <Footer></Footer> </div> ); } } export defa...
cli/react-antd-dva/src/components/GlobalFooter/index.js
CFshuming/react-demo-gather
import React from 'react'; import classNames from 'classnames'; import styles from './index.less'; export default ({ className, links, copyright }) => { const clsString = classNames(styles.globalFooter, className); return ( <div className={clsString}> { links && ( <div className={styles...
cloud/dashboard/src/components/FirmwareManagement.js
iotivity/iotivity
/* * //****************************************************************** * // * // Copyright 2017 Samsung Electronics All Rights Reserved. * // * //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= * // * // Licensed under the Apache License, Version 2.0 (the "License"); * // you may not use thi...
app/components/SearchGithub.js
munir7/react
import React from 'react'; class SearchGithub extends React.Component { handleSubmit() { var router = this.context.router, username = this.refs.username.getDOMNode().value; this.refs.username.getDOMNode().value = ''; router.transitionTo('profile', {username: username}); } render() { ret...
components/onederful-ui/yelp/yelp-card.js
alxyee/berkeley-onederful-demo
import React from 'react' import s from './styles.css'; const YelpCard = ({image_url, name, price, rating, review_count, categories = [], idx, location = {}}) => { const categoryList = categories.map(category=>category.title) return <div className={s.yelpCard}> <img src={image_url} className={s.yelpImage}></im...
docs/src/components/Docs/Props/DecoratorProp/index.js
michalko/draft-wyswig
import React from 'react'; export default () => ( <div> <h3>customDecorators</h3> <div className="docs-desc"> Rendering of a entities can be changed using customDecorators. An array of decorators can be passed to the editor. These should be decorators exactly as in DraftJS, an object with 2 prop...
src/js/components/Productlist.js
kRITZCREEK/squirrelzon
import React from 'react' import { showProduct } from 'Squirrelzon.Types' import ShoppingCartActions from 'babel!../actions/ShoppingCartActions' import Accessors from 'Squirrelzon.Types.Accessors' var Productlist = React.createClass({ products(){ return this.props.products .map((product => { retur...
actor-apps/app-web/src/app/components/modals/AppCacheUpdate.react.js
Rogerlin2013/actor-platform
import React from 'react'; import Modal from 'react-modal'; //import pureRender from 'pure-render-decorator'; import { Styles, FlatButton } from 'material-ui'; import AppCacheStore from 'stores/AppCacheStore'; import AppCacheActionCreators from 'actions/AppCacheActionCreators'; import { KeyCodes } from 'constants/Act...
clients/packages/admin-client/src/components/forms/help-block.js
nossas/bonde-client
import PropTypes from 'prop-types' import React from 'react' import classnames from 'classnames' const HelpBlock = ({ children, className }) => ( <div className={classnames('muted my2', className)}> <small className='block'> <dfn>{children}</dfn> </small> </div> ) HelpBlock.propTypes = { className...
src/components/SpinnerComponent.js
tjkang/ReactNativeAuth
// Import libraries for making a component import React from 'react'; import { StyleSheet, View, ActivityIndicator, } from 'react-native'; // Make a component const Spinner = ({ size }) => ( <View style={styles.spinnerStyle}> <ActivityIndicator size={size} /> </View> ); // ==============================...
packages/web/examples/ssr/pages/multidropdownlist.js
appbaseio/reactivesearch
/* eslint-disable */ import React, { Component } from 'react'; import { ReactiveBase, MultiDropdownList, SelectedFilters, ReactiveList, } from '@appbaseio/reactivesearch'; import initReactivesearch from '@appbaseio/reactivesearch/lib/server'; import Layout from '../components/Layout'; import BookCard from '../com...
src/pages/posts.js
epeterson320/epeterson320.github.io
import React from 'react'; import { graphql, StaticQuery } from 'gatsby'; import Page from '../components/Page'; import BlogExcerpt from '../components/BlogExcerpt'; import { PageTitleArea, Title } from '../components/titles'; import SEO from '../components/SEO'; const AllPosts = props => ( <Page style={{ maxWidth: ...
src/pages/404.js
grafmark59/gatsby-site
import React from 'react' const NotFoundPage = () => ( <div> <h1>NOT FOUND</h1> <p>You just hit a route that doesn&#39;t exist... the sadness.</p> </div> ) export default NotFoundPage
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/PureComponent.js
JonathanUsername/flow
// @flow import React from 'react'; class MyComponent extends React.PureComponent { static defaultProps: DefaultProps = {}; props: Props; state: State = {}; defaultProps: T; static props: T; static state: T; a: T; b = 5; c: T = 5; method() {} } const expression = () => class extends React.Pure...
app/javascript/mastodon/features/ui/components/bundle_modal_error.js
MastodonCloud/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; import IconButton from '../../../components/icon_button'; const messages = defineMessages({ error: { id: 'bundle_modal_error.message', defaultMessage: 'Something went wrong while loading this comp...
src/components/common/hocs/SummarizedVizualization.js
mitmedialab/MediaCloud-Web-Tools
import PropTypes from 'prop-types'; import React from 'react'; import { FormattedHTMLMessage, injectIntl } from 'react-intl'; import { Row, Col } from 'react-flexbox-grid/lib'; import AppButton from '../AppButton'; import messages from '../../../resources/messages'; const localMessage = { showDetails: { id: 'summari...
examples/js/complex/app.js
powerhome/react-bootstrap-table
/* eslint no-unused-vars: 0 */ /* eslint no-console: 0 */ /* eslint space-infix-ops: 0 */ /* eslint max-len: 0 */ import React from 'react'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; const jobs = []; function addJobs(quantity) { const startId = jobs.length; for (let i = 0; i < qu...
app/javascript/mastodon/features/ui/components/column_header.js
pso2club/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import Icon from 'mastodon/components/icon'; export default class ColumnHeader extends React.PureComponent { static propTypes = { icon: PropTypes.string, type: PropTypes.string, active: PropTypes.bool, ...
src/components/Share/Share.js
IFS49F/poker
import React, { Component } from 'react'; import './Share.css'; const defaultTooltip = 'Click to copy link'; class Share extends Component { constructor(props) { super(props); this.state = { tooltip: defaultTooltip }; } handleCopy = (e) => { // eslint-disable-line e.preventDefault(); ...
web/src/client/components/schedule.js
mrsharpoblunto/it-gets-the-hose-again
/* * @format */ import React from 'react'; import M from 'materialize-css'; import {useContext, useLayoutEffect, useEffect, useRef} from 'react'; import {useHistory} from 'react-router-dom'; import { getSchedule, removeFromSchedule, addToSchedule, } from '../actions/schedule'; import {StoreContext} from '../sto...
src/svg-icons/action/print.js
ruifortes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionPrint = (props) => ( <SvgIcon {...props}> <path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/> </...
src/js/components/PoemForm.js
tanaka0325/manday_web
import React from 'react' const PoemForm = (props) => { let input return ( <div> <h2>poem form</h2> <form onSubmit={(e) => { e.preventDefault() if (!input.value.trim()) { return } props.actions.add({ user_id: 1, da...
RN/AnimatedDemo/animated04.js
puyanLiu/LPYFramework
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, Easing, Animated, } from 'react-native'; class AnimatedDemo extends Component { constructor(props) { super(props); this....
app/javascript/mastodon/features/ui/components/actions_modal.js
NS-Kazuki/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import StatusContent from '../../../components/status_content'; import Avatar from '../../../components/avatar'; import Relative...
src/res/Error.js
BBuzzArt/react-native-infinite
import React from 'react'; import PropTypes from 'prop-types'; import { View, Text, TouchableOpacity } from 'react-native'; import css from './css'; export default class Error extends React.Component { static propTypes = { message: PropTypes.string, }; static defaultProps = { message: 'error message', onRe...
examples/basic-example/index.js
theadam/react-inform
import './index.css'; import '../foundation.css'; import React, { Component } from 'react'; import TextArea from 'react-textarea-autosize'; import { render } from 'react-dom'; import alertify from 'alertify.js'; import { isEmail } from 'string-validator'; import { form, from, DisabledFormSubmit, FeedbackFormSu...
blueocean-material-icons/src/js/components/svg-icons/social/party-mode.js
kzantow/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const SocialPartyMode = (props) => ( <SvgIcon {...props}> <path d="M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 3c1.63 0 3.06.79 3.98 2H12c-1.66 0-3 1.34-3 3 0 .35.07.69.18 1H7.1c-.06-.32-.1-.66...
src/shared/components/Map/Map.js
amcsi/teamap
/* @flow */ import React from 'react'; import { GoogleMap } from 'react-google-maps'; import ScriptjsLoader from 'react-google-maps/lib/async/ScriptjsLoader'; import { latLon } from '../../types/map'; import { safeConfigGet } from '../../utils/config' type Props = { spanFullPage: ?boolean, defaultCenter: latLon, }...
src/shared/components/login/login.js
NestorSegura/operationcode_frontend
import React, { Component } from 'react'; import _ from 'lodash'; import axios from 'axios'; import PropTypes from 'prop-types'; import config from 'config/environment'; import { Link } from 'react-router-dom'; import styles from './login.css'; import Form from '../form/form'; import Section from '../section/section'; ...
node_modules/_rc-tree-select@1.10.9@rc-tree-select/es/SelectTrigger.js
ligangwolai/blog
import _defineProperty from 'babel-runtime/helpers/defineProperty'; import _extends from 'babel-runtime/helpers/extends'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _createClass from 'babel-runtime/helpers/createClass'; import _possibleConstructorReturn from 'babel-runtime/helpers/possib...
client/src/components/FileStatusIcon/tests/FileStatusIcon-story.js
silverstripe/silverstripe-admin
import React from 'react'; // eslint-disable-next-line import/no-extraneous-dependencies import { storiesOf } from '@storybook/react'; import { withNotes } from '@storybook/addon-notes'; import { withKnobs, boolean, selectV2 } from '@storybook/addon-knobs'; import FileStatusIcon from 'components/FileStatusIcon/FileStat...
assets/scripts/main.js
magul/streetmix
/** * Streetmix * */ import Raven from 'raven-js' import React from 'react' import ReactDOM from 'react-dom' // Polyfills import 'babel-polyfill' import 'whatwg-fetch' // fetch API import 'handjs' // microsoft's pointer events / touch-action spec import './vendor/canvas-toBlob.js' import './vendor/Blob.js' import ...
src/js/components/Distribution.js
kylebyerly-hp/grommet
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import PropTypes from 'prop-types'; import ReactDOM from 'react-dom'; import classnames from 'classnames'; import KeyboardAccelerators from '../utils/KeyboardAccelerators'; import Intl from '../utils/Intl'; i...
fields/components/columns/InvalidColumn.js
dryna/keystone-twoje-urodziny
import React from 'react'; import ItemsTableCell from '../../components/ItemsTableCell'; import ItemsTableValue from '../../components/ItemsTableValue'; var InvalidColumn = React.createClass({ displayName: 'InvalidColumn', propTypes: { col: React.PropTypes.object, }, renderValue () { return ( <ItemsTableVal...
kaushik/ui-elements/src/App.js
fcc-hyd/moc-rnf
import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; import ParentUlContainer from './Tabs'; import ParentDropdown from './Dropdown'; class App extends Component { render() { return ( <div className="App"> <div className="App-header"> <img src={logo...
src/FormGroup.js
wjb12/react-bootstrap
import React from 'react'; import classNames from 'classnames'; class FormGroup extends React.Component { render() { let classes = { 'form-group': !this.props.standalone, 'form-group-lg': !this.props.standalone && this.props.bsSize === 'large', 'form-group-sm': !this.props.standalone && this.pr...
src/parser/shared/modules/DeathTracker.js
fyruna/WoWAnalyzer
import React from 'react'; import {Link} from 'react-router-dom'; import { formatNumber, formatPercentage } from 'common/format'; import Analyzer from 'parser/core/Analyzer'; import makeAnalyzerUrl from 'interface/common/makeAnalyzerUrl'; const WIPE_MAX_DEAD_TIME = 15 * 1000; // 15sec const debug = false; // Log whe...
src/svg-icons/editor/format-color-reset.js
hai-cea/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorFormatColorReset = (props) => ( <SvgIcon {...props}> <path d="M18 14c0-4-6-10.8-6-10.8s-1.33 1.51-2.73 3.52l8.59 8.59c.09-.42.14-.86.14-1.31zm-.88 3.12L12.5 12.5 5.27 5.27 4 6.55l3.32 3.32C6.55 11.32 6 12...
src/atoms/Tooltip/index.js
policygenius/athenaeum
import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import Icon from 'atoms/Icon'; import Modal from 'molecules/Modal'; import styles from './tooltip.module.scss'; class Tooltip extends React.Component { constructor(props) { super(props); this.state = { ...
frontend/app_v2/src/components/Song/SongPresentation.js
First-Peoples-Cultural-Council/fv-web-ui
import React from 'react' import PropTypes from 'prop-types' // FPCC import { getMediaUrl } from 'common/urlHelpers' import AudioNative from 'components/AudioNative' import SanitizedHtml from 'components/SanitizedHtml' function SongPresentation({ entry }) { const hasMedia = entry?.pictures?.length > 0 || entry?.vid...
src/routes/savoringYourChild/FAQContainer.js
goldylucks/adamgoldman.me
// @flow import React from 'react' import { logistics, lossGrief } from './data' import FAQ from '../../components/FAQ' const FAQContainer = () => ( <div> <h1 className='text-center'>F.A.Q.</h1> <div className='row justify-content-md-center'> <div className='col col-lg-8'> <h4>Logistics</h4>...
docs/app/Examples/elements/List/Types/ListExampleLink.js
mohammed88/Semantic-UI-React
import React from 'react' import { List } from 'semantic-ui-react' const ListExampleLink = () => ( <List link> <List.Item active>Home</List.Item> <List.Item as='a'>About</List.Item> <List.Item as='a'>Jobs</List.Item> <List.Item as='a'>Team</List.Item> </List> ) export default ListExampleLink
src/components/background/home.js
dadiaoguai/blog-react-demo-front
import React from 'react' import propTypes from 'prop-types' import { Redirect, Route, Switch, } from 'react-router-dom' import Header from './header' import ArticleManagement from './articleManagement' import NewArticle from './newArticle' import ArticleDetail from './articleDetail' class BackendHome extends Re...
src/containers/HomePage/MapSection.js
nickeblewis/walkapp
/** * Map Component */ import { Map, Marker, Popup, TileLayer } from 'react-leaflet' import React from 'react' import { graphql } from 'react-apollo' import gql from 'graphql-tag' class MapSection extends React.Component { // We set the GPS data in our costructor which is used to center the map on the middle of F...
fixtures/ssr/src/index.js
yungsters/react
import React from 'react'; import {hydrateRoot} from 'react-dom/client'; import App from './components/App'; hydrateRoot(document, <App assets={window.assetManifest} />);
docs/app/Examples/views/Feed/Variations/FeedExampleSizeSmall.js
mohammed88/Semantic-UI-React
import React from 'react' import { Feed, Header } from 'semantic-ui-react' const FeedExampleSizeSmall = () => ( <Feed size='small'> <Header as='h4'>Followers Activity</Header> <Feed.Event> <Feed.Content> <Feed.Summary> <a>Elliot Fu</a> added <a>Jenny Hess</a> as a friend </Fe...
src/components/Feedback/Feedback.js
piscis/react-starter-kit
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React from 'react'; import styles from './Feedback.css'; import withStyles from '../../decorators/withStyles'; @withStyles(styles) class Feedback { render() { return ( <div className="Feedback"> <div className="Feedba...
app/javascript/flavours/glitch/features/compose/components/textarea_icons.js
im-in-space/mastodon
// Package imports. import PropTypes from 'prop-types'; import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; // Components. import Icon from 'flavours/glitch...
src/components/resultDetail.js
joeterrell/SerpMonsterReactApp
import React, { Component } from 'react'; import Chart from 'chart.js'; class ResultDetail extends Component { constructor(props) { super(props); } renderChart = () => { this.destroyActiveChart(); const SerpTitle = this.props.selectedResultTitle; const ChartPlaceholder = document.getElementById(...
src/widgets/DataTable/TextInputCell.js
sussol/mobile
/* eslint-disable no-unused-expressions */ /* eslint-disable react/forbid-prop-types */ import React from 'react'; import PropTypes from 'prop-types'; import { View, TextInput } from 'react-native'; import Cell from './Cell'; import RefContext from './RefContext'; import { getAdjustedStyle } from './utilities'; /** ...
src/js/components/SidebarRightBox/SidebarRightBox.js
soundchain/soundchain-frontend
import React, { Component } from 'react'; import cx from './SidebarRightBox.scss'; export default class SidebarRightBox extends Component { render() { return ( <div> {[1,2,3,4,5,6,7,8,9,10].map((i) => ( <div style={{height: '100px'}} key={i}>SidebarRightBox</div> ))} </div> ...
assets/jqwidgets/demos/react/app/loader/righttoleftlayout/app.js
juannelisalde/holter
import React from 'react'; import ReactDOM from 'react-dom'; import JqxLoader from '../../../jqwidgets-react/react_jqxloader.js'; import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js'; class App extends React.Component { componentDidMount() { this.refs.openLoader.on('click', () => { ...
src/components/posts_new.js
tolgatuna/Udemy_BlogPostApp
import _ from 'lodash'; import React, { Component } from 'react'; import { Field, reduxForm } from 'redux-form'; import { Link } from "react-router-dom"; import { connect } from 'react-redux'; import { createPost } from "../actions/index"; const FIELDS = { title: { type: 'input', label: 'Title For ...
src/svg-icons/image/exposure-plus-1.js
kittyjumbalaya/material-components-web
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageExposurePlus1 = (props) => ( <SvgIcon {...props}> <path d="M10 7H8v4H4v2h4v4h2v-4h4v-2h-4V7zm10 11h-2V7.38L15 8.4V6.7L19.7 5h.3v13z"/> </SvgIcon> ); ImageExposurePlus1 = pure(ImageExposurePlus1); ImageEx...
lib/client.js
codevlabs/filepizza
import React from 'react' import ReactRouter from 'react-router' import routes from './routes' import alt from './alt' import webrtcSupport from 'webrtcsupport' import SupportActions from './actions/SupportActions' let bootstrap = document.getElementById('bootstrap').innerHTML alt.bootstrap(bootstrap) window.FilePizz...
resolvers/subschema-resolver-domtype/src/index.js
jspears/subschema-devel
import React from 'react'; import PropTypes from 'subschema-prop-types'; import { FREEZE_OBJ } from 'subschema-utils'; //Expose for configurability export const settings = { type: 'span' }; export function loadType(val, key, props, { loader, injector }) { const { type, ...rest } = typeof val === 'string' ? ...
src/Routes.js
iestruch/react_demo
import React from 'react'; import {Router,Route,IndexRoute,hashHistory} from 'react-router'; import App from './App'; import Home from './containers/Home'; import Gallery from './containers/Gallery/Gallery'; import PageA from './containers/PageA'; import PageB from './containers/PageB'; export default () => { retu...
src/parser/rogue/subtlety/modules/core/Energy.js
fyruna/WoWAnalyzer
import React from 'react'; import Analyzer from 'parser/core/Analyzer'; import SPELLS from 'common/SPELLS/index'; import SpellLink from 'common/SpellLink'; import resourceSuggest from 'parser/shared/modules/resourcetracker/ResourceSuggest'; import EnergyTracker from '../../../shared/resources/EnergyTracker'; import E...
frontend/src/components/App/App.js
edhzsz/reactnd-readable
import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; import { connect } from 'react-redux'; export class App extends Component { render() { return ( <div className="App"> <header className="App-header"> <img src={logo} className="App-logo" alt="logo...
packages/react/src/components/atoms/headings/ColoredHeading/index.js
massgov/mayflower
/** * ColoredHeading module. * @module @massds/mayflower-react/ColoredHeading * @requires module:@massds/mayflower-assets/scss/01-atoms/colored-heading */ import React from 'react'; import PropTypes from 'prop-types'; const ColoredHeading = (coloredHeading) => { const Element = `h${coloredHeading.level}`; let...
src/components/MobileNavigation.js
ICalvinG/icalving.github.io
import React from 'react'; import { NavLink } from 'react-router-dom'; const MobileNavigation = () => ( <nav className='mobile-navigation__wrapper'> <NavLink to="/">Home</NavLink> <NavLink to="/about">About</NavLink> <NavLink to="/resume">Resume</NavLink> <NavLink to="/skills">Skills</NavLink> <N...
zero-cloud-boss/src/router.js
xhyan/spring-cloud-learn
import React from 'react'; import { Router, Route } from 'dva/router'; // import Products from './routes/Products'; import Users from './routes/Users/Users'; export default function ({ history }) { return ( <Router history={history}> <div> <Route path="/users" component={Users} /> </div> <...
src/Grid.js
apkiernan/react-bootstrap
import classNames from 'classnames'; import React from 'react'; import elementType from 'react-prop-types/lib/elementType'; import { bsClass, prefix, splitBsProps } from './utils/bootstrapUtils'; const propTypes = { /** * Turn any fixed-width grid layout into a full-width layout by this property. * * Adds ...
src/blog/test-article-one.js
t-kelly/react-static-boilerplate
/** * React Static Boilerplate * https://github.com/koistya/react-static-boilerplate * Copyright (c) Konstantin Tarkus (@koistya) | MIT license */ import React from 'react'; export default class { render() { return ( <div> <h1>Test Article 1</h1> <p>Coming soon.</p> </div> )...
frontend/src/Settings/Profiles/Delay/EditDelayProfileModalContentConnector.js
geogolem/Radarr
import _ from 'lodash'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { saveDelayProfile, setDelayProfileValue } from 'Store/Actions/settingsActions'; import selectSettings from 'Store/Selectors/sele...
src/ParticipationListMobile/RenderUserClosestList.js
christianalfoni/ducky-components
import React from 'react'; import PropTypes from 'prop-types'; import ChallengeMeta13 from '../ChallengeMeta13'; function RenderUserClosestList(props) { return ( <div> { props.sortedList.map((section, index) => { if (index === props.currentPosition + 2) { return ( ...
src/app/app.js
zendra1994/react-ssr
import React from 'react'; import ReactDOM from 'react-dom'; import { Router, browserHistory } from 'react-router'; import { Provider } from 'react-redux'; import configStore from './store'; import routes from './routes'; import '../assets/favicon.ico'; require('../styles/main.sass'); require('./vendor.js'); conso...
admin/client/App/components/Navigation/Mobile/index.js
ratecity/keystone
/** * The mobile navigation, displayed on screens < 768px */ import React from 'react'; import Transition from 'react-addons-css-transition-group'; import MobileSectionItem from './SectionItem'; const ESCAPE_KEY_CODE = 27; const MobileNavigation = React.createClass({ displayName: 'MobileNavigation', propTypes: ...
client/components/ForgotPasswordForm.js
homanbromand/node-react-bootstrap
import React from 'react' import { forgot } from 'client/actions/passwordActions' export default class ForgotPassword extends React.Component { constructor() { super() this.submitHandler = this.submitHandler.bind(this) } submitHandler(e) { e.preventDefault() const email = this.emailInput.value if (em...
components/Modifiers/index.js
sikhote/clairic
import React from 'react'; import PropTypes from 'prop-types'; import Router from 'next/router'; import { connect } from 'react-redux'; import { Button, Select, Input } from 'antd'; import { at, get } from 'lodash'; import arrayMove from 'array-move'; import IconButton from '../IconButton'; import Icon from '../Icon'; ...
src/svg-icons/maps/local-cafe.js
igorbt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalCafe = (props) => ( <SvgIcon {...props}> <path d="M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM2 21h18v-2H2v2z"/> </SvgIcon> ); MapsLocalCa...
src/pages/Contact.js
dmed256/site
import React from 'react'; const Contact = () => ( <div>Contact</div> ); export default Contact;
app/client/util/react-intl-test-helper.js
nittmurugan/finddriver
/** * 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/routes.js
iamdew/ReactOnExpressBasic
import React from 'react' import Route from 'react-router-dom/Route'; import Redirect from 'react-router-dom/Redirect'; import Switch from 'react-router-dom/Switch'; import Link from 'react-router-dom/Link'; import Home from './container/Home'; import About from './container/About'; export default ( <div> ...
app/js/components/sidebar-filter.js
workco/hackathon-talent
'use strict'; import React from 'react'; import { Link } from 'react-router'; import cx from 'classnames'; import FilterActions from '../actions/filtering-actions'; export default React.createClass({ render() { const linkProps = { activeClassName: 'is-active', onClick: this._resetCharacterFilter ...
src/components/Cards/UserstoryCard.js
giux78/daf-dataportal
import React, { Component } from 'react'; import { Route, Link } from 'react-router-dom'; import { serviceurl } from "../../config/serviceurl"; import fontawesome from '@fortawesome/fontawesome' import FontAwesomeIcon from '@fortawesome/react-fontawesome' import { faUser, faGlobe, faUsers, faSortDown } from '@fortaweso...
src/components/DrumMachine.js
vibertthio/beact
import React, { Component } from 'react'; import uuid4 from 'uuid/v4'; import axios from 'axios'; import key from 'keymaster'; import styles from '../styles/DrumMachine.css'; import Matrix from './Matrix'; import { Sequencer, Keyboard, toBPM, presets } from '../utils/Audio'; import Animation, { animationKey2IndexMappi...
addons/storyshots/storyshots-core/stories/directly_required/index.js
kadirahq/react-storybook
import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import { Button } from '@storybook/react/demo'; storiesOf('Another Button', module) .add('with text', () => <Button onClick={action('clicked')}>Hello Button</Button>) .add('with some emoji',...
src/Migration/MigrationContent.Component.js
baopham/react-laravel-generator
import React from 'react' import MigrationGenerator from 'Migration/MigrationGenerator' export default class MigrationContent extends React.Component { static propTypes = { migration: React.PropTypes.object.isRequired } render () { const generator = new MigrationGenerator(this.props.migration) cons...
docs/app/Examples/elements/List/Types/ListExampleBasic.js
mohammed88/Semantic-UI-React
import React from 'react' import { List } from 'semantic-ui-react' const ListExampleBasic = () => ( <List> <List.Item>Apples</List.Item> <List.Item>Pears</List.Item> <List.Item>Oranges</List.Item> </List> ) export default ListExampleBasic
src/Table/components/TableHead.js
Pearson-Higher-Ed/compounds
import React, { Component } from 'react'; import PropTypes from 'prop-types'; const TableHead = ({ children }) => { return ( <thead> {children} </thead> ) } export default TableHead; TableHead.propTypes = { children: PropTypes.node }
assets/jqwidgets/demos/react/app/grid/localization/app.js
juannelisalde/holter
import React from 'react'; import ReactDOM from 'react-dom'; import JqxGrid from '../../../jqwidgets-react/react_jqxgrid.js'; class App extends React.Component { render() { let data = generatedata(250); let source = { localdata: data, datafields: ...
src/svg-icons/action/settings-phone.js
lawrence-yu/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionSettingsPhone = (props) => ( <SvgIcon {...props}> <path d="M13 9h-2v2h2V9zm4 0h-2v2h2V9zm3 6.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-...
assets/js/components/forms/input.js
joshgagnon/sailjs-webpack-base
"use strict"; import React from 'react'; import {Input} from 'react-bootstrap'; export default Input; /* export default class Input extends React.Component { render(){ return <div className="form-group"> <input type={this.props.type} className={"form-control "+(this.props.bsStyle || '')} {......
test/components_test/form-inputs/number.js
aichbauer/redux-valid-form
import test from 'ava'; import React from 'react'; import { shallow } from 'enzyme'; import Number from '../../../src/components/form-inputs/number'; test('Number | default props', (t) => { const numberWrapper = shallow(<Number />); t.deepEqual(numberWrapper.props(), { type: 'number', 'data-form-id': '',...
src/components/voting/votingBar.js
slaweet/lisk-nano
import { translate } from 'react-i18next'; import React from 'react'; import grid from 'flexboxgrid/dist/flexboxgrid.css'; import style from './votingBar.css'; import votingConst from '../../constants/voting'; import { getTotalVotesCount, getVoteList, getUnvoteList } from './../../utils/voting'; const VotingBar = ({ ...
app/containers/HomePage/index.js
mclxly/react-study
/* * HomePage * * This is the first thing users see of our App, at the '/' route */ // colin import moment from 'moment'; import React from 'react'; import { connect } from 'react-redux'; import { push } from 'react-router-redux'; import shouldPureComponentUpdate from 'react-pure-render/function'; import { creat...
fixtures/attribute-behavior/src/index.js
syranide/react
import './index.css'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render(<App />, document.getElementById('root'));
packages/@react-boilerplates/simple/test/render.js
dog-days/create-react-boilerplate-app
import React from 'react'; import { render } from 'react-dom'; import Container from 'src/container'; export default function renderApp() { const rootDOM = document.getElementById('root'); //先移除 render(<span />, rootDOM); //后渲染 render(<Container />, rootDOM); }
app/Output.js
fakepanda/react-hangman
import React from 'react'; // TODO: play next game? reveal answer const Output = (props) => { let output; if (props.gameState === 'play') { output = <div className="output">Topic: A character from the "Game of Thrones" series</div>; } else if (props.gameState === 'win' || props.gameState === 'lose') { ou...
src/svg-icons/av/mic-off.js
xmityaz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvMicOff = (props) => ( <SvgIcon {...props}> <path d="M19 11h-1.7c0 .74-.16 1.43-.43 2.05l1.23 1.23c.56-.98.9-2.09.9-3.28zm-4.02.17c0-.06.02-.11.02-.17V5c0-1.66-1.34-3-3-3S9 3.34 9 5v.18l5.98 5.99zM4.27 3L3 4.2...
src/app/home.js
vacuumlabs/doc-viewer
import React from 'react' function r([component, attr, ...children]) { return React.createElement( component, attr, ...children.map((c) => Array.isArray(c) ? r(c) : c), ) } const Card = ({link, newPage, icon, title, description, children}) => { const blank = {target: '_blank', rel: 'noopener norefer...
YEAR 3/SEM 1/MOBILE/mobile_exam_prep/screens/Experiment/UserProfile/index.js
Zephyrrus/ubb
import React from 'react' import PropTypes from 'prop-types' import contactData from './contact.json' import Profile from './Profile' const ProfileScreen = () => <Profile {...contactData} /> ProfileScreen.propTypes = { navigation: PropTypes.object.isRequired, } ProfileScreen.navigationOptions = () => ({ title:...
src/InputGroupButton.js
mmarcant/react-bootstrap
import classNames from 'classnames'; import React from 'react'; import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils'; class InputGroupButton extends React.Component { render() { const { className, ...props } = this.props; const [bsProps, elementProps] = splitBsProps(props); const...
actor-apps/app-web/src/app/components/sidebar/ContactsSectionItem.react.js
lzpfmh/actor-platform
import React from 'react'; import ReactMixin from 'react-mixin'; import addons from 'react/addons'; import DialogActionCreators from 'actions/DialogActionCreators'; import AvatarItem from 'components/common/AvatarItem.react'; const {addons: { PureRenderMixin }} = addons; @ReactMixin.decorate(PureRenderMixin) class ...