code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React, { Component } from 'react'; import { Grid, Container, Button, Header } from 'semantic-ui-react'; import ActionButton from '../../components/misc/action-button.js'; import input from '../../rpc/api/input.js'; import videoLibrary from '../../rpc/api/video-library.js'; import audioLibrary from '../../rpc/ap...
Component that displays a single sequence of non - terminal errors.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalMovies = (props) => ( <SvgIcon {...props}> <path d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"/> </Svg...
A component that exports a sequence of maps of the movies in a group of icons.
import React from 'react'; import ReactDOM from 'react-dom'; import App from 'containers/App/App.jsx'; import 'static/styles/base.css'; import 'normalize.css'; ReactDOM.render(<App />, document.getElementById('root'));
Imports a React application.
import React from 'react' import { render } from 'react-dom' import { BrowserRouter, Match } from 'react-router' import { Provider } from 'react-redux' import store from './store' import Landing from './Landing' import Search from './Search' import Details from './Details' import preload from '../public/data.json' impo...
Imports a single from React
import React from 'react'; /* component styles */ import { styles } from './styles.scss'; export const Footer = () => <footer className={`${styles}`}> <div className="container"> <div className="row"> <div className="col-xs-12 col-sm-12 col-md-12 col-lg-12"> ...
Exports a single loan.
/** * NotFoundPage * * This is the page we show when the user visits a url that doesn't have a route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a necessity for you then you can refactor it...
NotFoundPage - The page we show when the user visits a url that doesn t have a route .
import React from 'react' import { Input } from 'semantic-ui-react' const InputExampleActionLabeledButton = () => ( <Input action={{ color: 'teal', labelPosition: 'right', icon: 'copy', content: 'Copy' }} defaultValue='http://ww.short.url/c0opq' /> ) export default InputExampleActionLabeledButton
InputExampleActionLabeledButton - > button that displays a hidden element in a hidden state.
import React, { Component } from 'react'; import { EditorState } from 'draft-js'; import Editor from 'draft-js-plugins-editor'; import createUndoPlugin from 'draft-js-undo-plugin'; import editorStyles from './editorStyles.css'; import buttonStyles from './buttonStyles.css'; const theme = { undo: buttonStyles.button,...
Custom undo editor
import React from 'react' import { createHistory, useBasename } from 'history' import { Router, Route, IndexRoute, Link } from 'react-router' const history = useBasename(createHistory)({ basename: '/redirect-using-index' }) class App extends React.Component { render() { return ( <div> {this.prop...
The base implementation of a sequence of classes that extends React. Component and extends React. Router.
import { shallow, mount } from 'enzyme'; import jasmineEnzyme from 'jasmine-enzyme'; import React from 'react'; import $ from 'jquery'; import 'jasmine-ajax'; Object.assign(global, { jasmineEnzyme, mount, React, shallow, $ }); beforeEach(() => { jasmineEnzyme(); }); // function to require all modules for...
Imports all modules for a given context
// Based on Clearcasting Implementation done by @Blazyb import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import SpellIcon from 'common/SpellIcon'; import { formatNumber } from 'common/format'; import Analyzer from 'parser/core/Analyzer'; import Combatants from '...
Implementation of the Vivify abstract class.
import React from 'react'; import {List, ListItem} from 'material-ui/List'; import ActionGrade from 'material-ui/svg-icons/action/grade'; import Divider from 'material-ui/Divider'; import Avatar from 'material-ui/Avatar'; import {pinkA200, transparent} from 'material-ui/styles/colors'; const ListContacts = ({fetchData...
Imports a sequence of items from a list.
import React from 'react'; import PropTypes from 'prop-types'; export default class ImportRaceComponent extends React.Component { constructor(props) { super(props); this.handleSubmit = this.handleSubmit.bind(this); this.handleReset = this.handleReset.bind(this); } handleSubmit(urls) { this.props...
A component that renders a single missing - data link in the import window.
import React from 'react'; import { ComposedChart, Line, Area, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Legend } from 'recharts'; import './AreaStyle.css'; class CustomTooltip extends React.Component{ render() { const { active } = this.props; if (active) { const { payload, label } = this.props; ...
The base class for all of the top - level components that are rendered by a stacked chart.
// customized SelectionView // credits to thinnakrit --> https://github.com/thinnakrit/React-Native-Selection import React, { Component } from 'react'; import { Text, View, ScrollView, TouchableOpacity, Dimensions, Modal } from 'react-native'; import _ from 'lodash'; import Icon from 'react...
A custom selection view that opens a modal window and opens a modal window.
import React from 'react' import {Row, Col, Card} from 'wix-style-react/dist/src/Grid' import MessageInput from 'containers/MessageInput' import Messages from 'containers/Messages' // function getUser (id) { // // return 'https://pp.userapi.com/c841220/v841220877/ee41/x-F0a25bkoQ.jpg' // return // } // ...
Create a function that displays a user s name and a description of its author.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionSupervisorAccount = (props) => ( <SvgIcon {...props}> <path d="M16.5 12c1.38 0 2.49-1.12 2.49-2.5S17.88 7 16.5 7C15.12 7 14 8.12 14 9.5s1.12 2.5 2.5 2.5zM9 11c1.66 0 2.99-1.34 2.99-3S10.66 5 9 5C7.34 5 6 ...
A component that exports a series of action supervisors.
import React from 'react' import childrenPropType from 'propTypes/children' const Layout = props => <section className="layout-wrapper" id="block-app"> <header className="layout-header" id="block-header"> {props.header} </header> <nav className="layout-navigation" id="block-navigation"> {prop...
React layout - wrapper
import React from 'react'; import Collapse from '@kunukn/react-collapse'; import AttackReport from '../AttackReport'; import {FontAwesomeIcon} from '@fortawesome/react-fontawesome'; import {faQuestionCircle} from '@fortawesome/free-solid-svg-icons/faQuestionCircle'; import classNames from 'classnames'; class Selecte...
A component that displays a selected technique.
import React from 'react'; import { connect } from 'react-redux'; const JournalView = (props) => ( <div className="journalViewArea"> <div className="scrollableArea"> <div className="journalTextView"> TILANNEPÄIVÄKIRJA {props.journalEntries.entries.map((c) => <p className="journalEn...
React - redux - react
import PropTypes from 'prop-types'; import React from 'react'; const mainStyle = { position: 'fixed', top: 0, bottom: 0, left: 0, right: 0, padding: 20, backgroundColor: 'rgb(187, 49, 49)', color: '#FFF', WebkitFontSmoothing: 'antialiased', }; const headingStyle = { fontSize: 20, fontWeight: 600...
export ErrorDisplay function
import React from 'react'; import PropTypes from 'prop-types'; import Button from './Button'; import Dialog from './Dialog'; import '../styles/ExportLinkDialog.module.scss'; class ExportLinkDialog extends React.Component { render() { return ( <Dialog okayOnly={true} okayTitle="Done" ...
Export link dialog
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdFormatShapes(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M46 14h-4v20h4v12H34v-4H14v4H2V34h4V14H2V2h12v4h20V2h12v12zM6 6v4h4V6H6zm4 36v-4H6v4h4zm24-4v-4h4V14h-4v-4H14v4h-4v20h4v4h20zm8 4v-4h-4v4h4zm-4-...
Format shapes in icons.
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 PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; export default class SettingText extends React.PureComponent { static propTypes = { settings: ImmutablePropTypes.map.isRequired, settingKey: PropTypes.array.isRequired, label: PropT...
The SettingText class
import React from 'react' import ReactDOM from 'react-dom' import createBrowserHistory from 'history/lib/createBrowserHistory' import { syncReduxAndRouter } from 'redux-simple-router' import routes from './routes' import Root from './containers/Root' import configureStore from './redux/configureStore' const history = ...
Imports a single and renders it to the DOM.
import React from 'react'; import SvgIcon from '../../SvgIcon'; const HardwareComputer = (props) => ( <SvgIcon {...props}> <path d="M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"/> </SvgIcon> ); HardwareComputer.displayName = 'HardwareComputer';...
A component that exports a hardware computer.
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdChildCare(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M45.89 25.33c-.51 3.02-2.72 5.47-5.61 6.34a18.026 18.026 0 0 1-4.34 5.78C32.76 40.27 28.59 42 24 42s-8.76-1.73-11.94-4.55c-1.81-1.61-3.3-3.57-4.34-...
Manages the sequence of child cares.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationContacts = (props) => ( <SvgIcon {...props}> <path d="M20 0H4v2h16V0zM4 24h16v-2H4v2zM20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 2.75c1.24 0 2.25 1.01 2.25 2.25s...
A component that renders a sequence of components that can be used to display a communication contacts.
import React from 'react' import { IndexLink, Link } from 'react-router' import './Header.scss' export const Header = () => ( <div> <h1>React Redux Starter Kit</h1> <IndexLink to='/' activeClassName='route--active'> Home </IndexLink> {' · '} <Link to='/counter' activeClassName='route--activ...
export a header for a sequence of nodes
import { action } from '@storybook/addon-actions'; import React from 'react'; import { Pager } from './Pager'; export default { title: 'components/setupWizard/Pager', component: Pager, }; export const _default = () => <Pager disabled={false} isContinueEnabled={false} />; export const withBackButton = () => <Pager...
export default function for handling a single
import React from 'react'; import Drawer from 'material-ui/Drawer'; import MenuItem from 'material-ui/MenuItem'; import RaisedButton from 'material-ui/RaisedButton'; export default class DrawerUndockedExample extends React.Component { constructor(props) { super(props); this.state = {open: false}; } han...
The DrawerUndockedExample class
import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import {mergeProps} from 'pui-react-helpers'; import 'pui-css-tile-layout'; export class TileLayout extends React.Component { static propTypes = { columns: PropTypes.oneOfType([ PropTypes.number, PropT...
The TileLayout component is a base class that extends React. Component and extends a base class that extends React. BaseTileLayoutItem.
import React from 'react' import PropTypes from 'prop-types' import {translate} from 'react-i18next' import MarkdownPreview from '../../markdown-preview' import Warning from '../../warning' import Infos from './infos' import LifeCycle from './life-cycle' const shouldWarn = status => [ 'obsolete', 'underDevelopme...
Package containing JSX header for missing missing data.
/* * Copyright (C) Pootle 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 'react'; import AutosizeTextarea from '...
A component that renders a hidden
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceBrightnessLow = (props) => ( <SvgIcon {...props}> <path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 ...
Devuelte un componente nuevo brightness - low
import React from 'react'; import uuid from 'uuid'; class ToggleButton extends React.Component { constructor(props){ super(props); this.id = uuid(); } _getButtonClassName(){ return "checkbox-wrap" + (this.props.className ? (' ' + this.props.className) : "") + ...
A component that can be used to toggle a checkbox when a user clicks on a checkbox.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareKeyboard = (props) => ( <SvgIcon {...props}> <path d="M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v...
Hardware keyboard.
import { history } from 'byebye'; import { STATUS_OK, STATUS_PENDING, USER_ID_TAKEN } from 'app-constants'; import React from 'react'; import PropTypes from 'prop-types'; import SignUpStore from 'stores/SignUpStore'; import AuthStore from 'stores/AuthStore'; import SignUpActions from 'actions/SignUpActions'; import Sig...
The signup component which is used to sign up a user in a form.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageBlurOn = (props) => ( <SvgIcon {...props}> <path d="M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-...
A component that renders a sequence of icons.
/** * Created by parikhv on 4/10/16. */ import React, { Component } from 'react'; import { Input } from 'react-bootstrap'; /** * This class represents the editor dropdown option for bsSize', 'bsStyle', 'ComponentWidth', 'alignment' for the compnent properties */ export default class EditList extends Component { ...
A component which represents the edit list of a single compnent.
import React from 'react' import { Link } from 'redux-history-sync' function NavbarLink({ children, className, component, href, to }) { const Comp = component || Link let Linkelement = ( <Comp to={to} className={className} activeStyle={{ color: '#A94545', }}> {children} </Comp> ) if (h...
The default navigation link function
import React from 'react'; import ItemsTableCell from '../../components/ItemsTableCell'; import ItemsTableValue from '../../components/ItemsTableValue'; var SelectColumn = React.createClass({ displayName: 'SelectColumn', propTypes: { col: React.PropTypes.object, data: React.PropTypes.object, linkTo: React.Prop...
A component that can be used to select a column in a table.
import React from 'react'; import _ from 'lodash'; import VisibilityStore from 'stores/VisibilityStore'; import MessageActionCreators from 'actions/MessageActionCreators'; import MessageItem from 'components/common/MessageItem.react'; let _delayed = []; let flushDelayed = () => { _.forEach(_delayed, (p) => { ...
The MessagesSection component is a component that can be used to show a message in a specific month.
import React from 'react'; import moment from 'moment'; import 'moment-duration-format'; const colorMap = { '': '#383830', Sender: '#f92672', Receiver: '#a6e22e' , Eavesdropper: '#f2971f' } const TurnInfo = ({player: {role}, currentRound: {onTurn}, roundTime}) => { const roleColor = col...
Generate a single node with a color map for the given node.
import {renderToString} from 'react-dom/server'; import React from 'react'; import Counter from './index'; window.renderCounterServer = function(props) { return renderToString(<Counter {...props} />); };
Imports the React React server and renders the counter.
import React from 'react'; import Header from '../components/Header'; import PageBody from '../components/PageBody'; import SideBar from '../components/SideBar'; import StaticHTMLBlock from '../components/StaticHTMLBlock'; import { APIPages } from '../Constants'; export default class APIPage { render() { return ...
The default render function for a single node.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let SocialSentimentSatisfied = (props) => ( <SvgIcon {...props}> <circle cx="15.5" cy="9.5" r="1.5"/><circle cx="8.5" cy="9.5" r="1.5"/><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S1...
A component that exports a sequence of social sentiment that is satisfied by a user.
import React from 'react'; import Router from 'react-router'; import app from './app/app.jsx'; Router.run(app, Router.HistoryLocation, (Root) => { React.render(React.createElement(Root), document.getElementById('app')); });
Imports a component with a specific history location.
import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; const ListItem = ({ className, place, selectLocation }) => ( <div className={className} onClick={() => selectLocation(place)} role="button" tabIndex={0} > <h1>{place.name}</h1> <p>{place.l...
A component that displays a list item that can be used to show a missing node in a tree.
/** * 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, { Component } from 'react'; import withStyle...
A component that renders a single missing - node node in the hierarchy of components.
/* * Copyright (C) Pootle 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 cx from 'classnames'; import React from 'react'; i...
A component that renders a single missing - node error in the hierarchy of items that match a search query.
import React, { Component } from 'react'; import values from '../styles/values'; class ButtonFillLights extends Component { render() { const { btnSize, fillColor } = this.props; const circleDia = btnSize / 3.5; const styles = { root: { height: btnSize, width: btnSize, cursor: 'pointer', bord...
ButtonFillLights is a component that can be used to fill a button with a light color.
import 'babel-core/polyfill'; import React from 'react'; import { Provider } from 'react-redux'; import App from './containers/App'; import configureStore from './store/configureStore'; const store = configureStore(); React.render( <Provider store={store}> {() => <App />} </Provider>, document.getElementByI...
Imports a single node in the DOM.
import React from 'react' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' const FormStatesExamples = () => ( <ExampleSection title='States'> <ComponentExample title='Loading' description='If ...
This module exports a sequence of components that are not part of a form.
import React from 'react'; import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../../components/column'; import ColumnHeader fro...
The public timeline component is a component that can be attached to a timeline.
import React from 'react'; import PropTypes from 'prop-types'; import RcSteps from 'rc-steps'; export default class Steps extends React.Component { render() { return (React.createElement(RcSteps, Object.assign({}, this.props))); } } Steps.Step = RcSteps.Step; Steps.defaultProps = { prefixCls: 'ant-s...
The steps component that is used by the NgSteps component.
import React from 'react'; import IconBase from './../components/IconBase/IconBase'; export default class Document extends React.Component { render() { if(this.props.bare) { return <g> <path d="M399.3,168.9c-0.7-2.9-2-5-3.5-6.8l-83.7-91.7c-1.9-2.1-4.1-3.1-6.6-4.4c-2.9-1.5-6.1-1.6-9.4-1.6H136.2 c-12.4,0-23.7,9.6-...
The Document class
import React from 'react'; import d3 from 'd3'; export default class MiniPieChart extends React.Component { static defaultProps = { width: 50, height: 50, x: 0, y: 0, } constructor (props) { super(props); this.state = { }; } render () { var {props} = this, {width, height, data} ...
A chart that renders a single node in a pie chart.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { fetchPage } from '../actions/index'; import { Page } from '../components/page'; class About extends Component { componentWillMount() { this.props.fetchPage('About', '/about/'); } render() { if (!this.props.p...
The About component is a component that can be rendered on a page.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationAirlineSeatIndividualSuite = (props) => ( <SvgIcon {...props}> <path d="M7 13c1.65 0 3-1.35 3-3S8.65 7 7 7s-3 1.35-3 3 1.35 3 3 3zm12-6h-8v7H3V7H1v10h22v-6c0-2.21-1.79-4-4-4z"/> </SvgIcon> ); Noti...
A component that exports a sequence of notifications for a specific sequence of airlines.
import React from 'react'; import {parseType} from 'helpers'; import Chunk from 'components/Chunk'; class OutputLine extends React.Component { render() { var block = "console__output"; return ( <div className={block + "__line"}> {this.props.output.map( (chunk, i) => <Chunk key={i} ...
OutputLine class that renders a single chunk of a series of chunks.
'use strict'; import React from 'react'; let Button = React.createClass({ getDefaultProps() { return { icon: '', name: '', target: {} } }, render() { return ( <button type="button" className="btn btn-default btn-md btn-space" onClic...
Demonstration of a button that opens a link on a button.
import React from 'react'; import NewsList from 'components/NewsList.js'; export default class NewsNBAFollow extends React.Component { render() { const list = [ { title: '帕森斯晒自己与演员特里-克鲁斯的合照', lNum: '28', cNum: '212', bgurl: '...
Package containing a news list of all types of a specific sequence.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let SocialSentimentSatisfied = (props) => ( <SvgIcon {...props}> <circle cx="15.5" cy="9.5" r="1.5"/><circle cx="8.5" cy="9.5" r="1.5"/><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S1...
A component that exports a sequence of social sentiment that is satisfied by a user.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionList = (props) => ( <SvgIcon {...props}> <path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"/> </SvgIcon> ); ActionList = pure(ActionList); ActionList.displa...
ActionList for missing icons
// @flow import React from 'react' import ClauseRow from './ClauseRow' function ClauseTable(props:Object):?Object { let clauseTable:?Object = null const clauseRows:Object = [...props.clause.getIn(['dict','coll']).values()].map(clause => ( <ClauseRow key={clause.get('id')} clause={clause} strings={pr...
A function to export a single node in the hierarchy of a sequence of nodes.
import React from 'react'; import EntypoIcon from '../EntypoIcon'; const iconClass = 'entypo-svgicon entypo--CircularGraph'; let EntypoCircularGraph = (props) => ( <EntypoIcon propClass={iconClass} {...props}> <path d="M17.584,9.372h2c-0.065-1.049-0.293-2.053-0.668-2.984L17.16,7.402C17.384,8.025,17.531,8....
The default entypo - circulargraph component.
// modules import React from 'react'; import ReactDOM from 'react-dom'; import $ from 'jquery'; // CSS import './index.css'; import './App.css'; // React components import ReactObserver from './ReactObserver' // render React component ReactDOM.render( <ReactObserver />, document.getElementById('root') );
Renders a single component in the DOM.
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 from 'react'; import { SegmentedControl } from 'elemental'; const OPTIONS = [ { label: 'Is Set', value: true }, { label: 'Is NOT Set', value: false } ]; var PasswordFilter = React.createClass({ getInitialState () { return { checked: this.props.value || true }; }, toggleChecked (checked) { ...
A component that allows to filter the password field of a given type.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageWbSunny = (props) => ( <SvgIcon {...props}> <path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7...
A component that exports a sequence of icons that can be used to render a sequence of icons.
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './components/app'; import Home from './components/home'; import AboutMe from './components/about_me/about_me'; import Videos from './components/videos/videos'; export default ( <Route path="/" component={App}> <IndexR...
export default route for missing components
import React from 'react' import PropTypes from 'prop-types' import Link from 'gatsby-link' import Helmet from 'react-helmet' import './index.css' const Header = () => ( <div style={{ background: 'rebeccapurple', marginBottom: '1.45rem', }} > <div style={{ margin: '0 auto', ...
Create a template - based
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './index.css'; ReactDOM.render(<App />, document.getElementById('root'));
Imports a React application.
// @flow import React from 'react'; import { ListItem, ListItemText } from 'material-ui/List'; export default function SimpleListItem() { return ( <div style={{ background: '#fff', width: 300 }}> <ListItem> <ListItemText primary="Primary" /> </ListItem> <ListItem> <ListItemText...
The default implementation of which returns a list of the missing keys.
import React from 'react'; export default (data) => () => (<div>Unable to resolve: {JSON.stringify(data)}</div>)
Default function to return a promise that resolves a promise that is rejected when the promise resolves.
import React from 'react' import Bugsnag from '@bugsnag/js' import BugsnagPluginReact from '@bugsnag/plugin-react' import getConfig from 'next/config' const { serverRuntimeConfig, publicRuntimeConfig } = getConfig() Bugsnag.start({ apiKey: serverRuntimeConfig.BUGSNAG_API_KEY || publicRuntimeConfig.BUGSNAG_API_KEY, ...
Imports a bunch of bugsnag plugins and starts a new one if necessary.
import React from 'react'; import IconBase from './IconBase.js'; export const AutomationsIcon = (props) => ( <IconBase {...props} viewBox="0 0 20 22"> <path d="M16.54185892 18.39352399L15.76077 12.74640967l6.06217782 3.5-5.28108891 2.14711432zm1.3839746-4.39711432l1.7320508 1c2.75-4.76313972 1.10288569-10.91025404-...
The AutomationsIcon class
import React from 'react'; import { Button } from 'react-mdl'; import UserDialog from './UserDialogComponent'; import styles from './User.scss'; export default class User extends React.Component { constructor(props) { super(props); this.state = { dialog: false }; } static propTypes = { vi...
A component that displays a dialog when a user adds a new user.
import React from 'react'; import Select from 'react-select'; import { findDOMNode } from 'react-dom'; import assign from 'object-assign'; import { Fields } from 'FieldTypes'; import InvalidFieldType from '../../../shared/InvalidFieldType'; import { plural } from '../../../../utils/string'; import { BlankState, Button,...
The default update component is a component that can be used to update a list of items.
import React from 'react'; import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../../components/column'; import ColumnHeader fro...
The CommunityTimeline component is a component that can be attached to a column in a community timeline.
import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import FlashMessage from './FlashMessage' import { deleteFlashMessage } from '../../actions/flashMessages' const FlashMessagesList = ({ messages, deleteFlashMessage }) => { const htmlMessages = messages.map(msg => ( ...
React - Redux - FlashMessages
import React from 'react'; import {hydrate} from 'react-dom'; import App from './components/App'; hydrate(<App assets={window.assetManifest} />, document);
Imports React and ReactDOM.
import React from 'react'; import PropTypes from 'prop-types'; import { VisibleIcon, HiddenIcon } from '../../../svgIcons/SvgIcons'; // eslint-disable-line import/no-extraneous-dependencies import SovosTooltip from '../../../../../shared/components/sovos-tooltip/SovosTooltip'; import { violet } from '../../../../../the...
The column - selector view of a column - list.
import React from 'react'; import { ProductItem } from 'components/Product'; import withStyles from 'isomorphic-style-loader/lib/withStyles'; import s from './searchResult.css'; export const SearchResult = ({ quantity, list }) => ( <div className={s.root}> <h3 className={s.title}>{`${quantity} Searched result`}<...
The default search result implementation
import React from 'react'; function IssueIcon(props) { return ( <svg height="1em" width="0.875em" className={props.className} > <path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7S10.14 13.7 7 13.7 1.3 11.14 1.3 8s2.56-5.7 5.7-5.7m0-1.3C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7S10.86 1 7 1z m1 3H6v...
Issue icon for missing node.
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from ...
create a component that wraps a component with a bootstrap class that is used to render a block of media.
import React from 'react' import Router from 'react-router' import collider from './reactCollider' import {merge} from 'ramda' const defaultOptions = { fetch: null } // Client side rendering var renderPage = function reanderPage(Handler, data) { React.render(React.createElement(Handler, {data: data}), documen...
client - side middleware
/** * Created by arkeros on 31/5/17. * * @flow */ import React from 'react'; import { connect } from 'react-redux'; import FaTh from 'react-icons/lib/fa/th'; import FloatingActionButton from './FloatingActionButton'; import { toggleGrid } from '../actions'; const GridButton = ({ onToggleGrid }) => ( <Floating...
Provides a function
import React from 'react' import DuckImage from '../assets/Duck.jpg' import './AboutView.scss' import '../../../styles/font.scss' export const AboutView = () => ( <div> <h4>About Web!</h4> <ul> <li> <a href = "#">添加</a> </li> <li> <a href = "#">添加1</a> </li> </...
export AboutView function
// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import CSSClassnames from '../../../utils/CSSClassnames'; import Intl from '../../../utils/Intl'; import Props from '../../../utils/Pro...
A component that renders a link to a specific index in a series of icons.
import 'babel-polyfill' import React from 'react' import ReactDOMServer from 'react-dom/server' import { createStore, compose, applyMiddleware } from 'redux' import thunk from 'redux-thunk' import _reducers from './reducers' import { Provider } from 'react-redux'; import matchConfig from './matchConfig' import { Sta...
Renders a single node in the browser
import React from 'react' export default ({ className, style }) => ( <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 149 146.7' className={className} style={style}> <path d='M126,73.35a14.74,14.74,0,0,0-12.17-14.5l-1.28-3.07a14.74,14.74,0,0,0-1.64-18.85,15.05,15.05,0,0,0-18.86-1.65L89,34a14.72,14.72,0,0,0-2...
A component that renders a sequence of components that are not part of a component.
import React from 'react'; import { connect } from 'react-redux'; import Tabs, { TabPane } from 'rc-tabs'; import TabContent from 'rc-tabs/lib/TabContent'; import ScrollableInkTabBar from 'rc-tabs/lib/ScrollableInkTabBar'; import Icon from '../react/IconComponent'; import Panel from './PanelComponent'; import PanelButt...
Component that displays a ScratchpadRecordsContainer in a Scratchpad.
import React from 'react' import { Form, TextArea } from 'semantic-ui-react' const TextAreaExampleAutoHeightRows = () => ( <Form> <TextArea autoHeight placeholder='Try adding multiple lines' rows={1} /> </Form> ) export default TextAreaExampleAutoHeightRows
Imports a Nagios - style element and displays a text area with autoHeight.
/* * 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 _ from 'lodash'; import Immutable from 'immutable'; import keymirror from 'keymirror'; import React from 'react'; import { Styles, TextField, FlatButton } from 'material-ui'; import CreateGroupActionCreators from 'actions/CreateGroupActionCreators'; import ContactStore from 'stores/ContactStore'; import Cont...
A component that creates a modal group with a single group of members.
import React from 'react' import { AsyncStorage } from 'react-native'; // import SideMenu from 'react-native-side-menu'; // import Menu from '../features/menu'; import Nav from '../features/navigator'; import Entry from '../features'; import LoginButton from '../features/login/button'; import DICT from '../config/dict'...
Demonstration of a router that creates a nav object with a user object.
import React from 'react'; import styles from './teaser-footer.scss'; import TeaserMetrics from 'components/TeaserMetrics'; import TeaserInfo from 'components/TeaserInfo'; const TeaserFooter = ({ city, owner, metrics }) => ( <footer className={styles.root}> <div className={styles.info}> <TeaserInfo ...
export TeaserFooter to be used in the Teaser. js