code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React from 'react'; import {storiesOf} from '@storybook/react'; import {withKnobs, text} from '@storybook/addon-knobs'; import {StoryWrapper} from './../_lib/storyUtils'; import Tooltip from '.'; storiesOf('Tooltip', module) .addDecorator(withKnobs) .addWithInfo( 'default', () => ( ...
Add a decorator to the sequence of modules that can be used to generate a sequence of Knobs.
import React from 'react'; export default class Hero extends React.Component { render() { return ( <div> <h1>Welcome to Webpack</h1> <h2>This be a sweet component subhead</h2> </div> ); } }
The Hero class.
import React, { Component } from 'react'; import Board from './Board'; import { observe } from './Game'; /** * Unlike the tutorial, export a component so it can be used on the website. */ export default class ChessboardTutorialApp extends Component { constructor(props) { super(props); this.unobserve = obse...
The ChessboardTutorialApp class
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { StyleSheet, Text, View, Platform } from 'react-native'; import styles from '../../components/Styles/shared'; import { Button, // Card, SocialIcon, List, ListItem, ListV...
Component that is not part of the app
import React from 'react'; import Drawer from 'material-ui/Drawer'; import MenuItem from 'material-ui/MenuItem'; import RaisedButton from 'material-ui/RaisedButton'; export default class DrawerUndockedExample extends React.Component { constructor(props) { super(props); this.state = {open: false}; } han...
The base class for drawing a menu item when a drawer is closed.
import React, { Component } from 'react'; import Alert from '../Alert'; class Info extends Component { static defaultProps = { show: true } render() { return ( <Alert show={this.props.show} type="info" title="Heads up!" message={this.props.message} onDismiss...
A component that displays a header up if the component is not present in the DOM.
import { hooks } from 'botframework-webchat-api'; import React from 'react'; const { useLocalizer } = hooks; const AudioAttachment = () => { const localize = useLocalizer(); const label = localize('ATTACHMENT_AUDIO'); return <div>{label}</div>; }; export default AudioAttachment;
The default attachment function that exports a single attachment to a single audio attachment.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImagePhotoFilter = (props) => ( <SvgIcon {...props}> <path d="M19.02 10v9H5V5h9V3H5.02c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zM17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7l2.06.94zm-3.75....
A component that returns a filter that returns an image of a series of images.
import React from 'react' import {compose, withHandlers, withState} from 'recompose' const enhance = compose( withState('groupName', 'setGroupName', ''), withHandlers({ onGroupNameChange: props => event => { props.setGroupName(event.target.value) }, onNewGroupSubmit: props => event => { ev...
Devuelve un objeto React
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Permalink from '../../../components/permalink'; import Avatar from '../../../components/avatar'; import DisplayName from '../../../components/display_name'; import emojify from '../../../emo...
A component that displays a link to the user s account.
import React from 'react' import './requiresMetaMask.css' const RequiresMetaMask = () => ( <div className='requires-metamask-container'> <div className='message'> <span>This is a decentralized application. In order to use this site please </span> <a href='https://chrome.google.com/webstore/detail/met...
RequiresMetaMask - A function to export a RequiresMetaMask.
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import SunBurst from 'grommet/components/SunBurst'; import Box from 'grommet/components/Box'; import Legend from 'grommet/components/Legend'; import Value from 'grommet/components/Value'; import InteractiveEx...
Example of how to render a series of SunBurst components.
import React from 'react'; import PropTypes from 'prop-types'; import { find } from 'lodash'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { getComments, getCommentsList, getCommentsPendingVotes, getIsAuthenticated, getAuthenticatedUserName, } from '../reducers'; i...
The comments component which is used to display comments on a post.
import React from 'react'; import { SegmentedControl } from 'elemental'; const TOGGLE_OPTIONS = [ { label: 'Linked To', value: true }, { label: 'NOT Linked To', value: false } ]; var RelationshipFilter = React.createClass({ getInitialState () { return { inverted: TOGGLE_OPTIONS[0].value, value: '' }; ...
The filter that creates a filter that can be used to filter the nodes of a node.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionHourglassFull = (props) => ( <SvgIcon {...props}> <path d="M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6z"/> </SvgIcon> ); ActionHourglassFull = pure(ActionHour...
ActionHourglassFull is a function that exports a single action - hourglass element in a series of icons.
import React, { Component } from 'react'; import i18next from 'i18next'; import messageDispatcher from '../lib/MessageDispatcher'; class SessionClosed extends Component { constructor(props) { super(props); this.state = { config: props.config }; } login() { messageDispatcher.sendMes...
A component that is used to handle session closed events.
import React from 'react'; import { Toolbar } from 'rebass'; export default ({className, ...props}) => (<Toolbar className={className} {...props}/>);
export default function for missing react - keyboard toolbar
// @flow import React from 'react'; import PropTypes from 'prop-types'; import 'normalize.css/normalize.css'; import 'react-mdl/extra/css/material.cyan-red.min.css'; import Navbar from '../Navbar/NavbarComponent'; import Footer from '../Footer/FooterContainer'; import styles from './App.scss'; import yeoman from '../.....
The base component for a single node in the hierarchy.
import React from 'react'; export default function clearRenderer () { return ( <span className="Select-clear" dangerouslySetInnerHTML={{ __html: '&times;' }} /> ); };
The default clearRenderer function
import React, { Component } from 'react'; import styles from './home.sass'; import { Button } from 'react-bootstrap'; class Home extends Component { constructor(props) { super(props); this.onClick = this.onClick.bind(this); } onClick() { console.log('Click'); } render() { return...
Create a class that extends a React component with a default constructor.
import React, { Component } from 'react'; import Spinner from 'react-spinkit'; import { soundsApi } from '../../../config'; class Sound extends Component { constructor(props) { super(); this.state = { error: false, loading: true, }; this.handlePlay = this.handlePlay.bind(this); this...
A component that can be used to show a sound in a browser.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImagePortrait = (props) => ( <SvgIcon {...props}> <path d="M12 12.25c1.24 0 2.25-1.01 2.25-2.25S13.24 7.75 12 7.75 9.75 8.76 9.75 10s1.01 2.25 2.25 2.25zm4.5 4c0-1.5-3-2.25-4.5-2.25s-4.5.75-4.5 2.25V17h9v-.75zM...
A component that exports a sequence of images.
import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from 'material-ui/styles'; import Button from 'material-ui/Button'; import AddIcon from '@material-ui/icons/Add'; const styles = theme => ({ button: { margin: theme.spacing.unit, }, }); function ButtonSizes(props) { const {...
The button sizes of the missing buttons.
import React from 'react'; import ReactDOM from 'react-dom'; import {BrowserRouter, Route} from 'react-router-dom'; import App from './component/app'; ReactDOM.render(( <BrowserRouter> <Route exact path='*' component={App} /> </BrowserRouter>), document.getElementById('root'));
Imports a single component in the browser.
import React from 'react'; import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'; import { SiteView } from './site/components'; import { AppView } from './app/components'; const routes = ( <Router> <Switch> <Route exact path="/" component={ SiteView } /> <Route...
export default routes
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionAccountBalance = (props) => ( <SvgIcon {...props}> <path d="M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z"/> </SvgIcon> ); ActionAccountBalance = pure(ActionA...
ActionAccountBalance exports a default action account balance for a node.
'use strict' import React from 'react' import {connect} from 'react-redux' import LineChart from '../components/line-chart' import {Panel} from '../components/index' import D3 from 'd3' import Lodash from 'lodash' export const Clients = React.createClass({ render: function () { const {data} = this.props co...
The default implementation of Choice which renders a series of tables containing the timestamp related to a specific client.
/* @flow */ import React, { Component } from 'react'; import { translate } from '../../../base/i18n'; /** * The type of the React {@code Component} props of {@link NoRoomError}. */ type Props = { /** * Additional CSS classnames to append to the root of the component. */ className: string, /...
A component that can be rendered as a NoRoomError when a dial - in - ness is specified.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionShopTwo = (props) => ( <SvgIcon {...props}> <path d="M3 9H1v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2H3V9zm15-4V3c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H5v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5h-5zm-6-2h4...
A component that exports a sequence of action shades.
import React from 'react'; import hoistNonReactStatics from 'hoist-non-react-statics'; import ThemeContext from './themeContext'; // This function takes a component... const withTheme = WrappedComponent => { // ...and returns another component... class ThemedComponent extends React.PureComponent { render() { ...
A component that can be rendered with a theme.
import React from 'react'; import createReactClass from 'create-react-class'; import PropTypes from 'prop-types'; import { CardTitle, CardText, CardActions, RaisedButton, FlatButton } from 'material-ui'; export default createReactClass({ displayName: 'Confirmation', propTypes: { callbacks: PropTypes.object ...
The default function for creating a single missing - node node.
import React from 'react' import PropTypes from 'prop-types' import SVGDeviconInline from '../../_base/SVGDeviconInline' import iconSVG from './AngularjsOriginalWordmark.svg' /** AngularjsOriginalWordmark */ function AngularjsOriginalWordmark({ width, height, className }) { return ( <SVGDeviconInline clas...
The AngularjsOriginalWordmark class
/* * Copyright (C) 2016 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas 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, version 3 of the License. * * Canvas is distribut...
Diagnostics are needed if a component doesn t exist in the system.
import { t } from '@lingui/macro'; import { formatPercentage } from 'common/format'; import SPELLS from 'common/SPELLS'; import { SpellLink } from 'interface'; import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer'; import Events from 'parser/core/Events'; import BoringSpellValue from 'parser/ui/BoringSpellVa...
Package that implements the standard logic for the Guardian of elune.
// <ConnectedParseAccountBio> // ========================== // We need to format links if they appear—in both the bio and the // metadata. And, of course, we'll use a <ConnectedParse> to handle // any emoji. // * * * * * * * // // Imports // ------- // Package imports. import classNames from 'classnames'...
Private function for parsing a single individual bio.
import React, { Component } from 'react'; import { Values } from "redux-form-website-template"; import WizardForm from "../../components/IngestionWizardForm/WizardForm"; import { connect } from 'react-redux' import { addDataset } from './../../actions.js' import {createMetacatalog} from '../../helpers/TrasformForm' imp...
Ingestion form component that manages caricional sequence of tokens.
import React from 'react'; import { PieChart, Pie, Cell, BarChart, Bar } from 'recharts'; const data = [ { name: 'Group A', value: 400 }, { name: 'Group B', value: 300 }, { name: 'Group C', value: 500 }, { name: 'Group D', value: 200 }, { name: 'Group E', value: 278 }, { name: 'Group F', value: 189 }, ]; c...
Generates a chart showing the sequence of nodes that are part of a sequence of nodes.
import React from 'react' import { render } from 'react-dom' import { createStore, applyMiddleware } from 'redux' import { Provider } from 'react-redux' import createLogger from 'redux-logger' import thunk from 'redux-thunk' import reducer from './reducers' import { getAllProducts } from './actions' import App from './...
Imports a single node of a .
import React from 'react'; import '../../assets/stylesheets/application.css'; export const DisplayTextArea = props => { return ( <div key={props.key ? props.key : ''} className="item"> <div> <div className="display-container"> <p className="label">{props.label}</p> </div> ...
The default display for the Tree class
// @flow import type { TextProps } from './Text'; import React from 'react'; import Text from './Text'; import Title from './Title'; import { defineMessages, injectIntl } from 'react-intl'; const messages = defineMessages({ loadingText: { defaultMessage: 'Loading', id: 'loading.loadingText', }, longLoadi...
A component that loads a loading state from a text field.
import React from 'react'; import player from '../../utils/player'; import SubStore from './store'; import VisibilityStore from '../Visibility/store'; import ls from 'local-storage'; export default React.createClass({ getInitialState() { var visibilityState = VisibilityStore.getState(); var subSta...
Create a default subtitle export.
import React from 'react'; import Module from 'Parser/Core/Module'; import Combatants from 'Parser/Core/Modules/Combatants'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import SpellLink from 'common/SpellLink'; import { formatPercentage } from 'common/format'; import {HOTS_AFFECTED_B...
A base class that implements the restoration of a specific type of event.
/** * @flow */ import React from 'react' import PropTypes from 'prop-types' import cx from 'classnames' import styled from 'styled-components' const ButtonText = (props) => ( <ButtonTextStyledComponent> {"CONNECT"} </ButtonTextStyledComponent> ) const ButtonTextStyledComponent = styled.div` c...
Component that creates a single missing component with no children.
import React from 'react' import * as DevTools from 'redux-devtools' import LogMonitor from 'redux-devtools-log-monitor' import DockMonitor from 'redux-devtools-dock-monitor' // export default DevTools.createDevTools( <DockMonitor toggleVisibilityKey='ctrl-h' changePositionKey='ctrl-p' defaultIsVisible={...
Imports a single object and exports it as a DevTools.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImagePictureAsPdf = (props) => ( <SvgIcon {...props}> <path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 ...
A component that renders a sequence of icons that can be used to render a sequence of icons.
/** * @description DocumentZip SVG Icon. * @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon. * @property {string} colorIndex - The color identifier to use for the stroke color. * If not specified, this component will default to muiTheme.palette.textColor. *...
Component for displaying a link to a status icon.
import React from 'react'; import { ReactQueryCacheProvider } from 'react-query'; import ComboSearch from './ComboSearch'; import { queryCache } from './shared/queryCache'; function ComboPaysSearch(params) { return ( <ReactQueryCacheProvider queryCache={queryCache}> <ComboSearch required={params.m...
export default ComboPaysSearch
import React from 'react'; import { Image, Text, StyleSheet, View } from 'react-native'; import Constants from 'expo-constants'; import { BlurView } from 'expo-blur'; const uri = 'https://s3.amazonaws.com/exp-icon-assets/ExpoEmptyManifest_192.png'; export default function App() { return ( <View style={{ flex: 1...
The main app function
import React from 'react'; import { storiesOf } from '@storybook/react'; import { text, boolean, number } from '@storybook/addon-knobs'; import { HierarchicalMenu, SearchBox, Panel } from 'react-instantsearch-dom'; import { WrapWithHits } from './util'; const stories = storiesOf('HierarchicalMenu', module); stories ...
Imports a hierarchy of categories and their associated components.
/* * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you 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/li...
Provides a function to render a single missing - missing node in the system.
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { clearOrganizePreview } from 'Store/Actions/organizePreviewActions'; import OrganizePreviewModal from './OrganizePreviewModal'; const mapDispatchToProps = { clearOrganizePreview }; class Orga...
The base component that will be rendered when the user opens a modal window.
import React from 'react'; import mixpanel from 'utils/Mixpanel'; import MyProfileActions from 'actions/MyProfileActions'; import LoginActionCreators from 'actions/LoginActionCreators'; import AvatarItem from 'components/common/AvatarItem.react'; import MyProfileModal from 'components/modals/MyProfile.react'; import ...
The main header section for a specific user.
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.
import React from 'react' import { TouchableOpacity } from 'react-native' import styles from './Styles/NavItemsStyle' import { Actions as NavigationActions } from 'react-native-router-flux' import Icon from 'react-native-vector-icons/FontAwesome' import { Colors, Metrics } from '../Themes' const openDrawer = () => { ...
Imports a single node with a single navigation button.
import React from 'react'; import IconBase from 'react-icon-base'; export default class FaFileAudioO extends React.Component { render() { return ( <IconBase viewBox="0 0 40 40" {...this.props}> <g><path d="m35.8 8.5q0.6 0.6 1 1.7t0.5 1.9v25.8q0 0.8-0.6 1.5t-1.6 0.6h-30q-0.9 0-1....
A component that displays a sequence of FaFileAudioO.
import React from 'react'; export default function arrowRenderer ({ onMouseDown }) { return ( <span className="Select-arrow" onMouseDown={onMouseDown} /> ); };
Select arrow renderer
import React from 'react'; export const TooltipButton = () => () => (<button>Test Button</button>); export default TooltipButton;
export TooltipButton = > TooltipButton
import React from 'react'; import { connect } from 'react-redux'; import { get } from '../../../store'; import { translate as $t } from '../../../helpers'; import BankAccessItem from './item'; import FoldablePanel from '../../ui/foldable-panel'; import NewBankForm from './form'; export default connect(state => { ...
Imports a single node with a single key and its associated accessIds.
import React from 'react'; import ReactDOM from 'react-dom'; import Feap from 'feap'; let navigationItems = { "users": "Пользователи", "media": "Медиа-файлы", "polls": "Опросы" }; const myApp = ( <Feap navigationItems={navigationItems} /> ); ReactDOM.render(myApp, document.getElementById(...
This is a hack to work around the fact that the navigation items are not available in the page.
import PropTypes from 'prop-types' import React from 'react' import bytes from 'bytes' class PlainFileToken extends React.Component { static propTypes = { file_name: PropTypes.string, file_size: PropTypes.number } render() { const { file_name, file_size } = this.props return ( <div classN...
PlainFileToken Expose a component that renders a file - based token.
// @flow import React, { Component } from 'react'; import { Dropdown, DropdownMenu, DropdownItem } from 'reactstrap'; import { connect } from 'react-redux'; import userRepo from 'infra/repo/user'; import loc from 'infra/service/location'; import GroupStatus from './GroupStatus'; const mapStateToProps = state => ({ l...
A component that displays a single missing - user necessity in the system.
import React from 'react'; class Grades extends React.Component { render () { var assignments = COURSES[this.props.params.courseId].assignments; return ( <div> <h3>Grades</h3> <ul> {assignments.map(assignment => ( <li key={assignment.id}>{assignment.grade} - {assi...
A component that renders a list of assignments to a single course.
import React, { Component } from 'react'; import { Container, Grid, Column, NumberField } from '@extjs/ext-react'; Ext.require('Ext.grid.plugin.CellEditing'); export default class RelEditor extends Component { store = Ext.create('Ext.data.Store', { data: [ { value: '1' } ] }); ...
A component that can be used to edit a single record in a grid.
import React from 'react'; import blacklist from 'blacklist'; import Radio from './Radio'; var RadioGroup = React.createClass({ displayName: 'RadioGroup', propTypes: { display: React.PropTypes.oneOf([ 'block', 'inline' ]), onChange: React.PropTypes.func, options: React.PropTypes.arrayOf( React.PropT...
The RadioGroup component is a component that can be used to group radio buttons.
import React, { Component } from 'react'; import InputSection from './InputSection'; import MessageSection from './MessageSection'; import { Layout, Menu, Icon, Form, Input, Button, Checkbox, Modal } from 'antd'; const { Header, Footer, Sider, Content } = Layout; const { SubMenu } = Menu; const FormItem = Form.Item; c...
A component that displays a modal modal with a single keyboard.
import Grid from '@material-ui/core/Grid' import { makeStyles } from '@material-ui/core/styles' import classnames from 'classnames' import PropTypes from 'prop-types' import React from 'react' import { white } from 'src/styling/variables' const cardState = Object.freeze({ DEFAULT: 'default', SHRUNK: 'shrunk', E...
A component that collapses a single node in a grid.
import React from 'react'; export default class Slide extends React.Component { render() { return ( <div> <h1>phase 3: one repo to rule them all?</h1> <ul> <li>We think repos should be separated by deploy boundaries, and the client app service should be deployable o...
The base class for the hierarchy of a single component.
import React from 'react'; import { Surface, PolarRadiusAxis } from 'recharts'; export default React.createClass({ render () { const ticks = [ { value: '100', radius: 50 }, { value: '200', radius: 100 }, { value: '300', radius: 150 }, { value: '400', radius: 200 }, { value: '500', r...
export default constructor
import React from 'react'; import PropTypes from 'prop-types'; import Dialog from 'material-ui/Dialog'; import IconButton from 'material-ui/IconButton'; import SvgIcon from 'material-ui/SvgIcon'; import FlatButton from 'material-ui/FlatButton'; import { deleteDish } from 'actions/RestaurantActions'; const propTypes = ...
Dish delete button
import React from 'react'; import _ from 'lodash'; //"use strict"; //var _ = require("lodash"); class Deck { constructor(){ this.cards = [ {rank: '2', suit: 'spades'}, {rank: '3', suit: 'spades'}, {rank: '4', suit: 'spades'}, {rank: '5', suit: 'spades'}, {rank: '6', suit: 'spades'...
Define a new Deck object with a random card list.
// Copyright (c) 2016 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge...
Example showing how a single node in a software has a sequence of components.
import 'babel-polyfill'; import React from 'react'; import ReactDOM from 'react-dom'; import Home from './home.js'; const container = document.getElementById('container'); function renderComponent(Component) { ReactDOM.render(<Component />, container); } renderComponent(Home); // Enable Hot Module Replacement (H...
Renders a component if it is not already rendered.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvFiberSmartRecord = (props) => ( <SvgIcon {...props}> <g><circle cx="9" cy="12" r="8"/><path d="M17 4.26v2.09c2.33.82 4 3.04 4 5.65s-1.67 4.83-4 5.65v2.09c3.45-.89 6-4.01 6-7.74s-2.55-6.85-6-7.74z"/></g> </S...
A function to export a single missing - node node in a smile - open way.
import React from 'react'; import IconBase from './../components/IconBase/IconBase'; export default class AndroidWifi extends React.Component { render() { if(this.props.bare) { return <g> <path d="M256,228.719c-22.879,0-41.597,18.529-41.597,41.18c0,22.652,18.718,41.182,41.597,41.182 c22.878,0,41.597-18.529,41.59...
The WiFi component for the WiFi component.
import React from 'react' import BookEditor from '../components/BookEditor' import { connect } from 'react-redux' import { fetchBookDetail, editBook } from '../reducers/book' import _ from 'lodash' class BookEdit extends React.Component { constructor (props) { super(props) } componentWillMount () { const...
The base component for editing a single node in a book.
import React from 'react'; import Analyzer from 'parser/core/Analyzer'; import SPELLS from 'common/SPELLS/index'; import SpellLink from 'common/SpellLink'; import { formatNumber, formatPercentage } from 'common/format'; import DamageTracker from 'parser/shared/modules/AbilityTracker'; import TalentStatisticBox from 'in...
Package that implements the base class for all events that have a specific type of unknown state.
import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import { msg } from '_/intl' import { Modal } from 'patternfly-react' import Product from '../version' import { fixedStrings } from '../branding' const LegalInfo = () => { const idPrefix = `about-legal` if (fixedS...
A component that displays a modal dialog with a single possible failure.
/** * * Img.js * * Renders an image, enforcing the usage of the alt="" tag */ import React from 'react'; import PropTypes from 'prop-types'; function Img(props) { return ( <img className={props.className} src={props.src} alt={props.alt} /> ); } // We require the use of src and alt, only enforced by reac...
Renders an image with optional alt property if missing.
import React from 'react'; import { View, KeyboardAvoidingView, Modal, TouchableWithoutFeedback, TextInput } from 'react-native'; const ModalMultiInput = ({ visible, value, onChangeText, onPress }) => { const { containerStyle, inputStyle, modalStyle } = styles; return ( <Modal ...
create a modal - based keyboard - based input - based keyboard
import React from 'react'; import Quiz from '../components/Quiz'; var outerContainerStyle = { background: '#e1eef3', height: '100vh', width: '100vw', display: 'flex', alignItems: 'center', justifyContent: 'center' }; export default props => ( <div style={{ background: '#fff', borderRadius: '4px', he...
export default props
import React, { Component } from 'react'; export default class AppRoot extends Component { // we can't use `connect` in this component, so must do naiively: constructor(props) { super(props); this.state = { }; } render() { return ( <div> <h1>This is just an empty demo</h1> ...
The base class for the missing components.
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Intl from 'grommet/utils/Intl'; import CSSClassnames from 'grommet/utils/CSSClassnames'; import Button from 'grommet/components/Button'; import ExpandIcon from 'gro...
Component that is rendered when a button is clicked on a button.
import React from 'react'; import classNames from 'classnames'; import BootstrapMixin from './BootstrapMixin'; import styleMaps from './styleMaps'; const Glyphicon = React.createClass({ mixins: [BootstrapMixin], propTypes: { glyph: React.PropTypes.oneOf(styleMaps.GLYPHS).isRequired }, getDefaultProps() {...
The Glyphicon class is a child of a BootstrapMixin and is used to create a bootstrap glyphicon.
import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { mjml2html } from 'mjml'; import Theme from '../theme'; import styles from './styles'; export const handleTheme = (theme) => { const { colors, headerImage } = theme; let newTheme = theme; // If theme does not inclu...
Renders a single node in the MJML hierarchy.
/* eslint-disable jsx-a11y/anchor-is-valid */ import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import DatesFromUntil from '../content/DatesFromUntil'; const PageTitleWithDate = ({ from, until, title }) => ( <dl className={classnames( 'flex items-baseline',...
A page - title - with - date which shows a sequence of dates from a given date.
import _ from 'lodash'; import React from 'react'; import Loading from '../../components/loading'; import Logo from '../../components/logo'; import { connectRedux } from '../../helpers/decorators'; var Component = React.createClass({ propTypes: { children: React.PropTypes.element.isRequired, }, render: f...
The main function of the module
import { Parser } from 'hot-formula-parser'; import 'handsontable/dist/handsontable.full.css'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render(<App />, document.getElementById('root'));
Imports the hotformula - parser and react - dom and renders the root element.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AlertWarning = (props) => ( <SvgIcon {...props}> <path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/> </SvgIcon> ); AlertWarning = pure(AlertWarning); AlertWarning.displayName = 'AlertWarning'; Aler...
A component that exports a warning in a sequence of icons.
import React from 'react'; import PropTypes from 'prop-types'; export default class ModalRoot extends React.PureComponent { static propTypes = { children: PropTypes.node, onClose: PropTypes.func.isRequired, }; state = { revealed: !!this.props.children, }; activeElement = this.state.revealed ? ...
A component that is rendered as a modal modal.
import React from 'react' import { View, Text, StyleSheet } from 'react-native' import PropTypes from 'prop-types' class KeyDataRow extends React.Component { render() { return ( <View style={styles.dataRow}> <Text style={styles.dataItem}>{this.props.title}: </Text> ...
A component that can be rendered as a key sequence in a table.
/** * @description Cluster SVG Icon. * @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon. * @property {string} colorIndex - The color identifier to use for the stroke color. * If not specified, this component will default to muiTheme.palette.textColor. * @pr...
Component for displaying a cluster icon.
import React from 'react'; import PropTypes from 'prop-types'; import RuleToolbar from './RuleToolbar'; import RuleBody from './RuleBody'; const Rule = (props) => { const { rule } = props; return ( <React.Fragment> <RuleToolbar unsavedChanges={props.unsavedChanges} actionsDisabled={!rule...
The Rule class
import React from 'react'; import { render } from 'react-dom'; import { AppContainer } from 'react-hot-loader'; import App from '../shared/components/app'; // Create root mounting node const mountNode = document.getElementById('mount'); // Client-side rendering render(<AppContainer><App /></AppContainer>, mountNode)...
Create a root mounting node if it doesn t exist.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageExposure = (props) => ( <SvgIcon {...props}> <path d="M15 17v2h2v-2h2v-2h-2v-2h-2v2h-2v2h2zm5-15H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM5 5h6v2H5V5zm15 15H4L20 4v16z"/> </...
A component that exposes
import React from 'react' import { ResultList } from '../../components' export default function ResultBrowser({ props }) { return <ResultList props={props}/> }
The default implementation of which returns a list of all components that have a unique key.
import React, { Component } from 'react'; class Header extends Component { sidebarToggle(e) { e.preventDefault(); document.body.classList.toggle('sidebar-hidden'); } sidebarMinimize(e) { e.preventDefault(); document.body.classList.toggle('sidebar-minimized'); } mobileSidebarToggle(e) { ...
The main header class for the menu.
import React from 'react' export const Counter = (props) => ( <div style={{ margin: '0 auto' }} > <h2>Counter: {props.counter}</h2> <button className='btn btn-default' onClick={props.increment}> Increment </button> {' '} <button className='btn btn-default' onClick={props.doubleAsync}> ...
A function that exports a single missing - number counter.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let CameraFront = props => <SvgIcon {...props}> <path d="M10 20H5v2h5v2l3-3-3-3v2zm4 0v2h5v-2h-5zM12 8c1.1 0 2-.9 2-2s-.9-2-2-2-1.99.9-1.99 2S10.9 8 12 8zm5-8H7C5.9 0 5 .9 5 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2...
A component that renders a single missing component in a mixture of icons.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsDirectionsSubway = (props) => ( <SvgIcon {...props}> <path d="M12 2c-4.42 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.5...
A sub - component that exports a sequence of maps in a series of icons.
import React from 'react' import PropTypes from 'prop-types' import clsx from 'clsx' import { Avatar, Box, Chip, Card, CardContent, Divider, Grid, Typography, IconButton, Tooltip, makeStyles, Link } from '@material-ui/core' import slugify from '@sindresorhus/slugify' const logoGithub = require(...
A component that renders a single n - node node