code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceBatteryCharging60 = (props) => ( <SvgIcon {...props}> <path fillOpacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V11h3.87L13 7v4h4V5.33C17 4.6 16.4 4 15.67 4z"/><path d="M13 12.5h2L11 20v-5.5H9l1...
Devuelte un component Dihv2
import React, { Component } from 'react'; import { styles } from '../styles/styles'; export default class RightSideBar extends Component { render() { return ( <div id="rightSidebar" style={styles.rightSidebar}> <p style={styles.rightSidebarText}>At a glance:</p> <div className="iframeConta...
RightSideBar extends a component that is rendered on the right side of a page.
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import { FormattedMessage, FormattedRelative, FormattedDate, FormattedTime } from 'react-intl'; import BTooltip from '../components/BTooltip'; const PowerUpTransaction = ({ timestamp, amount, to, from }) => ( <div...
Private function for importing a single n - hot - network transaction.
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.
/* The Conflict of Interest (COI) module of Kuali Research Copyright © 2005-2016 Kuali, Inc. This program 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 Lic...
A component that is rendered in a background with a progress indicator.
import React, { Component } from 'react'; import TimeAgo from 'timeago-react'; import * as feather from 'react-feather'; import '../../ui/comment/comment.css'; import '../../ui/form/form.css'; export default class ComicComment extends Component { static defaultProps = { comment: require('../../api.mock/comic.co...
Component - ComicComment class
// Licensed under the Apache License, Version 2.0 (the 'License'); you may not // use this file except in compliance with the License. You may obtain a copy of // the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed un...
Displays a Bootstrap polling window when a node is missing or a value is missing.
// @flow import React from 'react' import cx from 'classnames' import { MDCSnackbarFoundation } from '@material/snackbar/dist/mdc.snackbar' import * as helper from '../helper' import type { PropsC } from '../types' class Snackbar extends React.Component { props: { align?: 'start', } & PropsC static defaultP...
The base implementation of a Snackbar component.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { Menu } from 'semantic-ui-react'; class TopMenu extends Component { state = {} handleItemClick = (e, { name }) => this.setState({ activeItem: name }) render() { // const isLogged...
The top menu component
/** * Copyright 2017 Goldman Sachs. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
Creates a new message with the given name if it does not already exist.
import React from 'react'; import translate from '../../../translate/translate'; import Config from '../../../config'; const ExchangesTOSModalRender = function() { return ( <div onKeyDown={ (event) => this.handleKeydown(event) }> <div className={ `modal modal-3d-sign exchanges-tos-modal ${this.stat...
Exports a modal with a single keyboard window.
import React from 'react'; import { FormattedMessage, useIntl, } from 'react-intl'; import { Field } from 'react-final-form'; import { FieldArray } from 'react-final-form-arrays'; import { Select, RepeatableField, } from '@folio/stripes/components'; import { departmentsShape } from '../../../../shapes'; impo...
The base component for adding or editing a single department.
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './index.css'; ReactDOM.render( <App />, document.getElementById('root') );
Imports a single node in the DOM.
import React from 'react'; class Announcement extends React.Component { render () { var { courseId, announcementId } = this.props.params; var { title, body } = COURSES[courseId].announcements[announcementId]; return ( <div> <h4>{title}</h4> <p>{body}</p> </div> ); } } ...
A component that renders an announcement if it exists.
import React from 'react' import { Text, View } from 'react-native' import PropTypes from 'prop-types' const styles = { textDescription: { fontSize: 12.5, fontWeight: '600', lineHeight: 24, textAlign: 'justify', }, } export const TextDescriptionCard = ( { containerStyle, textStyle = {}, titl...
Text description card
import PropTypes from 'prop-types'; import React from 'react'; import { injectIntl, FormattedMessage, FormattedHTMLMessage } from 'react-intl'; import { connect } from 'react-redux'; import { push } from 'react-router-redux'; import { schemeCategory10 } from 'd3'; import { Grid, Row, Col } from 'react-flexbox-grid/lib'...
Define a component that displays a single non -
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 ...
Creates a form group with no children.
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; }; import React from 'react'; import Link from './Link'; /** *...
Creates a link that links to an index route.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageLandscape = (props) => ( <SvgIcon {...props}> <path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"/> </SvgIcon> ); ImageLandscape = pure(ImageLandscape); ImageLandscape.displayName...
A component that exports a single image in a group of icons.
import React from 'react'; import TextField from 'material-ui/TextField'; import RaisedButton from 'material-ui/RaisedButton'; import FlatButtonSm from 'components/Button/FlatButtonSm'; import { login } from 'actions/AuthActions'; import LoginFormUI from 'components/Auth/LoginFormUI'; import validateInput from 'compone...
The login form component which is a component that can be used to login a user.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { DropTarget } from 'react-dnd'; import styled from 'styled-components'; import { openPopup } from '../actions/popup'; const SectionTarget = { drop(p...
The base class for a single section.
import React from 'react'; /** material ui */ import {LeftNav,List,ListItem,AppBar,Avatar} from 'material-ui'; import Colors from 'material-ui/lib/styles/colors'; import {SelectableContainerEnhance} from 'material-ui/lib/hoc/selectable-enhance'; const SelectableList = SelectableContainerEnhance(List); /** react-route...
A component that is rendered when a user clicks on a menu item.
/* eslint-disable jsx-a11y/no-autofocus, react/prop-types */ import React from 'react' export default ({ canCreate, hasResults, inputPlaceholder, onChange, onKeyDown, onNewOptionClick, value, }) => <div className="Select__input"> <input autoFocus onChange={onChange} onKeyDown={on...
Generate a single node with optional keydown and action.
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { compose } from 'react-apollo'; import history from 'lib/history'; import formWrapper from 'lib/formWrapper'; import { validateString, validatePasswords, } from 'lib/validateComponentForms...
A component that wraps a password change form and a password reset form.
import React from 'react'; import { render } from 'react-dom'; import { Router, browserHistory } from 'react-router'; // Import your routes so that you can pass them to the <Router /> component import routes from './routes.js'; render( <Router routes={routes} history={browserHistory} />, document.getElementById('...
Imports a component and renders it in the browser history.
/* Copyright 2019 Peppy Player peppy.player@gmail.com This file is part of Peppy Player. Peppy Player is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any la...
Component that renders a single - node block of a stream server.
import PropTypes from 'prop-types' import React from 'react' import styles from './overflowDetector.module.css' export default class OverflowDetector extends React.Component { ref = React.createRef() render() { const {className, children} = this.props const element = this.ref.current c...
A component that overflows the component
import React from 'react' import ReactDOM from 'react-dom' import App from './App' ReactDOM.render(<App />, document.getElementById('root'))
Import ReactDOM from react - dom
import {Entity} from 'aframe-react'; import React from 'react'; export default class Seat extends React.Component { constructor(props) { super(props); this.state = { opacity: 1, }; } render() { return ( <Entity position={this.props.seatPos} > <Entity visible={ true } ...
Component that renders a Seat.
import React from 'react'; import { string } from 'prop-types'; function PauseIcon({ fill, ...props }) { return ( <svg height="24" width="24" fill={fill} viewBox="0 0 24 24" {...props}> <path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z" /> <path d="M0 0h24v24H0z" fill="none" /> </svg> ); } PauseIcon.pro...
A component that displays a pause icon when a node is missing a color.
import React from 'react'; /* eslint-disable */ const People = (props) => ( <svg {...props} width="148" height="148" viewBox="0 0 148 148"> <path d="M147.616125 141.522687C145.842438 133.650937 132.4415 84.771625 73.9514375 84.771625 10.6536875 84.771625.1641875 142.001375.06475 142.581812-.161875 143.925375.208...
A function that exports a sequence of React elements.
import React from 'react'; function asyncComponent(getComponent) { return class AsyncComponent extends React.Component { static Component = null; state = { Component: AsyncComponent.Component }; componentWillMount() { if (!this.state.Component) { getComponent()....
A component that can be rendered asynchronously.
import React from 'react'; import PropTypes from 'prop-types'; import { shortNumberFormat } from 'mastodon/utils/numbers'; import { FormattedMessage } from 'react-intl'; export default class AutosuggestHashtag extends React.PureComponent { static propTypes = { tag: PropTypes.shape({ name: PropTypes.string...
The hashtag component which renders a series of hashtags.
import React from 'react'; import styled from 'styled-components'; import DotInfo from './components/DotInfo'; import StatisticInfo from './components/StatisticInfo'; import ScatterPlotInfo from './components/ScatterPlotInfo'; import TemplateTitleContainer from './components/TemplateTitleContainer'; const Main = style...
export default Statistic
import React from 'react'; class Widget extends React.Component { render() { return <div className="overview-widget"> <div className="overview-widget-header"> {this.props.title} </div> <div className="overview-widget-body"> {this.props.chi...
A component that can be rendered as a hidden hidden input.
import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; import Column from './column'; import ColumnHeader from './column_header'; import ColumnBackButtonSlim from '../../../components/column_back_button_slim'; import IconButton from '../../../components/...
The default bundle column error component
import React from 'react'; import {render} from 'react-dom'; import AreaChartExample from './examples/AreaChartExample.react'; import AreaChartExampleCode from '!raw-loader!./examples/AreaChartExample.react'; import AreaChartStackedExample from './examples/AreaChartStackedExample.react'; import AreaChartStackedExample...
Devuelve un objeto React - > Component
import React from 'react' import Hook from 'util/hook' import {getTypeQueries} from 'util/types' import {client} from 'client/middleware/graphql' export default () => { // add routes for this extension Hook.on('JsonDomError', ({error, editMode}) => { if (!editMode && error) { const querie...
Add routes for extension
/* eslint-disable react/prop-types */ import React from 'react'; export class Products extends React.Component { render() { return ( <div className='Products'> <h1>A list of all products</h1> <div className='children'> {this.props.children} </div> </div> ); } }...
A base class that exports a single hierarchy of all the components that are part of a hierarchy.
// styles reset import 'sanitize.css/sanitize.css'; // required for redux-saga generatos import 'regenerator-runtime/runtime'; import React from 'react'; import { render } from 'react-dom'; import { AppContainer } from 'react-hot-loader'; // root component required for react-hot-loader import Root from './containers...
Imports a single non - hot - loader root component
import React from 'react'; import StoryAvatar from './../Story/StoryAvatar'; import moment from 'moment'; import './UserAssignment.scss'; const UserAssignment = (props) => ( <div className='assignment'> <div className='assignment__header'> <div className='user-meta__type user-meta__type--large ...
Generate a single UserAssignment.
import React from 'react'; import { faBuilding, faCircle, faArrowUp } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { i18n } from '../../../services/LocalizationService'; // import AbstractIcon from './AbstractIcon'; /** * Icon for the "main" identi...
Icon for the main identity contract - layers are used.
import React, { Component } from 'react'; import hoistStatics from 'hoist-non-react-statics'; /* Note: When this decorator is used, it MUST be the first (outermost) decorator. Otherwise, we cannot find and call the fetchData and fetchDataDeffered methods. */ export default function connectData(fetchData, fe...
A decorator that wraps a component with a connectData method.
import React from 'react'; import Title from 'react-title-component'; import MarkdownElement from '../../MarkdownElement'; import installationText from './installation.md'; const Installation = () => ( <div> <Title render={(previousTitle) => `Installation - ${previousTitle}`} /> <MarkdownElement text={insta...
The default installation function
import Component from 'react-pure-render/component'; import React from 'react'; import { CenteredView, Text } from '../app/components'; import { FormattedMessage, defineMessages } from 'react-intl'; const messages = defineMessages({ intro: { defaultMessage: ` Este App Press CMD+R to reload Pres...
The home page is a component that can be rendered by a user.
import React from 'react'; import { Checkbox, Checkbox2 } from '../../src'; import CheckboxDemo from './checkbox' import { storiesOf, action, linkTo } from '@kadira/storybook'; const options = { inline: true } storiesOf('复选框', module) .addWithInfo( '复选框1', () => ( <CheckboxDemo /> ), options);
Add a hidden element to the hidden list.
import React from 'react' import ReactDOM from 'react-dom' import 'mini.css' import App from './core/app' ReactDOM.render(<App />, document.getElementById('root')) module.hot.accept()
Imports a single element in the hot - list.
import React, { Component } from 'react'; import styled from 'styled-components'; import { Field, reduxForm } from 'redux-form'; import { LoadingSubmitButton, ErrorDiv } from '../components/reuseable_components'; export const InputFieldLarge = styled(Field)` font-weight: 300; margin: auto; width: 80%; line-hei...
A component that displays a signup form with a hidden hidden input field.
/** * 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 Layout from '../../co...
Provides a function to export a single missing - missing component into a system.
import React from 'react' import Section from '../section' import Grid, { Column } from '../../grid' import WulkanoAndFriends from './wulkano-and-friends' import Links from './links' import Form from './form' export default () => ( <Section> <Grid> <Column> <WulkanoAndFriends /> </Column> ...
Imports a single node from the hierarchy.
import './index.css'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render(<App />, document.getElementById('root'));
Imports the index. css and react - dom.
import React from 'react'; import Field from '../Field'; import { Checkbox, FormField, FormNote } from 'elemental'; module.exports = Field.create({ displayName: 'BooleanField', propTypes: { indent: React.PropTypes.bool, label: React.PropTypes.string, note: React.PropTypes.string, onChange: React.PropTypes....
The default implementation of a NestedField is to create a Checkbox and a FormField and a FormNote.
import 'babel-polyfill'; import Example from './container'; import React from 'react'; import ReactDOM from 'react-dom'; ReactDOM.render( <Example />, document.getElementById('target') );
Imports a single node in the DOM.
/** * Function to get the shallow output for a given component * As we are using phantom.js, we also need to include the fn.proto.bind shim! * * @see http://simonsmith.io/unit-testing-react-components-without-a-dom/ * @author somonsmith */ import React from 'react'; import TestUtils from 'react-addons-test-utils'...
Get the shallow rendered component
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentAddCircleOutline = (props) => ( <SvgIcon {...props}> <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.5...
A component that renders a single missing circle inside a group of icons.
// (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 single missing - node icon in the DOM.
import React from 'react'; import Select from 'react-select'; var RemoteSelectField = React.createClass({ displayName: 'RemoteSelectField', propTypes: { hint: React.PropTypes.string, label: React.PropTypes.string, }, loadOptions (input, callback) { input = input.toLowerCase(); var rtn = { options: [ ...
A remote select field that can be used to select a remote component.
import React from 'react' import Types from './Types' import Variations from './Variations' const ContainerExamples = () => ( <div> <Types /> <Variations /> </div> ) export default ContainerExamples
export a default function to export a
import React from 'react' import propTypes from 'prop-types' const Screen = ({ store }) => (<div style={{ position: 'fixed', bottom: 0, left: 0, }} > {JSON.stringify(store, null, 2)} </div>) Screen.propTypes = { store: propTypes.shape({}), } Screen.defaultProps = { store: {}, } export de...
The screen component for a .
import React from 'react'; import { PureRenderMixin } from 'react/addons'; import DialogActionCreators from 'actions/DialogActionCreators'; import AvatarItem from 'components/common/AvatarItem.react'; const ContactsSectionItem = React.createClass({ propTypes: { contact: React.PropTypes.object }, mixins: [...
The ContactsSectionItem component is a component that renders a single missing - block block of content.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionDeleteForever = (props) => ( <SvgIcon {...props}> <path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1....
A function to create a action that deletes a node from a series of icons.
import React from 'react' import cx from 'classnames' import Button from '../Button' import type { PropsC } from '../types' class Action extends React.Component { props: PropsC static defaultProps = { component: Button, } static displayName = 'Card.Action' render() { const { component: Component, cl...
A component that is rendered when a button is clicked on a group of buttons.
import React from 'react'; export const CloudPrim = ({ color = 'white' }) => <g id="cloudPrim"> <path id="cloud1" fill={color} stroke="black" strokeWidth="10000" d="M472900 238469c6689,-709 13440,-1255 20252,-1255 71587,0 129619,59016 129619,131816 0,71009 -55312,129256 -125159,131775l-366116 39 -831 0c-64306,0 -11...
Export a Cloud Prim to a Cloud Prim file.
import React from 'react'; import PropTypes from 'prop-types'; import { CardContainer, Header, BodyContainer, } from 'style/animeCard'; const AnimeCard = props => ( <CardContainer> <Header> {props.title} </Header> <BodyContainer> {props.children} </BodyContainer> </CardContainer> ); AnimeCard.defau...
export default props and props of a
import React, { Component } from 'react'; import ReactHighcharts from 'react-highcharts/ReactHighstock.src'; import PropTypes from 'prop-types'; export default class PriceChart extends Component { componentWillReceiveProps = (nextProps) => { const chart = this.wschart.getChart(); if (this.dataChanged(nextP...
The base class for the series chart.
// @flow strict import React from 'react'; import { getContactHref, getIcon } from '../../../utils'; import Icon from '../../Icon'; import styles from './Contacts.module.scss'; type Props = { contacts: { [string]: string, }, }; const Contacts = ({ contacts }: Props) => ( <div className={styles['contacts']}>...
Exports a single type with all of its contacts.
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import './assets/style.css'; import { test, version } from 'test-integrity'; export default () => { const ...
The default function for missing feature - linked - modules.
import React, { Component } from 'react'; export default class GithubStarButton extends Component { componentDidMount() { const githubScript = document.createElement('script'); githubScript.src = '//buttons.github.io/buttons.js'; githubScript.id = 'github-bjs'; this.githubButton.parentNode.appendChi...
The default component for the github - star button.
import React from 'react'; import Container from './Container'; export default class CustomizeDropEffects { render() { return ( <div> <p> <b><a href='https://github.com/gaearon/react-dnd/tree/master/examples/05%20Customize/Drop%20Effects'>Browse the Source</a></b> </p> <p>...
The default logic for the dropdown drop effects.
import React from 'react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faFrown } from '@fortawesome/pro-regular-svg-icons/faFrown' export default class FARFrown extends React.Component { render () { return (<FontAwesomeIcon {...this.props} icon={faFrown} />) } }
FARFrown is a component that renders a FontAwesome icon with a faFrown icon.
import size from 'lodash/size'; import map from 'lodash/map'; import React from 'react'; import PropTypes from 'prop-types'; import Form from 'react-bootstrap/lib/Form'; import FormGroup from 'react-bootstrap/lib/FormGroup'; import Col from 'react-bootstrap/lib/Col'; import Row from 'react-bootstrap/lib/Row'; import Fo...
A component that renders a page with a link to a page in the RSS feed.
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path fillOpacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z" /> , 'SignalWifi0BarOutlined');
Create a series of icons for a specific node in a signal window.
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import FlexContainer from '../flex-container'; import './style.scss'; export default function SubContainer(props) { const { children, className, noMargin, fullWidth, ...rest } = props; return ( <FlexContainer ...
Create a new sub - container with the given props.
import React from 'react'; import Modal from 'react-modal'; //import pureRender from 'pure-render-decorator'; import { Styles, FlatButton } from 'material-ui'; import AppCacheStore from 'stores/AppCacheStore'; import AppCacheActionCreators from 'actions/AppCacheActionCreators'; import { KeyCodes } from 'constants/Act...
The base component for adding a new contact to the app.
import React from 'react'; import PropTypes from 'prop-types'; // Single work detail view class WorkDetail extends React.Component { render() { const work = this.props.work; return ( <div> <section className="page-head image-bg bg-dark"> <div className="background-image-holder less-blur blur"> ...
A component that renders a single single node of a
// // Component page save // import React from 'react'; import { PageHeader } from 'react-bootstrap'; import RestoreCreationForm from 'containers/RestoreCreation/Form'; /* eslint-disable react/prefer-stateless-function */ export default class RestoreCreation extends React.Component { componentWillUnmount() { th...
The base component for the restore - creation page.
/* * Copyright (C) 2015 Actor LLC. <https://actor.im> */ import _ from 'lodash'; import React from 'react'; import DialogActionCreators from 'actions/DialogActionCreators'; import CreateGroupActionCreators from 'actions/CreateGroupActionCreators'; import DialogStore from 'stores/DialogStore'; import CreateGroupSt...
Recent section component
import React from 'react' import { Segment } from 'stardust' const SegmentCompactGroupExample = () => ( <Segment.Group compact> <Segment> Pellentesque habitant morbi </Segment> <Segment> Pellentesque habitant morbi </Segment> </Segment.Group> ) export default SegmentCompactGroupExample...
Example of how to export a sequence of non - empty non
import React from 'react'; import { render } from 'react-dom'; import { AppContainer } from 'react-hot-loader'; import moment from 'moment'; import Root from './root'; import '../../semantic/src/semantic.less'; import './global.scss'; if(process.env.NODE_ENV === 'development') __webpack_public_path__ = `http://${...
Imports a single node in the DOM and renders it as a hidden element.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalTaxi = (props) => ( <SvgIcon {...props}> <path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5H15V3H9v2H6.5c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.4...
A component that exports a sequence of MapsLocalTaxi objects.
import React from 'react' import styles from './styles.scss' const UserCard = ({ info }) => ( <div className={styles.UserCard}> <h4>User Card</h4> <ul> <li>Name: {info.name}</li> <li>Phone: {info.phone}</li> <li>Email: {info.email}</li> <li>Website: {info.website}</li> </ul> </...
export a function to export a object
import React from 'react'; import ReactDOM from 'react-dom'; import Relay from 'react-relay'; import Reindex from './Reindex'; import App from './components/App'; Relay.injectNetworkLayer(Reindex.getRelayNetworkLayer()); ReactDOM.render( <App />, document.getElementById('root') );
Imports a single element in the DOM.
import React from 'react'; import classnames from 'classnames'; import FileViewModel from '../viewmodels/file.viewmodel'; export default class AddFilesButton extends React.Component { constructor(props) { super(props); } render() { const btnClasses = classnames('btn-floating', 'btn-large'...
A button that adds a file to a file picker.
import classNames from 'classnames'; import React from 'react'; function menuRenderer ({ focusedOption, instancePrefix, labelKey, onFocus, onSelect, optionClassName, optionComponent, optionRenderer, options, valueArray, valueKey, onOptionRef }) { let Option = optionComponent; return options.map((option,...
Menu renderer for a single node
import React from 'react'; const inviteList = props => { const listItems = props.invitations.map(invite => ( <li key={invite.id}> {'Invite from: ' + invite.createdBy} <button onClick={() => props.onAcceptInvitation(invite.id)} type="button"> ...
A component that exports a list of pending invitations.
import React from 'react' import PropTypes from 'prop-types' import FirebaseApp from '../firebaseapp' import { getCompLevelStr, getMatchSetStr } from '../helpers' import CurrentMatchDisplay from './CurrentMatchDisplay' import LastMatchesTable from './LastMatchesTable' import UpcomingMatchesTable from './UpcomingMatch...
The base event panel which is rendered when a component is mounted.
import React from 'react'; import HomepageBody from '../components/homepage-body'; import './homepage.less'; export default class Homepage { getTitle() { return "React Server"; } getElements() { return ( <div className="homepage"> <HomepageBody /> </div> ); } }
The homepage class
import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; export default class LoadMore extends React.PureComponent { static propTypes = { onClick: PropTypes.func, disabled: PropTypes.bool, visible: PropTypes.bool, } static defaultProps = { vi...
The LoadMore component exports a component that displays a button that loads more.
import React, { Component } from 'react'; import css from 'react-css-modules'; import { Player, Html5Video } from 'erlyeditor'; import { sources } from '../videoSources'; import styles from './styles'; export class PlayerDemo extends Component { render() { return ( <div styleName='root'> <Player ...
export a single component with no children
import React from 'react'; import Item from './Item'; import Wrapper from './Wrapper'; function ListItem(props) { return ( <Wrapper> <Item> {props.item} </Item> </Wrapper> ); } ListItem.propTypes = { item: React.PropTypes.any, }; export default ListItem;
ListItem exports a single item in a sequence of items that can be found in a sequence of items.
import React from 'react'; import styled from 'styled-components'; import { Link } from 'react-router'; import UserIcon from './user_icon.svg'; const MenuList = styled.ul` list-style-type: none; padding: 0; margin: 0 10px 0 0; display: none; @media (min-width: 64em) { display: block; } `; const MenuI...
A component that displays a list of menu items that can be selected or selected.
/* @flow */ import React from 'react'; import clamp from 'clamp'; import { Animated, PanResponder } from 'react-native'; import NativeBaseComponent from '../Base/NativeBaseComponent'; import { View } from './View'; const SWIPE_THRESHOLD = 120; export default class CardSwiper extends NativeBaseComponent { constru...
A component that swaps the pan and pan components.
import React from 'react' import { Route, IndexRoute, Redirect } from 'react-router' import CoreLayout from 'layouts/CoreLayout/CoreLayout' import HomeView from 'views/HomeView/HomeView' import UserIndexView from 'views/UserIndexView/UserIndexView' import NotFoundView from 'views/NotFoundView/NotFoundView' import AuthV...
Imports a bunch of components from the system.
import React, { Component } from 'react'; import utils from '../utils'; import Autosuggest from '../../../src/Autosuggest'; import SourceCodeLink from '../SourceCodeLink/SourceCodeLink'; import suburbs from 'json!../suburbs.json'; function getSuggestions(input, callback) { const escapedInput = utils.escapeRegexChara...
The basic example component is a component that can be rendered by a user.
/* @flow */ import React from 'react'; const ButtonHOC = (WrapedComponent: any) => { return class extends React.Component { props: { onTouchTap?: Function, payload?: any, } onTouchTap = (event: any) => { if (this.props.onTouchTap) { this.props.onTouchTap(event, this.props.paylo...
A component that wraps a button with a touch - tap event.
import React from 'react'; import {Popup, Modal} from 'Public' import css from './pop.scss' export default class Index extends React.Component { constructor(props) { super(props); this.state = { sta: false, sta1: false, open: false, time: new Date() ...
Component that shows a single critical sequence sequence
import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import SpellLink from 'common/SpellLink'; import { formatPercentage } from 'common/format'; import Analyzer from 'Parser/Core/Analyzer'; import HealingDone from 'Parser/Core/Modules/HealingDone'; import StatisticBox...
The TouchOfKarma class
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import FormControl from 'react-bootstrap/lib/FormControl'; import Modal from 'react-bootstrap/lib/Modal'; import ModalBody from 'react-bootstrap/lib/ModalBody'; import ModalHeader from 'react-bootstrap/lib/ModalHeader'; import ModalFooter fro...
A component that shows a modal with a modal window that shows a list of decisions for a specific day.
import React from 'react' import { Images, ComponentTable } from './styles' export class ExplainScreen extends React.Component { constructor (props) { super(props) this.state = { selectedIndex: 0, intervalDuration: 2500 } } componentDidMount () { this.startAnimation() } compo...
A component that displays a modal modal screen.
import React from 'react'; import TopLayoutBlog from 'docs/src/modules/components/TopLayoutBlog'; import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown'; const pageFilename = 'blog/2020-q2-update'; const requireRaw = require.context('!raw-loader!./', false, /2020-q2-update\.md$/); export default funct...
The top - layout - blog component.