code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React from 'react'; import PropTypes from 'prop-types'; export default class ExtendedVideoPlayer extends React.PureComponent { static propTypes = { src: PropTypes.string.isRequired, alt: PropTypes.string, width: PropTypes.number, height: PropTypes.number, time: PropTypes.number, contr...
Extend the video player with a series of optional properties.
import React from 'react'; import styles from './layout-wrap.scss'; const LayoutWrapper = ({ children }) => ( <div className={styles.root}> {children} </div> ); export default LayoutWrapper;
Export a layout - wrap wrapper for a node.
/*! * Description: Books stateless function component * * The component displaying either the books fetched or a spinner. * To decide which one, we checking currentStatus from the props. * * The app component hierarchy looks like this: * * App * - ControlsContainer * - TopicSelectorContainer * - TopicS...
The component that is not part of the books hierarchy.
import React from 'react'; import PropTypes from 'prop-types'; import unicodeMapping from '../features/emoji/emoji_unicode_mapping_light'; import { assetHost } from 'mastodon/utils/config'; export default class AutosuggestEmoji extends React.PureComponent { static propTypes = { emoji: PropTypes.object.isRequire...
The AutosuggestEmoji class
import React from 'react'; import Row from '../base/Row'; import Col from '../base/Col'; import Container from '../base/Container'; import PropTypes from 'prop-types'; import { imageHost } from '../../isomorphicVars'; import SubscribeForm from '../../components/SubscribeForm'; import Image from './Image'; class StoryP...
The base class for all of the n - ary components.
import React from 'react'; import ReactDOM from 'react-dom'; import { EncodingInfoSection } from './load_section/EncodingInfoSection' import { ManualFileEncodingSetting } from './load_section/ManualFileEncodingSetting' import { CollapsibleComponent } from 'lib/components/CollapsibleComponent' import { subscribeToSubtit...
LoadSubtitleSection - A component that loads a sub - section of a subtitle.
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { getCurrentLocale } from '../utils/Locale'; import SkipLinks from './SkipLinks'; import CSSClassnames from '../utils/CSSClassn...
Component that is rendered when a component is rendered with a component that is not yet rendered.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { observer } from 'mobx-react'; import { defineMessages, intlShape } from 'react-intl'; import injectSheet from 'react-jss'; import { H3, H2 } from '@meetfranz/ui'; import { Button } from '@meetfranz/forms'; import { FeatureList } fr...
A component that renders a critical critical feature list.
import React from 'react'; function elementContains(element, contained) { return element && contained instanceof Node && element.contains(contained); } function useDropdownDocumentEvents(dropdown, setIsMenuVisible) { const isComponentFocused = React.useCallback(() => { const active = document.activeElement; ...
Adds event listeners to the document that will toggle the dropdown menu when the element is clicked.
import React from 'react'; // import { Basic } from 'czechidm-core'; import ExportImportTable from './ExportImportTable'; /** * List of export-imports * * @author Vít Švanda */ export default class ExportImports extends Basic.AbstractContent { /** * "Shorcut" for localization */ getContentKey() { re...
The export - imports 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 from 'react'; import AdminEditSpecBlock from "./AdminEditSpecBlock"; import { SortableTbl } from '../Shared/SortableTbl'; import {CustomDel} from "./SortabletblCustomInput.js"; class AdminEditDocsTab extends React.Component{ constructor(props) { super(props); this.delItem = this.delItem.bind(this); ...
The admin - edit - docs - tab component.
import React from 'react' import Content from './Content' import Types from './Types' import States from './States' import Variations from './Variations' const MenuExamples = () => { return ( <div> <Types /> <Content /> <States /> <Variations /> </div> ) } export default MenuExamp...
export default menu examples
import React, { Component } from 'react'; import { Text, StyleSheet } from 'react-native'; import Menu, { MenuProvider, MenuOptions, MenuOption, MenuTrigger, renderers, } from 'react-native-popup-menu'; const { ContextMenu, SlideInMenu, Popover } = renderers; class BasicExampleComponent extends Component { ...
Component that is rendered when a user clicks on a menu.
import React from 'react' import Layout from './layout' React.render(<Layout />, document.getElementById('app'))
Imports a React component and renders it in the layout.
import React, { Component } from 'react'; const Mustache = require('mustache'); export default class ReactMustache extends React.Component { compileTemplate(template, data) { // lazy template compiling return Mustache.render(template,data); } render() { const { template, data, Component } = this.pr...
A component that renders a template into a Mustache template with optional data.
import React from 'react'; import { PureRenderMixin } from 'react/addons'; import AvatarItem from 'components/common/AvatarItem.react'; var ContactItem = React.createClass({ displayName: 'ContactItem', propTypes: { contact: React.PropTypes.object, onSelect: React.PropTypes.func }, mixins: [PureRende...
The contact item which is a list of all contacts that have a single contact.
import React from 'react' import PropTypes from 'prop-types' import Helmet from 'react-helmet' import { StaticQuery, graphql } from 'gatsby' import Header from './header' import './layout.css' const Layout = ({ children }) => ( <StaticQuery query={graphql` query SiteTitleQuery { site { s...
Imports a single node in a Helmet hierarchy.
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 { Image } from 'semantic-ui-react' const ImageExampleHidden = () => ( <Image src='/assets/images/wireframe/image.png' size='small' hidden /> ) export default ImageExampleHidden
Imports a single and exports it as a hidden image.
import React from 'react'; import Analyzer from 'Parser/Core/Analyzer'; import Combatants from 'Parser/Core/Modules/Combatants'; import SPELLS from 'common/SPELLS'; import SpellIcon from "common/SpellIcon"; import SpellLink from "common/SpellLink"; import PETS from 'common/PETS'; import CorePets from 'Parser/Core/Mod...
Creates a Black Arrow that can be used to kill an enemy.
import React, { Component } from 'react'; import 'bootstrap/dist/css/bootstrap.min.css'; import Monitoring from './Monitoring.js'; import Search from './Search.js'; import Home from './Home.js'; import { TabContent, TabPane } from 'reactstrap'; class Page extends Component { constructor(props) { ...
Component that is a page - level component that is used to render a page.
import React from 'react' import warning from './routerWarning' import invariant from 'invariant' import { createRouteFromReactElement } from './RouteUtils' import { component, components, falsy } from './InternalPropTypes' const { func } = React.PropTypes /** * An <IndexRoute> is used to specify its parent's <Route...
The indexRoute is used to specify its parent s indexRoute in a JSX route config.
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './containers/App'; import Menu from './components/Menu/Menu'; import OptionsMenu from './components/Menu/OptionsMenu'; import VerticalTree from './containers/VerticalTree'; import ExampleTree from './containers/ExampleTree'; i...
export default route for missing missing routes
import React from 'react'; import { Link } from 'react-router-dom'; const NotFoundPage = () => { return ( <div className="row"> <div className="col-12"> <h1>404 Page Not Found</h1> <Link to="/"> Go back to homepage </Link> </div> </div> ); }; export default NotFoundPage;
404 page not found
import _ from 'lodash'; import React from 'react'; import BackgroundTasksIndicator from '../backgroundTasksIndicator'; import MainMenu from '../mainMenu'; import SubMenu from '../subMenu'; import Logo from '../logo'; module.exports = React.createClass({ render: function() { const isExtraSmallScreen = !!...
The main menu component
import React from 'react'; import { Grid, Header } from 'semantic-ui-react'; import ServiceInfo from 'Components/ServiceInfo'; import HeaderBar from 'Components/HeaderBar'; export default ({ match, location }) => ( <div className="service"> <HeaderBar /> <Grid container> <Grid.Column> <Service...
export default Grammar
import React from 'react'; // class App extends React.Component { // render() { // // return ( // // <h1>Hello, Roy</h1> // // ); // // return React.createElement('h1', null, 'Hello, Roy') // } // } //stateless function Component const App = () => <h1>Hello, Roy</h1> export default App;
Component that extends React. Component and extends it with a stateless interface.
/** * NotFoundPage * * This is the page we show when the user visits a url that doesn't have a route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a necessity for you then you can refactor it...
NotFoundPage - The page we show when the user visits a url that doesn t have a route .
import FontAwesomeIcon from '@fortawesome/react-fontawesome' import React from 'react' import faPlay from '@fortawesome/fontawesome-free-solid/faPlayCircle' import faPauseCircle from '@fortawesome/fontawesome-free-solid/faPauseCircle' import faStopCircle from '@fortawesome/fontawesome-free-solid/faStopCircle' import fa...
Control sequence of events
import React, { Component } from 'react'; import { Provider, connect } from 'react-redux'; import store from '../store'; import { addUser, getUserPlaylists, getUserFriends } from '../actions'; import { Link } from 'react-router'; import Navbar from './Navbar'; import UserSongs from './UserSongs'; class AppLayout exte...
Component that is rendered when a user is clicked.
import React, { Component } from 'react'; import Switch, {Case, Default} from 'react-switch-case'; import PetData from './PetData'; import ProductData from './ProductData'; import ArticleData from './ArticleData'; class ProductBox extends Component { render() { return ( <div className="petBox imgContainer ...
The base class for the product box component.
/** * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @flow */ 'use s...
This function is a wrapper around the React module which renders a in the top - level DOM.
// @flow weak import React from 'react'; const Humburger = () => { return ( <button className="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span className="sr-only"> Toggle navigation </span> <span c...
A function that exports a weak weak nagle.
import React from 'react'; import { Col } from 'react-bootstrap'; export default class GitHeader extends React.PureComponent { render() { return ( <div className="git-name"> <h4> Mr. <a href={this.props.git.url}> @futurejuan</a> </h4> <h5>Working since {this.props.git.use...
The header for a branch that is not part of a branch.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvHd = (props) => ( <SvgIcon {...props}> <path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-...
A simple simple tool to display a missing - missing element in a group of icons.
import React from 'react'; import ModalContainer from 'app-components/modal-container'; import Button from 'core-components/button'; import Message from 'core-components/message'; class PopupMessage extends React.Component { static propTypes = Message.propTypes; static contextTypes = { closeModal: ...
A component that opens a modal popup and opens a message.
import _ from 'lodash'; import CodeMirror from 'codemirror'; import Field from '../Field'; import React from 'react'; import { findDOMNode } from 'react-dom'; import { FormInput } from 'elemental'; import classnames from 'classnames'; /** * TODO: * - Remove dependency on lodash */ // See CodeMirror docs for API: /...
The CodeMirror component is a component that can be rendered in a CodeMirror editor.
import React from 'react'; import SvgIcon from '../../SvgIcon'; const NotificationBluetoothAudio = (props) => ( <SvgIcon {...props}> <path d="M14.24 12.01l2.32 2.32c.28-.72.44-1.51.44-2.33 0-.82-.16-1.59-.43-2.31l-2.33 2.32zm5.29-5.3l-1.26 1.26c.63 1.21.98 2.57.98 4.02s-.36 2.82-.98 4.02l1.2 1.2c.97-1.54 1.54-3....
A component that exports a sequence of components that are not part of a component.
/* @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 IconAccountBox(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconPro...
A component that displays a menu item that is used to show a menu item in the menu.
import React from 'react'; import { CardTitle, CardText, CardActions, FlatButton } from 'material-ui'; import {Field} from 'redux-form'; import {TextField} from 'redux-form-material-ui'; const styles = { actions: { display: 'flex', justifyContent: 'flex-end' }, text: { display: 'flex', ...
A component that displays a login card with a login form.
import React from 'react'; import PropTypes from 'prop-types'; import pure from 'recompose/pure'; import compile from './Markup/compile'; const Motd = ({ children, compileOptions }) => ( <div className="ChatMessage ChatMessage--motd"> <div className="ChatMessage-content"> {compile(children, compileOptions...
A motd that displays a single node in a group of children.
'use strict'; import React from 'react'; import ReactCSS from 'reactcss'; import markdown from '../helpers/markdown'; import Code from './Code'; class Markdown extends ReactCSS.Component { classes() { return { 'default': { markdown: { fontSize: '17px', lineHeight: '24px', ...
The Markdown component that renders the children of a component.
import React from 'react'; import planList from './plans'; var valid = require('card-validator'); class SelectCard extends React.Component { constructor(props) { super(props); this.state = { selectedPlan: planList[0] }; } componentWillMount() { try { ...
A component that handles a series of cards that can be selected in a plan.
import React from 'react'; import ApiError from '../ApiError'; const GamepadError = ({ handleRetryClick }) => ( <ApiError icon="not_interested" title="No gamepad" text="There was a connection problem with your gamepad. Please make sure that it is plugged in." handleRetryClick={handleRetryClick} /> ...
The default error handler for the missing gamepad.
import React from 'react'; import { StoryPage } from 'StorybookConfig/preview'; import levelOptions from 'MayflowerReactHeadings/Headings.knobs.options'; import ContactGroup from './index'; import ContactGroupDocs from './ContactGroup.md'; import contactGroupOptions from './ContactGroup.knobs.options'; export const C...
export a default non - contact group
//React and Redux stuff //import React from 'react'; import {render} from 'react-dom'; import {createStore, applyMiddleware, compose} from 'redux'; //bootstraps redux import ReduxContext from './store/reduxContext.jsx'; //main app component import Main from './components/main/main.jsx'; //redux store actions and red...
Initialize a component with a React store
import React from 'react' import PropTypes from 'prop-types' import {Table, Tr, Td} from 'reactable' import {Button, Col, Container, Row} from 'reactstrap' import DropArea from '../DropArea/DropArea' import styles from './ProductTable.css' const ProductTable = props => { const handleEditClick = id => { const {se...
Devuelve un objeto ProductTable
import React from 'react'; import PropTypes from 'prop-types'; import createClass from 'create-react-class'; // eslint-disable-next-line const FlipMoveListItemLegacy = createClass({ render() { // eslint-disable-next-line react/prop-types const { style, children } = this.props; return <div style={style}>...
A legacy FlipMoveListItem which renders a single node in a hierarchy.
/* ######################################################################### # # Copyright (C) 2019 OSGeo # # This program 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 # ...
Component which is a list of alert objects that can be used to show a single alert.
/** * Render a footer for a popout */ import React from 'react'; const BUTTON_BASE_CLASSNAME = 'Popout__footer__button Popout__footer__button--'; const PopoutFooter = React.createClass({ displayName: 'PopoutFooter', propTypes: { children: React.PropTypes.node, primaryButtonAction: React.PropTypes.func, pri...
Renders a popout footer for a specific node in the tree.
import React from 'react' import { Dimmer, Loader, Image, Segment } from 'semantic-ui-react' const LoaderExampleLoader = () => ( <Segment> <Dimmer active> <Loader /> </Dimmer> <Image src='http://semantic-ui.com/images/wireframe/short-paragraph.png' /> </Segment> ) export default LoaderExampleLo...
Example of how to render a sequence of blocks with a loader.
import React, { Component } from 'react'; class DashBoard extends Component { render() { return ( <div> <h2>每位教师、医务人员都有自己主讲的医学健康云课程,自己的个人品牌值得一起来维护!</h2> </div> ); } } export default DashBoard;
DashBoard class.
import React from 'react'; import Checkbox from 'material-ui/Checkbox'; const StylesOverridingCssExample = () => ( <Checkbox name="StylesOverridingCssExample" label="Checked the mail" className="styles-overriding-css-example" /> ); export default StylesOverridingCssExample;
Imports a single node and exports it as a CSS - overriding - css - example.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionSubject = (props) => ( <SvgIcon {...props}> <path d="M14 17H4v2h10v-2zm6-8H4v2h16V9zM4 15h16v-2H4v2zM4 5v2h16V5H4z"/> </SvgIcon> ); ActionSubject = pure(ActionSubject); ActionSubject.displayName = 'Acti...
A action subject for a missing node in a group of nodes.
import React from 'react'; import TableSelectionCell from '../components/TableSelectionCell'; export default ( isGenericRow, selectionController, additionalData, before, after, ) => ( <TableSelectionCell id={`select${additionalData.rowIndex}`} checked={selectionController.isSelected(additionalData...
Default function for returning a
import React from 'react'; import PropTypes from 'prop-types'; class CardBlock extends React.Component { render() { const className = 'cf-card__block'; return ( <div className={className}> {this.props.children} </div> ); } } CardBlock.propTypes = { children: PropTypes.node }; ...
A component that is rendered as a block of children.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceSignalWifi3BarLock = (props) => ( <SvgIcon {...props}> <path opacity=".3" d="M12 3C5.3 3 .8 6.7.4 7l3.2 3.9L12 21.5l3.5-4.3v-2.6c0-2.2 1.4-4 3.3-4.7.3-.1.5-.2.8-.2.3-.1.6-.1.9-.1.4 0 .7 0 1 .1L23.6 7c-.4-...
Devuelve un signal de l objeto DeviceSignalWifi3BarLock
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import LoadingIndicator from '../../components/loading_indicator'; import { ScrollContainer } from 'react-router-scroll-4'; import Column from '../ui/componen...
A component that displays a list of mutes that can be used to manage a user s list of mutes.
import React from 'react'; import { connect } from 'react-redux'; import { withRouter } from 'react-router'; import AppHeaderUI from 'components/siteComponents/AppHeaderUI'; const mapStateToProps = ({ app }) => { return { authUser: app.getIn(['auth', 'user']), is404: app.getIn(['controls', 'is404']) }; }...
Imports a from React.
import React from 'react'; import { connect } from 'react-redux'; import Card from '../kit/Card'; const Medias = (props) => { const mediaList = props .medias .map(media => ( <li key={media.id} style={{ letterSpacing: 5 }}> <a target="_blank" ...
Demonstrate how to render a single nagios - critical sequence.
/** * Created by apache on 15-10-23. */ import React from 'react'; import {RouteHandler} from 'react-router'; import Nav from './Nav'; import Footer from './Footer'; class App extends React.Component { render() { return ( <div className="mon-app"> <Nav /> <Rout...
Create a base class for a single node in a hierarchy.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareVideogameAsset = (props) => ( <SvgIcon {...props}> <path d="M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-10 7H8v3H6v-3H3v-2h3V8h2v3h3v2zm4.5 2c-.83 0-1.5-.67-1.5-1.5s.67-...
HardwareVideogameAsset is a component that exports a component that can be used to render a hardware videogame icon.
import React from 'react'; class Assignments extends React.Component { render () { return ( <div> <h3>Assignments</h3> {this.props.children || <p>Choose an assignment from the sidebar.</p>} </div> ); } } export default Assignments;
A component that can
import React from 'react'; import PropTypes from 'prop-types'; export default class SearchNode extends React.Component { // eslint-disable-line react/prefer-stateless-function render() { return ( <div className="search"> <label htmlFor="search-input">Search:</label> <input id="search-input"...
The base class for the node that is used to search for a node in a tree.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceScreenLockRotation = (props) => ( <SvgIcon {...props}> <path d="M23.25 12.77l-2.57-2.57-1.41 1.41 2.22 2.22-5.66 5.66L4.51 8.17l5.66-5.66 2.1 2.1 1.41-1.41L11.23.75c-.59-.59-1.54-.59-2.12 0L2.75 7.11c-.59...
A component that displays a device screenlock rotation on the top of a hierarchy.
// @flow import type { State } from '../../../common/types'; import React from 'react'; import errorToMessage from '../../../common/app/errorToMessage'; import theme from '../themes/initial'; import { Animated, StyleSheet, TouchableWithoutFeedback, View } from 'react-native'; import { FormattedMessage } from './'; impo...
A component that displays a single alert with no animation.
/** * @description Elevator 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. * @p...
Component for the menu of a single node.
import React from 'react'; import IconBase from 'react-icon-base'; export default class FaFloppyO extends React.Component { render() { return ( <IconBase viewBox="0 0 40 40" {...this.props}> <g><path d="m11.6 34.3h17.1v-8.6h-17.1v8.6z m20 0h2.8v-20q0-0.3-0.2-0.9t-0.4-0.7l-6.3-6....
A component that shows a sequence of icons that can be used to render a sequence of items.
import 'core-js/fn/object/assign'; import React from 'react'; import ReactDOM from 'react-dom'; import { hashHistory, browserHistory, Router, Route, IndexRoute } from 'react-router'; import App from './components/App'; import Index from './components/Main'; import Login from './components/Login'; import Detail from '...
Renders the main component into the dom
import React from 'react'; import domUtils from './utils/domUtils'; import EventListener from './utils/EventListener'; /** * Checks whether a node is within * a root nodes tree * * @param {DOMElement} node * @param {DOMElement} root * @returns {boolean} */ function isNodeInRoot(node, root) { while (node) { ...
Checks whether a node is within a tree of nodes.
import React from 'react'; import Column from '../ui/components/column'; import MissingIndicator from '../../components/missing_indicator'; const GenericNotFound = () => ( <Column> <MissingIndicator fullPage /> </Column> ); export default GenericNotFound;
export a missing_indicator
/** * 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 [ { id: 1, name: '1' }, ...
The base class for a single node in the source tree.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router'; import _ from 'lodash'; import { newBid } from '../actions'; import pojo from '../utils/pojo'; import ItemSummary from '../components/ItemSummary'; const select = (state, props) => { const items = s...
The base component for all items that are not related to a specific item.
import React from 'react'; import { createDevTools } from 'redux-devtools'; import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; const DevTools = createDevTools( <DockMonitor toggleVisibilityKey='ctrl-h' changePositionKey='ctrl-q' defaultIsVisible={tru...
Imports a single node from React and exports it as a DevTools.
import React, { Component } from 'react'; import { FormGroup, FormControl, ControlLabel, } from 'react-bootstrap'; import LoaderButton from '../components/LoaderButton.js'; import './Login.css'; import config from '../config.js'; import { CognitoUserPool, AuthenticationDetails, CognitoUser } from 'amazon-co...
A component that displays a login form with a username and password.
/** * 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 PropTypes from 'prop-...
Generates a single missing - js component with a dangerously set view.
import React from 'react'; import { Checkbox, FormField, SegmentedControl } from 'elemental'; import PopoutList from '../../../admin/client/components/PopoutList'; const TOGGLE_OPTIONS = [ { label: 'Matches', value: false }, { label: 'Does NOT Match', value: true } ]; function getDefaultValue () { return { inver...
A component that can be used to filter a list of items in a field.
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.
// @flow import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import * as d3 from 'd3'; import * as actions from './state/actions'; import Swatch from 'components/Swatch'; type Props = { width: number, reversed: boolean, }; export class Co...
A component that displays a colorized category of the given width.
/** * React Static Boilerplate * https://github.com/kriasoft/react-static-boilerplate * * Copyright © 2015-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'; ...
A static component that is rendered when a component
import React from 'react'; import Header from './Header'; import ContestList from './ContestList'; import Contest from './Contest'; import * as api from '../api'; const pushState = (obj, url) => window.history.pushState(obj, '', url); class App extends React.Component { state = { pageHeader: 'Naming Contests'...
The base app for all components that are not part of a component s contests.
import React from 'react'; import {BaseMixin, ElementaryMixin} from './../common/common.js'; import TextInputMixin from './text-input-mixin.js'; import './text.less'; export default React.createClass({ mixins: [ BaseMixin, ElementaryMixin, TextInputMixin ], statics: { tagName: 'UU5.Forms.Text'...
The default constructor for a single node.
import React from 'react'; // M-UI components import {Popover} from 'material-ui'; // Settings import {USER_IMG_DEFAULT} from '../../../../../settings'; // Services import Settings_SRV from '../../../../../services/AppSettings/AppSettings'; // Styles import './UserDetails.scss'; class UserDetails extends React.Compone...
A component that displays a list of users with a specific action.
import React from 'react'; import classnames from 'classnames'; class ModalBody extends React.Component { render() { return ( <div {...this.props} className={classnames(this.props.className, this.props.modalClassName)}> {this.props.children} </div> ); } } ModalBody.propTypes = { /** ...
A modal body component that renders a modal modal to the user.
import React from 'react'; import App from './App'; React.render( <App/>, document.body );
Renders a into the document.
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import Notification from 'grommet/components/Notification'; import Button from 'grommet/components/Button'; import Example from '../../Example'; export default class NotificationCloserExample extends Compone...
Demonstrates how to render a notification closer example.
import React from 'react'; import * as cards from '../containers/card'; import * as cardTypes from '../constants/CardTypes'; import CardSettings from './CardSettings'; import DateRange from '../helpers/DateRange'; import { collectCardIds } from '../helpers/layout'; export default class Layout extends React.Component {...
The layout class which is used to render a layout.
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import MenuItem from 'Components/Menu/MenuItem'; class AddDownloadClientPresetMenuItem extends Component { // // Listeners onPress = () => { const { name, implementation } = this.props; this.props.onPress({ ...
AddDownloadClientPresetMenuItem creates a menu item which can be used to download a file from a remote server.
import React from 'react'; import PropTypes from 'prop-types'; class CounterComponent extends React.Component { render() { return ( <div> Counter: {this.props.value} <br /> <button onClick={this.props.increment}>Increment</button> <button onClick={this.props.decrement}>Decre...
A component that renders a counter.
import 'babel-polyfill'; import React from 'react'; import getRoutes from '../shared/routes'; import {render} from 'react-dom'; import {Provider} from 'react-redux'; import {Router, browserHistory} from 'react-router'; import {configureStore} from '../shared/redux/store/configureStore'; import {syncHistoryWithStore} fr...
Imports a single - user - defined sequence of react - dom and react - router.
import React, { Component } from 'react'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import getMuiTheme from 'material-ui/styles/getMuiTheme'; import CustomTheme from './CustomTheme'; import HomePage from './containers/HomePage'; import './App.css'; class App extends Component { render() { ...
The main function for the app.
/* eslint-disable no-console */ import React from 'react' import Portal from './Portal' export class App extends React.Component { state = { pickerVisible: false, } handleToggleVisibility = () => { this.setState(({ pickerVisible }) => ({ pickerVisible: !pickerVisible, })) } handleColorCh...
Create a component which is a component that can be used to show a color picker in the UI.
import React from 'react'; import { Trans } from '@lingui/macro'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import { formatPercentage } from 'common/format'; import Analyzer from 'parser/core/Analyzer'; import { STATISTIC_ORDER } from 'interface/others/StatisticBox'; import Statisti...
The base class for all of the rules of a single node.
import React from 'react'; import Comment from './Comment.js'; import CommentsTitle from './CommentsTitle.js'; import CommentsToggle from './CommentsToggle.js'; import ReactMixin from 'react-mixin'; import ReactFireMixin from 'reactfire'; import firebase from './firebase'; export default class CommentsList ext...
Create a new CommentsList component with all the fields that are not part of the current state.
import React from 'react'; const GithubButton = (props) => { const {user, repo, type, width, height, count, large} = props; let src = `https://ghbtns.com/github-btn.html?user=${user}&repo=${repo}&type=${type}`; if (count) src += '&count=true'; if (large) src += '&size=large'; return ( <iframe src=...
A button that displays a GitHub button.
import React from 'react'; import Formsy from './../..'; const defaultProps = { mixins: [Formsy.Mixin], getDefaultProps() { return { type: 'text' }; }, updateValue(event) { this.setValue(event.target[this.props.type === 'checkbox' ? 'checked' : 'value']); }, render() { return <input type={this....
InputFactory - InputFactory for missing - js - formsy - input - component
import React from 'react'; import SvgIcon from '../../SvgIcon'; const 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.displayName = 'ImageLandscape'; ImageLandscape.muiName = 'SvgIcon'; export default...
A component that exports a single image landscape in a series of icons.
import {AUTHENTICATION_STATES} from '../reducers/authentication.reducer'; import {connect} from 'react-redux'; import React from 'react'; import { Route, Redirect } from 'react-router-dom'; import {LoadingIndicator} from '../ux/ux'; import t from '../i18n/locale-keys'; const PrivateRoute = ({ authenticationStatus, com...
Private Route - > React Router -
import React, { Component } from 'react'; import { BuildRect } from '../helpers'; class Body extends Component { constructor(props) { super(props); this.state = { }; } static defaultProps = { } componentDidMount() { } componentDidUpdate() { ...
Extend React. Component with a custom component that draws on the screen.