code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React from 'react' import ReactDOM from 'react-dom' import RedBox from 'redbox-react' import { AppContainer } from 'react-hot-loader' import RootComponent from './root' import baseStyles from './styles' const rootPoint = document.createElement('div') document.body.insertBefore(rootPoint, document.body.firstChi...
Imports a single node in the DOM.
import React from 'react'; import Paper from 'material-ui/Paper'; import TextField from 'material-ui/TextField'; import IconButton from 'material-ui/IconButton'; import ActionLabelOutline from 'material-ui/svg-icons/action/label-outline'; import ActionLabel from 'material-ui/svg-icons/action/label'; import Subheader fr...
Class to handle a connection between two components.
import React from 'react'; import ItemsTableCell from '../../../admin/src/components/ItemsTableCell'; import ItemsTableValue from '../../../admin/src/components/ItemsTableValue'; const moreIndicatorStyle = { color: '#bbb', fontSize: '.8rem', fontWeight: 500, marginLeft: 8, }; var RelationshipColumn = React.create...
A column that can be used to display a list of items in a column.
/* eslint max-len: 0 */ /* eslint no-unused-vars: 0 */ import React from 'react'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; const products = []; function addProducts(quantity) { const startId = products.length; const startDate = new Date(2015, 0, 1); const endDate = new Date(); ...
A filter that can be used to filter out items that are not in the stock date.
/* */ import React from 'react'; import { connect } from 'react-redux'; import Helmet from 'react-helmet'; import * as FromState from '../../../../reducers'; function Post({ post }) { if (!post) { // Post hasn't been fetched yet. It would be better if we had a "status" // reducer attached to our post...
Package that contains a series of functions that can be used to create a post object.
import React from 'react' import styles from './Model3d.css' const Model3d = (props) => { return ( <div className={styles.holder}> <iframe width="100%" height="100%" src={props.url} frameBorder="0" allowFullScreen /> </div> ) } Model3d.propTypes = { url: React.PropTypes.string.isRequired, } expo...
React - > Model3d
import 'App/style/index'; import React from 'react'; import { render } from 'react-dom'; import { Router, Route, IndexRoute, browserHistory } from 'react-router'; import routes from 'config/routes.js'; import { createStore, compose, applyMiddleware, combineReducers } from 'redux'; import { Provider } from 'react-redux'...
Imports a single unknown node.
import values from 'lodash/values'; import React from 'react'; import { connect } from 'react-redux'; import { pure } from 'recompose'; import Todo from './todo'; import { deleteTodo, toggleTodo, updateTodo } from '../modules/todos'; function stateToProps(state, props) { return { todos: values(state.todos).sort...
A component that lists all todos in a sequence of state.
import React from 'react'; import PropTypes from 'prop-types'; import { Marker as RNMarker, Polyline as RNPolyline } from 'react-native-maps'; import { Colors } from 'react-native-paper'; import { useGeoJSON } from '@wq/map'; const COLOR_LIST = Object.values(Colors); export default function GeoJSONLayer({ id, data })...
Package that exports a GeoJSONLayer with a single - layer feature that has a marker and polyline.
import React from 'react'; import { connect } from 'react-redux'; import AuthStyle from './AuthStyle'; import BackgrndStyle from './BackgrndStyle'; import AuthForm from '../../components/AuthForm'; import CurveStyle from './CurveStyle'; import LogoStyles from './LogoStyles'; import LoadingStyle from './LoadingStyle'; i...
The base component for all unknown components.
import React from 'react'; import { Row, Col } from 'react-flexbox-grid'; import './GameWrapper.scss'; import WordChipContainer from '../../containers/WordChipContainer'; export const GameWrapper = (props) => { return ( <div id="gameContainer" className="game-wrapper"> <div className="row"> { ...
The GameWrapper component which renders a single - word menu with a single - word menu.
import React from 'react'; import { renderToString } from 'react-dom/server'; import Helmet from 'react-helmet'; import reactTreeWalker from 'react-tree-walker'; import Logger from 'nightingale-logger/src'; import createIsModernBrowser from 'modern-browsers'; import htmlLayout from './layout/htmlLayout'; import createA...
Create a redux app that wraps a Helmet instance and renders the HTML into a Redux app.
import React from 'react' import { Router, Route, IndexRoute, browserHistory } from 'react-router' import { App, Home, About } from './components' export default () => { return ( <Router history={browserHistory}> <Route path='/' component={App}> <IndexRoute component={Home} /> <Route path='...
export default function
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 StreamRenderables from '../components/streams/StreamRenderables' import { ZeroState } from '../components/zeros/Zeros' exp...
This function imports the action types and the API and returns the index of the matching post or user.
import React from 'react'; import { PureRenderMixin } from 'react/addons'; import ContactActionCreators from 'actions/ContactActionCreators'; import DialogActionCreators from 'actions/DialogActionCreators'; import PeerStore from 'stores/PeerStore'; import DialogStore from 'stores/DialogStore'; import AvatarItem from...
The default action that creates a user profile that can be used to show a dialog or a contact.
import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route, IndexRoute, hashHistory } from 'react-router'; import './index.css'; import Layout from './Layout'; import Home from './view/Home'; import About from './view/About'; import Media from './view/Media'; import Projects from './view/Proje...
Imports a bunch of components from the root element.
import 'shared/styles/vendors'; import 'shared/styles/globals'; import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { applyRouterMiddleware, Router, browserHistory } from 'react-router'; import useScroll from 'react-router-scroll'; import { createStore, applyMidd...
Imports a single React component.
import React from 'react'; import Router from 'react-router'; import ReactDOM from 'react-dom'; import createBrowserHistory from 'history/lib/createBrowserHistory'; import routes from './routes'; import Navbar from './components/Navbar'; let history = createBrowserHistory(); ReactDOM.render(<Router history={history}>...
Imports the history component.
import React from 'react'; import RadioButton from '../RadioButton'; import warning from 'warning'; class RadioButtonGroup extends React.Component { static propTypes = { /** * Should be used to pass `RadioButton` components. */ children: React.PropTypes.node, /** * The CSS class name of t...
A component that is rendered when a radio button is selected or deselected.
import React from 'react'; import { Text, TouchableHighlight, View } from 'react-native'; import PropTypes from 'prop-types'; import style from '../Style'; export default class GroupRow extends React.PureComponent { static propTypes = { cleanName: PropTypes.string.isRequired, color: PropTypes.stri...
A component that displays a group of items in a table.
import './search-mapping-view.scss'; import React from 'react'; import {observer, inject} from 'mobx-react'; import InfiniteScroll from 'react-infinite-scroller'; import InfiniteLoaderIcon from '../infinite-loader-icon'; import Button from '@material-ui/core/Button'; import MappingColumnLayout from '../mapping-card-gri...
The base class for the mapping - view
import React from 'react'; import ReactDOM from 'react-dom'; import JqxTreeGrid from '../../../jqwidgets-react/react_jqxtreegrid.js'; class App extends React.Component { componentDidMount() { this.refs.myTreeGrid.on('bindingComplete', () => { this.refs.myTreeGrid.expandRow(2); }); ...
Component class for a specific nav -
import React from 'react'; import Navigation from './Nav'; import Main from './Main'; import 'bootstrap/dist/css/bootstrap.css'; import '../App.css'; const App = (props) => { return ( <div className="App"> <Navigation /> <Main /> </div> ); }; export default App;
export default App
import React from 'react'; import { UsageSection } from './UsageSection'; export default { title: 'admin/info/UsageSection', component: UsageSection, decorators: [ (fn) => <div className='rc-old'>{fn()}</div>, ], }; const statistics = { totalUsers: 'statistics.totalUsers', nonActiveUsers: 'nonActiveUsers', ...
export default components
import React from 'react'; import ReactDOM from 'react-dom'; import JqxScheduler from '../../../jqwidgets-react/react_jqxscheduler.js'; class App extends React.Component { componentDidMount () { this.refs.myScheduler.ensureAppointmentVisible('id1'); } render () { let appointments = new Arr...
Demonstration of how to render a single app.
import React from 'react'; import { Label, Icon } from 'semantic-ui-react'; import PropTypes from 'prop-types'; export default class UnselectedProfileSkillListItem extends React.Component { constructor() { super(); this.handleClick = (event, data) => { console.log(data.children[0].props.children); ...
The base class for the list item of a user s profile skill.
import React from 'react'; export default ({ config: { media, mediasuffix } }) => [ <link rel="apple-touch-icon" sizes="57x57" href={`${media}apple-touch-icon-57x57.png${mediasuffix}`} />, <link rel="apple-touch-icon" sizes="60x60" href={`${media}apple-touch-icon-60x60.png${mediasuffix}`} ...
Exports a sequence of tags for a specific type of block.
import React, { Component } from 'react'; import { convertFromRaw, EditorState, } from 'draft-js'; import Editor, { composeDecorators } from 'draft-js-plugins-editor'; import createFocusPlugin from 'draft-js-focus-plugin'; import createColorBlockPlugin from './colorBlockPlugin'; import editorStyles from './editor...
A custom editor for a single node.
/** * Copyright (c) 2016-present, NDLA. * * This source code is licensed under the GPLv3 license found in the * LICENSE file in the root directory of this source tree. * */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Button } from 'ndla-ui'; import BEMHelper from 'react...
Component which is rendered when a user clicks on a key on the input field.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; class NavItem extends Component { render() { const { children, className, tag: Tag, ...attributes } = this.props; const classes = classNames( 'nav-item', ...
A nav item which is a child
import "core-js/stable"; import "regenerator-runtime/runtime"; import React from 'react'; import { render } from "react-dom"; import { Provider } from 'react-redux' import store from './redux/store' import Application from './Application'; render(<Provider store={store}><Application /></Provider>, document.getElementB...
Imports a bunch of packages that are required to render a single application.
import React from 'react' import { connect } from 'react-redux' import FilterInput from '../filter-input' const LabelFilter = ({ value }) => ( <FilterInput title="标签" label="label" value={value} /> ) const mapStateToProps = state => ({ value: state.filters.label, }) const mapDispatchToProps = () => ({}) const ...
React - Redux - compatible filter - input
import React from 'react'; import { storiesOf } from '@storybook/react'; import OAuthLoginButton from './'; storiesOf('OAuthLoginButton', module) .add('With text', () => { return <OAuthLoginButton />; }) .add('Logo icon only', () => { return <OAuthLoginButton iconOnly />; });
Imports a module which contains a non - standard React component.
'use strict'; import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Hr from './../atoms/Hr'; import Alert from './../organisms/Alert'; import TextField from './../organisms/TextField'; import { getLocationByGPS, getLocationByAddress, fetchNonRegionLimitedSurveys } from './....
A component that displays a location in a network.
/* @flow */ import React from 'react'; const Header = () => ( <div className="App-header"> <h2>React Clear Starter Kit</h2> </div> ); export default Header;
The default header for a missing React clear - cycle cycle.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { Col, KeyValue, Row, } from '@folio/stripes/components'; import { requestPreferencesShape } from '../../../../../shapes'; import styles from './RequestPreferencesView.css'; class...
Package that implements the request preferences view.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { browserHistory, withRouter } from 'react-router'; import DocumentTitle from 'react-document-title'; import CreateMarkdownPage from '../../components/C...
The base class for a page - new component.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import SignUp from '../components/SignUp'; import LoadingPage from '../components/LoadingPage'; import { signUp } from '../actions/statusActions'; class SignUpContainer extends Component { static navigationOptions = { title: 'Regi...
A component that can be used to sign up a user.
import React from 'react' import PropTypes from 'prop-types' import { Form, Button, Row, Col, Input, Popconfirm } from 'antd' const { Search } = Input const ColProps = { xs: 24, sm: 12, style: { marginBottom: 16 }, } const TwoColProps = { ...ColProps, xl: 96, } const Filter = ({ onAdd, onFilterChange, ...
React JSX plugin
import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import Label from '../label/Label'; import getRadioFillVariables from './radio-fill-variables'; import { useTheme } from '../../util/useTheme'; import ValidationContext from '../ValidationContext'; import useUniqueId...
Generates a single radio button with optional hidden inputs.
import React from 'react' import App from 'next/app' import '../styles/global.scss' class MyApp extends App { render() { const { Component, pageProps } = this.props return <Component {...pageProps} /> } } export default MyApp
A component that can be rendered by a component in a page.
import React from 'react'; import App from 'containers/app'; import { history } from 'react-router/lib/BrowserHistory'; React.render(<App history={history} />, document.getElementById('mount'));
Imports a single application.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageFilter7 = (props) => ( <SvgIcon {...props}> <path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-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 16H7V3h14v14zm-8-2l4-8V5h-6v2h4l-4 8h2z...
A filter that can be used to filter a series of icons.
'use strict' import React from 'react' import {AddStoreSubscriptions} from '../src/' class TestComponent extends React.Component { render () { return null } } export default AddStoreSubscriptions(TestComponent, ['testStore'], window, ['notAString'])
Add store subscriptions to a component
import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; export default class ColumnBackButtonSlim extends React.PureComponent { static contextTypes = { router: PropTypes.object, }; handleClick = () => { if (window.history && window.history.length ==...
A component that displays a column back button.
import React from 'react'; import Title from 'react-title-component'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import avatarReadmeText from './README'; import AvatarExampleSimple from './Exam...
Exports a single - language block of a single - language block.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Control, LocalForm } from 'react-redux-form'; import { appSave } from '../../redux/modules/application'; import { diff_match_patch } from 'diff-match-patch'; import styles from './AppDiff.css'; import traverse from 'traverse'; c...
The base component for the AppDiff component.
import React from 'react'; import { StyleSheet, View } from 'react-native'; import styles from '../HtmlStyles'; import HtmlNodeText from '../HtmlNodeText'; import renderHtmlChildren from '../renderHtmlChildren'; const BULLET = '\u2022'; const customStyles = StyleSheet.create({ text: { flexWrap: 'wrap', fle...
export default function
import React from 'react' import { render } from 'react-dom' import { browserHistory, hashHistory,Router, Route, IndexRoute, Link, withRouter } from 'react-router' import App from './components/app/app.js' import Home from './components/home/home.js' import Movie from './components/movie/movie.js' import MovieList from...
Imports a single non - empty sequence of components.
import React from 'react'; import {Table} from 'material-ui/Table'; class DataTablesTable extends Table { createTableBody(base) { return React.cloneElement( base, { allRowsSelected: this.state.allRowsSelected, multiSelectable: this.props.multiSelectable, onCellClick: this.onC...
Creates a table with no children.
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call &...
The base class for redirecting to a component that is not static.
import React from 'react'; import { Link } from 'react-router'; import { Row, Col, Button } from 'react-bootstrap'; import DocumentsList from '../components/DocumentsList'; const Documents = () => ( <div className="Documents"> <Row> <Col xs={ 12 }> <div className="page-header clearfix"> <...
Imports a bunch of modules that can be used to create a page with a single page.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let SocialPoll = (props) => ( <SvgIcon {...props}> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/> </SvgIcon> ); SocialPoll = ...
A component that renders a link to a component that can poll the user for a link to a component.
import React from 'react'; import BaseIcon from './BaseIcon'; export default class DownloadThickIcon extends BaseIcon { render() { return ( <svg className={`icon icon--download ${this.props.className}`} viewBox={this.getViewBox()}> <polygon points="44.1,23 33,39.7 33,4.6 27,4.6 27,39.7 15.9,23 10....
The download thick icon class.
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import jwtDecode from 'jwt-decode'; import setAuthorizationToken from './utils/setAuthorizationToken'; import { setCurrentUser } from './actions/authA...
Imports a single - user - defined token from the local storage.
import React from 'react' import moment from 'moment' import { Calendar, Views, momentLocalizer } from '../../src' import demoEvents from '../resources/events' import mdx from './drilldownView.mdx' const mLocalizer = momentLocalizer(moment) export default { title: 'props', component: Calendar, argTypes: { l...
export a single
import React, { Component } from 'react'; class Foo extends Component { render() {} }
Imports a React component and renders it.
import React from 'react'; import styles from './Copyright.module.scss'; const Copyright = ({ copyright }) => ( <div className={styles['copyright']}> {copyright} </div> ); export default Copyright;
export a default Copyright
import React, { Component } from 'react'; class Foo extends Component { render() {} }
Imports a React component and renders it.
import React from 'react'; import Title from 'react-title-component'; import MarkdownElement from '../../MarkdownElement'; import serverRenderingText from './serverRendering.md'; const ServerRendering = () => ( <div> <Title render={(previousTitle) => `Server Rendering - ${previousTitle}`} /> <MarkdownElemen...
The default implementation of a that renders a server - rendering page.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NavigationSubdirectoryArrowRight = (props) => ( <SvgIcon {...props}> <path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"/> </SvgIcon> ); NavigationSubdirectoryArrowRight = pure(Navigat...
A component that exports a navigation subtitle in a right - to - left manner.
/* eslint-disable react/prop-types */ import React from 'react' import classnames from 'classnames' import FontAwesome from 'react-fontawesome' import { Button } from '@slate-editor/components' import { alignmentMarkStrategy, hasMark, getMark } from './AlignmentUtils' const AlignmentCenterButton = ({ value, onChange,...
Generate a button that aligns the given value with the center of the mark.
/** * 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-...
Provides a way to render a missing component in a browser.
import React from 'react'; class Grades extends React.Component { //static loadProps (params, cb) { //cb(null, { //assignments: COURSES[params.courseId].assignments //}); //} render () { //var { assignments } = this.props; var assignments = COURSES[this.props.params.courseId].assignments...
The Grades component that renders the missing grades.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { getSrc } from './ShowArtifactPage'; import { Document, Page, pdfjs } from 'react-pdf'; import { Pagination, Spin } from 'antd'; import { getArtifactBytesContent } from '../../../common/utils/ArtifactUtils'; import './ShowArtifactPdfV...
A component that renders a PDF file that is rendered on the page.
import React from 'react'; import IconBase from '@suitejs/icon-base'; function DvGithubAlt(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M7.25 16.633c-.563-2.05.198-6.693 1.375-9.524 2.664.284 5.942 1.787 9.868 4.5 3.516-.726 7.162-.68 10.914 0 3.572-2.35 6.914-4.014 9.861-4.5 1.129 ...
DvGithubAlt is a default icon that shows a link to the user s page.
// @flow import React, { Component } from 'react'; import { reloadNow } from '../../../app/actions'; import { translate } from '../../../base/i18n'; import { connect } from '../../../base/redux'; /** * The type of the React {@code Component} props of {@link ReloadButton}. */ type Props = { /** * Reloads ...
A component that can be used to reload a page or a button.
import React from 'react'; import IconBase from 'react-icon-base'; export default class FaTextHeight extends React.Component { render() { return ( <IconBase viewBox="0 0 40 40" {...this.props}> <g><path d="m38.9 31.4q0.8 0 1 0.4t-0.3 1l-2.8 3.7q-0.4 0.5-1.1 0.5t-1.1-0.5l-2.8-3.7...
A component that displays a text height in a sequence of icons.
import React from 'react' import { Breadcrumb } from 'semantic-ui-react' const sections = [ { key: 'Home', content: 'Home', link: true }, { key: 'Store', content: 'Store', link: true }, { key: 'Shirt', content: 'T-Shirt', active: true }, ] const BreadcrumbExampleProps = () => ( <Breadcrumb icon='right angle' ...
Example of how to display a single node in a hierarchy.
import React from 'react' import { render } from 'react-dom' import { createStore, compose, combineReducers } from 'redux' import { Provider, connect } from 'react-redux' import { sagaStoreEnhancer } from 'redux-container-state-globalsaga' export default (containerDomId, View, updater) => { const storeFactory = com...
Default middleware for handling
import React, { Component } from 'react'; import auth from './Auth'; import ajax from 'superagent'; import SERVER_URL from '../config'; class Login extends Component { constructor(){ super(); this.state = { }; this.authenticate = this.authenticate.bind(this); } authenticate(e...
A component that can be used to login a user.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentArchive = (props) => ( <SvgIcon {...props}> <path d="M20.54 5.23l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-....
A component that exports a series of components in a group of icons.
import React from 'react'; import './AuthPage.css'; const AuthPage = props => <div className="AuthPage"> <header> <h1 className="AuthPageTitle">{props.title}</h1> </header> {props.children} </div>; export default AuthPage;
The default auth page class
import Express from 'express'; import React from 'react'; import ReactDOM from 'react-dom/server'; import config from './config'; import favicon from 'serve-favicon'; import compression from 'compression'; import httpProxy from 'http-proxy'; import path from 'path'; import createStore from './redux/store/configureStore...
Express - based Express server
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 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 'isomorp...
Public function to generate a single missing - node node in the hierarchy of React components.
import React from 'react' const Landing = React.createClass({ render() { return ( <div> <h1>Landing Page</h1> <p>This page is only shown to unauthenticated users.</p> <p>Partial / Lazy loading. Open the network tab while you navigate. Notice that only the required components are do...
The main function for the missing - components module.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageBrightness2 = (props) => ( <SvgIcon {...props}> <path d="M10 2c-1.82 0-3.53.5-5 1.35C7.99 5.08 10 8.3 10 12s-2.01 6.92-5 8.65C6.47 21.5 8.18 22 10 22c5.52 0 10-4.48 10-10S15.52 2 10 2z"/> </SvgIcon> ); I...
A component that renders a skeleton image that is not visible in a component.
import classnames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; class NavigationList extends React.Component { static propTypes = { itemClassName: PropTypes.string, items: PropTypes.array, listClassName: PropTypes.string, onChange: PropTypes.func, selectedClass...
A component that renders a navigation list with a list of items that can be clicked on.
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import Column from '../../components/column'; import ColumnHeader from '../../components/column_header'; import { mountConversations, unmountConversations, expandConversations } from '../../actions/conversations'; impo...
The direct timeline component which is used to show a direct timeline.
import React from 'react'; import Modal from 'react-modal'; //import pureRender from 'pure-render-decorator'; import { Styles, FlatButton } from 'material-ui'; import AppCacheStore from 'stores/AppCacheStore'; import AppCacheActionCreators from 'actions/AppCacheActionCreators'; import { KeyCodes } from 'constants/Act...
The base component for adding a new contact to the app.
import React from 'react'; import PropTypes from 'prop-types'; import FontIcon from '../../FontIcon'; import ThemeService from '../../styles/ChamelThemeService'; /** * Note button * * @param props * @param context * @returns {ReactDOM} * @constructor */ const NoteIcon = (props, context) => { let theme = c...
A component that creates a button that can be used to show a color button in the theme.
import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center' } }); export default class Route2 extends Component { render(){ return ( ...
Route2 is a class that exports a single node in a hierarchy.
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 thumbnail component that can be rendered by a Bootstrap image.
import React from 'react'; import PropTypes from 'prop-types'; import styles from './GithubButton.css'; const GithubButton = (props) => { const name = props.component ? `animakit-${props.component}` : 'animakit'; return ( <a className={ styles.button } href={ `https://github.com/animakit/${name}` ...
Animakit button that displays a button on GitHub.
/* eslint-disable no-console, no-use-before-define */ import path from 'path'; import Express from 'express'; import qs from 'qs'; import webpack from 'webpack'; import webpackDevMiddleware from 'webpack-dev-middleware'; import webpackHotMiddleware from 'webpack-hot-middleware'; import webpackConfig from '../webpack....
The main function that is responsible for rendering the universal example page
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionRestore = (props) => ( <SvgIcon {...props}> <path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 ...
A component that displays a series of action - restore icons.
import React from 'react'; import LinearProgress from 'material-ui/LinearProgress'; export default class LinearProgressExampleDeterminate extends React.Component { constructor(props) { super(props); this.state = { completed: 0, }; } componentDidMount() { this.timer = setTimeout(() => thi...
Example of how to render a component when it is mounted and when it is unmounted.
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ActionBar from './action_bar'; import Avatar from '../../../components/avatar'; import Permalink from '../../../components/permalink'; import IconButton from '../../../components/icon_button...
The navigation bar component.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { View, Text, StyleSheet } from 'react-native'; import { stringPadLeft} from '../../utils/stringHelper'; class Timer extends Component { getTimerCountDown() { return setInterval(() => { this.decrementTime(); ...
A component that has a timer that
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './{appName}'; // Set up parameters for the interface using _input/_output. function tryGetValue(id) { try { return JSON.parse(document.getElementById(id).value); } catch(err) { console.info("Ignorning input ...
This function imports the required components and renders the app.
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 { action } from '@storybook/addon-actions'; import DropDownButton from 'components/SimpleCommonComponents/DropDownButton'; import { foundationPartial } from '../src/styles/foundation'; import fonts from 'EBI-Icon-fonts/fonts.css'; const f = foundationPartial(fonts); export default ...
Provides a function to export a single node with a series of buttons and icons.
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 ...
Create a component that can be used to show a badge if it has no content.
import React from 'react'; import Envelope from 'react-icons/lib/fa/envelope'; import {Action} from './../../actions/Action.js'; const _openAbout=()=>Action('OpenModal','About'); class RightNav extends React.Component { render(){ return ( <section className='rightNav'> <div ...
RightNav component.
import React from 'react'; import Column from '../ui/components/column'; import MissingIndicator from '../../components/missing_indicator'; const GenericNotFound = () => ( <Column> <MissingIndicator fullPage /> </Column> ); export default GenericNotFound;
export a missing_indicator
import React from 'react'; import {Link} from 'react-router'; const cardStyle= { flex: 1, minWidth: '300px', maxWidth: '300px', marginTop: '7px', marginRight: '20px', marginBottom: '20px' }; const Card = ({title,description, route, destination }) => { return ( <div style={cardStyle} className="demo-...
A component that displays a single missing - node error in a demo card.
import React, { Component } from 'react'; import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; import PropTypes from 'prop-types'; import { SortableContainer } from 'react-sortable-hoc'; import TabItem from './TabItem'; @observer class TabBarSortableList extends Component { static propTypes = { se...
TabBarSortableList is a class that exports a sortable list of services.
import React from 'react'; // Exported from redux-devtools import { createDevTools } from 'redux-devtools'; // Monitors are separate packages, and you can make a custom one import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; // createDevTools takes a monitor an...
Private function to export a single node from redux - devtools
import React, { Component } from 'react'; import SearchBar from '../containers/SearchBar'; import WeatherList from '../containers/WeatherList'; export default class App extends Component { render() { return ( <div> <SearchBar/> <WeatherList/> </div> ); } }
The default app class
import React from 'react'; import SvgIcon from '../../SvgIcon'; const ActionCardGiftcard = (props) => ( <SvgIcon {...props}> <path d="M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1...
A component that exports a single action card.