code
stringlengths
26
5k
intent
stringlengths
3
2.56k
export Loader from '../loader' import Message from '../message' import React from 'react' export const Appending = () => ( <div className="reframe-infinite-loader"> <div className="ui active inverted dimmer"> <div className="ui small loader"></div> </div> </div> ) export const Delayed = () => { c...
Export a Loader class
import React, { Component } from 'react'; import './App.css'; import Store from './Store.js'; import About from './About.js'; import dogCookieBackdrop from './images/dog-cookies.jpg'; import pupIcon from './images/pupIcon.svg'; import boneIcon from './images/bone.svg'; class App extends Component { constructor(props...
Component class for a single nog cookies sequence.
import React from 'react'; import styled from 'styled-components'; import { rotation } from 'ui/utils/styled/animations'; const Spinner = styled.div` height: 30px; width: 30px; margin: auto; animation: ${rotation} .6s infinite linear; border-left: 4px solid rgba(245, 170, 53, 0.15); border-right: 4px soli...
Imports a missing - component component and returns a Spinner
import React from 'react'; import {IndexRoute, Route} from 'react-router'; import { isLoaded as isAuthLoaded, load as loadAuth } from 'redux/modules/auth'; import { App, Home, About, Login, LoginSuccess, Survey, NotFound, } from 'containers'; export default (store) => { const requireLog...
The default middleware for all routes that are not handled by the application.
import React from 'react'; import { Helmet } from 'react-helmet'; import PropTypes from 'prop-types'; import Grid from '@material-ui/core/Grid'; import Hidden from '@material-ui/core/Hidden'; import Typography from '@material-ui/core/Typography'; import { withStyles } from '@material-ui/core/styles'; import about from ...
Package that implements the standard sequence of error messages for a single node.
/* * Author: Joeri Nicolaes * ====================== */ import 'babel-polyfill'; import React from 'react'; import ReactDom from 'react-dom'; import TosApp from './TosApp'; import HeaderApp from './HeaderApp'; // read attribute sent via script and convert String into list of cities var scriptTag = document.getEl...
read attribute sent via script and convert String into list of cities
import React from 'react'; import ReactDOM from 'react-dom'; import JqxComboBox from '../../../jqwidgets-react/react_jqxcombobox.js'; import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js'; class App extends React.Component { componentDidMount() { this.refs.myComboBox.selectItem('Unated Stat...
Component that displays a single keyboard in the app panel.
import React from 'react'; import { Link } from 'react-router'; import packageJSON from '../../package.json'; export default class App extends React.Component { returnSomething(something) { // this is only for testing purposes. Check /test/components/App-test.js return something; } render() { const v...
The main app class for all maps.
import React from 'react'; import { observer, inject } from 'mobx-react'; import { LevelGroup, IndicatorRow } from './tableRows'; const ReportTableBody = inject('rootStore', 'filterStore')( observer(({ rootStore, filterStore }) => { return ( <tbody> { rootStore.levelRow...
Imports a report table from React
/** * Copyright 2017 Goldman Sachs. * 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...
Creates a new object with the specified name and description if it does not already exist.
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 checkbox with a label and a label for the checkbox.
/** * app.js * * This is the entry file for the application, only setup and boilerplate * code. */ // Needed for redux-saga es6 generator support import 'babel-polyfill'; // Import all the third party stuff import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; impor...
JS code generation
import React from 'react'; // eslint-disable-next-line import Eula from 'ringcentral-widgets/components/Eula'; const props = {}; props.brandId = 'test string'; props.currentLocale = 'en-US'; /** * A example of `Eula` */ const EulaDemo = () => <Eula {...props} />; export default EulaDemo;
A demo of a missing dependency on a component.
// Fair Warning: PluginExamples has a good bit of Ignite automation in editing. // Though robust, if you should modify this file, review your changes with us // As to not break the automated addition/subtractions. import React from 'react' import { View, ScrollView, Text, TouchableOpacity, Image } from 'react-native' ...
Plugin Examples screen is a screen that displays a single plugin in the system.
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './components/App'; import FilterableTable from './containers/FilterableTable'; import About from './components/About'; export default ( <Route path="/" component={App}> <IndexRoute component={FilterableTable} /> <Route p...
export default route
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import StatusListContainer from '../../ui/containers/status_list_container'; import { expandCommunityTimeline } from '../../../actions/timelines'; import Column from '../../../components/column'; import ColumnHeader fr...
The CommunityTimeline component is a column that displays a timeline of the community.
import React from 'react'; import CloudinaryImageSummary from '../../components/columns/CloudinaryImageSummary'; import ItemsTableCell from '../../components/ItemsTableCell'; import ItemsTableValue from '../../components/ItemsTableValue'; const moreIndicatorStyle = { color: '#888', fontSize: '.8rem', }; var Cloudin...
A column that displays a list of images that can be rendered on the top of a table.
// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import CSSClassnames from '../../../utils/CSSClassnames'; import Intl from '../../../utils/Intl'; import Props from '../../../utils/Pro...
A component that renders a standards - 3d - effects icon.
import { browserHistory, IndexRoute, Router, Route } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import { Provider } from 'react-redux'; import ReactDOM from 'react-dom'; import React from 'react'; import { RequiresAuthentication } from './utils/authentiationWrappers';...
Imports a single browser history.
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; export default class SizeProvider extends Component { constructor(props) { super(props); const { height, width } = props.style; this.state = { height, width, resize: ::this.onResi...
A component that can be used to provide a size of the content of a container.
import React from 'react' import PropTypes from 'prop-types' import { BlogPostTemplate } from '../../templates/blog-post' const BlogPostPreview = ({ entry, widgetFor }) => ( <BlogPostTemplate content={widgetFor('body')} description={entry.getIn(['data', 'description'])} tags={entry.getIn(['data', 'tags']...
A helper to create a preview of a single
// @flow import React from 'react'; import Style from './Product.css'; type Props = { children?: Array<*> }; const ProductContainer = (props: Props) => ( <div className={Style.productContainer}> {props.children} </div> ); export default ProductContainer;
The default product container for missing children
import React, { Component } from 'react'; import { Panel } from 'react-bootstrap'; import Link from '../Link'; class StatWidget extends Component{ // eslint-disable-line static propTypes = { style: React.PropTypes.string, count: React.PropTypes.string, headerText: React.PropTypes.string, icon: React....
A component that has a count of unique elements.
import React from 'react'; import Image from 'grommet/components/Image'; import styled from 'styled-components' import ScrantonHacksLogo from '../../pictures/ScrantonHacks_official_logo.svg'; import Anime from 'react-anime'; const Logo = styled.img` padding-top: 40px; padding-bottom: 30px; `; export default (...
Default configuration for a single node
import React, { Component } from 'react'; import ReactNative from 'react-native'; const { StyleSheet, Text, View, TouchableOpacity, Image } = ReactNative; /** * ButtonCircle component */ export default class ButtonCircle extends Component { /** * Render a ButtonCircle * @return {jsxresult} resu...
The ButtonCircle component
import React from 'react' import Router from 'next/router' export default class extends React.Component { constructor (...args) { super(...args) this.state = {} } componentDidMount () { const asPath = Router.asPath this.setState({ asPath }) } render () { return ( <div className='a...
A component that can be rendered as a link to a node in the DOM.
import React from 'react'; import reactCSS from 'reactcss'; import { EditableInput } from 'react-color/lib/components/common'; export const CompactFields = ({ hex, rgb, onChange }) => { const styles = reactCSS({ default: { fields: { display: 'flex', paddingBottom: '6px', paddingRig...
Exports a CompactFields object with the given hex and rgb values.
import React, { Component } from 'react'; import { View } from 'react-native'; import firebase from 'firebase'; import { Header, Button, CardSection } from './components/common'; import LoginForm from './components/LoginForm'; import SplashScreen from './components/SplashScreen'; class App extends Component { state...
Component that is not part of the React system.
/* Version listing as a smart component since it involves binding a lot of actions. */ import classnames from 'classnames'; import React from 'react'; import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; import {fetchVersions} from '../actions/addon'; import {del as deleteVersion} from '....
A smart component that lists all of the versions of a single add - on.
"use strict" import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, TouchableHighlight, View } from 'react-native'; import {Root} from './build/app/root' // See: ./app/root.tsx import {createReduxStore} from './build/app/init' var store = createReduxStore() export default class ...
The restdbNative component is
import React from 'react'; import {BaseMixin, ElementaryMixin} from '../common/common.js'; import Loading from './loading.js'; import './iframe.less'; export const Iframe = React.createClass({ //@@viewOn:mixins mixins: [ BaseMixin, ElementaryMixin ], //@@viewOff:mixins //@@viewOn:statics statics...
Create a new component with height property set to the height of the iframe.
/*globals COURSES:true */ import React from 'react' import { Link } from 'react-router' class AnnouncementsSidebar extends React.Component { render() { let { announcements } = COURSES[this.props.params.courseId] return ( <div> <h3>Sidebar Assignments</h3> <ul> {announcements....
A sidebar that has no associated component with it.
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* @flow */ import React from 'react'; import CodeBlock from '../components/CodeBlock'; import { applyStyles } from '../utils/dom/css'; ...
Creates a code block with the given properties.
import React, { Component } from 'react'; import values from '../styles/values'; class PatternInfo extends Component { truncDesc(desc) { if (!desc) return; return (desc.length > 37) ? desc.slice(0, 36) + "..." : desc; } render() { const { name, description, defaultSpeed } = this.props; const styles = { ...
A component that can be used to render a sequence of patterns.
// @flow weak import React from 'react'; import { ListSubheader } from 'material-ui/List'; export default function InsetListSubheader() { return ( <ListSubheader inset>Title</ListSubheader> ); }
Weak - check for missing list subheader in the list.
/** * Copyright 2017 OSBI Ltd * * 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 ...
Component that displays a modal window with
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* @flow */ import React, { Component } from 'react'; import { black } from '../styles'; import type { Node as ReactNode } from 'react'...
The base class for a node in the source tree.
import React from 'react'; import {Tabs, Tab} from 'material-ui/Tabs'; import FontIcon from 'material-ui/FontIcon'; import ActionFlightTakeoff from 'material-ui/svg-icons/action/flight-takeoff'; const TabsExampleIcon = () => ( <Tabs> <Tab icon={<FontIcon className="muidocs-icon-action-home" />} /> <Tab icon=...
A component that exports a sequence of tabs with a single icon.
import React from 'react'; import { GLView } from 'expo-gl'; const Browser = require('processing-js/lib/Browser'); Browser.window = window; const Processing = require('processing-js/src')(Browser); export class ProcessingView extends React.Component { componentWillUnmount() { if (this._p) { this._p.exit()...
The ProcessingView class
/* eslint-disable import/default */ import React from 'react'; import {render} from 'react-dom'; import { Provider } from 'react-redux'; import { Router, browserHistory } from 'react-router'; import routes from './routes'; import configureStore from './store/configureStore'; require('./favicon.ico'); // Tell webpack t...
Imports a single node and renders it as a hidden hidden element.
import React from 'react' import {Prompt} from 'react-router-dom' import {Formik, Form} from 'formik' import {Input} from './UI/Input' import {ExerciseSchema} from '../api/exercise' export const ExerciseForm = ({ exercise, submitText, history, redirectTo, validationSchema = ExerciseSchema, handleSubmit }) ...
Imports a single from React
import 'babel-core/polyfill'; import React from 'react'; import Root from './containers/Root'; React.render( <Root />, document.getElementById('root') );
Imports a from React
import React from 'react'; import SvgIcon from '../../SvgIcon'; const CommunicationScreenShare = (props) => ( <SvgIcon {...props}> <path d="M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.11-.9-2-2-2H4c-1.11 0-2 .89-2 2v10c0 1.1.89 2 2 2H0v2h24v-2h-4zm-7-3.53v-2.19c-2.78 0-4.61.85-6 2.72.56-2.67 2.11-5.33 6-5.87V7l4 3.73-4...
A component that exports a communication
import React from 'react'; import {TextField} from 'material-ui'; import SearchIcon from 'material-ui/svg-icons/action/search'; export default function SearchField(props) { return ( <div className="searchBar"> <SearchIcon className="searchBarIcon"/> <TextField className="searchBarFi...
A component that displays a search in the UI.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { Link } from 'react-router'; import { Map } from 'immutable'; import glamorous from 'glamorous'; import ScreenSaver from './ScreenSaver'; const Wrapper = glamorous.div({ ...
The base class for a single node that is a page of a React component.
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import 'react-app-polyfill/ie9'; import React from 'react'; import ReactDOM from 'react-dom'; import CompileErrorContainer from './conta...
The main function of the error - bar.
import React from 'react' import extensions from 'gen/extensions' import BaseLayout from '../components/layout/BaseLayout' import {Typography, ExpansionPanel, Button, SimpleSwitch, ContentBlock} from 'ui/admin' import Hook from 'util/hook' import {client} from '../middleware/graphql' import styled from '@emotion/styled...
A component that shows a single key sequence that can be used in a system.
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 component that renders a single glyphicon with a bootstrap class named after glyphicon - prefix.
/** * Copyright 2017 Goldman Sachs. * 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...
A component that adds a new user with a message and a username.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvForward10 = (props) => ( <SvgIcon {...props}> <path d="M4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8zm6.8 3H10v-3.3L9 13v-.7l1.8-.6h.1V16zm4.3-1.8c0 .3 0...
A component that renders a missing -
/* eslint no-console:0 */ import React from 'react'; import {ReactBulkhead} from '../src/Component'; const onCreate = ({element}) => { console.log('Simple: onCreate', {element}); Object.assign(element, { innerHTML: 'Gotcha! Mutable DOM here' }); }; export const Simple = () => ( <ReactBulkhead onCreate=...
Simple - Expose a component that can be used to create a single node in a DOM.
import React from 'react'; import { object } from 'prop-types'; import { PageHelmet } from '../components/helmet/'; const Publications = ({ data }) => { const { title, body } = data.contentfulPage; return ( <section> <PageHelmet title={title} /> <header> <h1>{title}</h1> </header> ...
The default Publications page implementation.
import React from 'react' import { graphql } from 'react-relay' import Route from 'found/lib/Route' import makeRouteConfig from 'found/lib/makeRouteConfig' import App from './App' import HomePage from '../pages/home/Home' import PostsPage, { POST_COUNT } from '../pages/post/Posts' import PostDetailPage from '../pages/...
Imports a bunch of components from the application.
import React, { Component } from 'react'; import style from './style.css'; export default (props) => ( <ul className={style.palette + " " + props.theme}> { props.colors.map((a, b) => ( <li key={b} className={style.color} style={{backgroundColor: a}}></li> ...
Default function for missing colors.
// Utils import _ from 'lodash'; // Express import express from 'express'; // React / App-level import React from 'react'; import ReactDOMServer from 'react-dom/server'; import { provideContext } from 'fluxible-addons-react'; import app from '../../admin/app'; import Html from '../../admin/components/Html.jsx'; // R...
Expose a middleware and a component to the application.
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; var _excluded = ["expand", "className", "cssModule", "light", "dark", "fixed", "sticky", "color", "tag"]; import React from 'react'; import PropTypes from 'prop...
Creates a navbar with optional properties that can be expanded or expanded.
import React, { Component } from 'react'; import { Link } from 'react-router'; import { connect } from 'react-redux'; import * as actions from '../../../actions/messaging'; import MessageList from './message-list'; import ReplyMessage from './reply-message'; const socket = actions.socket; class Conversation extends ...
A component that is rendered when a user enters a conversation.
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.
/** * Created by chris on 04/03/2017. */ import React from 'react'; const VideoDetail = ({video}) => { if (!video) { return <div>Loading...</div>; } const videoId = video.id.videoId; const url = `https://www.youtube.com/embed/${videoId}` return ( <div className="video-detail col...
Missing sequence of errors
import PropTypes from 'prop-types'; import React from 'react'; import { icons, kinds } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; import LegendIconItem from './LegendIconItem'; import LegendItem from './LegendItem'; import styles from './Legend.css'; function Legend(props) { const { ...
Legend - related functions
import React from 'react' import { render } from 'react-dom' import { Provider } from 'react-redux'; import { Router, Route, browserHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import Immutable from 'seamless-immutable' import configureRoutes from './routes' import configur...
Imports a single node in the DOM.
// @flow weak import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { withStyles } from 'material-ui/styles'; import MobileStepper from 'material-ui/MobileStepper'; const styles = { root: { maxWidth: 400, flexGrow: 1, }, }; class DotsMobileStepper extends Component { stat...
A component that wraps a weak weak node in a mobile stepper.
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* @flow */ import React from 'react'; import Header from '../components/Header'; import StackTrace from './StackTrace'; import type { ...
Generate a JSX error header for a unhandled error in a source tree.
import './css'; import React, { Component } from 'react'; import NavContainer from './NavContainer'; import { RouteHandler } from 'react-router'; export default React.createClass({ render() { return ( <div> <NavContainer /> <div> <RouteHandler /> </div>...
Imports the NavContainer and RouteHandler classes.
/** * 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...
Creates a code - block with a stack frame if no code - block is found.
import classNames from 'classnames'; import React from 'react'; import { Link as LinkComponent } from 'react-router'; import s from './HomeLink.css'; export default function HomeLink({ className }) { return ( <LinkComponent className={classNames(className, s.container)} to="/">React</LinkComponent> ); } HomeL...
export default ReactLink
import React from 'react'; import { SectionTitle, SectionBody, Section } from 'atoms/section'; import FormalEducation from 'molecules/formal-education'; import LanguageEducation from 'molecules/language-education'; import ExtraCourses from 'organisms/extra-courses'; const EducationWrapper = () => { return ( <S...
Imports a single node with unknown components
import React from 'react'; import classnames from 'classnames'; import { Progress } from '../Progress'; const Gallery = (props) => { const { children, progress, header: headerContent } = props; const progressBar = progress ? ( <div className="ui-gallery-progress"> <Progress progress={progress} /> </...
The Gallery component which renders a block of nodes with a header and a progress bar.
import React from 'react'; import PropTypes from 'prop-types'; import TextInput from '../TextInput'; import PasswordInput from '../PasswordInput'; /** Registration form with built-in validation. */ class RegistrationForm extends React.Component { constructor(props) { super(props); this.state = { user:...
A component that can be used to register a user with a password.
import React, { Component } from 'react'; import PropTypes from 'subschema-prop-types'; export class CheckboxTemplate extends Component { static propTypes = { label : PropTypes.node, style : PropTypes.style, checked: PropTypes.bool }; static defaultProps = { style ...
A component that can be used to toggle a checkbox in a tree.
import React from 'react' import App from 'next/app' import '../styles/global1.scss' import '../styles/global2.scss' class MyApp extends App { render() { const { Component, pageProps } = this.props return <Component {...pageProps} /> } } export default MyApp
A component that renders a single component in a chain of components.
import React from 'react'; import {connect} from 'react-redux'; import {EditorModal} from "../../dumb/editor/EditorModal"; import {getCustomFieldEditorFormValidationResult, getCustomFieldEditorState, getTaskEditorState} from "../../selectors/ui"; import {CustomFieldEditorContent} from "./CustomFieldEditorContent"; impo...
Imports React - Redux
import React from 'react'; import { Surface, Curve, Layer } from 'recharts'; import { curveBundle, curveCardinal, curveCardinalClosed, curveCardinalOpen, curveCatmullRomOpen } from 'd3-shape'; import { scaleOrdinal, schemeCategory10 } from 'd3-scale'; export default React.createClass({ render () { const point...
export default nix - sequence sequence feature from React
import PropTypes from 'prop-types'; import React, { Component } from 'react'; export default class InputCheckbox extends Component { static propTypes = { value : PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired, text : PropTypes.string.isRequired, check...
A component that can be used to check if a sequence of tokens is unique within a form.
import React from 'react' import { storiesOf } from '@kadira/storybook' import { withKnobs, number, boolean } from '@kadira/storybook-addon-knobs'; import ObservableView from './view' import EmissionsView from './emissionsView' storiesOf('Observable', module) .addDecorator(withKnobs) .add('View', () => ( <Obs...
Add a decorator to the sequence of non - negative non
import React from 'react' import Knob from './Knob' function formatInternalValue(v) { if (Math.abs(v) >= 1000) { return Knob.formatWithMinimumDigits(0.001*v, 3) + ' kHz'; } else { return Knob.formatWithMinimumDigits(v, 3) + ' Hz'; } } export default function FrequencyKnob(props) { return ( <Knob ...
export default frequency function
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationDoNotDisturbOn = (props) => ( <SvgIcon {...props}> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z"/> </SvgIcon> ); NotificationDoNotDisturbOn = pure(No...
A component that exports a single node with a single notification on.
import React from 'react'; import {Section} from '../UI'; /** * A section for the main focus of the page. */ export default React.createClass({ render() { return <Section type="hero">{this.props.children}</Section>; } });
A component that renders a single section in the main focus of the page.
import React from 'react'; const DockerImage = ({ handler, style, logo }) => ( <div className="card-wrap" onClick={handler} style={style}> <div className="card"> <img src={ logo } className="card-img" /> </div> </div> ); DockerImage.propTypes = { logo: React.PropTypes.string, handler: React...
A component that displays a single missing - node error in a card.
import React from 'react'; import { Grommet, Box, Heading, Paragraph, Text } from 'grommet'; import { grommet } from 'grommet/themes'; const paragraphFiller = ` Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. `; export const Medium = () => {...
export default protected protected
import React from 'react'; import H2 from './stc/H2'; import SectionSubHeaderWrapper from './stc/SectionSubHeaderWrapper'; import Icon from './stc/Icon'; import * as colors from '../colors'; function SectionSubHeader(props) { const { text, icon } = props; return ( <SectionSubHeaderWrapper className="SectionSub...
SectionSubHeader exports a function that renders a section - sub - header.
import React from 'react' const TrashIcon = () => ( <svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' > <path style={{ fill: '#908BA1' }} d='M3 6v18h18v-18h-18zm5 14c0 .552-.448 1-1 1s-1-.448-1-1v-10c0-.552.448-1 1-1s1 .448 1 1v10zm5 0c0 .552-.448 1-...
Create a series of icons for a single node.
import React from 'react' import { connect } from 'react-redux' import { pick } from 'ramda' import ChangePassword from '../components/change_password.js' import { update_password } from '../redux/modules/change_password.js' const ChangePasswordContainer = (props) => { return ( <ChangePassword { ...props } /> ...
Imports a single node in the hierarchy.
import React from 'react'; import { FormattedMessage } from 'react-intl'; import A from './A'; import Img from './Img'; import NavBar from './NavBar'; import HeaderLink from './HeaderLink'; import Banner from './banner.jpg'; import messages from './messages'; class Header extends React.Component { // eslint-disable-l...
export default Header
import React from 'react'; import { connect } from 'react-redux'; import {Router, Route, IndexRedirect, browserHistory} from 'react-router'; import { updatePlayersArray, updateLastNumberRolled, updateNextPlayerIndexTurn, setFirstPlayerTurn, startGame, buy, receivingMoney, receiveMoney } from '../reducers/gameReducer'; ...
Imports a single application.
import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import { media } from 'utils/style-utils'; import IconWrapper from './IconWrapper'; import InfoLink from './InfoLink'; import H3 from './H3'; import SVGIcon from '../SVGIcon'; const AgentInfoDisplayDiv = (props) => {...
Provides a function to render a single tag with a styled wrapper.
import React from 'react'; import SPECS from 'game/SPECS'; import CHANGELOG from './CHANGELOG'; export default { // The people that have contributed to this spec recently. People don't have to sign up to be long-time maintainers to be included in this list. If someone built a large part of the spec or contributed ...
The default implementation of the n - ary module.
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { Text, View, ListView, ActivityIndicator, } from 'react-native'; export default class MovieComponent extends Component { constructor(props) { super(pro...
JSX Component for a sequence of action - specific states
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.
'use strict'; import React from 'react'; import CurrentUserStore from '../../stores/CurrentUserStore'; class Logout extends React.Component { constructor (props) { super(props); // this.redirectToLogin = this // .redirectToLogin // .bind(this); } static propTypes...
A component that logs out if the user is not authenticated.
import 'babel-polyfill'; import React from 'react'; import {render} from 'react-dom'; import {Provider} from 'react-redux'; import {Router, Route, IndexRoute, browserHistory} from 'react-router'; import {syncHistoryWithStore, routerActions, routerMiddleware} from 'react-router-redux'; import {UserAuthWrapper} from 'red...
Imports a single node in the DOM.
import React from 'react'; import { Box, Button, Form, FormField, Grommet, MaskedInput } from 'grommet'; import { grommet } from 'grommet/themes'; export const MaskedInputForm = () => { const [value, setValue] = React.useState({ value: '' }); const onChange = nextValue => { console.log('onChange', nextValue);...
export default function
import React from 'react'; import blacklist from 'blacklist'; import classnames from 'classnames'; import Color from 'color'; import E from '../constants'; var Radio = React.createClass({ displayName: 'Radio', propTypes: { checked: React.PropTypes.bool, onChange: React.PropTypes.func, readonly: React.PropTypes...
The Radio component is a component that can be used to toggle or uncheck the radio button.
import React from 'react'; import PropTypes from 'prop-types'; import autobind from 'core-decorators/es/autobind'; import { connect } from 'react-redux'; import { graphql, compose } from 'react-apollo'; import { Button, Dialog, Intent } from '@blueprintjs/core'; import { resetPassword } from '../../../../graphql/auth';...
The UserPasswordReset component is a class that can be used to reset a password.
import React from 'react' import { Button, Form, Message } from 'semantic-ui-react' const FormExampleWarning = () => ( <Form warning> <Form.Input label='Email' placeholder='joe@schmoe.com' /> <Message warning header='Could you check something!' list={[ 'That e-mail has been subscrib...
Imports a bunch of errors from the Navigator.
import React, { Component } from 'react'; import { HomeContent } from '../../components/Home'; export default class Home extends Component { render() { return ( <div> <HomeContent/> </div> ); } }
The Home class
// @flow import React from 'react' import {Link} from 'react-router' import {userBooks} from '../model/subscription' import {SourceModel, isRecommended} from '../model/source' import {SimpleGallery} from './gallery' import {Suggestion} from '../books/support' import {Routes, transitionTo} from '../router' import {disp...
A component that can be used to render a single missing - free node.
import React, { Component } from 'react'; import { browserHistory } from 'react-router'; export class OperatorSignIn extends Component { constructor( props ) { super( props ); this.state = { username: '', password: '', error: '', }; this.signInOperator = this.signInOperator.bind( ...
The OperatorSignIn class
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageCenterFocusStrong = (props) => ( <SvgIcon {...props}> <path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm-7 7H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V...
A component that renders a sequence of icons that are not part of a component.
import React from 'react' import './Header.scss' export const Header = () => ( <div /> ) export default Header
export Header