code
stringlengths
26
5k
intent
stringlengths
3
2.56k
/* * Copyright (C) 2015 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
Displays a list of all items in the hierarchy that are not part of the current state.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let FastForward = props => <SvgIcon {...props}> <path d="M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z" /> </SvgIcon>; FastForward = pure(FastForward); FastForward.muiName = 'SvgIcon'; export default FastForwar...
A simple function to export a single node in a hierarchy.
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { deleteDownloadClient, fetchDownloadClients } from 'Store/Actions/settingsActions'; import createSortedSectionSelector from 'Store/Selectors/createSorte...
Create a component that will handle download clients.
import React from 'react'; import Immutable from 'immutable'; import { Models } from 'lattice'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import InlineEditableControl from '../../../components/controls/InlineEditableControl'; import { isNonEmptyString } from '../../../utils/La...
A component that renders a section of a organization description.
/* Copyright 2016 Aviral Dasgupta Copyright 2017 Vector Creations Ltd Copyright 2017, 2018 New Vector Ltd Copyright 2018 Michael Telatynski <7t3chguy@gmail.com> 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 ...
A class that implements the logic of the n - node autocomplete.
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './index.css'; ReactDOM.render(<App />, document.getElementById('root'));
Imports a React application.
import polyfill from 'babel-polyfill'; // eslint-disable-line no-unused-vars import d from 'debug'; import React from 'react'; import ReactDOM from 'react-dom'; import { Router, browserHistory } from 'react-router'; import routes from './components/Routes'; import app from './app'; import fetchRouteData from 'utils/fe...
Imports a single node in the application and renders it to the browser.
// @flow import React from 'react'; import Loading from '.'; export default <Loading />;
Imports a sequence of missing dependencies.
import React from 'react'; import { Text, } from 'react-native'; import { Font, } from 'exponent'; export class MonoText extends React.Component { render() { return ( <Text {...this.props} style={[this.props.style, Font.style('space-mono')]} /> ); } } export class HangmanText extends React.Compo...
Private function to export a single node from a React component.
import React from 'react'; export default class Install extends React.Component { render() { return ( <section className="mobile-placeholder col-xs row center-xs middle-xs"> <div> <img alt="Actor messenger" className="logo" src="assets/img/logo.png" ...
Package that exports a component with a component that is not installed on the system.
import React from 'react'; import RedirectWithStatus from 'components/RedirectWithStatus'; const Documentation = () => { return ( <RedirectWithStatus from="/docs" to="/docs/api" /> ); }; export default Documentation;
The default documentation for a missing - js middleware.
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call &...
A component that will be displayed when a user navigates away from a screen.
/* * Copyright (C) 2019 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
Controller for a single n - node tray.
import React from 'react' import Image from 'next/image' import img from '../public/test.jpg' const Page = () => { return ( <p> <Image id="inside-paragraph" src={img} /> </p> ) } export default Page
Page Exception - > Page Exception
//@flow import React from 'react' import LeftFrame from './LeftFrame' import RightFrame from './RightFrame' const style = { leftFrame: { position: 'absolute', width: '50%', height: '100%', borderRight: '1px solid black', textAlign: 'center' }, rightFrame: { position: 'absolute', left:...
A component that renders a object in a frame.
import React from 'react'; import gql from 'graphql-tag'; import { useQuery } from '@apollo/react-hooks'; import EntityLabel from './utilities/EntityLabel'; const GROUP_TYPE_CAMPAIGN_LIST_QUERY = gql` query GroupTypeCampaignListQuery($groupTypeId: Int!) { paginatedCampaigns(groupTypeId: $groupTypeId) { ed...
Generate a list of all tags in a group type.
import _extends from 'babel-runtime/helpers/extends'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _createClass from 'babel-runtime/helpers/createClass'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-runtime/helpers/i...
Creates a table cell with a text property that can be rendered with a table cell.
import React from 'react'; import Select from 'react-select'; var ValuesAsNumbersField = React.createClass({ displayName: 'ValuesAsNumbersField', propTypes: { label: React.PropTypes.string }, getInitialState () { return { options: [ { value: 10, label: 'Ten' }, { value: 11, label: 'Eleven' }, { ...
A field that can be used to select a numeric value in a dropdown.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareKeyboard = (props) => ( <SvgIcon {...props}> <path d="M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v...
Hardware keyboard.
import React from 'react'; import Snackbar from 'material-ui/Snackbar'; import { closeNot } from 'actions/NotActions'; class Notification extends React.PureComponent{ handleActionTouchTap = () => { const {dispatch} = this.props; dispatch(closeNot); }; handleRequestClose = () => { const {dispatch} =...
The Notification component which is used to show a Snackbar when a user clicks on a button.
import React from 'react'; import {storiesOf} from '@storybook/react'; import {withInfo} from '@storybook/addon-info'; import DynamicWrapper from 'app/components/dynamicWrapper'; storiesOf('DynamicWrapper', module).add( 'default', withInfo( ` Use this to wrap dynamic content (i.e. dates) for acceptance/sn...
Add a dependency that wraps dynamic content with a fixed content
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 React from 'react'; import PropTypes from 'prop-types'; import { Provider as ReduxProvider } from 'react-redux'; const ContextType = { // Enables critical path CSS rendering // https://github.com/kriasoft/isomorphic-style-loader insertCss: PropTypes.func.isRequired, // Universal HTTP client fetch: Pro...
The top - level React component that can be used to render a critical path.
/* * Copyright (C) 2015 Actor LLC. <https://actor.im> */ import _ from 'lodash'; import React from 'react'; import ReactMixin from 'react-mixin'; import addons from 'react/addons'; import { MessageContentTypes } from 'constants/ActorAppConstants'; import MessageActionCreators from 'actions/MessageActionCreators'; ...
The MessagesSection component is a component that can be used to show a message in a specific month.
import React from 'react'; import WizardActions from '../actions/wizard-actions'; export default class SortingHat extends React.Component { onSortingRequested() { WizardActions.sortIntoHouse(); } render() { return ( <img src="/img/sorting-hat.jpg" onClick={this.onSortingRequested}></img> ); ...
The sorting - hat component
import React from 'react'; import 'isomorphic-fetch'; import {RouteHandler} from 'react-router'; import Transmit from 'react-transmit'; import {createStore, combineReducers} from 'redux'; import {Provider} from 'react-redux'; import * as reducers from '../reducers/index'; class AppContainer extends React.Component { ...
The base app container class.
import React from 'react'; import PropTypes from 'prop-types'; import FontIcon from '../../FontIcon'; import ThemeService from '../../styles/ChamelThemeService'; /** * Delete button * * @param props * @param context * @returns {ReactDOM} * @constructor */ const DeleteIcon = (props, context) => { let theme = ...
Create a component that deletes a specific component by default.
import React from 'react'; import classnames from 'classnames'; import IronSelector from '../iron-components/iron-selector'; import DeviceView from './device-view'; import stylesheet from './px-demo-helpers.scss'; class DeviceLayoutViewer extends React.Component { render(){ const { device, src, ...
The base demo component for a single device.
import React from 'react'; import PropTypes from 'prop-types'; const NoPermissionClusterView = ({ cluster }) => { return ( <div> <div className="alert alert-danger"> <i className="fa fa-lock fa-lg" aria-hidden="true" /> Insufficient Privileges. Only administrators can modify boundary detail...
The NoPermissionClusterView class
import React from 'react'; import { browserHistory } from 'react-router'; import { ListGroup, ListGroupItem, Alert, Label } from 'react-bootstrap'; import Confirm from 'react-confirm-bootstrap'; import FontAwesome from 'react-fontawesome'; import moment from 'moment'; import business from 'moment-business'; import { Be...
Provides a function to render a list of all holidays that are not part of a developer.
// shameless copied from react-bootstrap import 'colors'; import express from 'express'; import httpProxy from 'http-proxy'; import ip from 'ip'; import path from 'path'; import React from 'react'; import ReactDOMServer from 'react-dom/server'; import {match, RoutingContext} from 'react-router'; import Root from './s...
The main function that is used to serve a single node - hotkey.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsLocalMovies = (props) => ( <SvgIcon {...props}> <path d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"/> </Svg...
A component that exports a sequence of maps of the movies in a group of icons.
import React from 'react'; import { WebView } from 'react-native'; import backendService from '../../shared/backendService'; import I18n from '../../i18n/i18n'; export default class Students extends React.Component { render() { return ( <WebView bounces={false} source={{ uri: `${b...
The base class for all components that are not part of a component s hierarchy.
import React from 'react'; import { branch } from 'baobab-react/higher-order'; import CommonHeader from '../../components/header'; class Header extends React.Component { componentDidMount() { const {owner, name} = this.props.params; document.title = `项目 ${name} (${owner}) | Drone`; } render() { retu...
A component that is rendered on top of a page.
import React, { Component } from 'react'; import { browserHistory } from 'react-router'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import AppBar from 'material-ui/AppBar'; import LeftNav from 'material-ui/Drawer'; import MenuItem from 'material-ui/MenuItem'; import FlatButton fr...
A component that displays a header with a link to the login screen and a popup to the login screen.
import React from 'react'; import PropTypes from 'prop-types'; import CSSModules from 'react-css-modules'; import FontAwesome from 'react-fontawesome'; import Media from 'react-bootstrap/lib/Media'; import Panel from 'react-bootstrap/lib/Panel'; import Image from 'react-bootstrap/lib/Image'; import CategoryImage from ...
A component that renders a single category in the article box.
import React from 'react'; import Ul from './Ul'; import Wrapper from './Wrapper'; 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={...
List - List of components that can be rendered by a component
import React from 'react'; import ReactDOM from 'react-dom'; import JqxChart from '../../../jqwidgets-react/react_jqxchart.js'; class App extends React.Component { render() { let sampleData = [ { Index: '1', SerieA: -30, SerieB: -10, SerieC: -25 }, { Index: '2', SerieA: -25, SerieB...
App - A component that shows a stacked Pyramid chart.
import React, { Component } from 'react'; import { render } from 'react-dom'; import Header from './header'; import Gallery from './gallery'; import Footer from './footer'; export default class App extends Component { render() { return ( <div> {this.props.children} </div> ); } }
Create a component that extends the base class
import React from 'react'; import App from './containers/App'; React.render( <App />, document.getElementById('root') );
Renders a into the DOM.
import React from 'react'; import { connect } from 'react-redux'; import { remote } from 'electron'; import path from 'path'; import { createImmutableJSSelector } from '../utils'; import ViewChoiceDropdown from '../components/ViewChoiceDropdown'; import CartoonButton from '../components/CartoonButton'; import TextFiel...
Private function to render a single missing - asset modal.
/* eslint-disable import/default */ import 'babel-polyfill' import React from 'react' import {render} from 'react-dom' import configureStore from './store/configureStore' import {Provider} from 'react-redux' import {Router, browserHistory} from 'react-router' import routes from './routes' import './styles/main.min.css'...
Imports a single node in the app.
import React from 'react'; import Header from '../public/Header'; import TextField from 'material-ui/TextField'; import RaisedButton from 'material-ui/RaisedButton'; import ClassNames from 'classnames'; class Photo extends React.Component { constructor(props){ super(props) this.handleToggle = this.h...
A component that creates a photo which can be opened or closed.
/** * app.js * * This is the entry file for the application, only setup and boilerplate * code. */ // Needed for redux-saga es6 generator support import 'babel-polyfill'; /* eslint-disable import/no-unresolved, import/extensions */ // Load the favicon, the manifest.json file and the .htaccess file import 'file?n...
JS code generation
import React from 'react'; import boom from '../assets/images/boom.gif'; import PropTypes from 'prop-types'; export default function Layout({ children }) { return ( <div> <h1>Hello, world!</h1> {children} <img src={boom} /> </div> ); } Layout.propTypes = { children: PropTypes.node }
Layout function for missing node -
import React from 'react'; import PropTypes from 'prop-types'; import { st, classes } from './DatePickerDropdown.st.css'; import ChevronDown from 'wix-ui-icons-common/ChevronDown'; import DropdownBase from '../../DropdownBase'; import TextButton from '../../TextButton'; export default class DropdownPicker extends Reac...
A dropdown picker that opens a dropdown box when a user presses a key on a date picker.
/* @flow */ import React, { Component } from 'react'; import { TouchableOpacity, View } from 'react-native'; import { Text } from '../basic/Text'; import { Button } from '../basic/Button'; import { connectStyle } from '@shoutem/theme'; import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; class SButton ...
A component that wraps a button with
import React from 'react' import PropTypes from 'prop-types' import AuthFields from '~/components/AuthFields' import validate from '~/components/AuthFields/validation' export default class SignInForm extends React.Component { static propTypes = { mutations: PropTypes.shape({ signIn: PropTypes.func.isRequir...
The signInForm component is a component
import PropTypes from 'prop-types'; import React from 'react'; import BasicWebChat from './BasicWebChat'; import Composer from './Composer'; // Please keep this file as simple as possible. This is for setting up the surface (a.k.a. <Composer>) and <BasicWebChat> only. // Web developers may choose to put things befor...
Exports a single with defaultProps and props.
import React, { Component } from 'react'; var Data = require('../data.json'); import Popup from 'react-popup'; import '../popup.css'; class Motivations extends Component { constructor() { super(); this.state = { Motivations: Data.Motivations, SpecificMotivations: Data.SpecificMotivations...
Component class for handling a sequence of motivations.
import React from 'react' import PropTypes from 'prop-types' const displayName = 'ArticleFrom' const propTypes = { article: PropTypes.object.isRequired, errors: PropTypes.object.isRequired, onChange: PropTypes.func.isRequired, onSubmit: PropTypes.func.isRequired, } const Form = ({ article, errors, onChange, o...
Generates a form that can be used to create a single branch of a branch of a branch.
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 ...
BreadcrumbItem is a breadcrumb item that shows a link to the inner element of a tree.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceScreenLockPortrait = (props) => ( <SvgIcon {...props}> <path d="M10 16h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1v-1c0-1.11-.9-2-2-2-1.11 0-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1zm.8-6c0-.66.54-1.2 1.2-1....
Devuelte un componente DeviceScreenLockPortrait
import React from 'react'; import { Button as rButton, Card as rCard, Dot, Flex } from 'rebass'; import styled from 'styled-components' export function Shutdown(props) { return ( <div> <img src="images/power-down.svg" style={{ width: "100%" }} /> {props.children} </div>); } export function Regis...
The default component for all unknown components
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; import _extends from "@babel/runtime/helpers/extends"; import React from 'react'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import formControlState from '../FormControl/formControlState'; import withFormControlCont...
The root node of a form control.
import React from 'react'; import Reflux from 'reflux'; import Griddle from 'griddle-react'; import cx from 'classnames'; import { Link } from 'react-router'; import oilsStore from 'stores/oils'; import GriddlePager from 'components/griddlePager'; import Spinner from 'components/spinner'; let oilLinkColumn = React.c...
A default component that creates a column with a default value for a column in a griddle.
import React from 'react'; import ReactDOM from 'react-dom'; import MessageBox from './MessageBox'; function alert(message, title, props) { if (typeof title === 'object') { props = title; } props = Object.assign({ title, message, modal: 'alert', closeOnPressEscape: false, closeOnClickModal: fal...
The next function is the main function that creates a modal dialog alert confirm prompt and msgbox.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorInsertPhoto = (props) => ( <SvgIcon {...props}> <path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/> </SvgIcon> ); EditorI...
A component that renders a component that can be inserted into a component that is not visible in a component.
import React from 'react' import '../../assets/stylesheets/application.css'; import { getStepClass } from '../../utils/utils' import { NAVIGATION_STEPS } from '../../utils/constants' const { CROWDSALE_CONTRACT, TOKEN_SETUP, CROWDSALE_SETUP, PUBLISH, CROWDSALE_PAGE } = NAVIGATION_STEPS export const StepNavigation = ({a...
Exports a sequence of functions that can be used to render a sequence of functions.
import React from 'react'; import classnames from 'classnames'; import Lightbox from 'jsonlylightbox'; // lightbox init const lightbox = new Lightbox(); const lightboxOptions = { animation: false, controlClose: '<i class="material-icons">close</i>' }; lightbox.load(lightboxOptions); let cache = {}; class Image ...
A component that renders a single image in a lightbox.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router'; import * as CitiesActions from '../actions/cities'; class Person extends Component { constructor(props: Object, context: Object) { super(props, context); this.loadRoute = this.load...
A component that can be used to render a city action.
/** * Function to get the shallow output for a given component * As we are using phantom.js, we also need to include the fn.proto.bind shim! * * @see http://simonsmith.io/unit-testing-react-components-without-a-dom/ * @author somonsmith */ // Add missing methods to phantom.js import './pack/phantomjs-shims'; im...
Get the shallow rendered component
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, TabBarIOS, StyleSheet, Text, View, Navigator } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; import List from './app/creat...
Component which is rendered as a hidden hidden
import React from 'react'; import Head from 'next/head'; import Accordion from '../components/accordion'; const data1 = { initialPanelState: true, title: 'Title' }; const data2 = { title: 'Open', alternateTitle: 'Close', content: ` This is a content for second accordion ` }; const Conten...
Generate a template for a single accordion.
/* * HomePage * * This is the first thing users see of our App, at the '/' route */ import React from 'react'; import PropTypes from 'prop-types'; import { Helmet } from 'react-helmet'; import { FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; import { compose } from 'redux'; import { c...
The HomePage component that is rendered when a user clicks on a hidden hidden input.
import React from 'react'; import ReactDOM from 'react-dom'; import getMuiTheme from 'material-ui/styles/getMuiTheme'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import App from './App'; const Root = () => ( <MuiThemeProvider muiTheme={getMuiTheme()}> <App /> </MuiThemeProvider> ); Re...
Imports a single element with a React component that can be rendered by a React component.
/* * Copyright (C) Pootle contributors. * * This file is a part of the Pootle project. It is distributed under the GPL3 * or later license. See the LICENSE file for a copy of the license and the * AUTHORS file for copyright and authorship information. */ 'use strict'; import React from 'react'; import { PureRen...
The EmailConfirmation component for a single missing link.
/* * @file: entry for <%= view %> component of <%= moduleName %> modules, some others description for this file * @author: <%= author %> * @date: <%= date %> */ import 'react-hot-loader/patch' import 'babel-polyfill' <% if (flexible) { %> import 'lib-flexible' <% } %> import React from 'react' import ReactDOM fro...
JSX - specific code for handling a single n - node critical sequence.
'use strict'; import React from 'react'; import Router from 'react-router'; export default React.createClass({ render() { var Link = Router.Link; return ( <div className="row"> <Link to="notification.source" params={{source: "123"}}>123</Link> </div> ); } });
The default implementation of which renders a single missing - node error message.
// @flow import React from 'react' import styled from 'styled-components' import Content from 'frontend/containers/Sidebar/Content' import type { Tab } from 'common/types' import { fontSize, fonts } from 'frontend/styles/common' import Menu from './Menu' const Container = styled.div` background-color: ${props => pro...
The main function for the package.
import React from 'react' const Flag = ({ country }) => { const flags = { UK: '🇬🇧', Sweden: '🇸🇪', India: '🇮🇳', Poland: '🇵🇱', Netherlands: '🇳🇱' } return ( <b> <span role="img" aria-label={country}> {flags[country]} </span> </b> ) } export default Flag
The flag module
import React from 'react'; /** * Wrapper for the rest of the app. * @class */ export default class Welcome extends React.Component { render() { document.title = 'Welcome (Edwin)'; return ( <div className="Welcome"> <h1>Oh hai!</h1> <p> This is Edwin. It is super pre-al...
A component that displays a warning when a user does not have a valid key in the system.
import _extends from 'babel-runtime/helpers/extends'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _createClass from 'babel-runtime/helpers/createClass'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-runtime/helpers/i...
A component that wraps a React component and renders it in a div.
import React from 'react' import { NavBar, Container, calendar } from 'layui' export default class CalendarView extends React.Component { calendarHandle(e){ const date = new Date() calendar.showCalendar(date, e.target, (obj)=>{ console.log(obj) }) } render () { return ( <div> ...
Component view that displays a calendar in a nav bar.
import React from 'react'; import InputBase from './InputBase'; import ButtonInput from './ButtonInput'; import deprecationWarning from './utils/deprecationWarning'; const buttonTypes = ['button', 'reset', 'submit']; class Input extends InputBase { render() { if (buttonTypes.indexOf(this.props.type) > -1) { ...
A component that renders a button input if it has a type that is not already present.
import React from 'react'; import IconButton from 'material-ui/IconButton'; import IconMenu from 'material-ui/IconMenu'; import MenuItem from 'material-ui/MenuItem'; import MoreVertIcon from 'material-ui/svg-icons/navigation/more-vert'; const TopBarMenu = ({ handleDataDialogShow }) => { return ( <IconMenu ...
The top - bar menu for the menu - buttons.
import React from 'react'; import FontAwesome from 'react-fontawesome'; import styled from 'styled-components'; import { connect } from 'react-redux'; import { hashHistory } from 'react-router'; import { bindActionCreators } from 'redux'; import Button from '../../../components/buttons/Button'; import StyledFlexCont...
Component that wraps a component with a hidden hidden input that is used to search for a specific organization.
/** * Copyright (c) 2015-present, 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. */ import Rea...
This module exports a warning if a is not found in the source tree.
import Express from 'express'; import React from 'react'; import ReactDOM from 'react-dom/server'; import config from './config'; import favicon from 'serve-favicon'; import compression from 'compression'; import httpProxy from 'http-proxy'; import path from 'path'; import createStore from './redux/create'; import ApiC...
Express - based Express server
// LICENSE : MIT "use strict"; import React from 'react'; import UserContext from './UserContext.js'; import App from './Components/AppComponent.js'; var context = new UserContext(); React.render( React.createElement(App, {context}), document.body );
The main function that creates a new component in the body of a .
import React from 'react' import { Button } from 'semantic-ui-react' const ButtonExampleContentProp = () => ( <Button content='Click Here' /> ) export default ButtonExampleContentProp
Deprecated. Use ButtonExampleContentProp instead.
import React from 'react' import { Mention, MentionsInput } from '../../../src' import { provideExampleValue } from './higher-order' import defaultStyle from './defaultStyle' import defaultMentionStyle from './defaultMentionStyle' function SingleLine({ value, data, onChange, onAdd }) { return ( <div className=...
The single - line input for a single - line input with mentions.
/* @flow */ import React, { Component } from 'react'; import { View, Modal, Platform, ActionSheetIOS, TouchableOpacity } from 'react-native'; import { connectStyle } from 'native-base-shoutem-theme'; import { Text } from './Text'; import { Button } from './Button'; import { ViewNB } from './View'; import { Icon } fro...
Component that is used to show a modal action sheet.
import React from 'react'; import { Article } from '../../../build/packages'; import srcArticle from './pic_article.png'; import Page from '../../component/page'; const ListDemo = (props) => ( <Page className="article" title="Article" subTitle="文章"> <Article> <h1>H1 Heading</h1> <se...
Demonstrate how to display a single sequence of failure records.
import React from 'react'; import ValidComponentChildren from './utils/ValidComponentChildren'; import classNames from 'classnames'; const Badge = React.createClass({ propTypes: { pullRight: React.PropTypes.bool }, hasContent() { return ValidComponentChildren.hasValidComponent(this.props.children) || ...
The main function for the badges component.
import React from 'react' import { connect } from 'react-redux' import * as actions from '../actions' class Brightness extends React.Component { render() { return <div>Brightness</div> } } const mapStateToProps = (state, props) => ({ }) const mapDispatchToProps = { } export default connect(mapStateToProp...
A component that is rendered when a node is missing a key.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { ListGroup, ListGroupItem } from 'react-bootstrap'; import Loading from '../loading/Loading'; import './Details.css'; class Details extends Component { static propTypes = { details: PropTypes.object.isRequired, } shouldCom...
A component that is rendered when a component is missing a required property.
import React from 'react'; import FetchingIndicator from '../Fetching/FetchingIndicator'; import { Link } from 'react-router-dom'; function normalize_string(str) { return str.toLowerCase() .replace(/ /g, "-") .replace("?","") .replace("¿",""); } const CategoryTopics = ({topics, isFetching }) => {...
export a category that can be found in a topic
import React from 'react'; import SelectInput from '../common/SelectInput'; import TextInput from '../common/TextInput'; import {Link} from 'react-router'; import {Button, Col, Row} from 'reactstrap'; const SearchForm = ({search, onSearch, onChange, errors}) => { return ( <form> <div className=...
Private function to create a search form that displays a sequence of unique sequences.
import React from 'react' import styled from 'styled' import './styles' import { Page, Section, ActionButton, InlineLink } from 'components' import { MailOutline } from 'icons' import Social from 'social' import cover from './cover.jpg' import background from './background.jpg' const AboutPage = () => ( <Page A...
Imports a single single node - sequence sequence from a Windows system.
/** * Created by Raphson on 10/14/16. */ /** * Created by Raphson on 10/10/16. */ import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import {Link} from 'react-router'; import NavBar from '../NavBar/index'; import Footer from '../Footer/Index'; import Auth from '../../utils/auth'; import Dev...
Component that is a component
import React from 'react'; import Input from './common/Input'; const AuthForm = ({ onChange, credentials, errors, submit }) => ( <div> <Input inputType="email" name="username" placeholder="Имя пользователя" onChange={onChange} value={credentials.username} ...
A function that exports a Navigator with a hidden field that allows to enter a user and password.
import React from 'react'; import ItemsTableCell from '../../components/ItemsTableCell'; import ItemsTableValue from '../../components/ItemsTableValue'; var LocalFileColumn = React.createClass({ renderValue: function () { var value = this.props.data.fields[this.props.col.path]; if (!value || !value.filename) ret...
The LocalFileColumn component is a component that renders a single interior field of a file in a table.
import React from 'react' import { createHistory, useBasename } from 'history' import { Router, Route, IndexRoute, Link } from 'react-router' const history = useBasename(createHistory)({ basename: '/redirect-using-index' }) class App extends React.Component { render() { return ( <div> {this.prop...
The base implementation of a sequence of classes that extends React. Component and extends React. Router.
import React from 'react'; import { Component } from 'react'; import SearchBar from '../containers/search_bar'; import WeatherList from '../containers/weather_list'; export default class App extends Component { render() { return ( <div> <SearchBar /> <WeatherList /> </div> ); }...
create a base class for all components that are not part of a component
import React from 'react'; import {render} from 'react-dom'; import injectTapEventPlugin from 'react-tap-event-plugin'; import Main from './main'; // Needed for onTouchTap injectTapEventPlugin(); // Render the main app react component into the app div. render(<Main />, document.getElementById('app'));
Imports the react component and renders it into the app div.
import React from 'react' import Slide from 'components/Slide' import Title from 'components/Title' import Subtitle from 'components/Subtitle' import Text from 'components/Text' import Gist from 'components/Gist' import Code from 'components/Code' import Example from 'components/Example' export default [ <Slide isT...
Component that renders a single node in a sequence of nodes.
import React from 'react'; import SelfHealTimingGraph from 'parser/shared/modules/features/SelfHealTimingGraph'; import SPELLS from 'common/SPELLS'; class DeathStrikeTiming extends SelfHealTimingGraph { constructor(...args) { super(...args); this.selfHealSpell = SPELLS.DEATH_STRIKE_HEAL; this.tabTitle ...
The DeathStrikeTiming class is a class
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorAttachFile = (props) => ( <SvgIcon {...props}> <path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2...
A component that can be attached to a component that can be attached to a component.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionLineWeight = (props) => ( <SvgIcon {...props}> <path d="M3 17h18v-2H3v2zm0 3h18v-1H3v1zm0-7h18v-3H3v3zm0-9v4h18V4H3z"/> </SvgIcon> ); ActionLineWeight = pure(ActionLineWeight); ActionLineWeight.displayN...
A component that exports action line weight icons.