code
stringlengths
26
5k
intent
stringlengths
3
2.56k
/// // Dependencies /// import React, { Component } from 'react'; import FailRetryNotif from '../../elements/FailRetryNotif'; import * as actions from '../actions'; /// // View /// class GetListFailNotifView extends Component { /// // Rendering /// renderMessage(action, userMessage) { return ( 'Retrievi...
This is a class that can be used to render a list of roles.
import React from 'react'; import Analyzer from 'parser/core/Analyzer'; import { STATISTIC_ORDER } from 'interface/others/StatisticsListBox'; import StatisticBar from 'interface/statistics/StatisticBar'; import AgonyUptime from './AgonyUptime'; import CorruptionUptime from './CorruptionUptime'; import UnstableAfflic...
This class exports a statistic bar that displays the current state of the system.
import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import R from 'ramda'; import styles from './styles.css'; export const Header = ({ type, size, vertical }) => <div className={classnames(styles.header, { [styles[type]]: type, [styles.vertical]: vert...
Generates a template for a object.
import React from 'react'; import PropTypes from 'prop-types'; import SVGWithMargin from '../SVGWithMargin'; import Bar from './Bar'; type Props = { width: PropTypes.number, height: PropTypes.number, values: PropTypes.array.isRequired, margin: PropTypes.object, color: PropTypes.string, xLabel: PropTypes.st...
export default JSX function
import React, { Component } from 'react'; import { View, Text, TouchableOpacity, StyleSheet, ToastAndroid, Vibration } from 'react-native'; import * as firebase from 'firebase'; import * as todoListService from '../../todolist.service'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons';...
A component that is rendered when a checkbox is selected.
import React from 'react'; import ReactDOM from 'react-dom'; import Site from './Site.jsx'; ReactDOM.render(<Site />, document.getElementById('root'));
Imports a React component and renders it into the root element.
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(ta...
Creates a component that reacts with a theme.
import React from 'react'; import { Link } from 'react-router-dom'; import steemconnect from 'sc2-sdk'; import { FormattedMessage } from 'react-intl'; const Error401 = () => (<div className="main-panel"> <div className="container my-5"> <div className="ptl text-center"> <h1> <FormattedMes...
Imports a single - node error - 401 from a module.
import React from 'react'; import { View, StyleSheet, ListView, } from 'react-native'; import {NavigationBar,} from './NavigationBar'; import {LoadingIndicator,} from './LoadingIndicator'; import {TapSummary,} from './TapSummary'; import {PlainListSeparator,} from './PlainListRow'; export const Pub = ({i...
Package that exports a single trait.
import React from 'react' import './logo.scss'; function Logo() { return ( <h1 className="logo">Rock Paper Scissors.</h1> ) } export default Logo
The default Logo function
import React from 'react'; import Header from 'grommet/components/Header'; import Button from 'grommet/components/Button'; import Title from 'grommet/components/Title'; import Menu from 'grommet/components/Menu'; import Checkbox from 'grommet/components/CheckBox'; import Box from 'grommet/components/Box'; import Power...
export default configuration
/* eslint-disable no-await-in-loop */ import React from 'react' import { isFunction, isBoolean, isString } from 'utils/is' import config from '../config' import api from '../backendAPI' import { stepFactory } from '../utils' import i18n from 'utils/createI18n' import { loadPackagesByType, mountPackagesByType } from '.....
Initialize a single node - browser middleware
import React, { Component } from 'react'; import CategoryList from '../containers/category-list'; import JokeContainer from '../containers/joke-container'; import Header from './Header'; export default class App extends Component { render() { return ( <div> <Header /> <di...
Package that exports a single component in a Joker application.
import React from 'react'; import { render } from 'react-dom'; import { Router, Route } from 'react-router'; import App from './App'; import '../node_modules/uikit/dist/css/uikit.almost-flat.min.css'; import './style.css'; render(( <Router> <Route path="/" component={App} /> </Router> ), document....
Imports a single component.
import React from 'react'; import {observer} from 'mobx-react'; import EventsList from '../components/eventsList'; import GroupsList from '../components/groupsList'; import DevTool from 'mobx-react-devtools'; class Dashboard extends React.Component { render() { const {store} = this.props; return ( <div>...
The base class for a single object that can be used to render a single single object.
import React from 'react'; import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer'; import Events from 'parser/core/Events'; import SPELLS from 'common/SPELLS'; import { formatThousands } from 'common/format'; import SpellLink from 'common/SpellLink'; import StatisticListBoxItem from 'interface/others/Stati...
The base class for all uA - related components.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; class Subheader extends Component { render() { return ( <div className="subheader-wrapper"> { this.props.children } </div> ); } } export default Subheader;
A component that is rendered as a subheader.
import { createDevTools} from 'redux-devtools'; import { render } from 'react-dom'; import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; import React from 'react' import { Provider } from 'react-redux'; const DevTools = createDevTools( <DockMonitor toggleVisibil...
Create a new node with a single node with a single DevTools element.
import React from 'react'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import stepperReadmeText from './README.md'; import advancedReadmeText from './Advanced.md'; import HorizontalLinearStepper...
Imports a single node with a sequence of non - linear stepper and stepper components.
import React from 'react'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import RaisedButton from 'material-ui/RaisedButton'; /** * A modal dialog can only be closed by selecting one of the actions. */ export default class DialogExampleModal extends React.Component { sta...
DialogExampleModal is a modal dialog with one action that can be closed by selecting one of the actions.
import React from 'react'; import Tile from './Tile.react.js'; export default class Row extends React.Component { render() { let tiles = []; this.props.tiles.forEach((tile) => { tiles.push(<Tile tile={tile} game={this.props.game} />); }); return <div className="row">{til...
A component that renders a row of a sequence.
import React from 'react'; import Paper from 'material-ui/Paper'; import Menu from 'material-ui/Menu'; import MenuItem from 'material-ui/MenuItem'; import Divider from 'material-ui/Divider'; import ArrowDropRight from 'material-ui/svg-icons/navigation-arrow-drop-right'; const style = { display: 'inline-block', mar...
Example of how to display a single - hot - cover menu.
import React, { Component } from 'react'; import { View } from 'react-native'; import { connectStyle } from '@shoutem/theme'; import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; import {ToastContainer as Toast} from './ToastContainer'; import {ActionSheetContainer as ActionSheet} from './Actionsheet'; im...
The base component for handling nested components.
/* * Copyright 2017-2018 Azad Bolour * Licensed under GNU Affero General Public License v3.0 - * https://github.com/azadbolour/boardgame/blob/master/LICENSE.md */ /** @module SwapBin */ import React from 'react'; import PropTypes from 'prop-types'; const ItemTypes = require('./DragDropTypes').ItemTypes; const D...
Creates a base component which can be used to create a tray or a swap bin.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentDeleteSweep = (props) => ( <SvgIcon {...props}> <path d="M15 16h4v2h-4zm0-8h7v2h-7zm0 4h6v2h-6zM3 18c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V8H3v10zM14 5h-3l-1-1H6L5 5H2v2h12z"/> </SvgIcon> ); ContentDeleteSwee...
The default content delete sweep function.
"use strict"; import React, { Component } from 'react'; require('../../css/pad.sass') class Pad extends Component { constructor(props) { super(props); this.state = { position: this.props.position } } componentWillMount() { } componentWillUnmount() { } handlePadClick(){ this....
A component that is rendered when a pad is active.
import React from 'react'; import styled from 'styled-components'; import GatsbyLink from 'gatsby-link'; import { rhythm } from '../utils/typography'; import { getColorFromString } from '../utils/color'; import Link from '../components/Link'; import Preview from '../components/Preview'; const List = styled.ul` dis...
Renders a single tag sequence in a container.
import React from 'react' import s from './styles.css' import {html, title} from './aboutClassindex.md' import SimpleHeader from '../components/Layout/SimpleHeader' import {Link, Route} from 'react-router-dom' import {AboutThesisPage} from './AboutThesisPage' import {AboutClassPage} from './AboutClassPage' import {Abou...
Component that show up in the header of a page
import React from 'react'; import Paper from '../Paper'; import transitions from '../styles/transitions'; import propTypes from '../utils/propTypes'; function getStyles(props, context, state) { const {targetOrigin} = props; const {open} = state; const {muiTheme} = context; const horizontal = targetOrigin.horiz...
A component that displays a popover animation in vertical mode.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwarePhoneAndroid = (props) => ( <SvgIcon {...props}> <path d="M16 1H8C6.34 1 5 2.34 5 4v16c0 1.66 1.34 3 3 3h8c1.66 0 3-1.34 3-3V4c0-1.66-1.34-3-3-3zm-2 20h-4v-1h4v1zm3.25-3H6.75V4h10.5v14z"/> </SvgIcon> ...
HardwarePhoneAndroid is a lightweight component that can be used to render a hardware - phone - android icon.
import React from 'react'; import { connect } from 'dva'; import { Table, Pagination, Popconfirm, Button } from 'antd'; import { routerRedux } from 'dva/router'; import queryString from 'query-string'; import styles from './Users.css'; import { PAGE_SIZE } from '../../constants'; import UserModal from './UserModal'; f...
Package named sequence of events that occur in a state that are not part of a state machine.
import React from 'react'; import Router from 'react-router'; import routes from '../components/routes'; import dataLoader from '../util/dataLoader'; import {get as getCached} from '../util/cache'; import rehydrate from '../util/rehydrate'; const token = rehydrate(); const renderState = { element: document.getEleme...
Imports a single token and renders it in a browser - aware way.
import React from 'react'; // eslint-disable-next-line import Badge from 'ringcentral-widgets/components/Badge'; /** * A simple example of `Badge` * By default, the default floats on right. */ const BadgeDemo = () => <Badge name="Badge">BadgeName</Badge>; export default BadgeDemo;
A simple example of missing missing components
import React from 'react'; class H3 extends React.Component { render() { return ( <h3>{ this.props.children }</h3> ); } } export default H3;
H3 component that renders a single hidden component with no children.
'use strict'; import React from 'react'; import $ from 'jquery'; import d3 from 'd3'; import reduce from 'lodash.reduce'; import each from 'lodash.foreach'; import bind from 'lodash.bind'; import tooltip from 'd3-tip'; import dispatcher from 'dispatcher'; import ChartStore from 'stores/chart'; import fisheye from 'lib...
Displays a list of colors that can be used to render a node in a chart.
'use strict' import React from 'react'; import { Provider } from 'react-redux'; import configureStore from './store/ReduxStore'; import App from './containers/index'; const store = configureStore(); class Root extends React.Component { render() { return( <Provider store={store}> <App /> </Provider> ...
Initialize a new Root component.
import React from 'react'; import { render } from 'react-dom'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; render(<HelloWorld />, document.getElementById('react-root'));
Imports a component from a file that has no react - dom.
import React from 'react'; import { FormattedMessage } from 'react-intl'; import Wrapper from './Wrapper'; import messages from './messages'; function Footer() { return ( <Wrapper> <section> <FormattedMessage {...messages.licenseMessage} /> </section> <section> </section> ...
Generate a footer for a sequence of missing records.
'use strict'; /** * Created by maluramichael on 13/09/16. */ import './ReactotronConfig'; import React, { Component } from 'react'; import { AppRegistry } from 'react-native'; import { Provider } from 'react-redux'; import { Data } from './app'; import Application from './application'; class AppWrapper extends Com...
The base implementation of a that is used to render a single component.
// @flow import React from 'react' import { View, ScrollView, Text, Image } from 'react-native' import { Colors, Fonts, Images } from '../Themes' import R from 'ramda' // Styles import styles from './Styles/ThemeScreenStyle' // Colors const colors = R.keys(Colors) // Font Types const types = R.keys(Fonts.type) // Fo...
A theme screen that displays a single key sequence with no color background font and style.
import React from 'react'; import {render} from 'react-dom'; import {Router, useRouterHistory} from 'react-router'; import AppRoutes from './AppRoutes'; import injectTapEventPlugin from 'react-tap-event-plugin'; import {createHashHistory} from 'history'; // Helpers for debugging window.React = React; window.Perf = req...
Renders the main app component.
import React from 'react'; import PropTypes from 'prop-types'; import { findDOMNode } from 'react-dom'; import EventCell from './EventCell'; import getHeight from 'dom-helpers/query/height'; import { accessor, elementType } from './utils/propTypes'; import { segStyle } from './utils/eventLevels'; import { isSelected } ...
Enhance rowHOC Enhancement
import React from 'react'; import PropTypes from 'prop-types'; import style from './style.styl'; function getScore(count, max=5) { const top = count <= 10 ? 10 : 100; return (max * count) / top; } class Stars extends React.Component { static propTypes = { rating: PropTypes.number.isRequired, ...
A component that renders a single random key sequence with a score of 0. 5.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionCached = (props) => ( <SvgIcon {...props}> <path d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97....
A component that renders a series of action - cached icons.
/* eslint-disable react/no-multi-comp */ import React, { Component } from 'react'; import Editor, { createEditorStateWithText } from '@draft-js-plugins/editor'; import createInlineToolbarPlugin, { Separator, } from '@draft-js-plugins/inline-toolbar'; import { ItalicButton, BoldButton, UnderlineButton, CodeB...
A component that can be used to show a block of text in the toolbar.
/** * Created by Raphson on 10/10/16. */ import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import {Link} from 'react-router'; import NavBar from '../NavBar/index'; import Footer from '../Footer/Index'; import Auth from '../../utils/auth'; import JobStore from '../../stores/JobStore'; import ...
Component that is a subclass of React. EventDispatcher that exports a single object that represents a single job.
import _ from 'lodash'; import React, { Component } from 'react'; import CodeMirror from 'react-codemirror'; import 'codemirror/mode/jsx/jsx'; import * as actions from 'actions'; import { connect } from 'react-redux'; class Editor extends Component { onCodeChange(code) { this.props.updateCode(code); } rende...
A component that is a component that can be used to edit a code block.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { inject, observer } from 'mobx-react'; import AuthLayout from '../../components/auth/AuthLayout'; import AppStore from '../../stores/AppStore'; import GlobalErrorStore from '../../stores/GlobalErrorStore'; import AppLoader from '../....
A component that wraps a component in a AuthLayout and renders it as a container.
import React from 'react'; const VideoDetail = ({video}) => { //check if data is loaded if(!video){ //if data is undefined will return loading div and stop here return <div>Loading...</div>; } const videoId = video.id.videoId; // const url = 'https://www.youtube.com/embed/'+videoId; const...
Generate a detail of a single video.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvSortByAlpha = (props) => ( <SvgIcon {...props}> <path d="M14.94 4.66h-4.72l2.36-2.36zm-4.69 14.71h4.66l-2.33 2.33zM6.1 6.27L1.6 17.73h1.84l.92-2.45h5.11l.92 2.45h1.84L7.74 6.27H6.1zm-1.13 7.37l1.94-5.18 1.94 ...
A component that exports a sequence of components that can be sorted by alpha.
// CSS import styles from './style.css'; import React from 'react'; import PureComponent from 'react-pure-render/component'; import Question from '../Question'; class Text extends PureComponent { render() { const { data, onClick } = this.props; return ( <div classNam...
Sequence class renders a single sequence of words.
import React, { Component } from 'react'; import Header from './header'; import WeightForm from './weight-form'; export default class App extends Component { render() { return ( <div> <Header /> <WeightForm /> </div> ); } }
Package that exports a single application.
import React from 'react'; export default function HelloWorld() { return <h1>Hello World</h1>; }
The default export for missing React.
/** * Copyright (c) 2014, 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. * * @flow */ 'use s...
This function is a wrapper around the React module which renders a in the top - level DOM.
import React from 'react' import { connect } from 'react-redux' import AppBar from 'material-ui/AppBar' import Sidebar from 'containers/Sidebar' import '../../styles/core.scss' import { toggleSidebar, setSidebar } from 'modules/sidebar' class CoreLayout extends React.Component { static propTypes = { children: R...
A component that renders a single node in a hierarchy.
import React from 'react' import PropTypes from 'prop-types' import Link from '../../utils/Link' const MessageItem = ({href, imageUrl, title, time, message, onClick}) => { return ( <li > <Link href={href} onClick={onClick}> <div className='pull-left'> <img src={imageUrl} className='img-c...
Create a message item that can be displayed in a single hidden tag.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalCarWash = (props) => ( <SvgIcon {...props}> <path d="M17 5c.83 0 1.5-.67 1.5-1.5 0-1-1.5-2.7-1.5-2.7s-1.5 1.7-1.5 2.7c0 .83.67 1.5 1.5 1.5zm-5 0c.83 0 1.5-.67 1.5-1.5 0-1-1.5-2.7-1.5-2.7s-1.5 1.7-1.5 2...
A component that renders a missing -
import React from 'react'; import PropTypes from 'prop-types'; import { injectIntl, defineMessages } from 'react-intl'; const messages = defineMessages({ load_more: { id: 'status.load_more', defaultMessage: 'Load more' }, }); export default @injectIntl class LoadGap extends React.PureComponent { static propTypes...
The load - more button is a button that will show a link to the load more page.
/* * Copyright (C) 2016 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
Component which creates a single non - terminal hidden hidden
import React from 'react'; export default () => <div></div>;
Export default function for missing React.
import React from 'react'; import DashboardStore from '../stores/DashboardStore'; import DashboardEdit from './DashboardEdit.react'; import DashboardOverview from './DashboardOverview.react'; import DashboardNav from './DashboardNav.react'; import LoadingSpinner from './LoadingSpinner.react'; class Dashboard extends ...
A component that shows a dashboard in the dashboard store.
import React from 'react' import PropTypes from 'prop-types' const Circle = props => ( <svg className={props.className} viewBox="0 0 24 24" width="20px" height="24px" xmlns="http://www.w3.org/2000/svg"> <path fill={props.colour} d="M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.6 0 12 0zm0 22C6....
Create a Circle component that draws a single missing - block block on the top of a group.
/* * Copyright (C) 2019 Nicolas Pelletier * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is...
The aliasEditorMerge component contains a number of aliases that are different from the selected attributes in the nameSection.
import React, { Component } from 'react'; class SearchBar extends Component{ constructor(props) { super(props) this.state = { term: '' }; } render (){ return( <div className="search-bar"> <input onChange={event => this.onInputChange(event.target.value) }...
A component that shows a search bar that shows the search term.
import React, { Component } from 'react'; import Button from 'react-bootstrap/lib/Button'; import Glyphicon from 'react-bootstrap/lib/Glyphicon'; import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger'; import tooltip from './Tooltip'; import RadioButtonGroup from './RadioButtonGroup'; ...
A component that outputs a radio button group.
/** * 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, { Component } from 'react'; import PropTypes from 'prop-types'; function load(prefix) { return [ { id: 1, [`${prefi...
The base class for a series of users that can be found in a source tree.
import React from 'react'; import addons from '@kadira/storybook-addons'; require ('mocha/mocha.css'); require ('../styles.css'); class MochaRunner extends React.Component { constructor (props) { super (props); this.state = {}; } componentDidMount () { const {channel} = this.props; channel.on ('addon-m...
The base class for the mocha runner.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import _ from 'lodash'; import styled from 'styled-components'; import color from '~/css/base/colors.scss'; import BadgeItem from './BadgeItem'; const Tabs = styled.ul` height: 40px; padding: 1rem 1rem; list-style: none; border-bott...
A component that displays a badge when a key is missing or missing.
import React from 'react'; import Textarea from 'react-textarea-autosize'; import './index.styl'; const ENTER_KEY = 13; export default React.createClass({ onKeyDown(e) { if(e.keyCode === ENTER_KEY && !e.shiftKey) { this.onSubmit(e); } }, onSubmit(e) { e.preventDefault(); const $el = Reac...
The default button that displays a message when the user presses enter.
import React from 'react'; const Row = require('react-bootstrap/lib/Row'); const Col = require('react-bootstrap/lib/Col'); const style = { color:"blue" } const Tweets = (date, text, user) => ( <div> <h2>{user}</h2> <div style={style}>{text}</div> {date} </div> ); export default Tweets;
export a Tweets function
import React from 'react'; import { Route, Redirect, IndexRoute } from 'react-router'; import { App, HomePage, TestsPage, TestPage, NotFoundPage } from 'containers'; export default ( <Route path="/" component={App}> <IndexRoute component={HomePage} /> <Route path="/index" comp...
export default middleware
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React, { Component } from 'react'; import styles from './Feedback.css'; import withStyles from '../../decorators/withStyles'; @withStyles(styles) class Feedback extends Component { render() { return ( <div className="Feedback...
The base class for the missing -
import React, { Component } from 'react'; import axios from 'axios'; import Settings from '../../settings'; import map from 'lodash/fp/map'; class PostList extends Component { constructor() { super(); this.state = { posts: [] } } componentWillMount() { axios.get(`${Settings.host}/posts`).then...
Component List class
/*! 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 IconBase from '@suitejs/icon-base'; function MdRingVolume(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M47.41 34.34A33.873 33.873 0 0 0 24 25C14.93 25 6.68 28.55.59 34.34c-.37.36-.59.87-.59 1.42 0 .55.22 1.05.59 1.41l4.95 4.95c.36.36.86.59 1.41.59.5...
Manages the ring of volumes in a sequence of icons.
'use strict' import React from 'react' import ReactCSS from 'reactcss' import markdown from '../helpers/markdown' import Code from './Code' export class Markdown extends ReactCSS.Component { classes() { return { 'default': { markdown: { fontSize: '17px', lineHeight: '24px', ...
A component that renders a single block of markdown.
import React from 'react'; import { Link } from 'react-router'; class App extends React.Component { constructor(props) { super(); this.state = { favoritesList: [], buoysList: [], fetchError: false, }; } getChildContext() { return { favoritesList: this.state.favoritesList,...
The base class for all child - contexts that are defined in the root component of a component.
import React from 'react'; import {storiesOf, action} from '@kadira/storybook'; import FormLogin from './form-login'; import {Provider} from 'react-redux'; import createStore from './../../store/createStore'; const onSubmit = callback => () => callback(); const initialState = {}; const store = createStore(initialStat...
Imports a bunch of components from the module.
import React from 'react'; import ReactDOM from 'react-dom'; import ReactRethinkdb from 'react-rethinkdb'; import RethinkdbConfig from '../rethinkdb.config'; import 'jquery'; import 'metro'; import App from './App'; // Open a react-rethinkdb session (a WebSocket connection to the server) ReactRethinkdb.DefaultSession...
Imports a single element in the root DOM
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.
/* * Copyright (C) Pootle contributors. * Copyright (C) Zing contributors. * * This file is a part of the Zing 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 'react...
Creates a component that is a higher - order child of a component.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationPhonelinkErase = (props) => ( <SvgIcon {...props}> <path d="M13 8.2l-1-1-4 4-4-4-1 1 4 4-4 4 1 1 4-4 4 4 1-1-4-4 4-4zM19 1H9c-1.1 0-2 .9-2 2v3h2V4h10v16H9v-2H7v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0...
A component that renders a communication phantomelink icon.
import React from 'react' import ReactDOM from 'react-dom' import Router from 'react-router' import ContactStore from './ContactStore' var { Route, DefaultRoute, NotFoundRoute, RouteHandler, Link } = Router var App = React.createClass({ getInitialState() { return { contacts: ContactStore.getCont...
The main function for all of the components that are not part of a system.
import React from 'react'; import {BrowserRouter} from 'react-router-dom' import App from './App'; const Routes = () => { return ( <BrowserRouter basename='/merit-badge-university'> <App/> </BrowserRouter> ); }; export default Routes;
export routes for all modules
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdPublish(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M10 8v4h28V8H10zm0 20h8v12h12V28h8L24 14 10 28z" /> </IconBase> ); } export default MdPublish;
The default publish function for missing icons.
import CommentInput from './CommentInput'; import CommentList from './CommentList'; import { Link } from 'react-router'; import React from 'react'; const CommentContainer = props => { if (props.currentUser) { return ( <div className="col-xs-12 col-md-8 offset-md-2"> <div> <list-errors err...
CommentContainer - comment container
import React from 'react'; import PropTypes from 'prop-types'; import unicodeMapping from '../features/emoji/emoji_unicode_mapping_light'; const assetHost = process.env.CDN_HOST || ''; export default class AutosuggestEmoji extends React.PureComponent { static propTypes = { emoji: PropTypes.object.isRequired, ...
The default emoji class
import React from 'react'; import PureRenderMixin from 'react-addons-pure-render-mixin'; import Dropzone from 'react-dropzone'; import _ from 'lodash'; import PublishActions from './actions'; import publishStore from './store'; /* Publisher Components */ import Table from './components/table'; import Register from ...
--------------------- Public API ----------------------
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsDirectionsRun = (props) => ( <SvgIcon {...props}> <path d="M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9l1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l...
A component that renders a series of icons that can be used to render a series of maps.
/* eslint flowtype-errors/show-errors: 0 */ import React from 'react'; import { Switch, Route } from 'react-router'; import App from './containers/App'; import HomePage from './containers/HomePage'; import ChartPage from './containers/ChartPage'; export default () => ( <App> <Switch> <Route path="/chart" c...
Imports a bunch of non - terminal components into a single page.
import React, { Component } from 'react'; import { Link,browserHistory } from 'react-router'; import CommentsContainer from './../containers/CommentsContainer'; import { Element,scroller } from "react-scroll"; import Prism from "../js/prism"; import moment from 'moment'; export default class Post extends Component { ...
A component that can be used to post a video.
import React from 'react' import PropTypes from 'prop-types' import { MESSAGE_TYPES } from '@actions/messages' const MessageBar = ({ message, type, onDismiss, dismissMessage='OK' }) => { const modifierClass = type ? `messages__text--${type}` : ''; return ( <li className={`messages__text ${modifierCla...
A component that displays a message in a sequence of messages.
import React, { Component } from 'react'; import { ProgressViewIOS } from 'react-native'; export default class ProgressBarNB extends Component { render() { const getColor = () => { if (this.props.color) { return this.props.color; } else if (this.props.inverse) { return this.getThem...
A progress bar wrapper class.
import React, { Component } from 'react'; import { connect, PromiseState } from 'react-refetch'; class CommentForm extends Component { constructor(props) { super(props); this.state = { value: '' }; this._onChange = this._onChange.bind(this); this._onSubmit = this._onSubmit.bind(this); } componen...
A component that renders a comment form with a form field that is rendered when a comment is submitted.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Row, Col } from 'antd'; import { addToCart } from '../actions'; import ProductItem from './ProductItem'; class ProductList extends Component { render() { let filteredProducts = this.props.products; if (this.props.filte...
The base class for the product list component.
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 ...
InputGroupAddon component that renders a bootstrap - based input.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let PlacesSpa = (props) => ( <SvgIcon {...props}> <path d="M8.55 12c-1.07-.71-2.25-1.27-3.53-1.61 1.28.34 2.46.9 3.53 1.61zm10.43-1.61c-1.29.34-2.49.91-3.57 1.64 1.08-.73 2.28-1.3 3.57-1.64z"/><path d="M15.49 9.63c...
A component that exports a sequence of icons.
import React from 'react' import { Button, Divider, Form } from 'stardust' const sizes = ['mini', 'tiny', 'small', 'large', 'big', 'huge', 'massive'] const FormSizeExample = () => ( <div> {sizes.map(size => ( <Form size={size} key={size}> <Form.Group widths='equal'> <Form.Field label='Fi...
Imports a component with a series of components that can be used to create a sequence of components.
import React from 'react'; import state from './state'; import { keys, map, filter, includes } from 'lodash'; import NavLink from './navLink'; const FILES = 'files'; const MESSAGES = 'messages'; const ENUMS = 'enums'; const SERVICES = 'services'; const ACTIVE = 'active'; class SelectionButton extends React.Component ...
The SelectionButton component is a button that allows to select a file service message or enum.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImagePanorama = (props) => ( <SvgIcon {...props}> <path d="M23 18V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zM8.5 12.5l2.5 3.01L14.5 11l4.5 6H5l3.5-4.5z"/> </SvgIcon> ); ImagePanora...
A component that exports a sequence of images in a sequence of icons.