code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React from 'react'; import { Map as iMap } from 'immutable'; import store from './store'; import logger, { formatBranchArgs } from './lib/log'; const isObject = item => !Array.isArray( item ) && typeof item === 'object'; function subscribe({ local, paths }) { return Component => { const rootPath = loc...
Subscribes to a component and its methods.
'use strict'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './container/App'; let root = document.getElementById('app'); ReactDOM.render( <App />, root );
Imports a single application.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import Chart from '../components/chart'; class WeatherList extends Component { renderWeather(cityData) { const name = cityData.city.name; const temps = cityData.list.map(weather => weather.main.temp); const pressures = cit...
A component that renders a list of weather objects.
/** * NotFoundPage * * This is the page we show when the user visits a url that doesn't have a route */ import React from 'react'; import { FormattedMessage } from 'react-intl'; import H1 from 'components/H1'; import messages from './messages'; export default function NotFound() { return ( <article> ...
NotFoundPage - the page that displays when the user visits a url that doesn t have a route
/* Copyright 2015, Yahoo Inc. Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms. */ import React from 'react'; class Button extends React.Component { render() { return <span style={{ color: 'blue' }}> Content inside lazy </span>; } } expo...
Adds a button to a lazy lazy loading of a node.
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M22 11v2H9V7h9c2.21 0 4 1.79 4 4zM2 14v2h6v2h8v-2h6v-2H2zm5.14-1.9c1.16-1.19 1.14-3.08-.04-4.24-1.19-1.16-3.08-1.14-4.24.04-1.16 1.19-1.14 3.08.04 4.24 1.19 1.16 3.08 1.14 4.24-.04z" /></g> , 'Airl...
Create a series of icons for a single .
import React from 'react'; import { connect } from 'react-redux'; import cx from 'classnames'; import { get } from 'lodash'; import { bindActionCreators } from 'redux'; import { VolumeMenuButton, ControlBar, ReplayControl, ForwardControl, PlayToggle, playerActions, videoActions, CurrentTimeDisplay, Ti...
The default component for a single critical state.
import React from 'react'; import { storiesOf, action } from '@kadira/storybook'; const CreateComment = require('../create_comment.coffee'); storiesOf('comments.CreateComment', module) .add('default view', () => { return ( <div className='comments'> <CreateComment postId='the-id' create={action('cr...
Add a custom view to the hierarchy of comments.
/** * A mobile section */ import React from 'react'; import MobileListItem from './ListItem'; import { Link } from 'react-router'; const MobileSectionItem = React.createClass({ displayName: 'MobileSectionItem', propTypes: { children: React.PropTypes.node.isRequired, className: React.PropTypes.string, curren...
A mobile section item is a list of items that can be rendered on a navigation navigation.
import React from 'react'; export const Path = ({ // eslintignore https://developer.mozilla.org/en-US/docs/Web/SVG/Element/path chartType = 'pie', d, fill = 'blue', id = '', stroke = 'gray', }) => <path className={`${chartType}-path`} d={d} fill={fill} id={id} stroke={stroke} />; Path.propTypes = ...
Create a path component for a
import React from 'react' import svgs from './../utils/svgs.js' import Navigation from './Navigation.js' const Header = () => ( <header className='header' key='header'> <a href='#content' className='skip-to-main'>Skip to main content</a> <div className='header__logo'> <a href='http://www.bostonglobe.com/' ...
export default Header Exception
// @flow import type { BlockContentFeature, BlockContentFeatures, SlateChange, SlateValue } from '../typeDefs' import React from 'react' import {keyMaps} from '../plugins/SetMarksOnKeyComboPlugin' import {toggleMark} from '../utils/changes' import CustomIcon from './CustomIcon' import FormatBoldIcon from 'p...
A component that renders a single block - level decorator button.
import React from 'react' import { connect } from 'react-redux' import { createStructuredSelector } from 'reselect' import PropTypes from 'prop-types' import { searchChange } from 'actions/programs' import { makeSearch } from 'selectors/programs' export class SearchBar extends React.PureComponent { render () { ...
A component that displays a search bar when a key is missing.
import _extends from 'babel-runtime/helpers/extends'; import _isNil from 'lodash/isNil'; import cx from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; import { customPropTypes, getElementType, getUnhandledProps, META, useKeyOnly } from '../../lib'; /** * A statistic can contain a numer...
A component that can be used to create a child element of a child element.
import React from 'react'; const Loader = () => ( <div className="loader"> OnTap </div> ); export default Loader;
The Loader class
import React from 'react'; const VideoDetail = ({video}) => { if (!video) { return <div>Loading...</div>; } const videoId = video.id.videoId; const url = `https://www.youtube.com/embed/${videoId}`; return ( <div className="video-detail col-md-8"> <div className="embed-responsive embed-respons...
The default function for the embed - related - video - detail. js
import React from 'react' import gql from 'graphql-tag' import { useMutation } from '@apollo/react-hooks' export const BuildContextFragment = gql` fragment BuildContextFragment on Build { id createdAt number status repository { name owner { login } } baseScreensh...
Create a new BuildContext. Provider object.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsPinDrop = (props) => ( <SvgIcon {...props}> <path d="M18 8c0-3.31-2.69-6-6-6S6 4.69 6 8c0 4.5 6 11 6 11s6-6.5 6-11zm-8 0c0-1.1.9-2 2-2s2 .9 2 2-.89 2-2 2c-1.1 0-2-.9-2-2zM5 20v2h14v-2H5z"/> </SvgIcon> ); ...
A component that exports a sequence of missing components.
import React, { Component } from 'react'; import { SimpleForm } from 'components'; class Home extends Component { render() { return ( <div> <h1>Home</h1> <SimpleForm /> </div> ); } } export default Home;
Imports and exports a single component.
import React from 'react' import Helmet from 'react-helmet' import { prefixLink } from 'gatsby-helpers' const BUILD_TIME = new Date().getTime() module.exports = React.createClass({ propTypes() { return { body: React.PropTypes.string, } }, render() { const head = Helmet.rewind() let css ...
The main function of the Helmet component.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { Navbar, NavbarBrand, Collapse, Nav, NavItem, NavbarToggler } from 'reactstrap'; import Login from './Login'; class NavBar extends Component { constructor(props){ super(props); t...
A component that is used to show a navigation bar in a modal window.
import React from 'react'; import ReactDOM from 'react-dom'; import {createStore, applyMiddleware} from 'redux'; import {Provider} from 'react-redux'; import createSagaMiddleware from 'redux-saga'; import 'regenerator-runtime/runtime'; // eslint-disable-line import/no-extraneous-dependencies import logger from 'redux-l...
Imports a single node in the DOM.
import PropTypes from 'prop-types'; import React from 'react'; import Link from 'react-router/lib/Link'; import { FormattedMessage, injectIntl } from 'react-intl'; import { connect } from 'react-redux'; import { Grid, Row, Col } from 'react-flexbox-grid/lib'; import { fetchSourceSuggestions, updateSourceSuggestion } fr...
The base component for all components that are not part of a composition chain.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceSignalCellularConnectedNoInternet4Bar = (props) => ( <SvgIcon {...props}> <path d="M20 18h2v-8h-2v8zm0 4h2v-2h-2v2zM2 22h16V8h4V2L2 22z"/> </SvgIcon> ); DeviceSignalCellularConnectedNoInternet4Bar = pur...
Devuelte un objeto DeviceSignalCellularConnectedNoInternet4Bar
import React from 'react'; import Button from '@material-ui/core/Button'; import Snackbar from '@material-ui/core/Snackbar'; import MuiAlert from '@material-ui/lab/Alert'; import { makeStyles } from '@material-ui/core/styles'; function Alert(props) { return <MuiAlert elevation={6} variant="filled" {...props} />; } ...
A component that displays a Snackbar and a button that shows a message in the UI.
import React, { Component } from 'react'; export default function asyncComponent(importComponent) { class AsyncComponent extends Component { constructor(props) { super(props); this.state = { component: null }; } async componentDidMount() { const { default: component } = ...
Async component implementation
import React from 'react'; import styles from './LoadingMessage.css'; const messages = [ 'Downloading more RAM', 'Now in Technicolor', 'Previously on Radarr...', 'Bleep Bloop.', 'Locating the required gigapixels to render...', 'Spinning up the hamster wheel...', 'At least you\'re not on hold', 'Hum som...
Create a loading message
import React, { Component } from 'react'; import { withRouter } from 'react-router-dom'; import PropTypes from 'prop-types'; import { CallbackComponent } from 'redux-oidc'; class CallbackPage extends Component { static propTypes = { userManager: PropTypes.object.isRequired, history: PropTypes.object.isRequir...
The base implementation of a single node that renders a single node in a browser.
/* * Copyright 2007-2017 Charles du Jeu - Abstrium SAS <team (at) pyd.io> * This file is part of Pydio. * * Pydio 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, either version 3 of the License, o...
Component which creates a single node in a tree that has a single label and content.
import React from 'react'; import PropTypes from 'prop-types'; import transitions from '../styles/transitions'; const propTypes = { /** * True if the parent `TextField` is disabled. */ disabled: PropTypes.bool, /** * Override the inline-styles of the underline when parent `TextField` is disabled. */ ...
The text field underline component.
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import 'babel-core/polyfill'; import path from 'path'; import express from 'express'; import React from 'react'; import ReactDOM from 'react-dom/server'; import Router from './routes'; import Html from './components/Html'; const server = global....
Register the middleware and API for the node
import React, { Component } from 'react'; import { withRouter } from 'react-router'; import { ajax } from './ajax'; import AlertFlash from './AlertFlash'; import { scrollToTop } from './scroll'; import { ReactComponent as LogoutIcon } from './icons/material/logout-24px.svg'; class Logout extends Component { render(...
The Logout component is a component that displays a logout button that will be displayed on the logout button.
import React from 'react' import PropTypes from 'prop-types' import { Control } from 'react-redux-form' import StatefulError from './StatefulError' import styles from './RadioList.scss' const RadioList = props => { const { id, label, name, options, model, messages, validators, onChange } = props return ( <div...
A component that renders a single missing missing node in a radio list.
/* * 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. */ 'use strict'; import React from 'react'; import { PureRen...
A component that renders a single missing - node error message when a user deactivates it.
import React from 'react' import { connect } from 'react-redux' import throttle from 'react-throttle-render' import { addLog } from './actions' import HighCharts from 'react-highcharts' import RaisedButton from 'material-ui/RaisedButton' function usersToData(name, users) { const data = [[0, 0]] Object.keys(users...
React - related - modules
// @flow import React from 'react' import {Badge} from 'reactstrap' import {sortBy} from 'lodash' import RecursiveInfo from './RecursiveInfo' import {showRelationType, getRelationTitle, getColor} from '../utilities' import type {RelatedEntity} from '../../../state' type RelationListProps = { data: Array<RelatedEnti...
Generate a single node - chain of nodes that are related to a node.
import React from 'react'; import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn, } from 'material-ui/Table'; class Step2Work extends React.Component { constructor() { super(); this.state = { items: [], selectedRows: [] }; this.onSelectionWork = this.o...
Component that manages a step of a module work.
import React from 'react'; import test from 'ava'; import { shallow } from 'enzyme'; import { Team } from '../Team/Team'; test('renders team members information correctly', t => { const wrapper = shallow( <Team /> ); t.is(wrapper.find('p').length, 7); t.is(wrapper.find('h1').length, 1); t.is(wrapper.fin...
Test if a specific tag is missing or incorrect.
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M23 3H1v5h2V5h18v14h-7v2h9V3zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11zm10 1.09v2L14.5 15l3.5-1.91v-2L14....
Create a graphic with a color that can be used to render a sequence of components.
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' const Types = () => ( <ExampleSection title='Types'> <ComponentExample title='Statistic' description='A statistic ca...
export a type for a single sequence of components
import React from 'react'; import LoginForm from '../containers/LoginForm.js'; require('/css/Home.less'); var Home = React.createClass({ render : function render(){ return ( <div id="Home"> <div> <h1>HOME</h1> </div> <div> <a href="/login">login</a> </div> </div> ); } }); expo...
The home component is a special component that can be used to render a menu with a hidden hidden element.
import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import configureStore from './stores'; import { IntlProvider } from 'react-intl'; import App from './containers/App'; import messages from './intl/en'; import getMuiTheme from 'material-ui/styles/getMuiTheme'; import ...
Imports a single non - terminal element.
import React from 'react' import { BaseNodeLikeWidget } from '../_base' export const TYPE='device'; export class DeviceWidget extends BaseNodeLikeWidget { getClassName(node) { return 'a-node model_t device'; } }
Devuelve un objeto DeviceWidget
import React from 'react'; import ReactDOM from 'react-dom'; // Your top level component import App from './App'; // Export your top level component as JSX (for static rendering) export default App; // Render your app if (typeof document !== 'undefined') { window.addEventListener('load', () => { const ga...
This function is exported to the JSX file that exports the top level component as JSX
import React, { Component } from 'react'; import { Panel, Button, Container } from '@extjs/ext-react'; export default class InsertStart extends Component { state = { showInserted: false } insert = () => { this.setState({ showInserted: true }) } render() { const { showInse...
A component that will be inserted into a tree.
// @flow // @flow import React from 'react' import {Link} from 'react-router' import {User, Users, userApiURL} from '../model/user' import {reloadHandler} from '../data/load' import {makeUpdate} from '../data/update' import {toDateString} from '../helpers' import {clickable} from '../style' import {sortBy, reverse} f...
A component that can be used to show a list of users that can be lifted.
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; class ConnectAccount extends ImmutablePureComponent { static propTypes = { nico_url: PropTypes.string, }; connectedLink(nico_url) { return ( <a href={nico_ur...
The ConnectAccount class
import React from 'react' import styled from 'styled-components' const Badge = ({ name, color, id, onClick, active, showLetter }) => <Container onClick={() => onClick && onClick(id)} active={active} color={color} > {showLetter && <Letter color={color} active={active}> {name.charAt(0)}...
Imports a missing - block block of unknown - block components and returns a Badge object.
import React from 'react'; import calcFill from './fill'; export default ({ fill = null, light = false, disabled = false, colors = {}, ...rest }) => ( <svg id="svg4300" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42" {...rest} > <path fill={calcFill({ fill, disabled, ligh...
XML - related functions
/** * 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 ErrorPage from './Err...
Provides a function to create a new object with the properties of a missing component.
import React from 'react'; import { storiesOf } from '@storybook/react'; import withReadme from 'storybook-readme/with-readme'; import Readme from '../readme.md'; import Loading from '../Loading'; import LoadingView from '../LoadingView'; import LoadingPane from './LoadingPane.story'; storiesOf('Loading', module) .a...
Imports a module with a loading decorator.
import React from 'react'; import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { debounce } from 'lodash'; import PropType...
A component that renders a block of blocks.
import React, { Component } from 'react'; import { mapStylePicker, layerControl } from './style'; export const HEXAGON_CONTROLS = { showHexagon: { displayName: 'Show Hexagon', type: 'boolean', value: true }, radius: { displayName: 'Hexagon Radius', type: 'range', value: 250, step: 50,...
The base class for all of the unknown terms in a component
import React from 'react' import { connect } from 'react-redux' import { addTodo } from '../actions' let AddTodo = ({ dispatch }) => { let input return ( <div> <form onSubmit={e => { e.preventDefault() if (!input.value.trim()) { return } dispatch(addTodo(input.v...
Add Todo to a node
import React from 'react'; import translate from 'Utilities/String/translate'; import FilterBuilderRowValue from './FilterBuilderRowValue'; const protocols = [ { id: 'announced', name: translate('Announced') }, { id: 'inCinemas', name: translate('InCinemas') }, { id: 'released', name: translate('Released') } ]; ...
Creates a MinimumAvailabilityFilterBuilderRowValue object that can be used to build a minimum - availability filter for a node.
import React from 'react'; import PropTypes from 'prop-types'; const Panel = props => { const { header, children, footer } = props; let headerElement, footerElement; if (header) { if (typeof header === 'string') { headerElement = ( <div className='panel-heading'> <h3 className='pa...
Panel for missing - node - related components
'use strict'; require('styles//BurndownChart.css'); import React from 'react'; import { connect } from "react-redux" import {AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip} from 'Recharts'; const data = [ {name: '12-12-2016', uv: 4000, pv: 2400, amt: 2400}, {name: '13-12-2016', uv: 3000, pv: 1398...
A component that renders a series of 12 - 12
import _extends from 'babel-runtime/helpers/extends'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _createClass from 'babel-runtime/helpers/createClass'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-runtime/helpers/i...
A component that renders a pagination.
// @flow import React from 'react' import { connect } from 'react-redux' import { addTodo } from '../actions' import type { Dispatch } from '../types' import type { Connector } from 'react-redux' type Props = { dispatch: Dispatch }; const AddTodo = ({ dispatch }) => { let input return ( <div> <form o...
The main function for the missing node - check
import React from 'react'; export class PlayBarShadow extends React.Component { render() { return ( <div className="playbar-shadow"> <h2> You need to pay the artist or pin the file/album in order to play this track ! </h2> </div> ...
A component that can be used to show a hidden track in the play bar.
/* eslint-disable */ import React from 'react'; import ModalPreviewLayout from '../..'; import { Modal, Box, Button, TextButton, IconButton } from 'wix-style-react'; class FullWidthContentExample extends React.Component { state = { isModalOpened: false, }; openModal() { this.setState({ isModalOpened: ...
Full - width content example
// @flow import React from 'react' import auth from '../../src/' export default class Copy extends React.Component<Object, Object> { componentWillMount() { auth.trackSession((session) => this.setState({ webId: session && session.webId }) ) } render() { const { webId } = this.state return ...
A component that copies a component from a session to a session.
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ // This is the default file as put down by RN /* eslint-disable */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; export default class ReactNativeVanilla extends Comp...
The default component that is not a component of a React component.
import React from 'react' import {render} from 'react-dom' import {Router, hashHistory} from 'react-router' import routes from './routes' require('../styles/app.less') if (process.env.NODE_ENV !== 'production') { localStorage.debug = true } document.addEventListener('DOMContentLoaded', () => { const root = docu...
Imports a single node in the DOM if it s not already loaded.
import React from 'react' import SEO from './seo' import '../styles/base.sass' const Layout = ({ title, description, className, children }) => ( <> <SEO title={title} description={description} /> <main className={className}>{children}</main> </> ) export default Layout
Layout for nano
import React from 'react'; class Grid extends React.Component{ /** * props: * strict: boolean - no margins between columns * array: boolean - should double grid at 4k * vcenter: boolean - flexbox vertical center * vstretch: boolean - flexbox vertical stretch */ render(){ const center...
A component that is rendered when a node is missing a missing child.
import React from 'react'; import EntypoIcon from '../EntypoIcon'; const iconClass = 'entypo-svgicon entypo--CreditCard'; let EntypoCreditCard = (props) => ( <EntypoIcon propClass={iconClass} {...props}> <path d="M18,3H2C0.899,3,0,3.9,0,5v10c0,1.1,0.899,2,2,2h16c1.1,0,2-0.9,2-2V5C20,3.9,19.1,3,18,3z M18,1...
The default EntypoCreditCard implementation.
import React, { Component } from 'react'; import { Provider } from 'react-redux'; import { Router, Route } from 'react-router'; import configureStore from '../store/configureStore'; import App from './App'; import UserPage from './UserPage'; import RepoPage from './RepoPage'; const store = configureStore(); export de...
The root component of a sequence of components.
import React from 'react'; export class Subnav extends React.Component { render() { return ( <nav className="page--subnav"> <ul> {this.props.children} </ul> </nav> ); } }
A component that renders a subnav.
import React from 'react'; import Helmet from 'react-helmet'; import Link from 'gatsby-link'; import styled from 'styled-components'; const Kai = styled.div` &:before{ position: absolute; content: ""; width: 0; height: 0; border-style: solid; border-width: 0 100vh 100vh 0; border-color: transparent t...
Imports a single component in a browser.
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 { Dimensions,Animated } from 'react-native'; import store from 'react-native-simple-store'; import { registerApp } from 'react-native-wechat'; import AV from 'leancloud-storage'; import NavigationUtil from '../utils/NavigationUtil'; const maxHeight = Dimensions.get('window').height; c...
Demonstration of the Splash component.
import React from 'react' import { connect } from 'react-redux' import { EVALUATE_JOB, JOB_HIDE_DIALOG } from '../../sagas/event' class JobActionEvaluate extends React.Component { handleSubmit = () => { this.props.dispatch({ type: JOB_HIDE_DIALOG }) this.props.dispatch({ type: EVALUATE_JOB, payload: this.pr...
JobActionEvaluate is a component that can be used to evaluate a specific job.
import React from 'react'; import Checkbox from 'material-ui/Checkbox'; const styles = { block: { maxWidth: 250, }, checkbox: { marginBottom: 16, }, }; const CheckboxExampleSimple = () => ( <div style={styles.block}> <Checkbox label="test" style={styles.checkbox} /> <Checkb...
A helper to create a checkbox example that can be used to check a single node in a tree.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageExposure = (props) => ( <SvgIcon {...props}> <path d="M15 17v2h2v-2h2v-2h-2v-2h-2v2h-2v2h2zm5-15H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM5 5h6v2H5V5zm15 15H4L20 4v16z"/> </...
A component that exposes
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionHistory = (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 exports action history for a node in a hierarchy.
import React from 'react'; import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer'; import SPELLS from 'common/SPELLS'; import Events from 'parser/core/Events'; import ItemStatistic from 'interface/statistics/ItemStatistic'; import AbilityTracker from 'parser/shared/modules/AbilityTracker'; import SpellUsable ...
A base class for all of the methods that are defined in the base class.
import React from 'react'; import Header from './component/Header'; import Footer from './component/Footer'; import TopicList from './component/TopicList'; export default class App extends React.Component { render() { return ( <div className="container"> <Header /> {this.props.children ? th...
The base class for the series of components that can be rendered by a component.
import React, { Component } from 'react'; import { connect } from 'react-redux'; // glue between react and redux import Product from '../components/product'; class SingleCollectionProduct extends Component { updateProduct = (product) => { if (this.props.collectionProducts) { // never modify this.props d...
The base class for a single - collection product.
import React from 'react'; import SvgIcon from '../../SvgIcon'; const ImageCropLandscape = (props) => ( <SvgIcon {...props}> <path d="M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H5V7h14v10z"/> </SvgIcon> ); ImageCropLandscape.displayName = 'ImageCropLandscape'; ImageCropLan...
A component that renders a series of icons that can be cropped or cropped to the image of the image.
import React from 'react'; export default class extends React.Component{ render() { return ( <div className="content"> Info Content </div> ); } }
Constructor for a single node.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionSettingsPower = (props) => ( <SvgIcon {...props}> <path d="M7 24h2v-2H7v2zm4 0h2v-2h-2v2zm2-22h-2v10h2V2zm3.56 2.44l-1.45 1.45C16.84 6.94 18 8.83 18 11c0 3.31-2.69 6-6 6s-6-2.69-6-6c0-2.17 1.16-4.06 2.88-...
A component that renders a series of action settings for a series of components.
import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; class App extends Component { render() { return ( <div className="App"> <header className="App-header"> <img src={logo} className="App-logo" alt="logo" /> <p> Edit <code>src/...
Package for React - based application.
import React from 'react'; import { FormattedMessage, injectIntl, } from 'react-intl'; import PropTypes from 'prop-types'; import { Field } from 'react-final-form'; import { Select, TextField, Row, Col, Accordion, Headline, } from '@folio/stripes/components'; import { AddressEditList } from '@folio/stri...
The base implementation of a sequence of non - terminal non
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { observer, PropTypes as MobxPropTypes } from 'mobx-react'; import { Link } from 'react-router'; import { defineMessages, intlShape } from 'react-intl'; import Webview from './ServiceWebview'; import Appear from '../../ui/effects/Appe...
Services class.
import React from 'react'; import Icon from '../Icon'; export default class PhotoLibraryIcon extends Icon { getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M44 32V8c0-2.21-1.79-4-4-4H16c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4zm-22-8l4.0...
The default icon for a specific component.
import React from 'react' import Link from 'react-router/lib/Link' import Header from "./Header" import Footer from "./Footer" export default class AppLayout extends React.Component { render() { return ( <div> <Header /> <nav> <ul> <li> <Link to="/">Home...
Component that renders a single TimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTimedTim...
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M10.59 9.17L5.41 4 4 5.41l5.17 5.17 1.42-1.41zM14.5 4l2.04 2.04L4 18.59 5.41 20 17.96 7.46 20 9.5V4h-5.5zm.33 9.41l-1.41 1.41 3.13 3.13L14.5 20H20v-5.5l-2.04 2.04-3.13-3.13z" /></g> , 'Shuffle');
Create a series of icons for a single .
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentDrafts = (props) => ( <SvgIcon {...props}> <path d="M21.99 8c0-.72-.37-1.35-.94-1.7L12 1 2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2l-.01-10zM12 13L3.74 7.84 12 3l8.26 4.84L12 13z"/>...
A component that exports a series of content drafts.
import React, { Component } from 'react'; import SearchResultList from './SeachResultList'; import './Search.css'; class Search extends Component { constructor(props) { super(props); this.state = { randomState: '', }; } render() { return ( <div className="searchPageContainer"> ...
The base class for the search component.
import React, { Component } from 'react'; import Header from '../components/Header'; import { MenuSimples } from '../components/Menus'; import { CardNoticias } from '../components/Cards'; import { Alert } from '../components/Alert'; import './css/InicioScreen.css'; const MENU_HEADER = [ 'Início', 'Vídeos', 'Cont...
A component that is used to display a single sequence of non - terminal words.
import React from 'react'; import githubLogo from './../../static/images/github-logo.svg'; import './style.css'; const Navbar = () => ( <div className="app__navbar"> <div className="navbar__container"> <div className="container__name"> <a href="/" title="What Class Is This??">logo</a> </div> ...
Exports a Navbar to show a single node in the hierarchy.
import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; export const Svg = styled.svg` width: 12px; > * { fill: ${props => props.theme.color[props.color]}; transition: fill cubic-bezier(0.47, 0, 0.75, 0.72) 0.3s; } `; const StatusLight = props => ( <Svg ...
export a component that displays a light color on top of a light light.
import React from 'react'; import test from 'ava'; import sinon from 'sinon'; import { shallow, mount } from 'enzyme'; import { App } from '../App'; import styles from '../App.css'; import { intlShape } from 'react-intl'; import { intl } from '../../../util/react-intl-test-helper'; import { toggleAddPost } from '../App...
Test if a component is mounted and has a proper layout.
import React from 'react' import { Message } from 'semantic-ui-react' const MessageExampleFloating = () => ( <Message floating> Way to go! </Message> ) export default MessageExampleFloating
export default message example floating
import React, { Component } from 'react'; import { ScrollView } from 'react-native'; import axios from 'axios'; import AlbumDetail from './AlbumDetail'; class AlbumList extends Component { state = { albums: [] }; componentWillMount() { console.log('inside componentWillMount'); axios.get('https://rallycod...
The AlbumList class
/** * Created by tomino on 17/03/06. */ import React from 'react'; import {List, ListItem,makeSelectable} from 'material-ui/List'; let Selectable = makeSelectable(List); export default class SelectableList extends React.Component { render() { const { onSelect, selectIndex, } = this...
The list component that is used to select a single item in a list.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionPrint = (props) => ( <SvgIcon {...props}> <path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/> </...
A component that renders a single node in a sequence of nodes.
import React from 'react' import { Checkbox } from 'semantic-ui-react' const CheckboxExampleShorthandElement = () => ( <Checkbox label={<label>Make my profile visible</label>} /> ) export default CheckboxExampleShorthandElement
Provides a shortcut for a single element in a sequence of checkboxes.
import React from 'react'; import { connect } from 'react-redux'; export default function (ComposedComponent) { class Authenticate extends React.Component { componentWillMount() { if (!this.props.isAuthenticated) { this.context.router.push('/'); } } ...
A component which authenticates a user.