code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React from 'react'; class Welcome extends React.Component { render() { return <p>Welcome</p> } } export {Welcome}
A component that is not a component of a component type.
import get from 'lodash/get' import PropTypes from 'prop-types'; import React from 'react'; const propTypes = { prop: PropTypes.object.isRequired, }; function PropDescription({ prop }) { const html = get(prop, 'description.childMarkdownRemark.html', ''); return ( <div dangerouslySetInnerHTML={{ __html: htm...
export a description of a single
import React, { Component } from 'react'; import { Card, CardTitle, CardText, CardActions, CardMenu, Badge, Button } from 'react-mdl'; class ListItem extends Component { componentDidMount() { } componentWillUnmount() { } approveRequest = () => { this.props.approveRequest({id: this.props.id, type: 'a...
A component that can be used to display a list of votes or approve requests.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationDialpad = (props) => ( <SvgIcon {...props}> <path d="M12 19c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-...
A component that displays a communication dialpad in a menu.
import React from 'react'; import PropTypes from 'prop-types'; import { translate } from 'react-i18next'; import Loader from 'react-loader'; import StickyAlert from '../utils/StickyAlert'; import AudioForm from '../forms/Audio'; let stickyContainer; const Audio = ({ t, loaded, stickyStyle, stickyContent, ...rest }) =...
Ajoute un objet Syndication des caracteres de la partie audio.
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 { gql, graphql, compose } from 'react-apollo' const getArticleQuery = gql` query getArticle($id: ID!) { article(id: $id) { id title content ratings { id value } } } ` const addRatingMutation = gql` mutation addRating($articl...
Imports a missing - term - related model from React
import Component from '../components/component.react'; import React from 'react'; import fetch from 'isomorphic-fetch'; import {createValidate} from '../validate'; import * as authActions from '../auth/actions'; import * as todosActions from '../todos/actions'; const actions = [authActions, todosActions]; export def...
Create a component that creates actions for each action.
import React from 'react'; // Icon taken from: https://github.com/spiffcode/ghedit export const Explorer = (props) => ( <svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' {...props}> <path d='M17.705 8H9s-2 .078-2 2v15s0 2 2 2l11-.004C22 27 22 25 22 25V13.509L17.705 8zM16 10v5h4v10H9V10h7zm5.50...
A function to export a with a customization for the JSF2 library.
import React from 'react'; import { storiesOf } from '@storybook/react' import { setupGraphiQL } from '../src' // setup the graphiql helper which can be used with the add method later const graphiql = setupGraphiQL({ url: 'http://localhost:3000/graphql' }); storiesOf('GraphQL Demo', module) .add('get user info', gr...
import the graphiql helper
import React from 'react' import PropTypes from 'prop-types' import styled from 'styled-components' import ReactTooltip from 'react-tooltip' import DifferentialFoldChangeCellInfo from './tooltip/DifferentialFoldChangeCellInfo' const DifferentialCellTd = styled.td` background-color: white; white-space: nowrap; f...
Differential cell for
import React from 'react' import * as ACTION_TYPES from '../constants/action_types' import * as MAPPING_TYPES from '../constants/mapping_types' import * as api from '../networking/api' import * as StreamFilters from '../components/streams/StreamFilters' import * as StreamRenderables from '../components/streams/StreamRe...
This module imports all action types and notifications from the network and updates the notification list.
import React from 'react'; import { Link } from 'react-router'; import ArticleList from './ArticleList'; import QuickRead from './QuickRead'; import Header from './Header' class Home extends React.Component { render() { return (<div> <QuickRead/> </div> ); } } export default Home;
Imports a React component.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageBrush = (props) => ( <SvgIcon {...props}> <path d="M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3zm13.71-9.37l-1.34-1.34c-.39-.39-1.02-.39-1.41 0L9 12.25...
A component that renders a block of icons that can be used to render a block of icons.
import React from 'react' import { Head } from 'react-static' // var popPic = require('js/popPic.js') export default () => ( <div> <Head> <title>Ugly Bunnies -- Proposed Platzner &amp; Co. Website</title> </Head> <header className="splash lh0"> <img src="/assets/web-p...
Private function for importing a single error in the system.
import React from 'react'; import PropTypes from 'prop-types'; const Icon = ({ colored, ...other }) => ( <svg viewBox="0 0 300.00006 244.18703" {...other}> <g transform="translate(-539.18 -568.86)"> <path d="m633.9 812.04c112.46 0 173.96-93.168 173.96-173.96 0-2.6463-0.0539-5.2806-0.1726-7.903 11.938-8.630...
A component that renders a sequence of components.
/*eslint-disable no-unused-vars */ import React from 'react' import { createHistory, useBasename } from 'history' import { Router } from 'react-router' import stubbedCourses from './stubs/COURSES' const history = useBasename(createHistory)({ basename: '/huge-apps' }) const rootRoute = { component: 'div', childR...
This module is used to render a single non - duplicate non
import React from 'react'; import ConceptTile from '../ConceptTile'; import './index.css'; const TypeaheadList = React.createClass({ render() { const { options, selectionIndex, onOptionSelected } = this.props; return ( <div className="TypeaheadList"> <ul className="TypeaheadList-list"> ...
Create a TypeaheadList with a single element for each option in the list.
import React from 'react'; import stringAccessor from './string-accessor'; import binding from '../binding'; import reactTemplate from './reactTemplate'; import defaultSettings, { syncSettings } from '../../default-settings'; import { version as d3Version } from 'd3'; import { version as wcVersion } from 'webcharts'; ...
The default component that is rendered when a component is rendered.
import SectionHeaderGeneral from '../SectionHeaderGeneral'; import SettingsItemBirthday from '../SettingsItemBirthday'; import SettingsItemGender from '../SettingsItemGender'; import SettingsItemLocation from '../SettingsItemLocation'; import Spacer from '../Spacer'; import React from 'react'; import PropTypes from 'pr...
Creates a section with a single unique identifier.
import React from 'react' import favicon from '../favicon.png' let stylesStr if (process.env.NODE_ENV === `production`) { try { stylesStr = require(`!raw-loader!../public/styles.css`) } catch (e) { console.log(e) } } module.exports = class HTML extends React.Component { render() { let css if (...
Generates a single tag with no children.
import React from 'react'; import { WarningIcon } from '../../icons'; import './List.css'; const FailedList = ( <div className="Primary-loading-failed"> <WarningIcon size="2x" /> <span>Loading failed</span> </div> ); export default FailedList;
FailedList - loading failed
/** * 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...
---------------------------- Private functions -
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.global.c...
Imports a single node.
import React from 'react'; import styles from './ActionPanel.scss'; const ActionPanel = ({ children }) => ( <div className={styles.actionPanel} > {children} </div> ); export default ActionPanel;
Exports action panel with a single child
import React from 'react' import DuckImage from '../assets/Duck.jpg' import './HomeView.scss' export const HomeView = () => ( <div> <h4>Welcome!</h4> <img alt='This is a duck, because Redux!' className='duck' src={DuckImage} /> </div> ) export default HomeView
export a default function to export a object
import React, { Component } from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import glamorous from 'glamorous'; const Wrapper = glamorous.div({ width: '100%', display: 'flex', flexWrap: 'wrap', justifyContent: 'space-between', backgroundColor: '#efefef', padding: '69px 40px 57px', ...
The ProductInfoNOCAB class
import React, { Component } from 'react'; import { Field, reduxForm } from 'redux-form'; import TextField from 'material-ui/TextField'; import Paper from 'material-ui/Paper'; import RaisedButton from 'material-ui/RaisedButton'; const validate = (values, props) => { values = { email: props.email, username: pr...
A component that creates a hidden hidden
import React from 'react'; import { Image } from 'react-bootstrap'; import { Router, Route, browserHistory } from 'react-router'; import { Link } from 'react-router'; const SampleMenu = () => ( <div className="sample-menu"> <p>Meatball Sliders</p> <Image src={'menu/1.jpg'} /> <p>This souce is, in one word...
The default menu for a single node.
import React from 'react'; import { Datepicker } from 'antd'; module.exports = React.createClass({ render: function() { return ( <div> </div> ); } });
Imports a Nagios - like class from a Datepicker.
import PropTypes from 'prop-types'; import React from 'react'; import FieldSet from 'Components/FieldSet'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; import Table from 'Components/Table/Table'; import TableBody from 'Components/Table/TableBody'; import ScheduledTaskRowConnector from './Schedule...
export default props
// @flow import React from 'react'; import { translate } from '../../../base/i18n'; import { connect } from '../../../base/redux'; import AbstractPageReloadOverlay, { abstractMapStateToProps, type Props } from '../AbstractPageReloadOverlay'; import OverlayFrame from './OverlayFrame'; /** * Implements a Rea...
A component that can be used to render a page reload overlay.
import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import styleShape from 'react-style-proptype'; const factory = (ripple) => { const Check = ({ checked, children, onMouseDown, theme, style, }) => ( <div data-react-toolbox="check" className={clas...
Create a default check - node factory.
import React from 'react'; const Profile = (props) => { return ( < div > Profile Page { props.name } < /div>); } export default Profile;
Export a profile page
import { connect } from 'react-redux'; import { emojify } from 'react-emojione'; import React from 'react'; import mapDispatchToProps from '../actions'; import { mapStateToProps } from '../model/state'; import entryEmojiOptions from '../images/entryEmojiOptions'; @connect(mapStateToProps, mapDispatchToProps) export d...
The JournalEntryTimeComponent class
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorMultilineChart = (props) => ( <SvgIcon {...props}> <path d="M22 6.92l-1.41-1.41-2.85 3.21C15.68 6.4 12.83 5 9.61 5 6.72 5 4.07 6.16 2 8l1.42 1.42C5.12 7.93 7.27 7 9.61 7c2.74 0 5.09 1.26 6.77 3.24l-2.88 3...
A component that exports a series of icons that are rendered as a multiline chart.
import React from 'react'; const First = React.createNotClass({ displayName: 'First' }); class Second extends React.NotComponent {}
The first component of a sequence is a
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' const LabelContent = () => ( <ExampleSection title='Content'> <ComponentExample title='Detail' description='A label ...
export a function to create a label with a specific type
import React from 'react'; import WhitePanel from '../WhitePanel'; import Highcharts from 'highcharts'; import funnelGraph from 'highcharts/modules/funnel'; const styles = { root: { position: 'relative', overflow: 'hidden', width: 460, height: 400 }, tip: { position: 'absolute', left: 30,...
A component that exports a FunnelGraph with a highcharts.
import React, { Component } from 'react'; class DeletePollButton extends Component{ constructor(props){ super(props); this.handleClick = this.handleClick.bind(this); } handleClick(){ this.props.setModalState(this.props.pollTitle, this.props.pollId); } render(){ return ( <div onClick=...
A component that will delete a modal modal.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsMap = (props) => ( <SvgIcon {...props}> <path d="M20.5 3l-.16.03L15 5.1 9 3 3.36 4.9c-.21.07-.36.25-.36.48V20.5c0 .28.22.5.5.5l.16-.03L9 18.9l6 2.1 5.64-1.9c.21-.07.36-.25.36-.48V3.5c0-.28-.22-.5-.5-.5zM15 ...
A component that exports a Navitia - style map of icons.
import React from 'react' import PropTypes from 'prop-types' const SettingsChildWrapper = props => { const { children } = props return ( <div style={{ padding: 20, minHeight: 400, }} > {children} </div> ) } SettingsChildWrapper.propTypes = { children: PropTypes.el...
Settings child component
import React from 'react'; import {connect} from 'react-redux'; import './App.css'; import Lock from './Lock'; import Weather from './Weather'; function App (props) { return ( <div className="App"> <div className="App-header"> <Lock/> </div> {props.isUnlocked ? <Weather/> : null} </...
export App - > props
/** * * LocaleToggle * */ import React from 'react'; // import { FormattedMessage } from 'react-intl'; import styles from './styles.css'; import ToggleOption from '../ToggleOption'; function Toggle(props) { // eslint-disable-line react/prefer-stateless-function let content = (<option>--</option>); // If we hav...
A component that can toggle a specific key in a locale.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageHdrStrong = (props) => ( <SvgIcon {...props}> <path d="M17 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zM5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 ...
A component that renders a sequence of icons in a sequence of icons.
import React from 'react' const Footer = () => <div className='footer-container'> <div className='footer'> <div id='disclaimer'>This site is not maintained anymore</div> <div id='versionInfo'>v1.5.12</div> <a id='release-notes' href='https://github.com/Laastine/lukkarimaatti/blob/master/CHANGEL...
Imports a single node with a footer
import React from 'react'; import { createDevTools } from 'redux-devtools'; import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; export default createDevTools( <DockMonitor toggleVisibilityKey='ctrl-h' changePositionKey='ctrl-q'> <LogMonitor /...
createDevTools creates a new devtools object from a single node.
import React, { Component } from 'react'; import { Segment, Tab } from 'semantic-ui-react'; import UniformPane from './UniformPane'; import withScene from '../../hocs/withScene'; import configurations from '../../configurations.json'; import './react-precision-slider.css'; import './UniformPanel.css'; class UniformPan...
Create a UniformPanel with a single tab pane.
/* Originally taken from https://github.com/hzdg/react-google-analytics/blob/cba5239561220a3762885d28b04619cbf6cf65f7/src/index.coffee JavaScript version was generated by coffee-script 1.9.2 (http://js2.coffee/) */ import React from 'react'; const slice = Array.prototype.slice; let name, scriptIsAdded; const ga = ...
The main function that creates a component that can be used to initialize a component with Google Analytics.
import React, { Component } from 'react'; import { connect } from 'react-redux'; export default function(ComposedComponent) { class Authentication extends Component { static contextTypes = { router: React.PropTypes.object } componentWillMount() { if(!localStorage.getItem('user')){ t...
The Authentication component is a component that is used to authenticate a user.
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../ui/components/column'; import { refreshTimeline, updateTimeline, deleteFromTimelines, } from '../../actions/timelin...
The hashtag timeline component which is used to display a timeline of hashtags.
/* * Copyright (C) Pootle contributors. * Copyright (C) Zing contributors. * * This file is a part of the Pootle project. It is distributed under the GPL3 * or later license. See the LICENSE file for a copy of the license and the * AUTHORS file for copyright and authorship information. */ import React from 'rea...
Zing contributors.
import React, { Component } from 'react'; import { StyleSheet, AppState } from 'react-native'; import { Container, Content, Text, View } from 'native-base'; import Modal from 'react-native-modalbox'; import AppNavigator from './AppNavigator'; import ProgressBar from './components/loaders/ProgressBar'; import theme ...
Component that is used to create a unique 32 bit integer on the device.
import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { graphql } from 'react-apollo'; import gql from 'graphql-tag'; import { get } from 'lodash'; import withIntl from '../../../lib/withIntl'; import Link from '../../../components/Link'; import Currency f...
JSX component for showing the top - level expenses stats.
import React from 'react'; import IconBase from 'react-icon-base'; export default class FaPencilSquare extends React.Component { render() { return ( <IconBase viewBox="0 0 40 40" {...this.props}> <g><path d="m12 24.7l3.4 3.4-1.1 1.2h-1.3v-2.2h-2.1v-1.2z m9.3-8.7q0.3 0.3-0.1 0.7l...
A component that shows a sequence of icons that can be used to render a sequence of icons.
import React, { Component } from 'react'; import ActionFilter from './ActionFilter'; import ActionActivities from './ActionActivities'; import VisibleResources from './VisibleResources'; import MessagesContainer from './MessagesContainer'; import './App.css'; class App extends Component { render() { return ( ...
The default app class
import React, { Component } from 'react'; import { connect } from 'react-redux'; import {HashLoader} from 'react-spinners'; @connect(store => ({})) class Loading extends Component { componentDidMount() {} render() { return ( <div className="loaderContainer"> <HashLoader color="#2a5fac" ...
The default loading class for a single component.
/* eslint react/prop-types: 0 */ import React from 'react'; import Select from 'react-select'; import CustomRenderField from './components/CustomRenderField'; import MultiSelectField from './components/MultiSelectField'; import RemoteSelectField from './components/RemoteSelectField'; import SelectedValuesField from '...
The main function that creates all the necessary components.
import React, { Component } from 'react'; import './TitlePanel.scss'; class TitlePanel extends Component { constructor(props) { super(props); } render() { return ( <div className="title-panel"> <img className="title-panel__image" /> <div className="title-panel__floating-title-box">...
The default title - panel class
import React from 'react'; const VideoListItem = ({video}) => { // colocar video dentro de chaves do parametro ao invés da prop é o mesmo que ter a props no parametro e ter a linha abaixo //const video = props.video; const imageUrl = video.snippet.thumbnails.default.url; return ( <li cla...
Dice un liste de chaves
import React from 'react'; import { View, Text, StyleSheet, Animated, Dimensions, Button } from 'react-native'; import { Actions } from 'react-native-router-flux'; import Lightbox from './BaseLightbox'; const styles = StyleSheet.create({ container: { position: 'absolute', top: 0, bottom: 0, left: 0, ...
Imports a single node in the hierarchy.
import React from 'react'; require('./styles.scss'); export default class Header extends React.Component { constructor() { super(); } render() { return ( <header id="header"> <nav className="navbar navbar-inverse navbar-fixed-top" role="navigation"> <div className="container-flu...
export default header class
import React from 'react'; import { observer } from 'mobx-react'; import { observable } from "mobx"; import dataActions from '../../../actions/dataActions'; import dataStore from '../../../stores/dataStore'; import Loading from '../../../components/loading'; import { Grid, GridItem } from '../../../components/grid'; ...
The FootballMatch component which is a component that is a FootballMatch.
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import { Router, Route, IndexRoute, browserHistory } from 'react-router'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import MainView from './containers/MainView'; import AboutView from './components/A...
Imports a single non - hotkey component.
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import Menu from 'grommet/components/Menu'; import Anchor from 'grommet/components/Anchor'; import DocsArticle from '../../../components/DocsArticle'; import BackControl from './BackControl'; export default ...
Demonstrates how to render a single missing - graphic component in a LayersDoc.
import React from 'react' import Layout from '../components/Layout' const NotFoundPage = () => ( <Layout> <div> <h1>NOT FOUND</h1> <p>You just hit a route that doesn&#39;t exist... the sadness.</p> </div> </Layout> ) export default NotFoundPage
This module imports a missing page if it doesn t exist.
/** * 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 PropTypes from 'prop-...
A component that renders a single node in the DOM.
import React from 'react'; import animateView from 'react-animated-views'; import '../css/pageone.css'; const PageOne = React.createClass({ displayName: 'PageOne', propTypes: { push: React.PropTypes.func, style: React.PropTypes.object, }, goToPageTwo(e) { const { push } = this.props; e.prev...
The pageone component of a sequence of states.
import React, { Component } from 'react'; import ReactDOM from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { textHover, saveState } from '../../actions/index'; import { calcRotation } from '../../utilities/sharedFunctions'; require("../../../css/components/...
Creates a new component that wraps a Lobe component and adds a textHover on it.
import React from 'react'; import App from './containers/App'; React.render( <App />, document.getElementById('root') );
Renders a into the DOM.
/** * index.ios.js: Ponto de entrada iOS * * Este arquivo define o primeiro componente carregado pelo aplicativo * quando ele é executado na plataforma iOS. * * O componente definido neste arquivo é responsável por realizar quaisquer * customizações necessárias para a plataforma iOS e passar o co...
Dice un componente de la base de un necessarios
import React from 'react' import Link from 'found/lib/Link' import { colors } from '../config' const FooterLink = ({children, target, to}) => ( <Link css={{ whiteSpace: 'nowrap', lineHeight: 2, ':hover': { color: colors.brand, }, }} to={to} target={target}> {child...
Add a footer link to a sequence of nodes.
import React from 'react' export default React.createClass({ render() { var className = 'example-step'; let push = this.props.push if (push === 'right') { className += ' example-step__push-right' } return <div className={className}> {this.props.children} </div> } })
The default class for the class
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import {createRoot} from 'react-dom'; import './index.css'; import Router from './Router'; createRoot(...
Package of the nagios. js file.
import ReactDOM from 'react-dom'; import React from 'react'; import { Router, browserHistory, hashHistory } from 'react-router'; // page import App from '../page/App'; import DashBoard from '../page/DashBoard'; import Create from '../page/Create'; import Import from '../page/Import'; import Log from '../page/Log'; co...
Imports a single node in the root DOM.
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; const filename = url => url.split('/').pop().split('#')[0].split('?')[0]; export default class AttachmentList extends ImmutablePureComponent { static propTypes...
The attachment list class
import './style/style.css'; import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route, hashHistory, IndexRoute } from 'react-router'; import ApolloClient from 'apollo-client'; import { ApolloProvider} from 'react-apollo'; import App from './components/App' import ProjectList from './componen...
The main event loop for a
import React from 'react' import { Route, IndexRoute } from 'react-router' import { App, MainPage, CounterPage, WolframPage } from '../containers' export default function getRoutes () { return ( <Route path='/' component={App}> <IndexRoute components={{content: MainPage}}/> <Route path='counter' comp...
get all routes in order of priority
import React from 'react' import {default as Router, Route, DefaultRoute} from 'react-router' import Html from './components/layout/html' // Import your pages import Home from './components/home/home' import Video from './components/video/video' // Declare your routes var routes = ( <Route handler={Html} path="/"...
Imports the routes from the and exports it as a route variable
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import 'babel/polyfill'; import _ from 'lodash'; import fs from 'fs'; import path from 'path'; import express from 'express'; import React from 'react'; import './core/Dispatcher'; import './stores/AppStore'; import db from './core/Database'; imp...
The top - level
import React from 'react'; import classNames from 'classnames'; const PageHeader = React.createClass({ render() { return ( <div {...this.props} className={classNames(this.props.className, 'page-header')}> <h1>{this.props.children}</h1> </div> ); } }); export default PageHeader;
The default page header class
import React from 'react'; import { Sidebar, SidebarNav, SidebarNavItem, SidebarControls, SidebarControlBtn, LoremIpsum, Grid, Row, Col, FormControl, Label, Progress, Icon, SidebarDivider } from '@sketchpixy/rubix'; import { Link } from 'react-router'; class ApplicationSidebar extends React.Component { h...
Private function to render a single node in the sidebar.
'use strict;' import React, { Component } from 'react'; import template from './NavTodo.rt'; module.exports = React.createClass({ render: template });
A module that exports a single node in a hierarchy.
import React, { Component } from 'react'; import { ReactiveBase, RangeInput, SelectedFilters, ReactiveList } from '@appbaseio/reactivesearch'; import PropTypes from 'prop-types'; import initReactivesearch from '@appbaseio/reactivesearch/lib/server'; import Layout from '../components/Layout'; import BookCard from '../...
The main component of the application.
// Logic and state for the creating a sub-map with data from another map. import { connect } from 'react-redux' import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux' import rx from '/imports/common/rx' import SubmapPres from '/imports/mapPage/calc/SubmapPres' const ge...
Logic and state for creating a sub - map with data from another map.
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import * as commandNames from 'Commands/commandNames'; import withCurrentPage from 'Components/withCurrentPage'; import * as blacklistActions from 'Store/Action...
Creates a blacklist component that will be used to handle the action of a command.
import _$ from 'jquery'; import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import jsdom from 'jsdom'; import chai, { expect } from 'chai'; import chaiJquery from 'chai-jquery'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import...
A component that can be rendered by a component that is not yet rendered by a component.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { defineMessages, intlShape } from 'react-intl'; import { inject, observer } from 'mobx-react'; import { ProBadge } from '@meetfranz/ui'; import Link from '../../ui/Link'; import { workspaceStore } from '../../../features/workspaces';...
A component that renders a navigation navigation navigation settings.
import React from 'react' export default ({ ...props }) => <a {...props} />
Default function for react - export.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionAccountBalanceWallet = (props) => ( <SvgIcon {...props}> <path d="M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-...
A component that exports a single action account balance wallet.
import React from 'react'; import { View, ActivityIndicator } from 'react-native'; const Spinner = ({ size }) => { return ( <View style={styles.spinnerStyle}> <ActivityIndicator size={size || 'large'} /> </View> ); }; const styles = { spinnerStyle: { flex: 1, ju...
export a spinner to show a warning in the system
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalPlay = (props) => ( <SvgIcon {...props}> <path d="M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2zm-4....
A component that exports a sequence of icons that can be played on the screen.
import React from 'react'; import PropTypes from 'prop-types'; import './AmountLabel.css'; const AmountLabel = props => { const { amount, unit } = props; let className; if (amount === 0) { className = 'info'; } else if (amount > 0) { className = 'success'; } else { className = '...
Create a component that displays a warning warning info success or danger message.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvSlowMotionVideo = (props) => ( <SvgIcon {...props}> <path d="M13.05 9.79L10 7.5v9l3.05-2.29L16 12zm0 0L10 7.5v9l3.05-2.29L16 12zm0 0L10 7.5v9l3.05-2.29L16 12zM11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69c1....
A small function to create a sequence of icons that can be used to render a video.
import React from 'react'; import {Link} from 'react-router'; import {getRandomScrap} from '../server'; import {hashHistory} from 'react-router'; export default class StartPage extends React.Component { handleFindScrapToFinish(e){ e.stopPropagation(); getRandomScrap((scrapData)=>{ hashHistory.push("sc...
The base class for the start page.
import React from 'react' import styled from 'styled-components' import VideoPreviewCard from '../videos/VideoPreviewCard' const List = styled.div` display: flex; flex-wrap: wrap; justify-content: center; ` const Card = styled(VideoPreviewCard)` display: flex; flex: 1; justify-content: center; margin...
Imports a missing key - value list with a video - preview - card.
import React, { Component } from 'react'; import TraceabilityBox from '../../components/Traceability'; class Traceability extends Component { constructor(props) { super(props); } render() { return ( <div className="traceability"> <TraceabilityBox {...this.props}/> </div> ); } ...
A base class for the Traceability component.
// @flow import React, { Component } from 'react'; import type { Children } from 'react'; export default class App extends Component { props: { children: Children }; render() { return ( <div> {this.props.children} </div> ); } }
The base class for a sequence of children.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionChromeReaderMode = (props) => ( <SvgIcon {...props}> <path d="M13 12h7v1.5h-7zm0-2.5h7V11h-7zm0 5h7V16h-7zM21 4H3c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 15h-9V6h9v13z"/> ...
A component that renders a series of icons in a series of icons.
import React from 'react'; import PropTypes from 'prop-types'; import Relay from 'react-relay/classic'; import Button from 'app/components/shared/Button'; import Panel from 'app/components/shared/Panel'; import TeamDeleteMutation from 'app/mutations/TeamDelete'; class TeamDelete extends React.Component { static pr...
The TeamDelete component is a React component that will delete a team s members.