code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React from 'react'; import jQuery from 'jquery'; import {redirectUrl} from '../lib/utils'; import {login, requestResetPassword, resetPassword} from '../lib/client'; export default class ResetPassword extends React.Component { constructor(props) { super(props); this.state = {}; } handleChange(na...
A component that displays a button that will reset the password.
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; import BTClient from 'react-native-braintree-xplat'; class example extends Component { componentDidMount() { ...
The default app sequence for a sequence of components.
import React from 'react'; import IconBase from './../components/IconBase/IconBase'; export default class IosPintOutline extends React.Component { render() { if(this.props.bare) { return <g> <path d="M368,170.085c0-21.022-0.973-88.554-19.308-125.013C344.244,36.228,336.25,32,316.999,32H195.001 c-19.25,0-27.246,4....
A component that can be used to render a Ios - Pint outline.
import React from 'react'; import { StyleSheet, View, Text, Dimensions, } from 'react-native'; import MapView, { MAP_TYPES, PROVIDER_DEFAULT } from 'react-native-maps'; const { width, height } = Dimensions.get('window'); const ASPECT_RATIO = width / height; const LATITUDE = 37.78825; const LONGITUDE = -122.4...
A component that renders a custom sequence of items with a specific map type.
import 'babel-polyfill' import React from 'react' import { render } from 'react-dom' import { Provider } from 'react-redux' import App from './containers/App' import configureStore from './store/configureStore' const store = configureStore() render( <Provider store={store}> <App /> </Provider>, document.get...
Imports a single and renders it into a DOM.
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' import { Message } from 'semantic-ui-react' const ImageTypesExamples = () => ( <ExampleSection title='Types'> <ComponentExample ...
Imports a sequence of components.
import React from 'react'; import PropTypes from 'prop-types'; import IconButton from './icon_button'; import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; const messages = defineMessages({ unblockDomain: { id: 'account.unblock_domain', default...
A component that unblocks a domain if it is blocked.
import React from 'react'; import ClassNames from 'classnames'; const LazyLoad = React.createClass({ displayName: 'LazyLoad', propTypes: { height: React.PropTypes.string, scroll: React.PropTypes.number, visibleByDefault: React.PropTypes.bool }, getInitialState () { return { visible: this.props.visibl...
The LazyLoad component is a component that can be rendered when a component is rendered.
// @flow import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { Router, hashHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import routes from './routes'; import configureStore from './store/configureStore'; import './app...
Imports a single node in the DOM.
import React from 'react' import { PropTypes } from 'prop-types'; import { connect } from 'react-redux' import { Field, reduxForm, submit } from 'redux-form' import { firebaseConnect, pathToJS, isLoaded } from 'react-redux-firebase' import RaisedButton from 'material-ui/RaisedButton' import Subheader from 'material-ui...
Imports a single node in the redux - firebase module.
import React from 'react'; import PropTypes from 'prop-types'; const NumberInput = ({name, label, placeholder, value, onChange, error}) => { let wrapperClass = 'form-group'; if(error && error.length > 0){ wrapperClass += " has-error"; } return ( <div className={wrapperClass}> ...
A function that exports a number input that can be used to enter a number in a sequence.
import React from 'react'; import './footer.scss'; import './footer_mobile.scss'; import DashBoard from '../../../images/Icons/dashboard'; import Support from '../../../images/Icons/support'; import Feed from '../../../images/Icons/feed'; class Footer extends React.Component { constructor(props) { super(prop...
Package that exports a Footer class.
import React from 'react'; import { App } from './app'; React.render(<App />, document.getElementById('root'));
Imports a React application and renders it into the root element.
'use strict' import '../../style.css' import './issues.css' import React from 'react' import Helmet from 'react-helmet' import Picture from '../shared/Picture' import IssueViewer from './IssueViewer' import issueData from './issue.json' class Issues extends React.Component { constructor(props) { super(props) ...
Component that renders a single
/* eslint max-len: 0 */ import React from 'react'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; const products = []; const qualityType = { 0: 'good', 1: 'bad', 2: 'unknown' }; const inStockStatus = { 1: 'yes', 2: 'no' }; function addProducts(quantity) { const startId = prod...
Adds a series of products to the bootstrap table.
/** * Sample React Native App * https://github.com/facebook/react-native */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; import ExampleComponent from './ExampleComponent'; class example extends Component { render() { retu...
Create a base class for a sequence of components that can be rendered using a sequence of components.
/* eslint-disable no-eval*/ import React from 'react' import ReactDOM from 'react-dom' import cssm from 'react-css-modules' import { transform } from 'babel-standalone' import * as ReactFabric from 'react-fabric' import style from './Preview.scss' const ERROR_TIMEOUT = 500 const SCOPE = { React, ...ReactFabric } c...
A component that can be rendered by a component in a DOM.
import React from 'react'; import Circle from './Circle'; import Wrapper from './Wrapper'; const LoadingIndicator = () => ( <Wrapper> <Circle /> <Circle rotate={30} delay={-1.1} /> <Circle rotate={60} delay={-1} /> <Circle rotate={90} delay={-0.9} /> <Circle rotate={120} delay={-0.8} /> <Cir...
The LoadingIndicator function
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionDns = (props) => ( <SvgIcon {...props}> <path d="M20 13H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 19c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM20 3H4c-.55 0-1 .45-1 1v...
A component that renders a series of action dns icons.
// import 'todomvc/All.styl' import __debug from 'debug' import React from 'react' import Container from 'immutable-di' import NativeCursor from 'immutable-di/cursors/native' import App from 'todomvc/app/components/App' import getConfig from 'todomvc/getConfig' import Location from 'todomvc/common/services/Location' c...
Imports a single node in the DOM and renders it as an App.
import React from 'react'; export default class App extends React.Component{ constructor(props) { super(props); this.render = this.render.bind(this); this.state = { items: this.props.items, disabled: true }; } componentDidMount() { this.setState({ disabled: false }) ...
The base class for a series of items that can be added to a menu.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvQueuePlayNext = (props) => ( <SvgIcon {...props}> <path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h2v-2H3V5h18v8h2V5c0-1.11-.9-2-2-2zm-8 7V7h-2v3H8v2h3v3h2v-3h3v-2h-3zm11 8l-4.5 4.5L18 21l3-3-3-3...
AvQueuePlayNext is a simple component that exports a sequence of icons that can be played next.
import React from 'react'; import { StoryPage } from 'StorybookConfig/preview'; import ColoredHeading from './index'; import ColoredHeadingDocs from './ColoredHeading.md'; import coloredHeadingOptions from './ColoredHeading.knobs.options'; import headingsOptions from '../Headings.knobs.options'; export const ColoredH...
Exports a single color color or level of a color in a story.
import React from 'react'; import ReactDOM from 'react-dom'; import { watch } from 'wramp'; import Counter from './components/Counter'; import store from './store'; function render() { ReactDOM.render( <Counter value={store.getCount()} onIncrement={() => store.$increment()} onDecrement={() => s...
This is a hack to avoid the circular dependency between React and Wramp.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NavigationArrowForward = (props) => ( <SvgIcon {...props}> <path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/> </SvgIcon> ); NavigationArrowForward = pure(NavigationArrowForward); Navigation...
A function to export a navigation arrow forward to a node in a hierarchy.
/** * The global Footer, displays a link to the website and the current Keystone * version in use */ import React from 'react'; import { Container } from 'elemental'; var Footer = React.createClass({ displayName: 'Footer', propTypes: { appversion: React.PropTypes.string, backUrl: React.PropTypes.string, br...
The Footer displays a link to the website and the current Keystone version in use
import $ from 'jquery'; import React from 'react'; import ReactDOM from 'react-dom'; import injectTapEventPlugin from 'react-tap-event-plugin'; import AppBar from 'material-ui/lib/app-bar'; import LeftNav from 'material-ui/lib/left-nav'; import TextField from 'material-ui/lib/text-field'; import List from 'material-u...
Component that displays a list of modules.
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import styles from './ModalHeader.css'; class ModalHeader extends Component { // // Render render() { const { children, ...otherProps } = this.props; return ( <div className={styles.modalHeader}...
Create a modal header with a single node.
/* 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; products.push({ id: id, ...
Adds products to the list of products in the system.
/* 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; products.push({ id: id, ...
The default table for a series of products.
import React from 'react'; import {storiesOf} from '@storybook/react'; import {withInfo} from '@storybook/addon-info'; import GlobalModal from 'app/components/globalModal'; import Button from 'app/components/button'; import {openModal} from 'app/actionCreators/modal'; storiesOf('GlobalModal', module).add( 'default'...
Imports a single non - modal modal.
import React from 'react'; import { IndexRoute, Redirect, Route, Router } from 'react-router'; import App from '../containers/App'; import ErrorPage from '../containers/ErrorPage'; import ExperimentPage from '../containers/ExperimentPage'; import HomePage from '../containers/HomePage'; import LegacyPage from '../conta...
Routes is a class that exports all routes in the application.
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdMovieFilter(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M36 8h8v28c0 2.2-1.8 4-4 4H8c-2.2 0-4-1.8-4-4l.02-24C4.02 9.8 5.8 8 8 8h2l4 6h6l-4-6h4l4 6h6l-4-6h4l4 6h6l-4-6zM22.5 30.5L28 28l-5.5-2.5L20 20l-2...
The MdMovieFilter class
import React, { Component } from 'react'; import { Translate, withLocalize } from 'react-localize-redux'; import { connect } from 'react-redux'; import { setSettingsVisible, setHelpVisible, setAboutVisible } from "../actions" const SimulatingStatus = { Stopped: 0, Step: 1, Play: 2 }; const CONSOLE_INPUT_NONE = ...
A component that displays a menu of the menu.
import {AssetInput} from 'widget/assetInput' import {Form} from 'widget/form/form' import {Layout} from 'widget/layout' import {Subject} from 'rxjs' import {compose} from 'compose' import {connect} from 'store' import {msg} from 'translate' import PropTypes from 'prop-types' import React from 'react' import _ from 'lod...
Component for reading a single asset section.
import React from 'react'; import Item from './Item.js'; import $ from 'jquery'; import { DropdownButton } from 'react-bootstrap'; import { MenuItem } from 'react-bootstrap'; class Wishlist extends React.Component { constructor(){ super() this.removeWish = this.removeWish.bind(this); this.markAsBought = ...
A component that shows a list of items in the wishlist.
/* eslint-disable no-console, no-use-before-define */ import path from 'path'; import Express from 'express'; import qs from 'qs'; import React from 'react'; import { Provider } from 'react-redux'; import configureStore from '../common/store/configureStore'; import App from '../common/containers/App'; import { fetch...
This is a middleware that renders the HTML of the universal example page.
/** * app.js * * This is the entry file for the application, only setup and boilerplate * code. */ import 'babel-polyfill'; /* eslint-disable import/no-unresolved */ // Load the manifest.json file and the .htaccess file import '!file?name=[name].[ext]!./manifest.json'; import 'file?name=[name].[ext]!./.htaccess';...
This module is responsible for importing the main application s JS files.
/* * Copyright (c) 2020 Nike, inc. * * Licensed 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/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to ...
Component for displaying User Group Permissions form field set
import { Router, browserHistory } from 'react-router'; import AsyncProps from 'async-props'; import React, { Component } from 'react'; import { render } from 'react-dom'; import routes from '../routes'; import App from './App'; class AppRoutes extends Component { render() { return ( <Router routes={routes}...
The routes class
'use strict'; import React from 'react'; import ActionButton from './ActionButton'; const buttonSpaceDefaultProps = { buttons: null, className: null, onOk: null, onClose: null, buttonClick: null, btnClass: null, href: null }; class ButtonsSpace extends React.Component { constructor(props) { super(props); ...
A component that shows a button space with buttons.
import React from 'react'; class Assignments extends React.Component { render () { return ( <div> <h3>Assignments</h3> {this.props.children || <p>Choose an assignment from the sidebar.</p>} </div> ); } } export default Assignments;
A component that can
import React from 'react'; import classSet from 'classnames'; const Row = React.createClass({ propTypes: { componentClass: React.PropTypes.node.isRequired }, getDefaultProps() { return { componentClass: 'div' }; }, render() { let ComponentClass = this.props.componentClass; return...
A component that is rendered as a row in a tree - like fashion.
import React from 'react'; import Icon from '../Icon'; export default class PermDataSettingIcon extends Icon { getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M37.98 23c.68 0 1.36.06 2.02.15V0L0 40h23.13c-.09-.66-.15-1.32-.15-2 0-8.28 6.72-15 15-15zm7.43 15...
A component that exports a PermDataSetting icon.
/* * 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...
JS Component for importing a missing node from a JS component.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageFilter5 = (props) => ( <SvgIcon {...props}> <path d="M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-2c0-1.11-.9-2-2-2h-...
A filter that returns an image that can be used to render a series of icons.
import React from 'react' import { Route, IndexRoute } from 'react-router' import Root from './root/Root' import Home from './pages/Home/Home' import Games from './pages/Games/Games' import GameDetail from './pages/GameDetail/GameDetail' import GameLobby from './pages/GameLobby/GameLobby' import Manage from './pages/M...
Imports a single package of the hierarchy.
import React from 'react'; import PropTypes from 'prop-types'; const emptyComponent = () => null; const noop = () => { }; class Bundle extends React.PureComponent { static propTypes = { fetchComponent: PropTypes.func.isRequired, loading: PropTypes.func, error: PropTypes.func, children: PropTypes.fu...
A component that is rendered by a component in a bundle.
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from ...
A modal header that shows a modal dialog with a close button.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageCropSquare = (props) => ( <SvgIcon {...props}> <path d="M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H6V6h12v12z"/> </SvgIcon> ); ImageCropSquare = pure(ImageCropSquar...
A component that exports a series of images with a random size that is a square of the image.
import React from 'react'; import * as GlobalConfig from '../../global.config.json'; import {FormattedMessage} from 'react-intl'; export default class Header extends React.Component { render() { const { main } = GlobalConfig.routes; return ( <nav className='navbar navbar-default navbar-...
A header class that displays a single missing or invalid node in the system.
import React, { Component } from 'react'; import Weather from './Weather'; export default class Main extends Component { render() { return ( <section className='weather-holder'> <Weather/> </section> ); } }
The main class for a component
import PropTypes from 'prop-types'; import React from 'react'; import { connect } from 'react-redux'; import { filterTable } from '../actions'; import ProductTable from '../components/ProductTable'; import { filterableTable } from '../styles/filterableTable.scss'; const FilterableTable = ({ filter, onFilter }) => { ...
A function that creates a filterable table that can be used to filter a node.
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import store from './redux/store'; import AppContainer from './components/AppContainer'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import './index.css'; import injectTapEventPlugin from 'rea...
Imports a single node in the DOM.
import electron from 'electron'; import PropTypes from 'prop-types'; import React from 'react'; import classNames from 'classnames'; import {connect, CursorContainer, CropperContainer} from '../../containers'; class Cursor extends React.Component { remote = electron.remote || false render() { if (!this.remot...
Generates a Cursor that can be used to show a cursor in the browser.
import React from 'react' import ReactDom from 'react-dom' import {AppContainer} from 'react-hot-loader' import getRouter from 'router/router' /* 初始化 */ renderWithHotReload(getRouter()) /* 热更新 */ if (module.hot) { module.hot.accept('router/router', () => { const getRouter = require('router/router').d...
imports ReactDOM from react - hot - loader
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionCardMembership = (props) => ( <SvgIcon {...props}> <path d="M20 2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h4v5l4-2 4 2v-5h4c1.11 0 2-.89 2-2V4c0-1.11-.89-2-2-2zm0 13H4v-2h16v2zm0-5H4V4h16v6z"/> </SvgIcon>...
ActionCardMembership is a function that exports a action card membership icon.
import React from 'react'; import styles from './Avatar.pcss'; const Avatar = props => { const { src } = props; return ( <img src={src} className={styles.image} /> ); }; Avatar.propTypes = { src: React.PropTypes.string.isRequired, }; Avatar.defaultProps = { }; export default Avatar;
export default Avatar
import _transformLib from 'transform-lib'; const _components = { Foo: { displayName: 'Foo' } }; const _transformLib2 = _transformLib({ filename: '%FIXTURE_PATH%', components: _components, locals: [], imports: [] }); function _wrapComponent(id) { return function (Component) { return _transformLib...
Private functions - Component that transforms a component into a component that can be rendered by a component.
import React from 'react'; import { Carcas } from '..'; export default class ResultsCarcas extends Carcas { constructor(props) { super(props); this.styles = require('./ResultsCarcas.less'); this.backgroundClass = this.styles.cresults; this.wrapClass = this.styles.containerAll; } renderCell(styl...
The results of a single node in a tree.
/* eslint-disable jsx-a11y/html-has-lang, react/prop-types */ import React from 'react'; function Html(props) { const { htmlAttributes, headerElements, bodyElements, appBodyString } = props; return ( <html {...htmlAttributes}> <head> {headerElements} </head> <body> <div id="a...
A component that renders a single tag in a sequence of HTML elements.
import React from 'react' import { Button, Form, Input, Message } from 'semantic-ui-react' const FormExampleError = () => ( <Form error> <Form.Input label='Email' placeholder='joe@schmoe.com' /> <Message error header='Action Forbidden' content='You can only sign up for an account once with ...
Imports a single node in a sequence of components.
import React from 'react'; import SvgIcon from '../../SvgIcon'; const CommunicationPhone = (props) => ( <SvgIcon {...props}> <path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1...
A component that exports a communication phone.
/* * Copyright 2007-2017 Charles du Jeu - Abstrium SAS <team (at) pyd.io> * This file is part of Pydio. * * Pydio 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, either version 3 of the License, o...
Warning! This is a part of the Vue GUI but it s not part of the Vue GUI.
import React, { Component } from 'react'; import { View, StyleSheet, Button } from 'react-native'; import { Navigator } from 'react-native-deprecated-custom-components'; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: 'white', padding: 20, justifyContent: 'center', }, }); ...
The main page class for a single carousel page.
import React from 'react'; import {MasterLayout} from 'components/Layout'; import {Grid, Row, Col} from 'react-bootstrap'; import {Link} from 'react-router'; import {translate} from 'utils'; import {connect} from 'react-redux'; class StopService extends React.Component { constructor(props) { super(props); } ...
A component that displays a sequence of words that can be hidden by a user.
import React, { Component } from 'react'; import CSSTransitionGroup from 'react-addons-css-transition-group'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { Flex, Box } from 'reflexbox'; import Cell from 'components/Cell'; import Cells from 'components/Cells'; import Textfi...
The base class for all components that implement a single property.
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import withStyles from 'isom...
Provides a Bootstrap - styled list of all panels that can be used to show a single user.
import React from 'react'; export default function Home() { return ( <div> <h1>Home</h1> </div> ); } Home.displayName = 'Home';
The default function for the Generator class.
import React, { Component } from 'react'; import './css/style.css'; import loading_img from './css/img/loading.gif'; import { connect } from 'react-redux'; import { ProgressBar } from 'react-bootstrap'; const Loading = ({ loading }) => { return ( <div className="load-container" style={{ display: loading ? ...
Imports a single component in the browser.
import test from 'ava'; import React from 'react'; import {shallow} from 'enzyme'; import {fn, Component} from './stubs'; test('stubs.fn', t => { t.is(typeof fn, 'function', 'should be a function'); t.is(fn(), null, 'should return `null`'); }); test('stubs.Component', t => { t.is(typeof Component, 'function'); t....
import test from
import React from 'react' import PropTypes from 'prop-types' import Title from '../components/Title.js' import Content from '../components/Content.js' const Section = ({name, position}) => ( <div> <Title name={name} position={position} /> <Content name={name} position={position} /> </div> ) Section.prop...
Create a section of a
import PropTypes from 'prop-types' import React from 'react' import propTypes from '../../prop-types' import buildClassName from '../../lib/class-names' import LoadingIndicator from '../loading-indicator' const ModelViewer = ({classNames, sceneId}) => ( <div className={buildClassName('ModelViewer', {}, classNames)...
Create a ModelViewer object that displays a single object.
import React from 'react' import { Button, Checkbox, Form } from 'semantic-ui-react' const FormExampleForm = () => ( <Form> <Form.Field> <label>First Name</label> <input placeholder='First Name' /> </Form.Field> <Form.Field> <label>Last Name</label> <input placeholder='Last Name' ...
Example of how to display a sequence of words in a form.
import React from 'react'; class BuiltEmitter extends React.Component { constructor(props) { super(props) this.callWhenDone = done => done(); } componentDidMount() { this.callWhenDone(() => document.dispatchEvent(new Event('ReactFeatureDidMount'))); } render() { const feature = React.clone...
The default feature feature is a component that is rendered on the top of the DOM.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import Forecast from './Forecast'; import CitySelector from '../selectors/city'; import ChartData from '../selectors/chartData'; class Details extends Component { render() { return ( <div> <Forecast city={this.props.ci...
A component that can be used to render a forecast or chart.
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './index.css'; ReactDOM.render( <App />, document.getElementById('root') );
Imports a single node in the DOM.
import React from 'react'; import { STRINGS } from '../../config/wagtailConfig'; import Icon from '../../components/Icon/Icon'; /** * A loading indicator with a text label next to it. */ const LoadingSpinner = () => ( <span> <Icon name="spinner" className="c-spinner" />{` ${STRINGS.LOADING}`} </span> ); exp...
A loading indicator with a text label next to it.
import React, { Component } from 'react'; import Relay from 'react-relay'; import { Card, CardHeader, CardText, CardActions } from 'material-ui/Card'; import TextField from 'material-ui/TextField'; import FlatButton from 'material-ui/FlatButton'; import FloatingActionButton from 'material-ui/FloatingActionButton'; impo...
Component that creates a post on a Committee.
import React from 'react' export default class DisplayText extends React.Component { render () { return ( <div> <span>{this.props.label + ': "'}</span> <span>{this.props.value + '"'}</span> </div> ) } }
A component that renders a hidden tag with a label and a value.
import React, { Component } from 'react'; import { Link } from 'react-router'; import logo from './logo.svg'; class ListGames extends Component { constructor(props) { super(props) console.log("preparing join") this.state = { games: [] } } componentDidMount() { console.log("fetching ga...
The listGames class
import React from 'react' import ReactDOM from 'react-dom' import { Provider } from 'react-redux' import DevTools from '../../containers/DevToolsWindow' export default function createDevToolsWindow (store) { const win = window.open( null, 'redux-devtools', // give it a name so it reuses the same window `...
Create a window
// @flow strict-local import React from 'react'; import PropTypes from 'prop-types'; import getNotDeclaredProps from 'react-get-not-declared-props'; import Sheet, { type Data } from './Sheet'; type Props = { active: boolean, className: string, }; type State = { animationName: string | null }; export default cla...
A component that is rendered when a backdrop is not active.
import React from 'react'; import { Link } from 'react-router'; import { prefixLink } from 'gatsby-helpers'; import { rhythm } from '../utils/typography'; export default class Index extends React.Component { render() { return ( <div> <div style={{ fontSize: '1.33rem', lineHeight...
The index class for a single node.
import React from 'react'; export const Layout = (props) => { return ( <div> <div className={`app-content app-container`} id="wrapper">{props.children}</div> </div> ); }; export default Layout;
React layout for
import React from 'react'; import { FormGroup, ControlLabel, FormControl } from 'react-bootstrap'; import ButtonPopover from 'components/ButtonPopover'; import Option from 'components/Option'; /* eslint-disable react/prefer-stateless-function */ export default class CreateUserFormGroups extends React.Component { con...
Create a component that creates a group of user - defined form fields.
import React from 'react' import classes from './CoreLayout.scss' import '../../styles/core.scss' export const CoreLayout = ({ children }) => ( <div> {children} </div> ) CoreLayout.propTypes = { children: React.PropTypes.element.isRequired } export default CoreLayout
React - core - layout
import './index.css'; import React from 'react'; import DatePicker from './DatePicker.js'; import Modal from './Modal.js'; import {defaultProps} from './dataSource'; type EnhanceDatePickerProps<T> = T & { isOpen: boolean, } function EnhanceDatePicker<T: *>({ isOpen, ...props }: EnhanceDatePickerProps<T>) { fu...
creates a datepicker - modal - modal - date - picker with props
'use strict'; import React from 'react'; var HeaderMessage = React.createClass({ displayName: 'HeaderMessage', propTypes: { children: React.PropTypes.array }, render: function () { return ( <section className='general-message'> <div className='inner'> {this.props.children} ...
Common header message for missing node
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from ...
Creates a page header with a bootstrap class
import React from 'react'; import EntypoIcon from '../EntypoIcon'; const iconClass = 'entypo-svgicon entypo--ChevronRight'; let EntypoChevronRight = (props) => ( <EntypoIcon propClass={iconClass} {...props}> <path d="M9.163,4.516c0.418,0.408,4.502,4.695,4.502,4.695C13.888,9.43,14,9.715,14,10s-0.112,0.57-0...
The default component of the component that displays a Chevron right icon.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImagePanoramaWideAngle = (props) => ( <SvgIcon {...props}> <path d="M12 6c2.45 0 4.71.2 7.29.64.47 1.78.71 3.58.71 5.36 0 1.78-.24 3.58-.71 5.36-2.58.44-4.84.64-7.29.64s-4.71-.2-7.29-.64C4.24 15.58 4 13.78 4 12...
A component that
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; ReactDOM.render(<App />, document.getElementById('root')); registerServiceWorker();
Imports a single application.
import React from 'react'; import Title from 'react-title-component'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import dividerReadmeText from './README'; import DividerExampleForm from './Exam...
The main function for the component.
import _ from 'lodash'; import React from 'react'; import memoize from 'memoizee'; import emojify from 'emojify.js'; import emojiCharacters from 'emoji-named-characters'; import Markdown from '../../../utils/Markdown'; const inversedEmojiCharacters = _.invert(_.mapValues(emojiCharacters, (e) => e.character)); emoj...
A component that renders a single tag with a single emoji.
import React from 'react' import { connect } from 'cerebral/react' import { state, signal } from 'cerebral/tags' import { css } from 'aphrodite' import styles from './styles' import Input from '../Fields/Input' import { form } from '@cerebral/forms' export default connect( { form: form(state`simple.form`), s...
Simple - > generate a single nag - sequence with buttons
import React from 'react'; export default class AboutPage extends React.Component { render() { return <div className="container"> <h1>About</h1> </div>; } };
The AboutPage class
/** * Created by liushuo on 17/5/2. */ import React, { Component } from 'react'; import { Dimensions, Image, ListView, Platform, StyleSheet, Text, View, TouchableOpacity } from 'react-native'; import ParallaxScrollView from 'react-native-parallax-scroll-view'; class ParallaxScrollView...
Component that displays a single single sequence of words.
import classnames from 'classnames'; import moment from 'moment'; import React from 'react'; import {ReverseLink} from 'react-router-reverse'; import {Note, NoteSubmit} from './comm'; import ReviewActions from './reviewActions'; import * as constants from '../constants'; import ConfirmButton from '../../site/component...
A component that displays a version of a specific version.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Navbar, Nav, NavItem, MenuItem, Pagination, FormControl, Button } from 'react-bootstrap'; import { fetchMenuBlog, setCurrentPage } from '../../MenuBlogActions'; import { getCurrentPage, getMenuB...
A component that displays a menu item in the Blog navigation bar.