code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React, { Component } from 'react'; import { Route, Link } from 'react-router-dom'; import { makeRoutePath } from '../../lib/util'; export class Pagination extends Component { render() { let props = this.props; let prevPage = (Number(props.page) - 1); let nextPage = (Number(props.page) + 1); ...
A pagination class that renders a page of a page in a tree.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageWbIncandescent = (props) => ( <SvgIcon {...props}> <path d="M3.55 18.54l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8zM11 22.45h2V19.5h-2v2.95zM4 10.5H1v2h3v-2zm11-4.19V1.5H9v4.81C7.21 7.35 6 9.28 6 11.5c0 3.31 2....
A component that exports a sequence of components that can be used to render a sequence of components.
import React, { Component } from 'react'; const style = { width: '100%', height: '100%', left: 0, top: 0, margin: 0, padding: 0, position: 'absolute', }; export default class GoogleMapDiv extends Component { shouldComponentUpdate() { return false; // disable react on this div } render() { ...
A component that is rendered on a div that is rendered on a Google Map.
import React from 'react'; // https://github.com/gaearon/redux-devtools#use-devtoolsinstrument-store-enhancer import { createDevTools } from 'redux-devtools'; import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; const DevTools = createDevTools( <DockMonitor t...
requires React to be installed
import React from 'react'; import {view as Todos} from './todos/'; import {view as Filter} from './filter/'; function TodoApp() { return( <div> <Todos/> <Filter/> </div> ) } export default TodoApp
TodoApp - Todo app
import React from 'react'; import PropTypes from 'prop-types'; import hoistNonReactStatics from 'hoist-non-react-statics'; import getInjectors from './sagaInjectors'; /** * Dynamically injects a saga, passes component's props as saga arguments * * @param {string} key A key of the saga * @param {function} saga A r...
Dynamically injects a component into a saga.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageCenterFocusStrong = (props) => ( <SvgIcon {...props}> <path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm-7 7H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V...
A component that renders a sequence of icons that are not part of a component.
/* eslint-disable react/jsx-one-expression-per-line */ import React from 'react'; import { SprkFooter } from '@sparkdesignsystem/spark-react'; const linkColumns = [ { heading: 'Support', links: [ { href: 'https://github.com/sparkdesignsystem/spark-design-system/blob/staging/CONTRIBUTI...
Exports a header with a link to the header and the link icons for the footer.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import TagsCloud from '../components/tags-cloud/tags-cloud'; import { setGenres } from '../actions/profile.actions' class MyGenres extends Component { onTagClick (tag) { // tag.selected = !tag.selected; // this.props...
Create a new component with a tag selected and a genres.
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' const ModalExamples = () => ( <ExampleSection title='Variations'> <ComponentExample title='Size' description='A modal...
export ModalExampleConstructor
import React from 'react'; // eslint-disable-next-line import CallAvatar from 'ringcentral-widgets/components/CallAvatar'; import styles from './styles.scss'; const props = {}; // props.isOnConferenceCall = true; // props.extraNum = 2; props.avatarUrl = null; // 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9Gc...
A demo of how to render a single with a call avatar.
/* @flow */ import React from 'react'; import Icon from 'mineral-ui/Icon'; import type { IconProps } from 'mineral-ui/Icon/types'; /* eslint-disable prettier/prettier */ export default function IconSignalCellularConnectedNoInternet2Bar(props: IconProps) { const iconProps = { rtl: false, ...props }; ret...
The default function for a sequence of icons that are not available on the device.
import React from 'react' import { ScrollView, Text } from 'react-native' import { connect } from 'react-redux' // Styles /* eslint-disable no-unused-vars */ import RoundedButton from '../../shared/components/rounded-button/rounded-button' import { loginScreen, // ignite-jhipster-entity-screen-import-needle } from ...
The base class for all components that are not part of a component s state and dispatch.
import React from 'react'; import { compose } from 'react-apollo'; import ReadingEnvironment from '../../components/ReadingEnvironment'; import readingEnvironmentQuery from '../../graphql/queries/readingEnvironment'; class ReadingEnvironmentContainer extends React.Component { render() { let work = null; if ( ...
The readingEnvironmentContainer class is a container that can be used to render a reading environment.
import React from 'react'; import PropTypes from 'prop-types'; import Layout from 'atoms/Layout'; import Button from 'atoms/Button'; import styles from './policy_card.module.scss'; export const PolicyActions = (props) => { const { onContinue, continueCTAText, selected } = props; return ( <div className={style...
A component that renders a single action on a single node in a group of action buttons.
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Toggle from 'react-toggle'; import AsyncSelect from 'react-select/async'; import { NonceProvider } from 'react-sele...
A column hashtag - specific settings that can be used to provide customizable customization of the hashtag - specific settings.
import React from 'react' import ReactDOM from 'react-dom' import App from './App' import registerServiceWorker from './registerServiceWorker' import { BrowserRouter as Router } from 'react-router-dom' import './index.css' ReactDOM.render(<Router><App /></Router>, document.getElementById('root')) registerServiceWorke...
import react - dom from react - dom
import React from 'react'; import { render } from 'react-dom'; import { Provider, connect } from 'react-redux'; import createApp, { store } from './App'; const App = createApp(React); const mapStateToProps = state => { return { clips: state.allClips.clips, filters: state.allFilters.filters, selectedFilt...
Imports a single and renders it into a hidden hidden element.
import React, { Component } from 'react'; import { Text, Dimensions, View, ScrollView } from 'react-native'; import {Icon, Input} from 'native-base'; import SearchPanel from './searchViews/SearchPanel'; import SearchItem from './searchViews/SearchItem'; const { width, height } = Dimensions.get('window')...
A component that can be used to show a search in a modal window.
import React, { Component } from 'react'; import AppBar from 'material-ui/AppBar'; import VideoSlider from './VideoSlider'; import { Card, CardText } from 'material-ui/Card'; import Text from 'material-ui/TextField'; import NavBar from './NavBar'; import Slide from './Slide'; class App extends Component { render() ...
Package that inherits from React.
import React from 'react'; import { Link } from 'react-router'; import { PromiseState } from 'react-refetch'; import connect from '../api-connector'; import PromiseStateContainer from './PromiseStateContainer'; const SUMMONERS = { na: [ 'tubstep', 'jbunnies', 'SURPRISE PARTY', ], }; class App extends ...
The base component for all non - optional children of a node.
import React from 'react'; import Avatar from '../../../components/avatar'; import DisplayName from '../../../components/display_name'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; class AutosuggestAccount extends ImmutablePureComponen...
A component that displays a list of unique identifiers that can be used to suggest a user s account.
import React from 'react' import R from 'ramda' import combine from '../lib/combine-string-lists' const { propOr } = R const Table = props => { return ( <div aria-role={props['aria-role'] || 'table'} className={combine('flex flex-column', props.className)} style={props.style} > {prop...
export default Table alphabetical tree
// This component handles the App template used on every page. import React from 'react'; import {connect} from 'react-redux'; import Navigation from './Navigation'; import dateFormatter from '../formatters/dateFormatter'; class App extends React.Component { render() { let date = dateFormatter.currentYear(...
A component that handles the App template used on every page.
import React from 'react'; import { Router, Route, IndexRoute } from 'react-router'; import Main from '../containers/Main'; import Home from '../components/home/'; import RecipeList from '../components/recipeList/'; import AddRecipe from '../components/addRecipe/'; import RecipeDetails from '....
Imports a single node in the hierarchy.
/** * THIS IS ORPHANED AND ISN'T RENDERED AT THE MOMENT * THIS WAS DONE TO FINISH THE REDUX INTEGRATION, WILL REWRITE SOON * - @mxstbr */ import React from 'react'; import { DropTarget } from 'react-dnd'; import { setCurrentPage } from '../../actions'; let timeoutID = false; // drop target var ItemsTableDragDro...
Provides a function to handle drop and drop - on - drop related to a specific item.
import React from 'react'; export default function SvgOrderSheet(props) { return ( <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props} > <path d="M18.25 4c-.347 0-.856.462-1.063.662l-.5.49a.457.457 0 01-.32.127....
SVG Order Sheet
import React, { Component } from 'react'; import { Image, Platform } from 'react-native'; import { connect } from 'react-redux'; import { Content, Title, Text, List, ListItem, Icon, Container, Left, Right, Badge, Button, View, StyleProvider, getTheme, variables } from 'native-base'; import { Actions } from 'react-nati...
Component that is rendered on a side - bar.
import React from 'react' import PropTypes from 'prop-types' import { InputNumber, Form } from 'antd' import { formLayout } from 'components/Field/layout' class InputNumberInput extends React.Component { handleChange(values) { this.props.input.onChange(values) } render() { return ( <Form.Item ...
Component that renders a single Input.
import React from 'react' import { Component } from 'react' import PropTypes from 'prop-types' import './ConfirmationBox.scss' export default class ConfirmationBox extends Component { static propTypes = { message: PropTypes.string.isRequired, handleYes: PropTypes.func.isRequired, handleNo:...
A component that can be used to confirm a user s confirmation.
/** * RepoListItem * * Lists the name and the issue count of a repository */ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { createStructuredSelector } from 'reselect'; import { FormattedNumber } from 'react-intl'; import { makeSelectCurrentUser } fro...
List items of a branch that are not part of a branch or a repository.
import React from 'react'; import IconBase from 'react-icon-base'; export default class FaShoppingBasket extends React.Component { render() { return ( <IconBase viewBox="0 0 40 40" {...this.props}> <g><path d="m37.3 17.5q1 0 1.7 0.7t0.8 1.8-0.8 1.8-1.7 0.7h-0.3l-2.3 12.8q-0.1 0....
A component that displays a sequence of items in a FaShoppingBasket.
import React from 'react'; import PropTypes from 'prop-types'; import glamorous from 'glamorous'; const Main = glamorous.article({ margin: 15, maxWidth: 600, lineHeight: 1.4, fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif', }); const Title = glamorous.h1({}); const Note = g...
Define a single - state
import React, { Component } from 'react'; import classNames from 'classnames'; import { withStyles } from '@material-ui/core/styles'; import Input from '@material-ui/core/Input'; import InputLabel from '@material-ui/core/InputLabel'; import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@materia...
A component that can be used to select multiple number fields.
import React from 'react'; import R from 'ramda'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { withStyles } from 'material-ui/styles'; import Typography from 'material-ui/Typography'; import Divider from 'material-ui/Divider'; import Tooltip from '../../common/portalTooltip'; impo...
A component that renders a single node in a sequence of nodes with a series of nodes.
/* eslint-disable flowtype/require-valid-file-annotation */ import React from 'react'; import Paper from 'material-ui/Paper'; import Tabs, { Tab } from 'material-ui/Tabs'; import PhoneIcon from 'material-ui-icons/Phone'; import FavoriteIcon from 'material-ui-icons/Favorite'; import PersonPinIcon from 'material-ui-icon...
A component that renders a single missing - node node in a tabbed pane.
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; import './index.css'; ReactDOM.render(<App />, document.getElementById('root')); registerServiceWorker();
Imports a single application.
import React, { Component } from 'react'; import SearchBar from '../containers/search_bar'; import WeatherList from '../containers/weather_list'; export default class App extends Component { render() { return ( <div> <SearchBar /> <WeatherList /> </div> ); } }
The default app class
import React from 'react'; export default class Stop extends React.Component { prepareCords() { let coords = { cx: this.props.cx, cy: this.props.cy, r: this.props.r, fill: this.props.fill } return coords; } render() { let coord...
Very basic stop component.
import React, { Component } from 'react'; import { StyleSheet, Picker, ListView, View, TouchableOpacity, TouchableHighlight, Image, Text, StatusBar } from 'react-native'; import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view'; export default class Settings extends Component { ...
A component that displays a single
// @flow import React from 'react'; import { render } from 'react-dom'; import Index from './pages/index'; render(<Index />, document.querySelector('#root'));
Imports a single node from the index page.
import React from 'react'; import ReactDOM from 'react-dom'; import JqxGrid from '../../../jqwidgets-react/react_jqxgrid.js'; import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js'; import JqxInput from '../../../jqwidgets-react/react_jqxinput.js'; class App extends React.Component { componentDidMou...
JSX Component that creates a single app.
import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import SpellIcon from 'common/SpellIcon'; import { formatPercentage } from 'common/format'; import Analyzer from 'parser/core/Analyzer'; import Enemies from 'parser/shared/modules/Enemies'; import StatisticBox fro...
Garrote uptime class
import React from 'react'; import PropTypes from 'prop-types'; import Head from 'docs/src/modules/components/Head'; export default function AppTheme(props) { const { children } = props; return ( <React.Fragment> <Head> <meta name="robots" content="noindex,nofollow" /> </Head> {childr...
The default theme for missing children
import React from 'react'; import 'rc-slider/assets/index.css'; import Slider from 'rc-slider'; const BpmRangeSlider = (props) => { const { value, min, max, onChange } = props; const display = `${value[0]} - ${value[1]}`; return ( <div className="bpm-range-slider"> <div className="bpm-label">BPM</div> ...
A function to generate a BPM range slider.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageNature = (props) => ( <SvgIcon {...props}> <path d="M13 16.12c3.47-.41 6.17-3.36 6.17-6.95 0-3.87-3.13-7-7-7s-7 3.13-7 7c0 3.47 2.52 6.34 5.83 6.89V20H5v2h14v-2h-6v-3.88z"/> </SvgIcon> ); ImageNature = p...
A component that renders a Nature icon in a component that is not part of a component.
import React from 'react'; import PropTypes from 'prop-types'; import { MessageDialog } from 'patternfly-react'; import { sprintf, translate as __ } from 'foremanReact/common/I18n'; const DeleteDialog = ({ show, selectedRows, onDeleteSubscriptions, onSubscriptionDeleteModalClose, }) => ( <MessageDialog show={s...
A dialog that deletes a sequence of records.
import styled, { ThemeProvider } from 'styled-components'; import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import _ from 'lodash'; import Icons from '../icons'; import { colors, renderThemeKeyOrDefaultValue, } from '../styles'; const SearchBarContainer = styled.div...
Component that renders a search box with a hidden hidden input.
import React from 'react'; import { Grid, Header, Icon, Segment, } from 'semantic-ui-react'; import { interpolateSnippets } from '../utils/interpolation'; const inlineComponents = { __heartIcon__: <Icon name='heart' size='small' />, }; const Footer = ({ snippets }) => { snippets = interpolateSni...
export default Footer
import React from 'react'; import MobileTearSheet from '../../../MobileTearSheet'; import Avatar from 'material-ui/Avatar'; import {List, ListItem} from 'material-ui/List'; import Subheader from 'material-ui/Subheader'; import Divider from 'material-ui/Divider'; import CommunicationChatBubble from 'material-ui/svg-icon...
The default implementation of the list - example - chat feature.
import App from './render/App'; import pify from 'pify'; import _ from 'lodash'; import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { connect } from 'react-redux'; import createStore from './state/store'; import jsonStorage from 'electron-json-storage'; import { ...
Imports a single application.
/* @flow */ import React from 'react'; import { Route } from 'react-router-dom'; import LoadableWithLoading from '@ncigdc/components/LoadableWithLoading'; const ImageViewerRoute = ( <Route path="/image-viewer" component={LoadableWithLoading({ loader: () => import('./ImageViewerRoute'), })} /> ); ...
The default route for a sequence of components.
import CONFIG from '../config'; import React from 'react'; import Firebase from 'firebase'; import swal from 'sweetalert'; import { Route, Link } from 'react-router'; class UserZones extends React.Component { constructor() { super(); this.state = { loggedIn: false, userId: null, zones: [] }; } com...
Component that handles user - specific state changes.
import React from 'react'; const HealthBar = React.createClass({ render() { let {health, color, max, style} = this.props return ( <div style={style} className="healthBar noSelect"> <span className="healthPercent">{health}</span> <div style = { { width: 100 * health...
A component that shows a health bar with a single health parameter.
import React, { Component } from 'react'; import { Card, Message } from 'semantic-ui-react'; import requests from '../utils/requests'; import ListItemsWithPagination from '../components/listItemsWithPagination'; import RequestCard from '../components/root/requestCard'; const itemsPerPage = 16; class RequestTable ext...
A component that can be rendered in a table which can be used to render a request.
import React from 'react' import PropTypes from 'prop-types' import { map } from 'lodash' import Stadium from './Stadium' const Stadiums = ({ stadiums }) => ( <div style={styles.container}> {map(stadiums, (stadium, key) => <Stadium stadium={stadium} key={key} />)} </div> ) const styles = { container: { ...
React - specific module that imports a from React - specific module
import React from 'react'; import './SuggestionList.css' class SuggestionList extends React.Component { render() { const listItems = this.props.suggestions.map((suggestion) => { return ( <li className="SuggestionList-item" key={suggestion.id} onClick={() => this.props....
The SuggestionList component is a list of items that can be used to display a list of suggestions.
import React from 'react'; import transitions from '../styles/transitions'; class SvgIcon extends React.Component { static muiName = 'SvgIcon'; static propTypes = { /** * Elements passed into the SVG Icon. */ children: React.PropTypes.node, /** * This is the fill color of the svg icon....
A component that renders a single node in a SVG icon.
import _jsx from "@babel/runtime/helpers/builtin/jsx"; import _inheritsLoose from "@babel/runtime/helpers/builtin/inheritsLoose"; import _assertThisInitialized from "@babel/runtime/helpers/builtin/assertThisInitialized"; import React from 'react'; import PropTypes from 'prop-types'; import { translate } from 'react-i18...
A component that displays a button that deletes a playlist.
import React from 'react'; import StyleSheet from 'react-inline'; import cx from 'classnames'; const { oneOf, bool } = React.PropTypes; class Button extends React.Component { render() { const { size, busy, block, className } = this.props; const classes = cx( styles.default ,styles[ size ], block && styles.bloc...
A button that can be used to show a button in a block or block - wide fashion.
import React from 'react'; import { render } from 'react-dom'; import { App } from './js/App'; render(<App />, document.getElementById('root'));
Imports React and ReactDOM.
import React from 'react'; import { Step, Stepper, StepLabel, } from 'material-ui/Stepper'; import RaisedButton from 'material-ui/RaisedButton'; import FlatButton from 'material-ui/FlatButton'; import ExpandTransition from 'material-ui/internal/ExpandTransition'; import TextField from 'material-ui/TextField'; /*...
The base class for a single failure - critical sequence of states.
import React from 'react'; import ReactDOM from 'react-dom'; import JqxPopover from '../../../jqwidgets-react/react_jqxpopover.js'; import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js'; class App extends React.Component { componentDidMount() { let data = new Array(); let firstNames...
A component that displays a list of employees that can be used to show a list of employees.
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; const url = `https://www.youtube.com/embed/${videoId}`; return ( <div className="video-detail col...
The default function for the embed - related - video - detail - panel
import React from 'react'; import classNames from 'classnames'; import typography from '../../src/Typography'; export default () => <ul className="ltr style-list"> <li className={typography.h0}>H0 - Helvetica_25 /48px</li> <li className={typography.h1}>H1 - Helvetica_35 /36px</li> <li className={typogra...
A default function to export a single with a list of possible icons.
import React from 'react'; import Router from 'react-router'; var Link = Router.Link; var RouteHandler = Router.RouteHandler; export class NavBar extends React.Component { render() { return ( <nav className="navbar navbar-default"> <div className="collapse navbar-collapse"> <ul className="nav navbar-na...
export a navigable class that displays a navigable object in a navbar.
import React from 'react'; import { storiesOf, action, linkTo } from '@storybook/react'; import { containerSizeStyles } from '../../stories/config'; import Layout from './layout'; import Button from '../widgets/button'; const buttonList = [0,1,2,3,4,5,6,7,8,9,10].map(() => { return (<Button> 😀 😎 👍 💯 ...
Default function for generating a warning message for a single unknown - sequence sequence.
import React from 'react' class Assignments extends React.Component { render() { return ( <div> <h3>Assignments</h3> {this.props.children || <p>Choose an assignment from the sidebar.</p>} </div> ) } } export default Assignments
A component that can
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvSubtitles = (props) => ( <SvgIcon {...props}> <path d="M20 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-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z"/> </SvgIcon...
A component that renders a series of icons that can be used to render a series of icons.
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App.jsx'; import './index.css'; ReactDOM.render( < App / > , document.getElementById('root'));
Imports the application.
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; }; function _objectWithoutProperties(obj, keys) { var target = {...
Creates a link that links to a route.
import React from 'react'; import PropTypes from 'prop-types'; import { Link, IndexLink } from 'react-router'; //import LoadingDots from './LoadingDots'; const Header = () => { return ( // <nav> // <IndexLink to="/" activeClassName="active">Home</IndexLink> // {" | "} // ...
A function that exports a single - language nack - sequence.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentWeekend = (props) => ( <SvgIcon {...props}> <path d="M21 10c-1.1 0-2 .9-2 2v3H5v-3c0-1.1-.9-2-2-2s-2 .9-2 2v5c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2zm-3-5H6c-1.1 0-2 .9-2 2v2.15c1.16.41 2 1.51...
A component that renders a series of icons in a series of possible states.
import React from 'react'; import createReactClass from 'create-react-class'; export default createReactClass({ displayName: 'EmptyView', render: function() { return ( <div> <h3>Please select a tweet</h3> </div> ); } });
Create a new empty class with a hidden hidden tag.
import React from 'react'; import ContentZone from '../agility/components/ContentZone' const OneColumnTemplate = (props) => { return ( <div className="one-column-template"> <ContentZone name="Main" {...props} /> </div> ); } export default OneColumnTemplate;
OneColumnTemplate is a template that can be used to render a single node in a content zone.
'use strict'; import app from 'ampersand-app'; import React from 'react'; import Router from 'ampersand-router'; import PublicPage from './pages/public.js'; import ReposPage from './pages/repos.js'; import Layout from './layout'; export default Router.extend({ renderPage(page, opts = {layout: true}) { if (opts....
Imports a single page in the browser.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Section from 'shared/components/section/section'; import Select from 'react-select'; import SchoolCard from 'shared/components/schoolCard/schoolCard'; import styles from './stateSortedSchools.css'; import stateOptions from './stateOpti...
The base class for the state - sorted - schools component.
import React, { Component } from 'react'; import t from 'tcomb-form-native'; const Form = t.form.Form; const Email = t.refinement(t.String, function (email) { var re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$...
Component that is used to render a login form.
import React from 'react'; import Title from 'react-title-component'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import datePickerReadmeText from './README'; import DatePickerExampleSimple from...
Package that exports a single date picker.
import React from 'react' import invariant from 'invariant' import warning from 'warning' import { createRouteFromReactElement } from './RouteUtils' import { component, components, falsy } from './PropTypes' const { bool, func } = React.PropTypes /** * An <IndexRoute> is used to specify its parent's <Route indexRout...
Create a new indexRoute object that can be used to specify its parent s indexRoute.
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { Link } from 'react-router'; import styles from './Nav.css'; export default class extends Component { constructor(props) { super(props); this.onScroll = this.onScroll.bind(this); this.state = { fixed: false, ...
The base class for all components that are not part of a component hierarchy.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwarePhonelink = (props) => ( <SvgIcon {...props}> <path d="M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z"/> ...
Hardware Phonelinks are used to display a link to a hardware icon.
import React from 'react'; import { Trans } from '@lingui/macro'; import DocumentTitle from 'interface/DocumentTitle'; import TwitterIcon from 'interface/icons/Twitter'; import NewsList from './List'; const News = () => ( <> <DocumentTitle /> {/* prettiest is if the Home page has no title at all */} <div ...
export default functions
import React from 'react'; import { connect } from 'react-redux'; import { PropTypes } from 'prop-types'; import { ButtonGroup, Button } from 'react-bootstrap'; import { profileActions } from '../../../core/profile'; import { browserHistory } from 'react-router'; import './profile.css'; // this is just to fast style t...
The default component that creates a single unknown key in a modal window.
import React from 'react' import './example.less' import Helmet from 'react-helmet' import { config } from 'config' export default class Less extends React.Component { render () { return ( <div> <Helmet title={`${config.siteTitle} | Hi lessy friends`} /> <h1 cla...
Component that exports a single hierarchical exception.
/** * This component shows the loading screen. It does so by removing any classes it * has, which will revert it back to it's default state, which is visible. **/ import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; export default createReactClass({ di...
This component shows the loading screen when it s mounted. It also removes any classes applied to the loading screen.
import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import ownerDocument from 'dom-helpers/ownerDocument'; import exactProp from '../utils/exactProp'; function getContainer(container, defaultContainer) { container = typeof container === 'function' ? container() : containe...
The base class for the base class for all children.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalPlay = (props) => ( <SvgIcon {...props}> <path d="M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2zm-4....
A component that exports a sequence of icons that can be played on the screen.
import React from 'react'; import './loading.less'; const Loading = ({isloading}) => ( <div className="bouncing-loader" style={{display: isloading ? 'flex' : 'none'}}> <div>🐤</div> <div>🐤</div> <div>🐤</div> </div> ); export default Loading;
The default loading function for missing - node - modules.
import React from 'react'; export default class App extends React.Component{ constructor(props) { super(props); this.render = this.render.bind(this); this.state = { items: this.props.items, disabled: true }; } componentDidMount() { this.setState({ disabled: false }) ...
The base class for a series of items that can be added to a menu.
import React, { Component } from 'react'; import { OverlayTrigger } from 'react-bootstrap/lib'; import { updateRegEx } from '../../services/regex.service'; import { helpEdit } from '../../utils/help_tips'; export class CategorizedValue extends Component { constructor(props) { super(props); this...
Component that can be used to show a categoricized value in a tab.
import React from 'react' import { observer, inject } from 'mobx-react' import StatisticsModal from './statistics-modal' @inject('userStore') @observer export default class StatisticsLink extends React.Component { constructor(props) { super(props) this.state = { show: false } } open = e => {...
Link to a Jak jsem link.
import React, { Component } from 'react'; import { View, Text, TouchableOpacity, TextInput } from 'react-native'; import io from 'socket.io-client'; export default class App extends Component { constructor(props) { super(props); this.socket = io('http://192.168.1.104:3000', { jsonp: false }); this.state = { ...
The base class for all components that can be rendered on a socket. io - client.
import React, { Component } from 'react'; class Login extends Component { render() { return ( <div> <form id="formLogin" class="form"> <label>Username</label> <input onChange={(e) => { this.props.dataFunc(e) }} name="username" type="text" ...
A login component that displays a login form with a username and a password.
import React from 'react'; import {reduxForm} from 'redux-form'; import {connect} from 'react-redux'; import * as auth from '../redux'; import Signup from './Signup'; @reduxForm({form: 'signup', fields: ['name.first', 'name.last', 'email', 'password']}) @connect(state => state.auth, auth) export default class SignupCo...
The signup container class.
import React, { Component } from 'react'; //pullling Component from React const Componenet = React.component class SearchBar extends Component { constructor(props) { super(props); this.state = { term: ''}; } render() { return ( <div className="search-bar" > <input placeholder=...
A component that can be used to show a search bar when a term is selected.
/* eslint max-len: ["error", 1000]*/ import React, { Component } from 'react'; export default class Contact extends Component { render() { return ( <li className="contact"> <div className="image-cropper"> <img src={this.props.avatar} alt="avatar" /> </div> <div className="...
The contact component which is rendered by a component that has a contact icon.
/** * * ToolTypeSelectedPartial * */ import React from 'react'; import styled from 'styled-components'; import {Link} from 'react-router'; import { injectIntl } from 'react-intl'; import TranslatableStaticText from 'containers/TranslatableStaticText'; import staticText from '../ToolTypeArea/staticText'; import Isvg ...
ToolTypeSelectedPartial ToolType for selecting a partial of a sequence of flags.
import React from 'react' import ReactDOMServer from 'react-dom/server'; import {match, RouterContext} from 'react-router' import routes from './raw-routes' import createElement from './createElement' export default function ssr(url, callback) { match({ routes: routes, location: url }, function (error, redirectL...
Servicio nazwa un url avec nazwa router
import React from 'react' import moment from 'moment-timezone' import { DateRangePicker } from 'react-dates' // Modified copy of 'react-dates/lib/css/_datepicker.css' import '../../../css/datepicker.css' class DateRangePickerInput extends React.Component { constructor () { super() this.state = { focusedInput:...
A date range picker input that allows to select a date range from a date range.