code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import Backbone from 'backbone' import React from 'react' import $ from 'jquery' import ProjectsPage from './projects-page.js' import SkillsPage from './skills-page.js' // import Resume from './resume.js' import HomePage from './home-page.js' const AppController = React.createClass({ render: function(){ swi...
Devuelve un objeto AppController
import React from 'react' import styles from './quote.less' function Quote (props) { const { name, content, title, avatar } = props return ( <div className={styles.quote}> <div className={styles.inner}> {content} </div> <div className={styles.footer}> <div className={styles.de...
The quote component
// @flow import React from 'react'; import withRoot from 'docs/src/modules/components/withRoot'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import markdown from './collapse.md'; function Page() { return <MarkdownDocs markdown={markdown} />; } export default withRoot(Page);
A default implementation of that creates a page with a Markdown documentation.
import { Provider } from 'alfa' import React from 'react' import { render } from 'react-dom' import App from './containers/App' import * as TODO_FILTERS from './constants/TodoFilters' import * as actions from './actions' import 'todomvc-app-css/index.css' /** * Initial state of applicaiton. */ const data = { todo...
Renders a single in the root DOM.
import React from 'react'; import SvgIcon from '../../SvgIcon'; const ToggleRadioButtonUnchecked = (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 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/> </SvgIcon> ); ToggleRadioButtonUnchecked....
A component that renders a dropdown dropdown that toggles the radio button state.
import React from 'react'; import PropTypes from 'prop-types'; import Base from '../../../components/modal_root'; import BundleContainer from '../containers/bundle_container'; import BundleModalError from './bundle_modal_error'; import ModalLoading from './modal_loading'; import ActionsModal from './actions_modal'; imp...
The base component for modal modal components.
import React, { Component } from 'react'; import { NICE, SUPER_NICE } from './colors'; class Counter extends Component { constructor(props) { super(props); this.state = { counter: 0 }; this.interval = setInterval(() => this.tick(), 1000); } tick() { this.setState({ counter: this.state.coun...
A component that is rendered by a counter component.
import React from 'react'; import BaseIcon from './BaseIcon'; export default class ChevronRightIcon extends BaseIcon { render() { return ( <svg className={`icon icon--chevron-right ${this.props.className}`} viewBox={this.getViewBox()}> <polygon points="18.66 58.8 12.65 52.79 35.4 30.04 12.58 7.21 ...
A Chevron Right Icon
import React from 'react'; import "./menu.scss"; import FontIcon from 'material-ui/FontIcon'; import {red500, yellow500, blue500} from 'material-ui/styles/colors'; const iconStyles = { marginRight: 24, }; const ProfileMenu = ({open}) => ( <div> <FontIcon className="material-icons" style={iconStyles}>...
The default menu for the menu.
import React from 'react' import ReactDOM from 'react-dom'; import BlockRoot from '../../components/BlockRoot'; import Knob from '../../components/Knob'; class View extends React.Component { constructor(props) { super(props); } render() { const {stages, setStages, smoothness, setSmoothness} = this.props...
A component that can be rendered as a child of a BlockRoot.
import React from 'react'; import { Col } from 'react-bootstrap'; import { Link } from 'react-router'; export default (props) => { const { name, distance, id, index } = props; const nameStyle = { fontWeight: 'bold', padding: 0, }; const distanceStyle = { padding: 0, }; return ( <Col...
The default function for missing missing nodes.
/** * app.js * * This is the entry file for the application, only setup and boilerplate * code. */ import 'babel-polyfill'; /* eslint-disable import/no-unresolved */ // Load the manifest.json file and the .htaccess file import '!file?name=[name].[ext]!./manifest.json'; import 'file?name=[name].[ext]!./.htaccess';...
JS code generation
import React from 'react' import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' const States = () => ( <ExampleSection title='States'> <ComponentExample title='Active' description='A step can be hi...
Imports a sequence of components.
import React from 'react'; import warning from './routerWarning'; import invariant from 'invariant'; import Redirect from './Redirect'; import { falsy } from './InternalPropTypes'; var _React$PropTypes = React.PropTypes; var string = _React$PropTypes.string; var object = _React$PropTypes.object; /** * An <IndexRedir...
The indexRedirect component is used to redirect to an indexRoute.
import React, { Component } from 'react'; import './css/Menus.css'; export class MenuHeader extends Component { renderMenu() { if (!this.props.menu) return console.error('Os itens não foram encontrados!'); return( <div> { this.props.menu.map((item, index)=> ...
A component that opens a menu in the DOM.
/* eslint-disable no-undef, react/prop-types */ import React from 'react'; import { graphql } from 'gatsby'; import Img from 'gatsby-image'; import { css } from 'react-emotion'; import { Box } from '../components/Layout'; import PageWrapper from '../components/PageWrapper'; import colors from '../utils/colors'; const ...
Demonstrates how to render a single missing - node node in a browser.
import React from 'react'; import { View } from 'react-native'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import reducer from './reducers'; import { Header } from './components/common'; import LibraryList from './components/LibraryList.js'; const App = () => { return ( <Provide...
export default app
import React, { Component } from 'react'; import Constants from 'Constants'; import MaxAvailableSpaceContainer from 'common/components/MaxAvailableSpaceContainer'; class DataCleansingPage extends Component { render() { return ( <MaxAvailableSpaceContainer> <iframe src={Constants.BASE_URL + 'dataclean...
The Data Cleansing Page
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvFiberSmartRecord = (props) => ( <SvgIcon {...props}> <g><circle cx="9" cy="12" r="8"/><path d="M17 4.26v2.09c2.33.82 4 3.04 4 5.65s-1.67 4.83-4 5.65v2.09c3.45-.89 6-4.01 6-7.74s-2.55-6.85-6-7.74z"/></g> </S...
A function to export a single missing - node node in a smile - road fashion.
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 thumbnail component that can be rendered by a Bootstrap image.
import React from 'react'; import Page from './Page'; export default class Accommodations extends React.Component { constructor(props) { super(props); } render() { return ( <div> <Page title="Amanda & Dan's Wedding - Accomodations" /> <section className="section"> <div cl...
A component that displays a sequence of non -
import React, { Component } from 'react'; import { connectStyle } from 'native-base-shoutem-theme'; import Ionicons from 'react-native-vector-icons/Ionicons'; import Entypo from 'react-native-vector-icons/Entypo'; import FontAwesome from 'react-native-vector-icons/FontAwesome'; import Foundation from 'react-native-ve...
The base component for icons.
import React from 'react'; import RefreshIndicator from 'material-ui/RefreshIndicator'; const style = { container: { position: 'relative', }, refresh: { display: 'inline-block', position: 'relative', }, }; const RefreshIndicatorExampleLoading = () => ( <div style={style.container}> <RefreshI...
export default loading color
import React from 'react'; import { Route } from 'react-router'; import App from '../components/App/App'; export default ( <Route path="*" component={App} /> );
default - > missing
import _extends from 'babel-runtime/helpers/extends'; import React from 'react'; import { getValuePropValue, defaultFilterFn, UNSELECTABLE_ATTRIBUTE, UNSELECTABLE_STYLE } from './util'; import { Item as MenuItem, ItemGroup as MenuItemGroup } from 'rc-menu'; import warning from 'warning'; export default { filterOptio...
The default implementation of the filterOption and filterOptGroup methods.
import React from 'react'; import Snackbar from 'material-ui/Snackbar'; import IconButton from 'material-ui/IconButton'; import CloseIcon from 'material-ui-icons/Close'; import { default as axiosHttp } from 'axios'; import { store } from '../store/storeConfiguration'; import { API_CALL_STATUS, LOGOUT } from '../store/a...
Imports a Snackbar from a store.
import React from 'react'; import ReactDOM from 'react-dom'; ReactDOM.render( <h1>Hello, world!</h1>, document.getElementById('root') );
Renders a single node in the DOM.
import React from 'react'; import { createDevTools } from 'redux-devtools'; import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; import { rocConfig } from '../shared/universal-config'; export default createDevTools( <DockMonitor {...rocConfig.dev.redux.devToo...
Imports a single React component and creates a DevTools if it doesn t already exist.
import React from 'react'; import Avatar from '@ichef/gypcrete/src/Avatar'; import FlexRow from 'utils/FlexRow'; export default { title: '@ichef/gypcrete|Avatar', component: Avatar, }; export const basicUsage = () => ( <FlexRow> <Avatar alt="Avatar of Design" src="https://api.adorable.io/avatars/285/design...
export a single
import React from 'react'; import { connect } from 'react-redux'; import Pagination from '../components/Pagination'; import { applyFilter } from '../actions'; import { change } from 'redux-form'; import Filter from './Filter'; import ListItem from './ListItem'; import PerPage from './PerPage'; const ListForm = connect...
Imports a single object from the API.
import React from 'react'; import { Link } from 'react-router'; import { FormErrors } from './partials'; import { Center, LoginWith } from './partials/Elements'; import { Button, Input, ButtonInput } from 'react-bootstrap'; import { AppActions } from '../actions/AppActions'; import { AppStore } from '../stores/A...
The login form class
import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import { Number } from './number' import { style } from 'typestyle' export const resultStyle = style({ display: 'flex', padding: '10px 20px', height: '45px' }) function Result ({ result }) { return ( <div cl...
export function to render a
/** * * CompositionBar * */ import React from 'react'; import { withStyles } from 'material-ui/styles'; import PropTypes from 'prop-types'; import { isMobile } from 'react-device-detect'; import { styles } from './styles'; const atomicNumbers = { X: 0, H: 1, He: 2, Li: 3, Be: 4, B: 5, C: 6, N: 7, O: 8, F: 9, Ne: 10,...
A component that renders a single residue in a composition with a jmol color.
import React from 'react'; import { connect } from 'react-redux'; import { push } from 'react-router-redux'; export default function requireAuthentication(Component) { class AuthenticatedComponent extends React.Component { static propTypes = { isAuthenticated: React.PropTypes.bool.isRequired, ...
A component that requires authentication.
import React from 'react'; import ReactDOM from 'react-dom'; import { StartPage } from '../main/_startPage.js'; import { ResetPassword } from '../main/_resetPassword.js'; import { ContactUs } from '../main/_contactUs.js'; (function(APP) { "use strict"; APP.MAIN = {}; APP.MAIN.init = function() { ...
Imports a single module into the main window.
import React, { Component } from 'react'; import { View } from 'react-native'; import RoundTextButton from '../common/RoundTextButton'; import { PortraitScreenOrientation } from '../helpers/screen-orientation'; export class LetterRotated extends Component { getTransform = index => { const angleIndex = this.prop...
A component that rotates a letter.
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _Array$from from 'babel-runtime/core-js/array/from'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtim...
Creates a dropdown menu with a single child.
import React, { Component } from 'react'; import Event from './Event'; class Events extends Component { constructor(props) { super(); } render() { return ( <section id="events" className="content events container row"> <div className="col s12"> { this.props.title...
A component that can be rendered as events.
import React from 'react'; import PropTypes from 'prop-types'; import { supportsPassiveEvents } from 'detect-passive-events'; import { scrollTop } from '../scroll'; export default class Column extends React.PureComponent { static propTypes = { children: PropTypes.node, label: PropTypes.string, bindToDoc...
A column class that can be used to create a column with a single child.
import React from 'react'; import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox'; import SpellIcon from 'common/SpellIcon'; import SPELLS from 'common/SPELLS'; import Analyzer from 'Parser/Core/Analyzer'; const debug = false; class TacticianProc extends Analyzer { totalProcs = 0; on_byPlayer_applybu...
Tactician is a class that exports the total number of non - hot
import React from 'react'; import PropTypes from 'prop-types'; import { gettext } from '../utils/constants'; import toaster from './toast'; const propTypes = { hasSuffix: PropTypes.bool, name: PropTypes.string.isRequired, onRenameConfirm: PropTypes.func.isRequired, onRenameCancel: PropTypes.func.isRequired, };...
A component that renames a node in the rename input.
/** * * Sidebar * */ import React from 'react'; import { Drawer } from 'material-ui'; const { bool, func, node } = React.PropTypes; const Sidebar = ({ open, onToggleSidebar, children }) => ( <Drawer docked={false} open={open} onRequestChange={onToggleSidebar} > {children} </Drawer> ); Sidebar....
Sidebar with no children
import React from 'react'; import { storiesOf } from '@storybook/react'; import { withInfo } from '@storybook/addon-info'; import { action } from '@storybook/addon-actions'; import { Button, ButtonRaised } from 'j-react-ui'; const buttonStory = storiesOf('Buttons', module) buttonStory.add( 'Default', () => <But...
Add a sequence of components to the system.
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; import React from 'react'; import Link from './Link'; /** *...
Creates a link that links to an index route.
/* 使用Ace Admin Template的MainContainer组件 */ import SideBarShortcuts from './SideBarShortcuts'; import SideBarNavList from './SideBarNavList'; import Footer from './Footer'; import Breadcrumbs from './Breadcrumbs'; import React from 'react'; export default class MainContainer extends React.Component { static prop...
A component that displays a single node in the main container.
import React from 'react' import ReactDOM from 'react-dom' import { Provider } from 'react-redux' import { syncHistoryWithStore } from 'react-router-redux'; import { Router, Route, browserHistory } from 'react-router' class ReactClient{ constructor(register) { this.routes = register.routes; this.store = re...
The base class for a bunch of things that can be handled by react - react.
import PropTypes from 'prop-types'; import React from 'react'; import cx from 'classnames'; import cxBinder from 'classnames/bind'; import styles from './_styles.scss'; const cxStyles = cxBinder.bind(styles); export const MenuIcon = ({ className, dark, controls, open, ...restProps, }) => { const classNam...
Exports a menu - icon which is a button that can be used to open a menu item.
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React, { Component } from 'react'; import s from './Game.scss'; import Engine from '../../Engine'; // Move to NPM module? import { TestScreen } from '../../Game/debug/TestScreen'; import withStyles from '../../decorators/withStyles'; @wit...
Component class that implements a NPM component with a TestScreen
import React from 'react' import { render } from 'react-dom' function Card({ loading, error, title, subtitle }) { let content if (error) { content = 'Error' } else if (loading) { content = <h3 style={styles.empty}>Loading...</h3> } else { content = ( <div> <h1 style={styles.title}>{t...
The main render function for a single node.
import React, { Component } from 'react'; import { TitleBar, Toolbar, ToolbarNav, ToolbarNavItem } from 'react-desktop/macOs'; const circle = ( <svg x="0px" y="0px" width="25px" height="25px" viewBox="0 0 25 25"> <circle cx="12.5" cy="12.5" r="12.5"/> </svg> ); const star = ( <svg x="0px" y="0px" width="25p...
A component that is a sequence of items that can be selected in a sequence of items.
/* * Copyright (C) Zing contributors. * * This file is a part of the Zing 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. */ import React from 'react'; // passed `items` prop is an array...
Zing contributors.
import React from 'react' import './example.css' import DocumentTitle from 'react-document-title' import { config } from 'config' export default class PostCSS extends React.Component { render () { return ( <DocumentTitle title={`${config.siteTitle} | Hi PostCSSy friends`}> <div> <h1 class...
Component that exports a single Invite with a PostCSS y friends.
import React from 'react'; /** * Maps children that are typically specified as `props.children`, * but only iterates over children that are "valid components". * * The mapFunction provided index will be normalised to the components mapped, * so an invalid component would not increase the index. * * @param {?*} ...
Determines if the Child container has one or more valid components.
import React, { Component } from 'react'; export default class HideShow extends Component { constructor(props) { super(props); this.state = { visible: false, }; this.show = this.show.bind(this); this.hide = this.hide.bind(this); } show() { this.setState({ visible: true }); } ...
The base class for the hide show class.
'use strict' import React from 'react'; import ReactDOM from 'react-dom'; class NimGame extends React.Component { constructor() { super(); this.state = { 'board': [3,5,8], 'turns': 0, 'gameOver': false } } checkGameOver() { let gameOver = this.state.gameOver; let winner ...
A component that is rendered when a user enters a node in a board.
import React from 'react' import {MaterialForm} from 'components/materials' import FullWidthSection from 'components/full-width-section' import { defineMessages, FormattedMessage } from 'react-intl' const messages = defineMessages({ appUploadMaterial: { id: 'appuploadmaterial.title', description: 'Title for ...
Imports a single node in the hierarchy.
import React from 'react'; import { render } from 'react-dom'; import App from './components/App'; render( <App />, document.getElementById('root') );
Imports a single node from the DOM and renders it as a child of the root element.
/** * 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. * * @provides...
Provides a function to render a single missing - node block in the DOM.
import React, { Component } from 'react'; import DefaultLayout from '../layouts/default'; import PositionsGroup from './positions-group'; import PositionForm from '../forms/position-form'; import WPAPI from '../../tools/wpapi'; class PositionsList extends Component { constructor() { super(); this....
Package named list of position elements.
import React from 'react' class Marketing extends React.Component { render() { return ( <div id='marketing'> <div className="row"> <div className="col-lg-4"> <img className="img-circle" src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAAL...
Marketing component for missing missing parameters.
import React from 'react'; import styled from 'styled-components'; import withStyle from './Base'; const StyledPre = styled.pre``; const Pre = props => <StyledPre {...props} />; export default withStyle(Pre);
export withStyle
import React from 'react'; const DescriptionIcon = props => ( <svg {...props.size || { width: '24px', height: '24px' }} {...props} viewBox="0 0 24 24"> {props.title && <title>{props.title}</title>} <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h...
DescriptionIcon - A component that displays a description of a missing node.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageCameraRear = (props) => ( <SvgIcon {...props}> <path d="M10 20H5v2h5v2l3-3-3-3v2zm4 0v2h5v-2h-5zm3-20H7C5.9 0 5 .9 5 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm-5 6c-1.11 0-2-.9-2-2s.89-2 1.99-...
A component that renders a single missing component in a sequence of icons.
import React, { Component } from 'react'; import Relay from 'react-relay'; import { Link } from 'react-router'; import Drawer from 'material-ui/Drawer'; import MenuItem from 'material-ui/MenuItem'; import Subheader from 'material-ui/Subheader'; import Divider from 'material-ui/Divider'; import CommitteeMenuItem from '....
A component that can be used to render a navigation with a single key - on - navigation navigation.
import React, { Component } from 'react'; import Index from './Todo/components/Index' import { AppRegistry, StyleSheet, Text, View } from 'react-native'; class TDN extends Component { render() { return ( <View style={styles.container}> <Text style={styles.welcome}> Todo! <...
The base class for a single node.
import React from 'react' import { Radio } from 'semantic-ui-react' const RadioExampleToggle = () => <Radio toggle /> export default RadioExampleToggle
Imports a component and exports it as a RadioExampleToggle.
import React, { Component } from 'react'; import Link from 'next/link'; import Head from 'next/head'; import axios from 'axios'; import { map, size } from 'lodash'; import { nextConnect } from '../store'; import { FETCH_EVENTS } from '../actions/types'; import HeaderSocial from '../components/HeaderSocial'; import Head...
Component that displays a single keyboard or a list of keyboard events.
import React from 'react'; import PropTypes from 'prop-types'; import dayjs from 'dayjs'; const Cell = ({ data }) => ( <div className="cell-container"> <article className="mini-post"> <header> <h3><a href={data.link}>{data.title}</a></h3> <time className="published">{dayjs(data.date).format...
Generate a cell that contains a sequence of unique IDs.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionHelpOutline = (props) => ( <SvgIcon {...props}> <path d="M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c...
A component that renders a series of action icons.
/** * 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 from 'react'; import Layout from '../../compo...
Provides a function to export a single missing - missing component into a system.
import React from 'react'; import Slices from 'slices'; import TodoStore from '../stores/Todo'; class AddTodo extends React.Component { static propTypes = { user: React.PropTypes.object.isRequired } getInitialState() { return { value: '', }; } render() { return ( <div> <form ...
AddTodo extends a class that can be used to add a todo to a user.
import React from 'react'; const EditFilledIcon = props => ( <svg {...props.size || { width: '24px', height: '24px' }} {...props} viewBox="0 0 24 24"> {props.title && <title>{props.title}</title>} <path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1...
A component that renders a block of hidden icons that can be edited by a user.
import React from 'react'; import test from 'ava'; import sinon from 'sinon'; import { shallow } from 'enzyme'; import { FormattedMessage } from 'react-intl'; import { Header } from '../../components/Header/Header'; import { intl } from '../../../../util/react-intl-test-helper'; const intlProp = { ...intl, enabledLang...
Tests if a header is properly rendered and has a link to the first page in the page.
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import StatusListContainer from '../../ui/containers/status_list_container'; import { expandPublicTimeline } from '../../../actions/timelines'; import Column from '../../../components/column'; import ColumnHeader from ...
Public timeline component
import React from 'react'; import { Intro } from 'apparena-patterns-react'; export default function BoxExample() { return ( <div> <Intro imgSrc="https://aa-fonts.s3.amazonaws.com/app-arena/atoms-l.svg" headline="Default Box" text="This is my Intro Text" /> <hr/> ...
The default box example
import React, { Component } from 'react'; import { FormGroup, ControlLabel, FormControl, Button } from 'react-bootstrap'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { postComment } from '../../actions/index'; import { Link } from 'react-router'; // import { submitComment }...
A component that is a comment box that displays a comment on a character.
import React from 'react'; import FlatButton from 'material-ui/FlatButton'; import FontIcon from 'material-ui/FontIcon'; import ActionAndroid from 'material-ui/svg-icons/action/android'; const styles = { uploadButton: { verticalAlign: 'middle', }, uploadInput: { cursor: 'pointer', position: 'absolute...
Example of how to use a FlatButton.
import React from 'react' import classNames from 'classnames' import styles from './style.less' export class ContextMenuItem extends React.Component { static propTypes = { glyph: React.PropTypes.string.isRequired, label: React.PropTypes.string, onClick: React.PropTypes.func.isRequired } static def...
A context menu item which shows a dropdown menu item with a label and a glyph.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationAirlineSeatLegroomNormal = (props) => ( <SvgIcon {...props}> <path d="M5 12V3H3v9c0 2.76 2.24 5 5 5h6v-2H8c-1.66 0-3-1.34-3-3zm15.5 6H19v-7c0-1.1-.9-2-2-2h-5V3H6v8c0 1.65 1.35 3 3 3h7v7h4.5c.83 0 1....
A component that exports a sequence of notifications for the airline seat legroom.
import React from 'react'; class Paragraph extends React.Component { constructor(props) { super(props); } render() { return( <div className="mainParagraph"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas porta tellus nulla, in ullamcorper elit...
A component that renders a sequence of words in a sequence of words.
import React from 'react' import Dom from 'react-dom' import App from 'components/App' if (typeof document !== 'undefined') { Dom.render( React.createElement(App, { message: 'Urban' }), document.getElementById('root') ) } export default App
default App if - > render a component with message
require("../node_modules/bootstrap/dist/css/bootstrap.css"); require("../public/stylesheets/style.css"); import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route, IndexRoute, browserHistory, hashHistory, Redirect } from 'react-router'; import App from './components/App.jsx'; import RobotsTa...
Renders a sequence of non - hot modules.
import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import illustration from 'mastodon/../images/elephant_ui_disappointed.svg'; import classNames from 'classnames'; const MissingIndicator = ({ fullPage }) => ( <div className={classNames('regeneration-indicato...
Provides a function to generate a missing - indicator for a single node.
import React from 'react' import {storiesOf} from '@storybook/react' import {action} from '@storybook/addon-actions' import range from 'lodash/range' import {withState} from '@dump247/storybook-state' import CartNavLink from '.' import CartModelItem from '../cart-model-item' import Button from '../button' storiesOf('...
Imports a single node in the system as a sequence of components.
import Express from 'express'; import React from 'react'; import Location from 'react-router/lib/Location'; 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'; im...
Express middleware that serves the API.
import React from 'react' export const ReactReduxContext = React.createContext(null) export default ReactReduxContext
export default ReactReduxContext
import React from 'react'; import CodeBlock from '../components/CodeBlock'; const mixinCode = `React.createClass({ mixins: [ValidationMixin] ...`; export default class Slide extends React.Component { render() { return ( <div> <h1>That sounds like a mixin!</h1> <CodeBlock> {...
A base class for selecting a single component from a single component or a single component from a single component.
import React from 'react'; import { connect } from 'react-redux'; @connect(state => ({ counter : state.counter })) export default class HomeView extends React.Component { static propTypes = { dispatch : React.PropTypes.func.isRequired, counter : React.PropTypes.number.isRequired } constructor () { ...
The HomeView class is used to show a single unique identifier in a page.
import React, { Component } from 'react'; import AppBar from 'material-ui/AppBar'; import Drawer from 'material-ui/Drawer'; import { MenuItems } from './menu_items'; import SearchBar from '../containers/search_bar'; export default class Menu extends Component { constructor(props) { super(props); this.stat...
Menu component that displays a menu in the menu - overflow state.
// @flow import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; import AppContainer from './src/containers/AppContainer'; class iCharts extends Component { render() { return ( <AppContainer /> ); } } const styles = StyleSheet.create({ ...
The iCharts component is a component that can be rendered by a series of components.
import React from 'react'; import HomeHeader from './HomeHeader'; import HomeInput from './HomeInput'; import '../stylesheets/Home.css'; class Home extends React.Component { constructor(props) { super(props); } render() { return ( <div className="Home-container"> <HomeHeader/> <H...
The Home component that is rendered by a component that has a hidden hidden input.
import isEmpty from 'lodash/isEmpty'; import now from 'lodash/now'; import React from 'react'; import PropTypes from 'prop-types'; import { browserHistory } from 'react-router'; import { publish } from '../../../components/events/events.js'; import InfiniteScrollPage from '../../../components/infinite-scroll/page.js';...
The registration component
import React from 'react'; import './ErrorAlert.css'; function ErrorAlert(props) { return ( <section className='error-alert'> <h2>Something went wrong!</h2> <p>{props.errorText}</p> </section> ); } export default ErrorAlert;
The ErrorAlert class
import React from 'react'; import { FlatButton, } from 'material-ui'; import _ from 'lodash'; import {_fetch, _ga, IS_SMALL} from '../../helpers'; import Formsy from 'formsy-react' import { FormsyText } from 'formsy-material-ui/lib'; import { Modal } from 'react-bootstrap'; export default class Contact extends R...
Contact component which displays a modal window
import React, { Component } from 'react'; import { Platform, StyleSheet, Text, View } from 'react-native'; const instructions = Platform.select({ ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', android: 'Double tap R on your keyboard to reload,\n' + 'Shake or press menu button for...
The base class for a single node in a hierarchy.
import React from 'react'; import 'babelify/polyfill'; import hu from 'moment/locale/hu'; import '../html'; import DataActionTypes from '../constants/DataConstants'; import DataRequestActionCreator, {DataRequestDescriptor, ServiceDescriptor} from '../actions/DataRequestActionCreator'; import Panel from '../component...
Package that contains a series of components.
import React from 'react'; import ReactDOM from 'react-dom'; import { OpenfinApiHelpers } from 'stockflux-core'; import App from './App'; const mountApp = () => { ReactDOM.render(<App />, document.getElementById('root')); }; if (OpenfinApiHelpers.getWindow()) { mountApp(); } else { console.error('This applicati...
This is a utility function that will mount the application to the window.
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render(<App />, document.getElementById('root'));
Imports a React application.
/** * @flow */ import React, { Component } from 'react'; import { Text, View, ListView, } from 'react-native'; import { cloneDeep } from 'lodash'; import ArticleListItem from '../../components/ArticleListItem/ArticleListItem'; import Banner from '../banner/BannerView'; import lightStyles from './themes/light'...
Private function to render a section list with no - op children.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageColorLens = (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...
Missing color lens