code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import _extends from "@babel/runtime/helpers/esm/extends"; import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; import _createClass from "@babel/runtime/helpers/esm/createClass"; import React from 'react'; import { SheetsRegistry } from 'jss'; import StylesProvider from '../StylesProvider'; import c...
Creates a default dependency on the server - side page.
import React from 'react'; import CSSModules from 'react-css-modules'; import style from './style'; class Home extends React.Component { constructor(props) { super(props); this.state = { features: [ 'React, Redux', 'React Router', 'Redux Simple Router', 'Node Sass, Boots...
A component that can be used to render a sequence of nodes.
import React from 'react'; import MorphTransition from './MorphTransition'; import { Surface, Transform, Shape, } from 'ReactNativeART'; export default class MorphTransitionNative extends MorphTransition { render() { var width = this.props.width; var height = this.props.height; ...
A default base class for all MorphTransitionNative classes.
import React from 'react'; import DataProcessor from './DataProcessor'; export default class SparklinesNormalBand extends React.Component { static propTypes = { style: React.PropTypes.object }; static defaultProps = { style: { fill: 'red', fillOpacity: .1 } }; render() { ...
A sparkline component that shows a series of missing components in the mean and standard deviation of the series.
import React from 'react'; // Icon taken from: https://github.com/spiffcode/ghedit export const Collapse = (props) => ( <svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='-1 0 16 16' {...props}> <path fill='#C5C5C5' d='M14 1v9h-1V2H5V1h9zM3 3v1h8v8h1V3H3zm7 2v9H1V5h9zM8 7H3v5h5V7z'/> ...
Collapse a single node in a sequence of nodes
import React from 'react'; import App from './containers/App'; import '../bower_components/bootstrap/dist/css/bootstrap.css'; import '../bower_components/font-awesome/css/font-awesome.css' import '../css/main.css'; React.render(<App />, document.getElementById('root'));
Imports a single application.
import React from 'react'; import THREE from 'three'; const gameWidth = 600; const gameHeight = 600; export default [ <meshBasicMaterial key={ 84940 } resourceId="selectionWireframe" color={0x66ff00} wireframe />, <shape resourceId="row" key={ 84941 } > ...
Generate a sequence of colors for a single node.
import React, { Component } from 'react'; import { Link } from 'react-router'; import Pagination from "../../components/Pagination"; import DeviceProfileStore from "../../stores/DeviceProfileStore"; import SessionStore from "../../stores/SessionStore"; class DeviceProfileRow extends Component { render() { retu...
The base component for all device - profiles that can be viewed in a specific organization.
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React, { Component } from 'react'; // eslint-disable-line no-unused-vars import EventEmitter from 'eventemitter3'; import { canUseDOM } from '../../node_modules/react/lib/ExecutionEnvironment'; let EE; let viewport = {width: 1366, height:...
The main function for the withViewport component.
// @flow weak import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from 'material-ui/styles'; import Paper from 'material-ui/Paper'; import Grid from 'material-ui/Grid'; const styles = theme => ({ root: { flexGrow: 1, marginTop: 30, }, paper: { padding: 16, textAl...
A component that displays a weak node in the hierarchy of nodes that are not part of a hierarchy.
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './editor/containers/App'; import MainPanel from './editor/containers/MainPanel'; export default ( <Route path="/" component={App}> <IndexRoute component={MainPanel} /> </Route> );
export default function
import React from 'react'; import { createDevTools } from 'redux-devtools'; // Monitors are separate packages, and you can make a custom one import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; import SliderMonitor from 'redux-slider-monitor'; // createDevTools t...
createDevTools creates a DevTools component from a single managed component.
import React from 'react' import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { Dropdown } from 'semantic-ui-react' import { RequestParameterNames } from '../../../constants/requestparameters'; import { scopeOptions, defaultScope } from '../../../constants/scope'; import { search ...
A base class for filtering items by scope.
import React from 'react' import ReactDOM from 'react-dom' import './index.css' import App from './App' import registerServiceWorker from './registerServiceWorker' ReactDOM.render(<App name='hello' />, document.getElementById('root')) registerServiceWorker()
Imports a single application.
import React from 'react'; import Root from './containers/Root'; React.render( <Root />, document.getElementById('root') );
Renders a into a DOM.
import React, { Component } from 'react'; import onecolor from 'onecolor'; // 0: color space, 1: property name, 2: number of gradients const values = { h: ['hsl', '_hue', 360], s: ['hsl', '_saturation', 3], l: ['hsl', '_lightness', 3], r: ['rgb', '_red', 2], g: ['rgb', '_green', 2], b: ['rgb', '_blue', 2],...
A component which renders a color - rect based on a list of colors.
import React, { Component } from 'react'; import { render } from 'react-dom'; import Button from '../../index'; import './index.less'; export default class BaseDemo extends Component { render() { return ( <div> <Button iconType="iconfont icon-add" shape="squared"></Button> <Button iconType="ic...
The base demo class
import React from 'react'; import { connect } from 'react-redux'; import { getCoinTitle, getModeInfo, isKomodoCoin, } from '../../../util/coinHelper'; import CoinTileItem from './coinTileItem'; import translate from '../../../translate/translate'; import CoinTileRender from './coinTile.render'; class CoinTile e...
A component that renders a single coin tile.
import React from 'react'; import { Map, TileLayer, LayersControl } from 'react-leaflet' import {GoogleLayer} from '../src' const { BaseLayer} = LayersControl; const key = 'AIzaSyDEG4lyorD61vnJoAHG0FkQERZ-McElZyg'; const terrain = 'TERRAIN'; const road = 'ROADMAP'; const satellite = 'SATELLITE'; const hydrid = 'HYBRID'...
Generate a single GoogleExample object from a sequence of key sequence sequences.
import React from 'react'; import ReactDOM from 'react-dom'; import './style.scss'; import App from './component/app'; ReactDOM.render(<App />, document.getElementById('root'));
Imports a single component.
import React from 'react'; import Dashboard from './Dashboard'; import GlobalNav from './GlobalNav'; class App extends React.Component { render() { var courses = COURSES; return ( <div> <GlobalNav /> <div style={{ padding: 20 }}> {this.props.children || <Dashboard courses={co...
The base App class.
import 'babel-core/polyfill'; import React from 'react'; import { Provider } from 'react-redux'; import configureStore from '../common/store/configureStore'; import App from '../common/containers/App'; const initialState = window.__INITIAL_STATE__; const store = configureStore(initialState); const rootElement = do...
Imports a single node in the DOM.
/*globals COURSES:true */ import React from 'react' import Dashboard from './Dashboard' import GlobalNav from './GlobalNav' class App extends React.Component { render() { return ( <div> <GlobalNav /> <div style={{ padding: 20 }}> {this.props.children || <Dashboard courses={COURSES...
Extend the base App class with a hidden hidden
import useStyles from 'isomorphic-style-loader/useStyles'; import React from 'react'; import PropTypes from 'prop-types'; import s from './Home.css'; import SearchBar from '../../components/SearchBar'; export default function Home({ clients }) { useStyles(s); return <SearchBar clients={clients} />; } Home.propTyp...
Home is a module that exports a single node.
import React from 'react' class HighlightOverlay extends React.Component { constructor(props) { super(props) this.state = { width: 0, height: 0 } } componentDidMount() { this.updateWindowSize() window.onresize = () => this.updateWindowSize()...
A component that highlights a single node in the DOM.
import Icon from '../Icon'; import React from 'react'; import PropTypes from 'prop-types'; import Typography from '../Typography'; import classNames from 'classnames'; import styles from './styles.css'; function ListComposite(props) { const title = ( props.challenge ? props.challengeName : 'Hashtag' )...
ListComposite - A component that exports a sequence of hashtag sequence.
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3....
Missing element in a group of icons
/** * 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 class that exports a single node in the source tree.
import React from 'react'; import classNames from 'classnames'; import BootstrapMixin from './BootstrapMixin'; const Label = React.createClass({ mixins: [BootstrapMixin], getDefaultProps() { return { bsClass: 'label', bsStyle: 'default' }; }, render() { let classes = this.getBsClassSe...
create a label with a bootstrap class
import React from 'react'; import PropTypes from 'prop-types'; import './QuizWrapperComponentStyles.scss'; const propTypes = { children: PropTypes.element.isRequired }; const defaultProps = {}; const QuizWrapperComponent = ({ children }) => ( <div className="quiz-wrapper"> { children } </div> ); QuizWrapp...
export a quiz - wrapper component that wraps a single node in a div.
import React from 'react'; import PropTypes from 'prop-types'; import { TouchableHighlight } from 'react-native'; export default function Button({ onPress, children }) { return <TouchableHighlight onPress={onPress}>{children}</TouchableHighlight>; } Button.defaultProps = { children: null, onPress: () => {}, }; ...
Button for selecting a node in a tree.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalPhone = (props) => ( <SvgIcon {...props}> <path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-...
A component that exports a sequence of maps.
import Check from 'teatime-components/component/Check'; import React from 'react'; export default () => ( <Check id='checks-id' label='checks label' name='check-control'/> );
Check - control
import classnames from 'classnames'; import evalDependsOn from '../utils/evalDependsOn.js'; import React from 'react'; import { findDOMNode } from 'react-dom'; import { FormField, FormInput, FormNote } from '../../admin/client/App/elemental'; import blacklist from 'blacklist'; import CollapsedFieldLabel from '../compon...
The default implementation of a component that creates a nested field.
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from ...
Creates a new radio with a label and a child.
import React from 'react' const PropTypes=require('prop-types'); class SubMenu extends React.Component{ getItem(){ const {children} = this.props; const item = React.Children.map(children, (child,id) => { if (!child) { alert('没有子元素') return; ...
A component that can be rendered as a sub - menu.
/* eslint react/prop-types: 0 */ import React from 'react'; import Select from 'react-select'; import CustomRenderField from './components/CustomRenderField'; import MultiSelectField from './components/MultiSelectField'; import RemoteSelectField from './components/RemoteSelectField'; import SelectedValuesField from '...
The main function that creates all the necessary components.
import React, { Component } from 'react'; class AuthHome extends Component { render() { return ( <div> You are logged in! </div> ) } } export default AuthHome;
The default component that displays a menu in the UI.
import React from 'react'; import {storiesOf, action} from '@kadira/storybook'; import {StatefulNumberInput, NumberInputControls} from '../src'; /** * */ storiesOf('NumberInput', module) .addWithInfo( 'default', ` Keyboard interactions when the focus is inside the input: * \`↑\` increments the value * \`↓\` ...
The main function that imports all of the components of a sequence of keyboard interactions and actions.
import React from 'react'; export default class SocialShare extends React.Component{ render() { return (<div> <ul className="barra-social"> <li className="s-fb"> <a href={`https://www.facebook.com/sharer.php?u=${this.props.nota.post_URL}`} className="fa fa-facebook"></a> </li> ...
The base class for all non - social components.
import React, { Component } from 'react'; import Slider from 'material-ui/lib/slider'; export default class BookmarkSlider extends Component { constructor(props) { super(props); } onSliderChange(e, value) { this.props.changeBookmarkThreshold(~~value, e.clientX); } render() { let x = this.props....
The BookmarkSlider component is a wrapper around a UI element that can be rendered to a bookmark filter.
/** * @fileOverview The logo component * @name index.js<Logo> * @license GNU General Public License v3.0 */ import React from 'react' const Logo = () => ( <div className='logo-content'> <svg className='octopus-logo'> <use xlinkHref='#octopus' /> </svg> <h1 className='logo-title'> <span c...
Show logo for a single node in the sequence of components that have a non - empty sequence.
import React from 'react'; import { Table } from 'antd'; import CrudActions from '../actions/CrudActions'; import CrudStore from '../stores/CrudStore'; class Component extends React.Component { constructor(props){ super(props); this.onChange = this.onChange.bind(this); this.state = CrudStore.getState()...
Component class which extends React. Component and provides a way to render a table.
import React from 'react' import { assert } from 'chai' import { shallow } from 'enzyme' import { Foo, Bar } from '../components' export function testBarComponent() { const wrapper = shallow(<Bar/>) assert.equal(wrapper.text(), 'a bar. drink up!') } export function testFooComponent() { const wrapper = shallow(<...
Test if a component is a reserved element.
import React from 'react'; import Gravatar from 'react-gravatar'; var Option = React.createClass({ propTypes: { addLabelText: React.PropTypes.string, className: React.PropTypes.string, mouseDown: React.PropTypes.func, mouseEnter: React.PropTypes.func, mouseLeave: React.PropTypes.func, option: React.PropTy...
The option component that is rendered when a user clicks on a node in a dropdown list.
import React from 'react'; import CounterContainer from './CounterContainer'; function App() { return ( <div> <h1>Counter</h1> <CounterContainer /> </div> ); } export default App;
The default implementation of that exports the default
/* eslint-disable no-unused-vars*/ import React from 'react'; /* eslint-enable no-unused-vars*/ import { Router, Route, IndexRoute } from 'react-router'; import createBrowserHistory from 'history/lib/createBrowserHistory'; import App from './App/'; import Home from './Home/'; const Routes = () => ( <Router history=...
export routes for a single
import React from 'react' import ReactDOM from 'react-dom' import { Button } from 'antd' import app from './app.less' import title from './title.less' import antShowcase from './ant-showcase.less' const Title = ({ content }) => { return <h1 className={ title.normal }>{ content }</h1> } const AntShowcase = () => {...
Imports a single node in the hierarchy.
// @flow import React from 'react'; class Tuple extends React.Component<{children: [boolean, string, number]}, void> {} class TupleOne extends React.Component<{children: [boolean]}, void> {} <Tuple />; // Error: `children` is required. <Tuple>{true}{'foo'}{42}</Tuple>; // OK: All the tuple items. <Tuple>{true}foo{...
The base implementation of which is used to determine if a node is missing a tuple or not.
import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; class App extends Component { render() { return ( <div className="App"> <div className="App-header"> <img src={logo} className="App-logo" alt="logo" /> <h2>Welcome to React</h2> ...
The base class for all components that are not in React.
'use strict'; require('./css/Button.less'); import React from 'react'; import {Link} from 'react-router'; /** * Styled button component. */ export default class Button extends React.Component { constructor(props) { super(props); } render() { return ( <div> <h5> This is my button co...
The button component which is a component that is rendered on a page.
import React from 'react'; import { Provider } from 'react-redux'; import routes from '../routes'; import { ReduxRouter } from 'redux-router'; import DevTools from './DevTools'; import { createDevToolsWindow } from '../utils'; import HTML5Backend from 'react-dnd-html5-backend'; import { DragDropContext } from 'react-dn...
The root component of a node that is rendered by a React component.
import React, { Component } from 'react'; import Project from '../project'; export default class IntelliJoe extends Component { render() { const images = [ "../../static/images/embedded/intellijoe/blockdiagram.png" ]; return( <Project title="Intelli Joe!" description="I part...
The IntelliJoe component that is used to render a blockdiagram.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceSignalWifi0Bar = (props) => ( <SvgIcon {...props}> <path fillOpacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/> </SvgIcon> ); DeviceSignalWifi...
Devolve a device - signal - wifi0 bar
import React from 'react'; import { StyleSheet, View, Text, Dimensions, ScrollView, } from 'react-native'; import MapView from 'react-native-maps'; const { width, height } = Dimensions.get('window'); const ASPECT_RATIO = width / height; const LATITUDE = 37.78825; const LONGITUDE = -122.4324; const LATITUDE_...
Create a hidden hidden
import React from 'react'; import { storiesOf } from '@storybook/react'; import { Switch } from '../../src/base'; storiesOf('base.Switch', module) .add('initialize by default', () => ( <Switch /> )) .add('initialize switch defaults isOpen true', () => ( <Switch width={80} height={20} isOpe...
Imports a bunch of modules that are not part of a base. Switch module.
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Toggle from 'react-toggle'; import noop from 'lodash/noop'; import StatusContent from '../../../components/status_content'; import { MediaGallery, Video } from '../../ui/util/async-component...
The status check box class
import React from 'react'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; export default class RemoteSorting extends React.Component { constructor(props) { super(props); } render() { return ( <BootstrapTable data={ this.props.data } remote={ true }...
A component that sorts the products by ID name and price.
import React from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import Dropzone from 'react-dropzone'; import { FormElement, FormElementControl, FormElementError, } from '../Form'; import { Button } from '../Button'; const preventDefault = e => e.preventDefault(); const FileSelector ...
The base class for a single node.
import React, { Component } from 'react'; import { connect } from 'react-redux'; class Background extends Component { render() { if (!!this.props.background && this.props.background.length > 0) { return ( <img id="bg" src={this.props.background} alt="background image" /> ...
A component that is rendered in a background.
import React from 'react'; import Tabs, { Tab } from '../../src/tabs/Tabs'; class Demo extends React.Component { constructor(props) { super(props); this.state = { activeTab: 0 }; this._handleChange = this._handleChange.bind(this); } _handleChange(tabId) { ...
Demo component that shows a list of key sequence sequences.
import React, { Component } from 'react'; import { Image } from 'react-native'; const launchscreen = require('../../../images/shadow.png'); export default class SplashPage extends Component { static propTypes = { navigator: React.PropTypes.shape({}), } componentWillMount() { const navigator = this.pr...
A component that wraps a page in a modal window.
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import 'whatwg-fetch'; import * as util from './util.js'; import 'babel-polyfill'; import Container from './container'; class App { constructor() { this.initializeSDK(); this.userData = {}; this.render(); } async updateUserD...
The main app class which is a class which implements the logic for a specific flag.
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-runtime/helpers/inherits'; import _extends from...
A dropdown component that is used to toggle or activate a dropdown.
import React, { Component } from 'react'; import { Row, Col, Well } from 'react-bootstrap'; import Page from '../Page'; import { main, links } from '../Readme'; class About extends Component { render() { return ( <Page pageName="About"> <Row> <Col md={8}> <Well dangerouslySetI...
Imports a single component that is not dangerously set.
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 { fetchFavourites } from '../../actions/interactions'; import { ScrollContainer } fr...
The favourites component
/* * SonarQube * Copyright (C) 2009-2016 SonarSource SA * mailto:contact AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License...
Provides a component that can be used to enter a single key sequence in a multi - value form.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NavigationSubdirectoryArrowRight = (props) => ( <SvgIcon {...props}> <path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"/> </SvgIcon> ); NavigationSubdirectoryArrowRight = pure(Navigat...
A component that exports a navigation subtitle in a right - to - left manner.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Container, Header, Title, Content, Button, Icon, Left, Right, Body, Text, H3 } from 'native-base'; import { Actions } from 'react-native-router-flux'; import { actions } from 'react-native-navigation-redux-helpers'; import { ope...
A component that is a component that is able to render a key sequence without navigation.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageTagFaces = (props) => ( <SvgIcon {...props}> <path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c....
A component that renders a tag with a component that is not attached to a component.
// @flow import React, { Component } from 'react'; import { Link } from 'react-router'; import styles from '../styles/views/Home.less'; export default class Home extends Component { render() { return ( <div> <div className={styles.container}> <h2>Home</h2> <Link to="/counter">t...
The default implementation of a sequence of components that can be rendered to a counter.
import React from 'react' import { Link } from 'react-router' import { FORM_FIELDS as PERSONAL_INFORMATION_FORM_FIELDS } from '../../PersonalInformation/config/personal_information_config' import { FORM_FIELDS as DENTAL_HISTORY_FORM_FIELDS } from '../../DentalHistory/config/dental_history_config' import { FORM_FIELDS a...
Package that implements the standard sequence of missing elements.
import React from 'react'; import * as Virtualized from 'react-virtualized'; class StickyList extends React.PureComponent { static defaultProps = { itemToGroup: item => item && item['group'], wrapperStyle: {}, }; getGroupedItems = (items, itemToGroup) => { let newIndex = 0; const itemsAndGroups ...
A component that renders a list of items in a table.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import {selectBook} from "../actions/index"; import {bindActionCreators} from 'redux'; /* * React Component that returns a books html list */ class BookList extends Component{ renderlist() { // For each book return this.props...
The base class for a list of books
import React from 'react' import './styles.css' export default class NotFound extends React.Component { render() { return ( <div className="not-found"> <h1>404</h1> <div className="travolta"></div> </div> ) } }
The default implementation of NotFound class.
import React from 'react' import run from '../../run' import './styles.css' import AddAssignment from '../AddAssignment' import Assignments from '../Assignments' import appMounted from '../../events/appMounted' class App extends React.Component { componentDidMount () { run('appMounted', appMounted) } rende...
The base class for a sequence of components that can be rendered by a component.
import React from 'react'; import ReactDOM from 'react-dom'; var classNames = require('classnames'); //var Colours = require('../mixins/Colours'); //var Defaults = require('../mixins/Defaults'); var LoginService = require("../login/LoginService"); var CONFIG = JSON.parse(localStorage.getItem('CONFIG')); //module.expor...
The login component is a component that can be used to login a user.
import React from 'react' import {Icon} from 'antd' import styles from './error.less' const Error = () => <div className='content-inner'> <div className={styles.error}> <Icon type='frown-o' /> <h1>404 Not Found</h1> </div> </div> export default Error
The default error class for missing or unknown node.
import React from 'react' import { connect } from 'cerebral/react' import { props, signal, state } from 'cerebral/tags' import translations from '../../common/compute/translations' export default connect( { // autoFocus clients: state`clients.all`, // field // placeholderKey value: state`projects...
Generate a dropdown with a dropdown of all the keys in a sequence of clients.
import React from 'react'; import Title from 'react-title-component'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import tableReadmeText from './README'; import TableExampleSimple from './Exampl...
Imports a single - language language - dependent module.
import React from 'react' const VideoDetail = ({ video }) => { if (!video) { return <div>Loading...</div> } const videoID = video.id.videoId const url = `https://www.youtube.com/embed/${videoID}` return( <div className="video-detail col-md-8"> <div className="embed-responsive embed-responsiv...
The default function for the missing - node - id - filter - export
import React, { Component } from 'react'; class GoogleMap extends Component{ componentDidMount(){ new google.maps.Map(this.refs.map,{ zoom: 12, //放大倍數 center:{ lat:this.props.lat, //經緯度 lng:this.props.lon } }); } render() { // return <di...
A component that is rendered on a Google Map.
import express from 'express' import browserify from 'browserify' import React from 'react' import ReactDOM from 'react-dom/server' import path from 'path' import cookieParser from 'cookie-parser' import bodyParser from 'body-parser' import passport from './auth/passport' import { Html } from './components' import expr...
The main browser of the application
import React, { Component } from 'react'; import { Button, Card, Form, FormGroup, Input } from 'reactstrap'; import { login, getMyUserData } from 'actions/user'; import StatusAlert from 'components/StatusAlert'; import * as css from './css'; import { isValidEmail } from 'helper'; class LoginForm extends Component ...
The login form component
/*jshint esversion: 6 */ import React from 'react'; import Panel from 'react-bootstrap/lib/Panel'; import Table from 'react-bootstrap/lib/Table'; const rest = require('rest'); const mime = require('rest/interceptor/mime'); export class ShowWatcher extends React.Component { constructor(props) { super(pro...
Demonstrates how to show a single node in a system that has a single user.
import React from 'react'; import { linkTo } from '@storybook/addon-links'; import { Welcome } from '@storybook/react/demo'; export default { title: 'Other/Demo/Welcome', component: Welcome, }; // Some other valid values: // - 'other-demo-buttonmdx--with-text' // - 'Other/Demo/ButtonMdx' export const ToStorybook ...
export to a private function
import React from 'react' import { storiesOf } from '@storybook/react' import Productcard from 'fyndiq-component-productcard' storiesOf('Product card', module) .addDecorator(story => ( <div style={{ backgroundColor: '#c4e5e9', padding: '1em' }}>{story()}</div> )) .addWithInfo('default', () => ( <Productc...
Add a decorator to the top - level hierarchy of a sequence of components.
import React from 'react' import Vertical from './vertical.js' export default class Panel extends React.Component { render() { const { props } = this return ( <Vertical aria-labelledby={props['aria-labelledby']} role={props.role} ref={props._ref} style={{ heig...
The main function for the Tree.
import React, { Component } from 'react'; import debounce from 'lodash.debounce'; import { Input, Box } from 'BuildingBlocks'; export default class index extends Component { setupEvent = event => { event.persist(); this.handleChange(event); }; handleChange = debounce(event => { const value = event.t...
The index component which is used to display a search box in the UI.
'use strict'; import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import CSSModules from 'react-css-modules'; import Icon from '../Icon'; @CSSModules(require('./style.less')) export default class Footer extends Component { render() { return ( <footer styleName="root"> ...
The main function for the footer.
'use strict'; import React from 'react'; import icons from '../icons'; import PropertiesLabel from '../properties/properties-label'; import PropertiesTitle from '../properties/properties-title'; import PropertiesValue from '../properties/properties-value'; import PropertiesEditor from '../properties/properties-editor...
The default implementation of which exports a single node in a hierarchy.
import React from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import Modal from './Modal'; import * as uiActions from '../../services/ui/actions'; import { I18n, i18n } from '../../locale'; const hotkeys = [ { label: 'info', keysets: [['i']] }, { label: 'pla...
Create a class that displays a list of keys with a unique state.
// @flow import React, { Component } from 'react'; import { Link } from 'react-router'; import styles from './Counter.css'; class Counter extends Component { props: { increment: () => void, incrementIfOdd: () => void, incrementAsync: () => void, decrement: () => void, counter: number }; rend...
A component that displays a fade in alert when a user clicks on a counter.
import PropTypes from 'prop-types'; import React from 'react'; import Alert from 'Components/Alert'; import { kinds } from 'Helpers/Props'; import styles from './Form.css'; function Form({ children, validationErrors, validationWarnings, ...otherProps }) { return ( <div> { validationErrors.length ||...
Generate a form with a single node with no children.
/** * Created by diop on 07/05/2017. */ import React from 'react'; import LoginFormComponent from './LoginForm'; import SignUpFormComponent from './SignUpForm'; import { Divider, Grid } from 'semantic-ui-react'; class Auth extends React.Component{ render(){ return( <Grid columns="equal" centered>...
Demonstration of the nagios - auth class.
import React from 'react' import { Router, Route, IndexRoute, hashHistory } from 'react-router' import { App, Whoops404 } from './components' import SkiDayCount from './components/containers/SkiDayCount' import AddDayForm from './components/containers/AddDayForm' import SkiDayList from './components/containers/SkiDayLi...
Imports a single sequence of Nagios.
import ActionIcon from 'binary-ui-components/mobile/ActionIcon'; import IconArrowLeft from 'binary-ui-icons/binary/ArrowLeft'; import IconArrowRight from 'binary-ui-icons/binary/ArrowRight'; import React from 'react'; import BinaryUICarousel from 'binary-ui-carousel'; const colors = ['#AA3939', '#AA6C39']; function ...
The base class for a single menu item.
import React from 'react'; import * as snapshot from '../utils/snapshot'; import { View, Text, TouchableOpacity, StyleSheet } from 'react-native'; /** * Simple developer menu, which allows e.g. to clear the app state. * It can be accessed through a tiny button in the bottom right corner of the screen. * ON...
Simple developer menu which allows e. g. to clear the app state.
import React from 'react'; import Button from '../src/Button'; export default <Button flat waves='light'>Button</Button>;
Imports a React component and exports it as a default .
import React from 'react'; import {PixelRatio} from 'react-native'; class TopTabs extends React.Component { static navigatorStyle = { topTabTextColor: '#ffffff', selectedTopTabTextColor: '#ff505c', // Icons topTabIconColor: '#ffffff', selectedTopTabIconColor: '#ff505c', // Tab indicator ...
Top tabs class