code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React from 'react' import { connect } from 'dva' import QueueAnim from 'rc-queue-anim' import TopBanner from '../components/TopBanner' import BottomBar from '../components/BottomBar' import './RulePage.scss' const Honor = () => { console.log('function') return ( <QueueAnim className="rule-box" type={['r...
This function is used to create a single - node constructor for a given key.
import React from 'react' import PropTypes from 'prop-types' import { Global, css, jsx } from '@emotion/react' const colors = { char: '#D8DEE9', comment: '#999999', keyword: '#c5a5c5', lineHighlight: '#14161a', primitive: '#5a9bcf', string: '#8dc891', variable: '#d7deea', boolean: '#ff8b50', punctuat...
A component that renders a single non - terminal token.
import React from 'react'; import Default from 'components/ui/default'; /** * @class Quote * @extends Default */ class Quote extends Default { /** * React method. * Return a single React element. * This element can be either a representation of a native DOM component, * such as <div />, or another compos...
A component that can be rendered in a composite component
import React from 'react'; // eslint-disable-next-line import ActiveCallPad from 'ringcentral-widgets/components/ActiveCallPad'; import callCtrlLayouts from 'ringcentral-widgets/enums/callCtrlLayouts'; const props = {}; props.onMute = () => null; props.onUnmute = () => null; props.onHold = () => null; props.onUnhold =...
A component that exports a single key - value pair of properties.
/** * React Static Boilerplate * https://github.com/koistya/react-static-boilerplate * Copyright (c) Konstantin Tarkus (@koistya) | MIT license */ import React, { Component } from 'react'; export default class extends Component { render() { return ( <div> <h1>Test Article 1</h1> <p>Co...
The base class for a missing component that is not a component of a component type.
/** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import PropTypes from 'prop-types'; import React from 'react'; import classnames from 'classnames'; import { settings } from 'carbon-componen...
The FluidForm component that renders a single node in the form
import React from 'react' import { Divider, Form, Label } from 'semantic-ui-react' const LabelExamplePointing = () => ( <Form> <Form.Field> <input type='text' placeholder='First name' /> <Label basic color='red' pointing>Please enter a value</Label> </Form.Field> <Divider /> <Form.Field>...
This module imports all the necessary labels from the UI.
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 new Tab with a matching eventKey and a navigation item.
import React from 'react'; import PropTypes from 'prop-types'; import styles from '../../../static/css/repository.module.css'; /** * Repository class **/ export class Repository extends React.Component { // eslint-disable-line no-unused-vars /** * contructor - The constructor * * @param {object} props - T...
The base class for the missing - components.
// @flow import React from 'react'; import Radium from 'radium'; import type { FunctionComponent } from 'radium' type Props1 = { a: number, b: string }; const C1: FunctionComponent<Props1, void> = (props: Props1) => <div>{props.a} {props.b}</div> type Props2 = { a: number, b: string, }; class C2 ext...
A component that is not part of a component that is not part of a component s state.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Col, ControlLabel, FormControl, FormGroup, } from 'react-bootstrap'; const styles = { label: { marginTop: '7px', textAlign: 'right', }, }; const types = { EMAIL: 'email', PHONE: 'phone', NUMBER: 'number', ...
A component that can be used to render a hidden input with a series of data attributes.
/* © 2017 NauStud.io * @author Eric */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; class Toaster extends Component { static propTypes = { open: PropTypes.bool, text: PropTypes.string, time: PropTypes.number, type: PropTypes.oneOf(['success', 'error']), onClose: PropTypes....
Toaster component for a specific component
import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; const messages = defineMessages({ placeholder: { id: 'search.placeholder', defaultMessage: 'Search' }, }); class Search extends React.PureComponent { static propTypes = { ...
The base class for a single node that can be used to search for a specific node.
import React, { Component } from 'react'; import { object } from 'prop-types'; import GoogleAnalytics from 'react-ga'; const googleAnaliticsId = process.env?.GOOGLE_ANALITICS_ID; if (googleAnaliticsId) { GoogleAnalytics.initialize(googleAnaliticsId); } export default function withTracker(WrappedComponent, options ...
A component that tracks the page view of the page and updates the page view if the page is changed.
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import MenuIcon from 'grommet/components/icons/base/Menu'; import Anchor from 'grommet/components/Anchor'; import Menu from 'grommet/components/Menu'; import Box from 'grommet/components/Box'; const MainMenu = (props)...
Create a menu that displays a menu item in the table store.
import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import { capitalize } from '../utils/helpers'; import withStyles from '../styles/withStyle...
Create a link with a given component.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageColorize = (props) => ( <SvgIcon {...props}> <path d="M20.71 5.63l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3...
A component that can be used to colorize a colorized component.
import React from 'react'; import TextInput from '../common/TextInput'; const LoginForm = ({user, onSave, onChange, saving}) => { return ( <form> <h1>Login</h1> <TextInput name="email" label="Email" onChange={onChange} value={user.email} /> <TextInput ...
The login form
import PropTypes from 'prop-types'; import React from 'react'; import Modal from 'Components/Modal/Modal'; import EditRootFolderModalContentConnector from './EditRootFolderModalContentConnector'; function EditRootFolderModal({ isOpen, onModalClose, ...otherProps }) { return ( <Modal isOpen={isOpen} o...
Imports and exports a modal - based edit root folder modal.
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import App from '../components/...
The main function of the middleware that creates a component if it doesn t already exist.
import React from 'react'; export class ToolHeader extends React.Component { static propTypes = { header: React.PropTypes.string }; render() { return <h1>Color Tool</h1>; } }
A header for a color tool.
import React from 'react'; import PropTypes, { instanceOf } from 'prop-types'; import { connect } from 'react-redux'; import { withCookies, Cookies } from 'react-cookie'; import DashboardComponent from './Dashboard.jsx'; import { switchView } from '../../actions/main-actions.js'; const mapStateToProps = state => { r...
A component that represents a single unique identifier in a dashboard.
import React from 'react'; import {Field, reduxForm} from 'redux-form'; import {RaisedButton} from "material-ui"; import {TextField} from "redux-form-material-ui"; class LoginForm extends React.Component { componentDidMount() { this.ref // the Field .getRenderedComponent() // on Field, returns ReduxFormMate...
A component that displays a login form when a user enter a password.
import React, { Component } from 'react'; import { Button } from 'react-bootstrap'; import UploadBlock from '../components/UploadBlock'; export default class Home extends Component { constructor(props){ super(props); this.state = { newNamePhoto: '', newPhoto: {}, activeName: true, }; ...
A component that opens a photo in a form that uploads a photo to a new name.
import React from 'react' class Title extends React.Component { constructor(props) { super(props) } componentDidMount() { this.props.onLoad() } render() { let { onClick } = this.props return <h2 className="text-muted" onClick={onClick} style={{cursor:'pointer'}}>Redux Counters</h2> } } Tit...
A component that displays a redux counter on the top of a menu.
import React from 'react'; import NavigationBar from './client/NavigationBar'; export default ({ children }) => { return( <div> <NavigationBar/> <div className="container">{children}</div> </div> ) };
default function to export a object
/** * 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. */ /* @flow */ import React, { Component } from 'react'; import CodeBlock from './StackFrameCodeBlock'; import { getPrettyURL } from '../ut...
Displays a stack frame with a single code block.
import React, { Component } from 'react'; import { fetchUser } from '../actions/userProfileActions'; import { hideModal } from '../actions/modals/modalActions'; import { connect } from 'react-redux'; import Modal from 'react-modal'; import LateralMenu from './LateralMenu'; import AlertsComponent from './AlertsComponent...
Component that is rendered when a user is not shown.
import React from 'react'; import PropTypes from 'prop-types'; import api from 'mastodon/api'; import { injectIntl, defineMessages } from 'react-intl'; import classNames from 'classnames'; const messages = defineMessages({ other: { id: 'report.categories.other', defaultMessage: 'Other' }, spam: { id: 'report.categ...
The base component for all categories that can be used to display a warning or warning message.
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; import IconButton from '../../../components/icon_button'; import { defineMessages, inject...
A component that renders a single missing - item list.
import React from 'react' import {Popover, OverlayTrigger} from 'react-bootstrap' import {bindActionCreators} from 'redux' import * as VoiceActions from '../VoiceActions' import {connect} from 'react-redux'; import SpeechHelp from './SpeechHelp' class SpeechButton extends React.Component { hidePopover = ()=> { ...
A component that displays a warning when a non - terminal command fails.
import React, { Component } from 'react'; // import GoogleApiComponent from 'google-maps-react'; import '../css/App.css'; import '../css/normalize.css'; import '../css/skeleton.css'; // Google Maps API key: AIzaSyCFwE9ezzuQGddycwRrZ1K3BvRzFVQGvvg const __GAPI_KEY__ = "AIzaSyCFwE9ezzuQGddycwRrZ1K3BvRzFVQGvvg"; class R...
The base class for all of the components that are not loaded by the user.
import React from 'react'; export default ({children}) => ( <aside className="col-xs-3"> {children} </aside> );
Default function to export a as a JSX hidden element.
import React from 'react'; import _ from 'lodash'; import CheckboxItem from 'components/common/CheckboxItem'; export default class CycleNumberInput extends React.Component { constructor(props) { super(props); this.state = { cycleNumber: 1, isCycling: false, }; this.sendCycleDefaultRouti...
A component that handles the input of a cycle number.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionTheaters = (props) => ( <SvgIcon {...props}> <path d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"/> </SvgI...
ActionTheaters is a function that returns a pure action the icons are
import React from 'react'; import PropTypes from 'prop-types'; import styles from './SellingPoint.less'; import Text from '../../../Text/Text'; const SellingPoint = ({ sellingPoints, showSellingPoint }) => { if (!showSellingPoint || !sellingPoints) { return null; } return ( <ul className={styles.selling...
Exports a single - language critical feature that can be selected by a user.
import React from 'react' import ReactDOM from 'react-dom' import createStore from './store/createStore' import AppContainer from './containers/AppContainer' // ======================================================== // Store Instantiation // ======================================================== const initialState...
Initialize a single node in the DOM
import React from 'react'; import ItemsTableCell from '../../components/ItemsTableCell'; import ItemsTableValue from '../../components/ItemsTableValue'; var TextColumn = React.createClass({ displayName: 'TextColumn', propTypes: { col: React.PropTypes.object, data: React.PropTypes.object, linkTo: React.PropType...
A column which is rendered as a text field in a column in a table.
import React from 'react'; import PropTypes from 'prop-types'; import VideoDurationComponent from '../VideoDurationComponent'; import './VideoTimePanelComponentStyles.scss'; const propTypes = { duration: PropTypes.number.isRequired, elapsed: PropTypes.number.isRequired }; const defaultProps = { }; const VideoT...
The base class for missing missing components.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionViewStream = (props) => ( <SvgIcon {...props}> <path d="M4 18h17v-6H4v6zM4 5v6h17V5H4z"/> </SvgIcon> ); ActionViewStream = pure(ActionViewStream); ActionViewStream.displayName = 'ActionViewStream'; Acti...
A function to create a action view stream for a node in a hierarchy.
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import Label from 'grommet/components/Label'; import Anchor from 'grommet/components/Anchor'; import DocsArticle from '../../components/DocsArticle'; import Code from '../../components/Code'; Label.displayNa...
Package containing functions for the label - based ID sequence.
/** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import PropTypes from 'prop-types'; import React from 'react'; const TabContent = props => { const { selected, children, ...other } = prop...
Private functions - tab - content and tab - content
/* eslint-disable no-underscore-dangle */ /** * Created by owenray on 19/07/2017. */ import React, { Component } from 'react'; import { Button, Icon, Input, Row } from 'react-materialize'; import { deserialize } from 'redux-jsonapi'; import store from '../helpers/stores/settingsStore'; class SearchBar extends Compo...
A component that shows a list of user types in the model.
import React from 'react'; import classnames from 'classnames'; import '../styles/Input.css'; const Input = (props) => { const classNames = classnames(['form-control', 'Input']); return ( <div className="form-group"> <input type="text" className={classNames} maxLength="39" {...props} ...
export default Input
import React, { Component } from 'react'; import { reduxForm } from 'redux-form'; import _ from 'lodash'; import { recuperarSenha } from '../actions'; import { FIELD_ESQUECI_SENHA } from './forms/fields_types'; class EsqueciSenha extends Component{ handleSubmitForm({ email }){ this.props.recuperarSenha({ email }...
A component that can be used to render a single - field
import React, { Component } from 'react'; import Header from '../../Header'; import AddNewStoreAction from './AddNewStoreAction' import './AddNewStore.css'; class Signup extends Component { constructor(props) { super(props); console.log(props); this.state = { storeName: '', description:...
The Signup component is a component that can be used to sign up a user s store.
import React from 'react'; import ReactDOM from 'react-dom'; import JqxGrid from '../../../jqwidgets-react/react_jqxgrid.js'; class App extends React.Component { render() { let employeesSource = { datatype: 'xml', datafields: [ { name: 'First...
A component that represents a list of EmployeeIDs.
import React from 'react'; import { storiesOf } from '@storybook/react'; import DropdownButton from './DropdownButton'; import Icons from '../icons'; import { wrapComponentWithContainerAndTheme, colors } from "../styles"; const SFIcon = Icons.ColoredSalesforceIcon; const buttonAction = (selectedOption) => { alert(...
Renders a single single critical critical option with a theme.
import React from 'react'; import MainPage from './mainPage'; const defaultTab = 1; export default function RouteToTab1(){ return( <MainPage defaultTab={defaultTab} /> ); }
Route to tab1
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 ...
A component that can be used to create a full - width grid layout by this property.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import './Placeholder.css'; /** * Image placeholders. */ export default class Placeholder extends Component { static propTypes = { type: PropTypes.oneOf([ 'animal', 'bacon', 'beard', 'bear', 'cat', 'food', 'city', ...
A component that renders a placeholder with a placeholder image.
import React, { Component } from 'react'; import { Link } from 'react-router'; import FontAwesome from 'react-fontawesome'; import FontIcon from 'material-ui/FontIcon'; import {red500, yellow500, blue500} from 'material-ui/styles/colors'; import {Row, Col} from 'react-materialize'; class Footer extends Component { ...
Package that implements the ninamaelouw footer.
import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import styled from 'styled-components'; import Button from '../../../components/Button'; import ButtonGroup from '../../../components/ButtonGroup'; import Close from '../../../components/icons/Close'; import Gear from ...
Component that displays a keyboard window with a single keyboard input.
import React from 'react' class AppContent extends React.Component { componentDidMount() { this.screen = this.props.screenAction } componentDidUpdate() { if (this.props.screenAction != this.screen) { this._div.scrollTop = 0 this.screen = this.props.screenAction } } render () { l...
AppContent component that renders the content of a menu item.
import React, { Component } from 'react'; import DragSubmit from './DragSubmit'; import SearchBar from './search/SearchBar'; import DisplaySearch from './display/DisplaySearch'; import styles from './App.css'; class App extends Component { render() { return ( <div style={styles}> <DragSubmit /> ...
The main function for the application.
import React from 'react' import is from 'ramda/src/is' import pipe from 'ramda/src/pipe' import addIndex from 'ramda/src/addIndex' import map from 'ramda/src/map' import keys from 'ramda/src/keys' import stripFunction from '../../utils/stripFunction' import Level from '../Level' import Punctuation from '../Punctuatio...
Component class for a series of keywords.
import React from 'react'; import ReactDOM from 'react-dom'; import { AppLocalizationProvider } from './l10n'; import App from './App'; ReactDOM.render( <AppLocalizationProvider userLocales={navigator.languages}> <App /> </AppLocalizationProvider>, document.getElementById('root') );
Imports a single node in the DOM.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareKeyboardTab = (props) => ( <SvgIcon {...props}> <path d="M11.59 7.41L15.17 11H1v2h14.17l-3.59 3.59L13 18l6-6-6-6-1.41 1.41zM20 6v12h2V6h-2z"/> </SvgIcon> ); HardwareKeyboardTab = pure(HardwareKeyboard...
Hardware keyboard tab
import React from 'react'; class Expand extends React.Component { render() { return ( <svg className='expand' x='0' y='0' viewBox='0, 0,250, 250'> <g transform="translate(1.05932,1.0593224)"> <path d="M 15.217893,234.60694 12.5,231.71388 l 0,-82.10694 C 12.5,69.166666 12.550746,67....
A component that renders a sequence of components in a tree.
/** * * RequestBodyBuilder * */ import React from 'react'; import AceEditor from 'react-ace'; import 'brace/mode/json'; import 'brace/mode/xml'; import 'brace/mode/plain_text'; import 'brace/theme/monokai'; class RequestBodyBuilder extends React.Component { // eslint-disable-line react/prefer-stateless-function ren...
A component that renders a single missing - block block of content into a request body.
import React from 'react'; import { Link } from 'react-router'; const AboutView = () => ( <div className='container text-center'> <h1>This is the about view!</h1> <hr /> <Link to='/'>Back To Home View</Link> </div> ); export default AboutView;
export AboutView = > Show the about view!
import React from 'react'; import { Link } from 'react-router' import classNames from 'classnames' import TemplateActions from '../actions/TemplateActions' class TemplateItemComponent extends React.Component { static propTypes = { template: React.PropTypes.object.isRequired }; static defaultProps = {}; ...
A component that is rendered when a template is selected.
import React, { Component } from 'react'; import { DragDropContext } from 'react-dnd'; import HTML5Backend from 'react-dnd/modules/backends/HTML5'; import BoxWithImage from './BoxWithImage'; import BoxWithHandle from './BoxWithHandle'; @DragDropContext(HTML5Backend) export default class Container extends Component { ...
The base class for the sequence of components that are not part of a component in a container.
import React from 'react'; import PropTypes from 'prop-types'; import Motion from '../../ui/util/optional_motion'; import spring from 'react-motion/lib/spring'; export default class Warning extends React.PureComponent { static propTypes = { message: PropTypes.node.isRequired, }; render () { const { mes...
A component that displays a warning if a node is missing.
import React from 'react'; import Analyzer from 'parser/core/Analyzer'; import SPELLS from 'common/SPELLS/index'; import SpellLink from 'common/SpellLink'; import { formatPercentage } from 'common/format'; import SpellUsable from 'parser/shared/modules/SpellUsable'; const RANGE_WHERE_YOU_SHOULDNT_DC = 12; // yrd clas...
The base class for all of the events that are not part of a standard way.
/* eslint max-len: 0 */ import React from 'react'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; const products = []; function addProducts(quantity) { const startId = products.length; for (let i = 0; i < quantity; i++) { const id = startId + i; products.push({ id: id, ...
The base class for the missing - key - products component.
// @flow import React from 'react'; import {DRAW_LINE} from '../actionLayer/ActionLayer'; import type {ActionLayerName} from '../actionLayer/ActionLayer'; import type {ChangeableActionLayerSettings} from '../../state/generateActionLayerSettings'; const COLOR_LIST = [ '#000', // 黒 '#fff', // 白 '#f00', // 赤 '#...
A palette that displays a single action layer with a color on a button.
import React from 'react'; import { connect } from 'react-redux'; import { bool, object, func, string, shape, any } from 'prop-types'; import { get } from 'lodash'; import { Lozenge, Truncate } from 'veritone-react-common'; import { modules } from 'veritone-redux-common'; const { engine: engineModule } = modules; im...
Component that handles a single sequence of words.
// @flow import React, { Component } from 'react'; import { Link } from 'react-router'; import styles from './Home.css'; import Card from './Home/Card'; import Header from './common/Header'; import moment from 'moment'; import { PROJECT_DATE_FORMAT } from '../model/project'; import { STATUS } from '../reducers/gatsby...
The Home component is a base class for all non - standard non
import React from 'react'; import { withStyles } from 'material-ui/styles'; import PropTypes from 'prop-types'; import Typography from 'material-ui/Typography'; import SpreadContent from '../../../../common/spreadContent'; import PolarRadio from '../../../../forms/fields/PolarRadio'; import TextForm from '../../../../f...
export default JSX plugin
import React from 'react' import { Link } from 'react-router' import { browserHistory } from 'react-router' export default React.createClass({ getInitialState: function() { return { url: '' }; }, handleURLChange: function(e) { this.setState({ url: e.target.value }); }, contextTypes: { router: Rea...
The default module that exports a single necessity of a necessity with a navbar.
import React from 'react'; import shouldPureComponentUpdate from 'react-pure-render/function'; import matchParser from './match_parser'; export default class AutoLinkText extends React.Component { shouldComponentUpdate = shouldPureComponentUpdate render() { const text = this.props.text; const target = th...
Generates unique keys for each element in the list.
import React from 'react'; import PropTypes from 'prop-types'; import { Form, Input, message, Button } from 'antd'; import { Link } from 'react-router-dom'; import './less/account.less'; const FormItem = Form.Item; class Forgot extends React.Component { static propTypes = { form: PropTypes.object.isRequired, ...
A component that handles the forgot action.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageGradient = (props) => ( <SvgIcon {...props}> <path d="M11 9h2v2h-2zm-2 2h2v2H9zm4 0h2v2h-2zm2-2h2v2h-2zM7 9h2v2H7zm12-6H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 18H7v-2h2v2z...
A component that renders a single graphic image with a gradient of 0. 5% gradient
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call &...
A component that will be displayed when a user navigates away from a screen.
import React from 'react'; import { Link } from 'react-router'; import utils from '../utils'; import LoginLink from '../components/LoginLink'; import { forgotPassword } from '../actions'; class DefaultResetPasswordForm extends React.Component { render() { return ( <ResetPasswordForm {...this.props}> ...
The default reset password form class.
import 'core-js/fn/object/assign'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/Main'; // Render the main component into the dom ReactDOM.render(<App />, document.getElementById('app'));
Renders the main component into the main DOM.
import React from 'react'; import Todo from './Todo.js'; import {Decorator as Cerebral} from 'cerebral-react'; @Cerebral({ todos: ['visibleTodos'], isAllChecked: ['isAllChecked'] }) class TodosList extends React.Component { renderTodo(todo, index) { return <Todo key={index} index={index} todo={todo}/> } ...
A component that renders a list of Todos.
import Humanize from './humanize'; import React from 'react'; import TimeAgo from 'react-timeago'; import zhStrings from 'react-timeago/lib/language-strings/zh-CN' import buildFormatter from 'react-timeago/lib/formatters/buildFormatter' import './build_panel.less'; export default class BuildPanel extends React.Compon...
A component that displays a single failure in the build panel.
import React from 'react'; import { css, StyleSheet } from 'aphrodite/no-important'; function ScreenReaderOnly ({ className, ...props }) { props.className = css(classes.srOnly, className); return <span {...props} />; }; const classes = StyleSheet.create({ srOnly: { border: 0, clip: 'rect(0,0,0,0)', height: ...
The ScreenReaderOnly class is a class that can be used to display a screen reader.
import React from 'react' const NotFoundPage = () => ( <div className="not-found"> <h1>NOT FOUND</h1> <p>You just hit a route that doesn&#39;t exist... the sadness.</p> </div> ) export default NotFoundPage
Provides a function to return a NotFoundPage if the node is not found.
import PropTypes from 'prop-types'; import React from 'react'; import Helmet from 'react-helmet'; import B from 'mcs-lite-ui/lib/B'; import P from 'mcs-lite-ui/lib/P'; import MobileHeader from 'mcs-lite-ui/lib/MobileHeader'; import { updatePathname } from 'mcs-lite-ui/lib/utils/routerHelper'; import IconArrowLeft from ...
Component that displays a list of missing missing words.
import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/App'; function main() { const app = document.createElement('div'); document.body.appendChild(app); ReactDOM.render(<App />, app); } main();
The main function that creates a div that will be rendered when a component is not found.
/* @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 IconNaturePeople(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconP...
The default navigation navigation for icons that are not available in the system.
import React from 'react'; import { storiesOf } from '@storybook/react'; import Pagination from '../src/Pagination'; const stories = storiesOf('Components/Pagination', module); stories.addParameters({ info: { text: `Add pagination links to help split up your long content into shorter, easier to understand block...
Add pagination links to the pagination buttons.
// External dependencies import { useTranslation, Trans } from 'react-i18next'; import PropTypes from 'prop-types'; import React from 'react'; // Internal dependencies import '@/config/client/i18n'; import { DAYS_TO_REPLY } from '../../utils/constants'; import SuccessMessage from '@/modules/core/client/components/Succ...
Default function for generating a confirmation message after successful submission of a new experience.
import React from 'react'; import Relay from 'react-relay'; class App extends React.Component { render() { return ( <div> <h1>Widget list</h1> <ul> {this.props.viewer.widgets.edges.map(edge => <li>{edge.node.name} (ID: {edge.node.id})</li> )} </ul> ...
Create a new App with a single node.
import React from 'react'; import packageJSON from '../../package.json'; let version = packageJSON.version; if (/docs/.test(version)) { version = version.split('-')[0]; } const PageHeader = React.createClass({ render() { return ( <footer className='bs-docs-footer' role='contentinfo'> <div c...
Private function to create a page header with a single warning.
import React, { Component } from 'react'; import Select from 'react-select'; class SelectInput extends Component { handleChange(chosenOption) { this.props.inputUpdate(chosenOption.value); } render() { let { value, options } = this.props.input; return ( <div className="f...
A component that can be used to select a single key sequence from a dropdown.
import React from 'react'; import { Router, Route, Link } from 'react-router'; import data from './data'; var Category = React.createClass({ render() { var category = data.lookupCategory(this.props.params.category); return ( <div> <h1>{category.name}</h1> {this.props.children || ( ...
The main function that creates the hierarchy of components that can be rendered by a specific route.
"use strict" import React from 'react' import classnames from 'classnames' import Checkbox from './Checkbox' import { toArray } from './utils/strings' import { toTextValue } from './utils/objects' class CheckboxGroup extends React.Component { static displayName = "CheckboxGroup" static propTypes = { classNam...
A component that is rendered as a checkbox group.
import React from 'react' import { Button, Form, Segment } from 'shengnian-ui-react' const FormExampleInverted = () => ( <Segment inverted> <Form inverted> <Form.Group widths='equal'> <Form.Input label='First name' placeholder='First name' /> <Form.Input label='Last name' placeholder='Last ...
Imports a component with a series of components that are not part of a sequence of components.
import React from 'react'; import Nav from '../Nav/Nav'; class App extends React.Component { constructor(props) { super(props); this.state = {}; } render() { return ( <div> <Nav /> {this.props.children} </div> ); } } App.propTypes = { children: React.PropTypes.ele...
The base component for a node that has no children.
import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; const Portal = (props) => { // https://github.com/facebook/react/issues/13097#issuecomment-405658104 const [isMounted, setIsMounted] = React.useState(false); const element = document.querySelector(props.selector); ...
A function that exports a node that can be mounted in a new DOM.
import React from 'react' import Nav from '../components/presentation/common/nav' import ProfileInput from '../components/presentation/profile/profile-input' export default () => ( <div> <Nav /> <ProfileInput /> </div> )
export default
import React from 'react'; const PageHeader = React.createClass({ render() { return ( <div className='bs-docs-header' id='content'> <div className='container'> <h1>{this.props.title}</h1> <p>{this.props.subTitle}</p> </div> </div> ); } }); export default Pag...
The default page header class
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; function load() { return Promise.resolve([ { id: 1,...
The base class for a series of users that can be referenced by a key in a tree.
import React from 'react'; import requireAuth from 'utils/require-auth'; import DialogActionCreators from 'actions/DialogActionCreators'; import JoinGroupActions from 'actions/JoinGroupActions'; import JoinGroupStore from 'stores/JoinGroupStore'; // eslint-disable-line class JoinGroup extends React.Component { st...
A component that is a component that joins a group with a token.
import React from 'react' import { Form, Input, TextArea, Button } from 'shengnian-ui-react' const FormExampleFieldControlId = () => ( <Form> <Form.Group widths='equal'> <Form.Field id='form-input-control-first-name' control={Input} label='First name' placeholder='First name' /> <Form.Field id='form-...
Imports a component with a control that can be used to edit a hidden field.
import classNames from 'classnames'; import React from 'react'; import elementType from 'react-prop-types/lib/elementType'; import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils'; const propTypes = { componentClass: elementType, }; const defaultProps = { componentClass: 'div', }; class Row ...
A component that wraps a component in a row that can be rendered by a bootstrap component.