code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React from 'react'; import { render } from 'react-dom'; import injectTapEventPlugin from 'react-tap-event-plugin'; import App from './App'; import './print.css'; // Needed for material-ui until it removes the dependency injectTapEventPlugin(); // Render main app to root div render(<App />, document.getElementB...
Imports a component and renders it to the root div
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsNavigation = (props) => ( <SvgIcon {...props}> <path d="M12 2L4.5 20.29l.71.71L12 18l6.79 3 .71-.71z"/> </SvgIcon> ); MapsNavigation = pure(MapsNavigation); MapsNavigation.displayName = 'MapsNavigation'; ...
A component that exports a Navitia - style sequence of objects.
import React from 'react'; import Title from 'react-title-component'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import dividerReadmeText from './README'; import DividerExampleForm from './Exam...
The main function for the component.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import Chart from '../components/chart'; import _ from 'lodash'; import GoogleMaps from '../components/google_map'; class WeatherList extends Component { renderWeather(cityData, i) { const cityName = cityData.city.name; const te...
A component that renders a list of weather in a single place.
/** * Created by Wangke on 2017/9/21. */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; function Button(props, context) { return <button style={{ backgroundColor: context.color }}>{props.children}</button>; } Button.contextTypes = { color: PropTypes.string.isRequired, }; Button.p...
Renders a single missing - node node with no children.
import React from 'react'; const Header = ({ message }) => { return ( <h2 className="Header text-center"> {message} </h2> ); }; Header.propTypes = { message: React.PropTypes.string }; export default Header;
The header for the enumeration.
import React from 'react'; import { Grid, Col } from 'react-bootstrap'; import { Link } from 'react-router'; const Footer = () => ( <Grid fluid className="footer-container"> <Col xs={12}> <a href="mailto:jasmin@ecocycle.org"> <p>Questions? Reach out to us!</p> </a> <i className="fa fa-c...
Exports a footer to the JSF - API.
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 toggle a unique identifier in a toggle button group.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationVoicemail = (props) => ( <SvgIcon {...props}> <path d="M18.5 6C15.46 6 13 8.46 13 11.5c0 1.33.47 2.55 1.26 3.5H9.74c.79-.95 1.26-2.17 1.26-3.5C11 8.46 8.54 6 5.5 6S0 8.46 0 11.5 2.46 17 5.5 17h13c3...
A component that exports a communication voicemail.
import React from 'react'; import {render} from 'react-dom'; import {Provider} from 'react-redux'; import createStore from './helpers/createStore'; import {Main, reducer, init} from 'modules/main'; const store = createStore(reducer, init()); render( <Provider store={store}> <Main /> </Provider> , document.g...
Imports a bunch of packages that are not part of a React application.
import './index.css'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render(<App />, document.getElementById('root'));
Imports the index. css and react - dom.
import React from 'react'; import Icon from '../../components/Icon/Icon'; import './Logout.scss'; const Logout = () => ( <div className="Logout"> <p> <img src="/image/eruditelogo.jpg" className="img img-responsive" /> </p> <h1>You have been logged out</h1> </div> ); Logout.propTypes = {};...
A function to export a single object that can be used to log in a user.
import React from 'react'; import { Router, Route, IndexRoute, Link } from 'react-router'; var PICTURES = [ { id: 0, src: 'http://placekitten.com/601/601' }, { id: 1, src: 'http://placekitten.com/610/610' }, { id: 2, src: 'http://placekitten.com/620/620' } ]; var Modal = React.createClass({ styles: { posi...
The main function for the high - level hierarchy.
import React from 'react' import { Component } from 'react-native'; import { Provider } from 'react-redux'; import { persistStore } from 'redux-persist'; import { AsyncStorage } from 'react-native'; import DiceRollerAppNavigator from './components/DiceRollerAppNavigator'; import createStore from './createStore'; cons...
Imports a bunch of packages that are not part of a React application.
import React from 'react' import { shape } from 'svg-intersections' import { ModelNodeWidget } from '../BaseNodeWidget' export const TYPE='andJunction'; export class AndJunctionWidget extends ModelNodeWidget { getClassName(node) { return 'a-node model_x andJunction'; } renderTitle(node) { return null; } bord...
A base widget for a node with a and - junction widget.
import React from 'react'; class NoMatch extends React.PureComponent { render() { return ( <div> <h2>无法匹配 <code>{this.props.location.pathname}</code></h2> </div> ) } } export default NoMatch;
NoMatch 方法 无 法 无
import React from 'react'; import IconMenu from 'material-ui/IconMenu'; import MenuItem from 'material-ui/MenuItem'; import IconButton from 'material-ui/IconButton'; import MoreVertIcon from 'material-ui/svg-icons/navigation/more-vert'; /** * Simple Icon Menus demonstrating some of the layouts possible using the `anc...
Icon Menus demonstrating some of the layouts possible using the anchorOrigin and targetOrigin properties.
import React from 'react' import { connect } from '@cerebral/react' import { state, signal } from 'cerebral/tags' import { Button, Modal, Icon } from 'semantic-ui-react' export default connect( { showConfirmSignOut: state`settings.showConfirmSignOut`, signOutCancelled: signal`settings.signOutCancelled`, ...
Imports a single node in a modal window.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvPlayCircleFilled = (props) => ( <SvgIcon {...props}> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"/> </SvgIcon> ); AvPlayCircleFilled = pure(AvPlayCirc...
A component that exports a single node in a group of nodes that can be played by a circle.
import React from 'react'; import Avatar from '../../components/avatar'; import Chip from '../../components/chip'; import style from '../style.module.css'; import { cold } from 'react-hot-loader'; const ColdAvatar = cold(Avatar) class ChipTest extends React.Component { state = { deleted: false, }; handleDe...
The base ChipTest class.
import React from 'react' export default class Story extends React.Component { markAsRead () { this.props.onMarkAsRead(this.props.story.id) } openUrl (url) { this.props.onUrlClick(url) } handleYurlOnClick (e) { e.preventDefault() this.openUrl(this.props.story.yurl) } handleByOnClick (e...
A component that shows a link to a Youtube URL or a URL that is clicked on a Youtube URL.
import React from 'react'; import styles from './styles.css'; function List(props) { const ComponentToRender = props.component; let content = (<div></div>); // If we have items, render them if (props.items) { content = props.items.map((item, index) => ( <ComponentToRender key={`item-${index}`} item...
List - List
import React from 'react' import { Button } from 'shengnian-ui-react' const ButtonExampleCircular = () => ( <Button circular icon='settings' /> ) export default ButtonExampleCircular
Imports a component from a window.
import React from 'react'; import Column from './column'; import '../css/main.css' export default class MainComponent extends React.Component { render() { return ( <div className="row"> <Column title="Things that went well"/> <Column title="Improvements"/> ...
The main component for a sequence of things.
/** * Copyright (c) Facebook, Inc. and its affiliates. * * 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 from 'react'; import warningWithoutStack from 'shared/warningWithoutStack'; import {createLRU} from './L...
The main entry point for the cache - related functions.
'use strict;' import React, { Component } from 'react'; import { LinkedStateMixin } from 'react-addons'; import { TodoActions } from '../TodoList'; import template from './NewTodo.rt'; module.exports = React.createClass({ handleToggleAll: function(event) { TodoActions.toggleAllItems(); }, handleValueChang...
The main function of the plugin.
import React from 'react'; import ReactDOM from 'react-dom'; import AppContainer from './AppContainer'; import './index.css'; ReactDOM.render( <AppContainer />, document.getElementById('root') );
Imports a single node from the DOM.
/** * Created by yangxp5 on 2017/1/5. */ import React, { Component } from 'react'; import { AppRegistry,DeviceEventEmitter,Image,Navigator,ScrollView,StyleSheet,Text, TouchableOpacity, TouchableHighlight,View } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; import NavigationBar from './c...
Component that extends a single Navigator
import React from 'react' import Header from '../components/common/Header' import { Tabs, Flex, Button, WhiteSpace } from 'antd-mobile' import styles from './Check.less' const TabPane = Tabs.TabPane; class Map extends React.Component<any, any> { static defaultProps = { id: 'location' } static propT...
Component that creates a BMap with a marker and a scroll wheel.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentGesture = (props) => ( <SvgIcon {...props}> <path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3....
A component that renders a series of icons that can be used to render a series of icons.
import React from 'react' import classes from './<%= pascalEntityName %>.scss' export const <%= pascalEntityName %> = () => ( <div className={classes['<%= pascalEntityName %>']}> <h4><%= pascalEntityName %></h4> </div> ) export default <%= pascalEntityName %>
export to a function that returns a function that returns a object.
import React from 'react'; import { render } from 'react-dom'; import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react'; /* * Puts Redux DevTools into a separate window. * Based on https://gist.github.com/tlrobinson/1e63d15d3e5f33410ef7#gistcomment-1560218. */ export default function createDevToo...
Creates a window with a DevTools element and a DebugPanel.
import React from 'react' import PT from 'prop-types' const propTypes = { onClick: PT.func.isRequired, completed: PT.bool.isRequired, text: PT.string.isRequired } const Todo = ({ onClick, completed, text }) => ( <li onClick={onClick} style={{ textDecoration: completed ? 'line-through' : 'none' ...
A component that exports a single missing - node node.
import React from 'react' import {AppLoader} from '../../appLoader' export default class RootComponent extends React.Component{ constructor(props){ super(props) if(sessionStorage["root/logined"]=="1"){ this.handleLoginSuccess(); } } handleLoginSuccess(){ //Action Export的方法已经被注入到component,可以this.prop...
The root component is a component that can be used to render a component in a browser.
/* Copyright 2016 First People's Cultural Council Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in w...
Imports a single node in the system if it exists.
import React from 'react' import './sections.scss' export const SectionAbilities = (props) => ( <section> ABILITIES <br /> <ul className='todoList'> TODO <li>weapons and data about how they interact with combat (dmg bonus, etc.)</li> <li>spells (sorted by level, school, whatever dependi...
SectionAbilities export function
import React from 'react'; import VideoListItem from './video_list_item'; const VideoList = (props) => { const videoItem = props.videos.map((video) => { return <VideoListItem onVideoSelect={props.onVideoSelect} key={video.etag} video={video} /> }); return ( <ul className="col-md-4 list...
React - > VideoList
import React from 'react'; import Anchor from '../Anchor'; import PropTable from '../PropTable'; import ReactPlayground from '../ReactPlayground'; import Samples from '../Samples'; export default function NavbarSection() { return ( <div className="bs-docs-section"> <h2 className="page-header"> <An...
The main logic for the Navbar section.
import React from 'react'; import Example from './components/Example/Example'; React.render(<Example content='hello world' />, document.getElementById('app'));
Imports a component that has not been imported.
/* @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 IconMoodBad(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconProps}...
A component that renders a missing missing icon in a section of a tree.
/** * Created by n7best */ import React from 'react'; import classNames from 'classnames'; export default class TabBody extends React.Component { render() { const {children, className, ...others} = this.props; const cls = classNames({ weui_tab_bd: true }, className); ...
Demonstrates how to render a single Failure in a Tab.
/* * 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....
Displays a list of all the string constants related to a user s business rule.
// Like react-motion's Motion, but reduces all animations to cross-fades // for the benefit of users with motion sickness. import React from 'react'; import Motion from 'react-motion/lib/Motion'; import PropTypes from 'prop-types'; const stylesToKeep = ['opacity', 'backgroundOpacity']; const extractValue = (value) =>...
Reduces all animations to cross - fades for users with motion sickness.
import React from 'react'; const AccessWarn = () => ( <div> <hr /> <p className="small"> This is a private system. Unauthorized access to or use of this system is strictly prohibited and tracked. By continuing, you acknowledge your awareness of and c...
Demonstrates how to warn about unrecoverable errors.
import React from 'react'; import ReactDOM from 'react-dom'; import App from './app'; import './index.css'; ReactDOM.render( <App />, document.getElementById('root') );
Imports a single node in the DOM.
import PropTypes from 'prop-types'; import React from 'react'; import { gettext } from '../../../utils/gettext'; import Icon from '../../Icon/Icon'; import TooltipEntity from '../decorators/TooltipEntity'; const documentIcon = <Icon name="doc-full" />; const missingDocumentIcon = <Icon name="warning" />; const Docu...
Generates a TooltipEntity that displays a missing document if the contentState has a contentKey.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageCropFree = (props) => ( <SvgIcon {...props}> <path d="M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2zm2 10H3v4c0 1.1.9 2 2 2h4v-2H5v-4zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2z"/> </SvgIco...
A component that exports a series of icons that can be cropped to a square.
import React from 'react'; import createFragment from 'react-addons-create-fragment';
Imports React and creates a fragment.
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import Audio from 'mastodon/features/audio'; import { connect } from 'react-redux'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { previewState } from './video_modal'...
A component that displays a modal dialog with a modal modal window.
/** * Абстрактный Lazy-load * * @module Lazy * * Created by Evgeniy Malyarov on 28.09.2018. */ import React from 'react'; import LoadingMessage from './LoadingMessage'; export default class Lazy extends React.Component { state = {Component: null}; render() { const {Component} = this.state; return ...
A component that can be rendered if it is not already rendered.
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' const CommentTypes = () => ( <ExampleSection title='States'> <ComponentExample title='Collapsed' description='Commen...
Component type - checking for comments
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentDrafts = (props) => ( <SvgIcon {...props}> <path d="M21.99 8c0-.72-.37-1.35-.94-1.7L12 1 2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2l-.01-10zM12 13L3.74 7.84 12 3l8.26 4.84L12 13z"/>...
A component that exports a series of content drafts.
import React, { Component } from 'react'; import GraphiQL from 'graphiql'; // import './App.css'; import 'graphiql/graphiql.css'; const defaultURL = "http://127.0.0.1:9130" const defaultQuery = '# Welcome to GraphiQL\n#\n# GraphiQL is an in-browser tool for writing, validating, and\n# testing GraphQL queries.\n#\n# Ty...
Component that implements a single keyboard shortcut that can be used to query a user s network.
import React from 'react' import { action } from '@storybook/addon-actions' import { DatePicker } from 'react-ui-core/src' export const DefaultDatePicker = ( <DatePicker value="10/10/2019" onChange={action('picked a date')} placeholder="Date" /> ) export const DatePickerReadOnly = ( <DatePicker ...
The default date picker and date picker are used to display a single
import React from 'react'; import {Field, reduxForm, formValueSelector} from 'redux-form'; import { Link } from 'react-router' import { connect } from 'react-redux'; import * as action from '../actions'; import '../styles/access/login.css'; import FlatButton from 'material-ui/FlatButton'; import RaisedButton from 'mate...
A login component that displays a user in a login window.
import React from 'react'; import ReactDOM from 'react-dom'; import Search from './components/Search'; import Routes from './components/Routes'; ReactDOM.render( <Routes />, document.getElementById('app'));
Imports a single route.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImagePalette = (props) => ( <SvgIcon {...props}> <path d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.4...
A component that exports a palette
import React from 'react'; import Router from 'react-router'; import BrowserHistory from 'react-router/lib/BrowserHistory'; import routes from './views/routes'; import createRedux from './redux/create'; import { Provider } from 'redux/react'; import ApiClient from './ApiClient'; const history = new BrowserHistory(); co...
Imports a React component and renders it in the DOM.
import React, { Component } from 'react'; class TimePeriodButton extends Component { render() { const { currentPeriodName, periodName, onSetPeriod, text } = this.props; return ( <button className={ currentPeriodName === periodName ? 'active' : ''} onClick={ () => {...
A component that can be used to toggle the time period of a time period.
import React from 'react'; import ms from './ms'; export class Dropdown extends React.Component { render () { // Using px because half-pixel sizes lead to width and height not being displayed to look the same let arrowSize = '6px'; let arrowThickness = 3; let arrowStyles = { position: 'absolute...
A drop - down component that renders a dropdown dropdown with a height of 0.
import React from 'react'; import { browserHistory } from 'react-router'; import styled from 'styled-components'; import imageBack from '../../../images/header/back.png'; const HeaderLeftArrowContainer = styled.div` width: 10%; height: 100%; position: absolute; display: flex; align-items: center; ...
Imports a bunch of components into a styled container.
import React from 'react'; import { useFocusWhenNavigate, NoPermissions as NoPermissionsCompo } from '@strapi/helper-plugin'; import { Main } from '@strapi/design-system/Main'; import { ContentLayout, HeaderLayout } from '@strapi/design-system/Layout'; import { useIntl } from 'react-intl'; import { getTrad } from '../....
The NoPermissions function
// @flow import React from 'react'; import type { Element } from 'react'; import classNames from 'classnames'; import withStyles from '../styles/withStyles'; import { emphasize } from '../styles/colorManipulator'; export const styles = (theme: Object) => ({ root: { position: 'relative', display: 'flex', ...
The main function for the node.
/** * 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, { Component } from 'react'; import withStyle...
Demonstrates how to render a single missing - node header in a React application.
import React from 'react'; import AdvancedCollapsible from './AdvancedCollapsible'; export default { component: AdvancedCollapsible, title: 'AdvancedCollapsible', }; export const Main = () => ( <div> {['small', 'medium', 'large'].map((size) => ['neutral', 'teal'].map((color) => ( <div key={si...
export a single with a component that can be used to create a single component in a component hierarchy
import React from 'react'; import Router from 'react-router'; import createRoutes from '../routes'; import {Provider} from 'react-redux'; const getFetchData = (component = {}) => { return component.WrappedComponent ? getFetchData(component.WrappedComponent) : component.fetchData; }; export function createTr...
The main router function.
import React from 'react'; import RequestAppAccessForm from '../RequestAppAccessForm'; const SalesDemo = () => { const appName = 'Sales Demo'; return ( <div> <header id="topbar"> <div className="heading heading-light"> {appName} </div> </header> <RequestAppAccessForm...
export default configuration
import React from 'react'; const ButtonFunctional = ({text, onClick}) => ( <button onClick={onClick}> {text} </button> ); export default ButtonFunctional;
ButtonFunctional is a function that exports a enumeration.
import React from 'react'; export default class LegendY extends React.Component { prepareCords() { let coords = { x1: this.props.x, y1: this.props.y } coords.x2 = coords.x1 + this.props.length; coords.y2 = coords.y1; for (var i = 0; i<10; i=i+30){ } return coords; } ...
LegendY - A legend that renders a single polygon on the y - axis.
import React from 'react' import {connect} from 'react-redux' @connect(state => ({ alerts: state.alerts })) export default class extends React.PureComponent { render() { const { alerts } = this.props const __html = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"><input typ...
The base component for the donate button.
/* @flow */ import React from 'react'; import isEqual from 'lodash.isequal'; import type { ChildrenArray } from 'react'; import type { RenderedSectionDescriptor } from '../types'; import MessageListSection from './MessageListSection'; import MessageListItem from './MessageListItem'; let lastRenderedMessages = null; l...
The default implementation of which caches the renderedMessages array and returns a cached messageList array.
import React from 'react'; import {RadioButton, RadioButtonGroup} from 'material-ui/RadioButton'; import ActionFavorite from 'material-ui/svg-icons/action/favorite'; import ActionFavoriteBorder from 'material-ui/svg-icons/action/favorite-border'; const styles = { block: { maxWidth: 250, }, radioButton: { ...
The default function for the missing components.
import React from 'react'; import withStyles from 'isomorphic-style-loader/lib/withStyles'; import s from './HeaderMobile.css'; import Link from './../../Link'; import Phone from './../../Phone'; import logoUrl from './../HeaderHome/logo.png'; import cx from 'classnames'; class HeaderMobile extends React.Component { ...
A component that displays a menu of non - menu items.
import React from 'react'; import SvgIcon from '../../SvgIcon'; const ImageWbIncandescent = (props) => ( <SvgIcon {...props}> <path d="M3.55 18.54l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8zM11 22.45h2V19.5h-2v2.95zM4 10.5H1v2h3v-2zm11-4.19V1.5H9v4.81C7.21 7.35 6 9.28 6 11.5c0 3.31 2.69 6 6 6s6-2.69 6-6c0-2.22-1.21-4...
A component that exports a sequence of icons that can be used to render a sequence of images.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ToggleStar = (props) => ( <SvgIcon {...props}> <path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/> </SvgIcon> ); ToggleStar = pure(ToggleStar); ToggleStar.disp...
A component that renders a single node in a group of nodes that can be toggled.
import React from 'react'; class Settings extends React.Component { static propTypes = { children: React.PropTypes.object, config: React.PropTypes.object, refreshProgress: React.PropTypes.number }; render() { return ( <div className="settings"> <...
A component that shows how to render a block of a block of content.
/** * * VSelect * */ import React from 'react'; import PropTypes from 'prop-types'; import Select from 'react-select'; import 'react-select/dist/react-select.css'; import { Validations } from 'validations'; class VSelect extends React.Component { // eslint-disable-line react/prefer-stateless-function constructor(pro...
A component that can be used to create a dropdown dropdown list of options and values.
import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { Router, hashHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import routes from './routes'; import configureStore from './store/configureStore'; import './app.global.c...
Imports a single node.
import React from 'react'; import { search } from '@/js/api'; import Autosuggest from 'react-autosuggest'; import Redirect from 'react-router-dom/Redirect'; import './search.scss'; const theme = { input: 'input', inputFocused: 'inputFocused', inputOpen: 'inputOpen', suggestionsContainer: 'suggestionsContainer'...
The base class for a single team number search.
/** * External dependencies */ import React from 'react'; import Highlighter from 'react-highlight-words'; /** * Internal dependencies */ import { ExternalLink } from 'wp-plugin-components'; const Referrer = ( props ) => { const { url, search } = props; if ( url ) { return ( <ExternalLink url={ url }> ...
External and internal dependencies of a component
import React from 'react' import PropTypes from 'prop-types' import { Navbar, NavItem, MenuItem, Nav, NavDropdown } from 'react-bootstrap' import './HeaderNav.scss' export const MainNav = ({ children }) => ( <Navbar inverse collapseOnSelect> {/* <Navbar.Header> <Navbar.Brand> <a href='#'>React-Boot...
A function that exports a Navable object with a main nav.
import React from 'react'; import { connect } from 'react-redux'; import { translate as $t, validatePassword } from '../../../helpers'; import { actions, get } from '../../../store'; import DisplayIf from '../../ui/display-if'; const Export = connect( state => { return { isExporting: get.isExp...
A component that exports a single node in the administration screen.
import React from 'react'; import { render } from 'react-dom'; import { Router, Route, Link, browserHistory, hashHistory, IndexRoute } from 'react-router'; import '../css/common.css'; class App extends React.Component { constructor(props) { super(props); this.state = { name : 'react app', data ...
The base class for all components that can be rendered and have a no - match component.
import React from 'react'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import { MuiThemeProvider } from '@material-ui/core/styles'; import AppCssBaseline from './AppCssBaseline'; import AppHeader from './AppHeader'; import AppMain from './AppMain'; import AppNavDrawer from './AppNavDrawe...
The base component for all of the app - frame components.
/* @flow */ import React from 'react'; import {Cell, Column, ColumnGroup, Table} from 'fixed-data-table-2'; let cell = <Cell/>; cell = <Cell onColumnResize={(left, width, minWidth, maxWidth, columnKey, event) => {event.target;}}/>; // $ExpectError cell = <Cell onColumnResize={(left, width, minWidth, maxWidth, columnKe...
requires React to be imported from fixed - data - table - 2
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 renders a bootstrap block.
import React from 'react' import LandingPage from './LandingPage' import DashboardPageContainer from '../containers/DashboardPageContainer' export default (props) => ( props.authenticated ? <DashboardPageContainer /> : <LandingPage /> )
Default component that exports a single unknown node.
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Toggle from 'react-toggle'; export default class SettingToggle extends React.PureComponent { static propTypes = { prefix: PropTypes.string, settings: ImmutablePropTypes.map.isReq...
A component that can toggle a setting of a node or array.
import React from 'react' class Announcements extends React.Component { render() { return ( <div> <h3>Announcements</h3> {this.props.children || <p>Choose an announcement from the sidebar.</p>} </div> ) } } export default Announcements
A component that renders a single announcement if it exists.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import R from 'ramda'; import { Layout, Sidebar } from 'react-toolbox/lib/layout'; import { IconButton } from 'react-toolbox/lib/button'; import { Dropdown } from 'react-toolbox/lib/dropdown'; i...
A component that is rendered as a palette in a Bootstrap - styled way.
import React from 'react'; import PropTypes from 'prop-types'; import Icon from 'common/Icon'; import SpellLink from 'common/SpellLink'; class AtonementHealingBreakdown extends React.Component { static propTypes = { total: PropTypes.object.isRequired, bySource: PropTypes.object.isRequired, }; render() ...
AtonementHealingBreakdown class renders a single missing - node node with a table showing the highest healing state.
import React from 'react'; import PropTypes from 'prop-types'; import { translate as __ } from 'foremanReact/common/I18n'; import { FormGroup, ControlLabel } from 'react-bootstrap'; import BootstrapSelect from '../../components/react-bootstrap-select'; function MultiSelect(props) { const { options, onChange,...
A component that renders a dropdown dropdown with multiple options.
import React, { Component } from 'react'; import {Layout, AppBar, Navigation, Panel, Link} from 'react-toolbox'; import {LinkContainer} from 'react-router-bootstrap'; import Header from './header/Header'; import Sidebar from './Sidebar' import styles from './Home.css'; export default class Home extends Component { ...
The default component that is used to render a menu.
import React from 'react'; import { View } from 'react-native'; import shorthandStyles from './shorthandStyles' const Row = (props) => { const { dial = 0, flex: _flex, spaceBetween, spaceAround, stretch, margin, padding, style, reverse, ...
A component that renders a row in a table with a specific style.
import React from 'react'; import PropTypes from 'prop-types'; import { MessageDialog } from 'patternfly-react'; const InputsErrorsDialog = ({ show, showErrorDialog, }) => ( <MessageDialog show={show} title={__('Editing Entitlements')} secondaryContent={__('Some of your inputs contain errors. Please up...
A dialog that displays a single missing record in the system.
import React from 'react' import cx from 'classnames' const Action = ({ active, children, class: className, onClick }) => active ? ( <span className={cx('action action_selected', className)} > {children} </span> ) : ( <a className={cx('action', className)} onClick={e => { ...
Create action tag for a node with no children
import UserEmailForm from '../../user/emailForm/main.js'; import React from 'react'; require('./styles.scss'); export default class SignupView extends React.Component { constructor() { super(); } render() { return ( <div id="signup-view"> <div className="col-xs-12 signup-form"> ...
export a single signup view
import React from 'react' import Menus from './Menus' import InputThumb from './InputThumb' const isAnyLoading = ({ img, menus }) => { const all = menus.concat(img) return all.some(x => x === true) } const FormRestaurant = (props) => { const MAX_MENU = 7 const { form, errors, loading, onDelete...
export function for missing missing params
import React from 'react'; import $ from "jquery"; import Promise from 'bluebird' import MapLoading from './MapLoading2'; import './map-loading-slider.less'; class MapLoadingSlider extends React.Component { constructor(...args) { super(...args); this.state = { index: 1 }; } componentDidMount(...
The base class for the loading - slider component.
//main.js import React from 'react'; import {render} from 'react-dom'; import Greeter from './Greeter'; import './main.css'; render(<Greeter />, document.getElementById('root'));
Imports a bunch of components from React and react - dom.