code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from ...
A component that can be used to show a carousel caption.
import React from 'react'; import Percentage from './Percentage'; import react from '../../images/react.svg'; import redux from '../../images/redux.svg'; import scss from '../../images/scss.svg'; import graphQL from '../../images/graphQL.svg'; import webpack from '../../images/webpack.svg'; import node from '../../im...
Diagram Skills.
import React from 'react'; import {BaseMixin, ElementaryMixin, SectionMixin, Tools} from '../common/common.js'; import Factory from './factory.js'; import './ul-ol.less'; Factory.createList = function (tag) { return React.createClass({ //@@viewOn:mixins mixins: [ BaseMixin, ElementaryMixin, ...
Create a list of children of a given tag.
/** * Created by kaidi on 2016/10/12. */ /** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, Image, Navigator, DeviceEventEmitter } from 'react-native'; var tabBar...
Micro - UI - based application action
import React from 'react' export default function Button({ type = 'default', name="name" }){ return ( <div className={ ` btn btn-${ type }` }> { name } </div> ) }
Button for a
import React from 'react' import PropTypes from 'prop-types' import ThanksNextPetition from '../../containers/thanks-next-petition' const Thanks = ({ sharedSocially, isCreator, renderRawLink, renderTwitter, renderFacebook, renderMessenger, renderMail, renderCopyPaste, nextPetition }) => ( <div cla...
The main function for the Thanks component.
import React from 'react' import Helmet from 'react-helmet' import { config } from 'config' module.exports = React.createClass({ propTypes () { return { route: React.PropTypes.object, } }, render () { const data = this.props.route.page.data return ( <div> <Helmet tit...
The base component for missing missing nodes.
import React from 'react'; import { Menu, Icon } from 'antd'; import { Link } from 'dva/router'; import styles from './main.less'; import { config } from '../../../utils'; function getMenus(menuArray) { return menuArray.map((item) => { if (!!item.items && item.items.length > 0) { return ( <Menu.Sub...
Get the menu items from a menu array.
import React from 'react' // Styles import styled from 'styled-components' const Divz = styled.div` ul { list-style: none; padding: 0; } ul li{ display: inline; } ` const facebook = () => { window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(document.URL)}&t=${encodeURIComponent(...
Imports a single noreferrer or a link to a window.
import React from 'react' import AppDispatcher from '../dispatcher/AppDispatcher' var styles = { display: 'flex', flexDirection: 'column', padding: '10px', borderBottom: '1px solid #DFDFDF' } var titleStyles = { margin: '0px', fontWeight: 'bold', width: '100%', whiteSpace: 'nowrap', overflow: 'hid...
The SidebarItem class is a component that can be used to show a bunch of items in a Sidebar.
/** * 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 missing dependency on the top of the source tree.
import Component from '../components/component.react'; import React from 'react'; import User from '../users/user'; export default function requireAuth(BaseComponent) { return class RequireAuth extends Component { static displayName = `${BaseComponent.name}RequireAuth`; static willTransitionTo(transition)...
The RequireAuth component is a class that can be used to require a user to be authenticated.
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { StyleSheet, Text, View } from 'react-native'; import Student from './Student' import MiStudent from './MiStudent' export default class setup extends Component { co...
Component that is a subclass of React. Native. Component that can be used to render a sequence of components.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsTraffic = (props) => ( <SvgIcon {...props}> <path d="M20 10h-3V8.86c1.72-.45 3-2 3-3.86h-3V4c0-.55-.45-1-1-1H8c-.55 0-1 .45-1 1v1H4c0 1.86 1.28 3.41 3 3.86V10H4c0 1.86 1.28 3.41 3 3.86V15H4c0 1.86 1.28 3.41...
A component that renders a sequence of maps on a group of icons.
import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import ProgressBar from 'react-native-air-progress-bar'; export default class App extends React.Component { render() { return ( <View style={styles.container}> <Text>Open up App.js to start working on your app!</Text>...
The base class for the missing components.
import React from 'react' import PropTypes from 'prop-types' import { Modal, Button } from 'antd'; import ConditionList from './ConditionList'; class MoreChecks extends React.Component { state = { visible: false, checkedListTexts: [] } showModal = () => { this.setState({ visible: true, });...
A component that can be used to show a modal and a list of conditions.
/** * THIS IS ORPHANED AND ISN'T RENDERED AT THE MOMENT * THIS WAS DONE TO FINISH THE REDUX INTEGRATION, WILL REWRITE SOON * - @mxstbr */ import React from 'react'; import { DropTarget } from 'react-dnd'; import { setCurrentPage } from '../../actions'; let timeoutID = false; // drop target var ItemsTableDragDro...
Provides a way to drop or drop a node in a drop zone.
/*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 React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; export default class Icon extends React.PureComponent { static propTypes = { id: PropTypes.string.isRequired, className: PropTypes.string, fixedWidth: PropTypes.bool, }; render () { const { id, c...
The default icon class which renders a single icon.
import React from 'react'; import PropTypes from 'prop-types'; const PersonBoxed = (props) => { const color = props.color == 'inherit' ? undefined : props.color; const aria = props.title ? 'svg-person-boxed-title' : '' + props.title && props.description ? ' ' : '' + props.description ? 'svg-person-boxed-de...
The person boxed component.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationConfirmationNumber = (props) => ( <SvgIcon {...props}> <path d="M22 10V6c0-1.11-.9-2-2-2H4c-1.1 0-1.99.89-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2...
NotificationConfirmationNumber is a component that can be used to confirm a user that a user has selected a notification.
import React from 'react'; import _ from 'lodash'; import Rx from 'rx'; import {TerminalLayout} from './compiled/src/views/TerminalLayout.js'; var keys = { goUp: event => (event.ctrlKey && event.keyCode === 80) || event.keyCode === 38, goDown: event => (event.ctrlKey && event.keyCode === 78) || event.keyCode ...
The keyboard event handler which creates a keyboard event that fires when a key is pressed on the terminal.
import React from 'react'; import PropTypes from 'prop-types'; import {ipcRenderer as ipc} from 'electron-better-ipc'; import {connect, PreferencesContainer} from '../../../containers'; import General from './general'; import Plugins from './plugins'; const CATEGORIES = [ { name: 'general', Component: Gene...
A component that can be rendered by a user to render a category.
import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import BottomNavigation from '@material-ui/core/BottomNavigation'; import BottomNavigationAction from '@material-ui/core/BottomNavigationAction'; import FolderIcon from '@material-ui/icons/Folder'; import RestoreIcon from '@material-ui/ic...
LabelBottomNavigation - Bottom navigation
import React from 'react'; import Select, { Option } from 'rc-select'; import 'rc-select/assets/index.css'; function onSelect() { console.log(arguments); } function onDeselect() { console.log(arguments); } export default class UserSelect extends React.Component { //eslint-disable-line constructor(props) { s...
The UserSelect component that is used to select a user s team.
// @flow import React from 'react' import {has} from 'lodash' import {map, switchMap} from 'rxjs/operators' import FeatureStateProvider from '@vega/components/FeatureStateProvider' import {materializePaths} from 'part:@vega/datastores/document-preview' import withPropsStream from '@vega/utils/withPropsStream' import Wi...
The default implementation of a single n - node node that is rendered as a section of a block.
import Component from '../components/component.react'; import React from 'react'; import User from '../users/user'; export default function requireAuth(BaseComponent) { return class RequireAuth extends Component { static willTransitionTo(transition) { if (User.isLoggedIn) return; transition.redirec...
RequireAuth extends a component that requires a user to be logged in.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let PhotoFilter = props => <SvgIcon {...props}> <path d="M19.02 10v9H5V5h9V3H5.02c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zM17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7l2.06.94zm-3.75.75L...
A component that can be used to filter a series of images.
/** * Saving * * Shows a label indicating something is being saved */ import React from 'react'; import styles from './styles.css'; const SavingLabel = () => (<div className={styles.label}>Saving...</div>); export default SavingLabel;
Show a label indicating that a node is being saved.
import React, { Component } from 'react'; import { Animated, Image, ImageBackground, Platform, ScrollView, StyleSheet, Text, View, } from 'react-native'; import { TabBar, TabViewAnimated, TabViewPagerPan, TabViewPagerScroll, } from 'react-native-tab-view'; import PropTypes from 'prop-types'; ...
A component that renders a single single secondary secondary
import React from 'react'; import ReactDOM from 'react-dom'; import Zdd from './Zdd'; ReactDOM.render(<Zdd />, document.getElementById('root'));
Imports React and ReactDOM.
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from ...
A component that renders a bootstrap block.
'use strict' import React from 'react' import ReactDOM from 'react-dom' export default function prettify (Component) { class Prettify extends React.Component { static displayName = 'Prettify' static propTypes = { children: React.PropTypes.array } componentDidMount () { window.prettyPri...
Create a prettified component that can be used to render a component without having to render it.
import React from 'react'; import { IntlProvider } from 'react-intl'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import reducer from '../reducers'; var createElement = React.createClass({ propTypes: { locale: React.PropTypes.string.isRequired, messages: React.PropTypes.objec...
Create a new node with a single child that has a locale and a list of children.
import React from 'react'; import {addDecorator} from '@storybook/react'; import {fontFamily, fontSize} from '../src/styles'; global.__PATH_PREFIX__ = ''; // eslint-disable-line no-underscore-dangle global.__BASE_PATH__ = ''; // es...
Add a decorator to the object.
import React from 'react' import { storiesOf, action } from '@kadira/storybook' import GitReposList from '../src/components/GitReposList' // import '../src/index.css'; // import 'bootstrap/dist/css/bootstrap.css' const authButtonClicked = action('authenticate with Github button clicked'); const reposLinkClicked = ac...
Imports a single node in a hierarchy.
import React from 'react' import Autocomplete from '../../lib/index' import { getStates, matchStateToTerm, sortStates, styles, fakeRequest } from '../utils' let App = React.createClass({ getInitialState () { return { unitedStates: getStates(), loading: false } }, render () { return ( ...
The main function for the sequence of items that can be autocompleteed.
import React from 'react'; import PureRenderMixin from 'react-addons-pure-render-mixin'; export default React.createClass({ render: function() { return ( <div className="person-info"> <h3>{this.props.name}</h3> </div> ); } });
The default implementation of which renders a single tag with a header and a footer.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Modal } from 'react-bootstrap'; import { Typeahead } from 'react-bootstrap-typeahead'; import 'react-bootstrap-typeahead/css/Typeahead.css'; export class ComposeModal extends Component { constructor(props) { super(props); ...
Component that is a modal component that composes a single key sequence.
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
/* * Copyright (C) 2016 - 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...
Tests if a node is missing a confirmation button and a message.
import React from 'react'; import BenchGraphs from './BenchGraphs.react'; class BenchResults extends React.Component { render() { if (!this.props.bench.results) return null; var metricValues = Object.keys(this.props.bench.results).map((key) => { let data = this.props.bench.results[k...
A component that renders the results of a single failure in a Bench.
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import Icon from 'mastodon/components/icon'; export default class ColumnHeader extends React.PureComponent { static propTypes = { icon: PropTypes.string, type: PropTypes.string, active: PropTypes.bool, ...
A component that renders a column header when a button is clicked on a column.
import React from 'react' import { monospacedFontFamily, grayColor } from '../../../lib/styles/variables' import CommentForm from './CommentForm' import CommentItem from './CommentItem' import socket from '../../../lib/socket' class CommentList extends React.PureComponent { componentDidMount () { const { iss...
The base comment list class.
/** * svgtoreact * * @author Michael Hsu */ import React from 'react'; export default function SVGCode(props) { return ( <svg width={152} height={102} viewBox="0 0 152 102" {...props}> <g> <rect id="Rectangle-25" fill="#fff" x={1} y={1} width={...
SVG Code for a single missing -
import React from 'react'; import ReactDOM from 'react-dom'; import Tab from './components/Tab/Tab.js'; require('./assets/styles/main.scss'); (function main() { $.material.init(); ReactDOM.render(<Tab />, document.getElementById('donutTab')); })();
Imports a component and renders it in a main frame.
import React from 'react'; import { colors as Colors } from 'material-ui/styles'; import CloseButton from '../CloseButton/'; const PageIntro = ({ headline, text, actions, onRequestClose, show = 'true' }) => { const styles = { main: { marginBottom: 24, padding: 32, background: 'rgba(243, 243, 24...
A page intro that displays a page with a single header text actions and onRequestClose.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import AnalysisLoadingComponent from './AnalysisLoading/AnalysisLoadingComponent'; const { number, shape, arrayOf, string } = PropTypes; export const AnalysisLoadingHOC = WrappedComponent => { class WithLoading extends Component { ...
The base component for the with - loading component.
import React from 'react'; import ReactDOM from 'react-dom'; import App from './app.jsx'; ReactDOM.render(<App />, document.getElementById('app'));
Imports a React application.
import React from 'react' import PropTypes from 'prop-types' import SVGDeviconInline from '../../_base/SVGDeviconInline' import iconSVG from './PhpOriginal.svg' /** PhpOriginal */ function PhpOriginal({ width, height, className }) { return ( <SVGDeviconInline className={'PhpOriginal' + ' ' + className} ...
Create a PhpOriginal object with a width height and className.
import React, { Component } from 'react'; import i18next from 'i18next'; import ManageExportData from './ManageExportData'; class ModalCoinExport extends Component { constructor(props) { super(props); this.state = { config: props.config, cb: props.cb, safe: props.safe, coin: props....
Component that exports a single non - null non
import React from 'react'; class Faq extends React.Component { render() { return ( <div> FAQ </div> ); } } export default Faq;
Generate a FAQ component from a sequence of nodes.
import React, { Component } from 'react'; import * as Config from '../actions/Config'; class About extends Component { render(){ let about = Config.getAbout(); return ( <div id="about"> <img id="header" src={Config.getImageFromCache("about").src} /> <div id="content"> <h1><s...
A component that displays a single warning in the system that has no warning in the system.
/*! React Alt Firebase Starter */ import React from 'react'; import { Route } from 'react-router'; import Contact from './components/Contact'; export default ( <Route name='contact' path='/contact' handler={Contact}/> );
The default implementation of .
/** * 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 */ import React from 'react'; import TestUtils from 'react-addons-test-utils'...
Get the shallow rendered component
/* @flow */ import React from 'react'; import Icon from 'mineral-ui/Icon'; import type { IconProps } from 'mineral-ui/Icon/types'; /* eslint-disable prettier/prettier */ export default function IconPhotoLibrary(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconP...
IconPhotoLibrary - A component that renders a single icon with a photo of the image.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; class Link extends Component { constructor(props) { super(props); this._handleClick = this._handleClick.bind(this); } _handleClick(e) { e.preventDefault(); lx.openLink(this.props.link, this.props.target); } render() { if (!...
Link component for a link
import _$ from 'jquery'; import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import jsdom from 'jsdom'; import chai, { expect } from 'chai'; import chaiJquery from 'chai-jquery'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import...
A component that can be rendered by a component that is not yet rendered by a component.
import React from 'react'; import classNames from 'classnames'; const Table = React.createClass({ propTypes: { striped: React.PropTypes.bool, bordered: React.PropTypes.bool, condensed: React.PropTypes.bool, hover: React.PropTypes.bool, responsive: React.PropTypes.bool }, getDefaultProps() { ...
Create a table with a series of children.
import React from 'react'; import Paper from 'material-ui/Paper'; import Menu from 'material-ui/Menu'; import MenuItem from 'material-ui/MenuItem'; const style = { display: 'inline-block', margin: '16px 32px 16px 0', }; const MenuExampleSimple = () => ( <div> <Paper style={style}> <Menu> <Menu...
The default menu example for missing modules.
import React, { Component } from 'react'; import { Surface, Rectangle } from 'recharts'; class RectangleDemo extends Component { state = { x: 50, y: 50, width: 80, height: 100, }; changeSize() { this.setState({ x: Math.random() * 50, y: Math.random() * 50, width: Math.rando...
Demonstrates how to render a single node in a tree.
import React from 'react'; import {View, StyleSheet, Alert} from 'react-native'; import AppStyles from 'dedicate/AppStyles'; import Text from 'text/Text'; import Textbox from 'fields/Textbox'; import Button from 'buttons/Button'; import ButtonPlus from 'buttons/ButtonPlus'; export default class ButtonAddListItem exten...
Component which adds a list item to a modal window.
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from ...
A component that renders a navbar with a header.
import React, { Component } from 'react'; import { Card, Row, Col, Modal, Radio, Select, Menu, Dropdown, message, TimePicker, DatePicker, Icon, Form, Input, Button, Checkbox } from 'antd'; import BookingTransfer from './CreateBookingFormComponents/BookingTransfer.js' import moment from 'moment'; import SearchAddres...
Create a component that has a unique name and number.
/** * Copyright 2017 Goldman Sachs. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writ...
Component which is rendered when a user submits a card in a modal window.
import React from 'react'; import { Table as PfTable } from 'patternfly-react'; export default value => <PfTable.Cell>{value}</PfTable.Cell>;
Imports a sequence of missing cell values from patternfly - react.
import React from 'react'; import { storiesOf, action } from '@kadira/storybook'; import { Layout, Drawer } from '../src/index'; const content = ( <div> <h1>Welcome to the content for testing scroll</h1> <ul> <li>one</li> <li>one</li> <li>one</li> <li>one</li> <li>one</li> <li>one</li> <li>o...
This module is used to display a hidden hidden
import React, { Component } from 'react'; import createFragment from 'react-addons-create-fragment'; import TextInput from './TextInput'; import TextAreaInput from './TextAreaInput'; import Button from './Button'; import './Forms.scss'; /** * FAKE DATA * Head of front end development Miu Furinji Vivid Resou...
Demonstrates how to create a loggent form with a single node.
import React from 'react'; import { findDOMNode } from 'react-dom'; import { Form, FormField, FormInput, FormSelect, Grid, } from '../../../admin/client/App/elemental'; const MODE_OPTIONS = [ { label: 'Exactly', value: 'equals' }, { label: 'Greater Than', value: 'gt' }, { label: 'Less Than', value: 'lt' }, { ...
The default filter for a number field
import React from 'react'; import {GridList, GridTile} from 'material-ui/GridList'; import IconButton from 'material-ui/IconButton'; import StarBorder from 'material-ui/svg-icons/toggle/star-border'; const styles = { root: { display: 'flex', flexWrap: 'wrap', justifyContent: 'space-around', }, gridLi...
A simple example of a sequence of colors that can be used to display a sequence of colors.
import React from 'react' import ReactDOM from 'react-dom' import App from './App' ReactDOM.render(<App />, document.getElementById('root'))
Import ReactDOM from react - dom
import 'babel-polyfill'; import React from 'react'; import {render} from 'react-dom'; import {Container} from 'cerebral-view-react'; import controller from './controller'; import Main from './components/Main'; require('!style!css!highlight.js/styles/github.css'); require('!style!css!highlight.js/styles/default.css'); ...
Imports a single node in the DOM.
import React from 'react' import { Table } from 'semantic-ui-react' const TableExampleBasic = () => { return ( <Table basic> <Table.Header> <Table.Row> <Table.HeaderCell>Name</Table.HeaderCell> <Table.HeaderCell>Status</Table.HeaderCell> <Table.HeaderCell>Notes</Table....
Imports a single - language - dependent object from React.
/** * * ShowProfile * */ import React from 'react'; import './style.css'; import './styleM.css'; export default class ShowProfile extends React.PureComponent { constructor(props) { super(props); this.state = { user: {}, skills: [], links: [] } } componentWillMount() { this.g...
The base class for all showProfile and showUser objects.
import React from 'react'; import CommentFrame from './comment-frame'; import CommentIndent from './comment-indent'; export default class HiddenComment extends React.Component { static propTypes = { comment: React.PropTypes.shape({ id: React.PropTypes.number.isRequired, user: React.PropTypes.shape({ ...
The HiddenComment component is a component that can be rendered by a user or a component that has a comment.
import React from 'react'; class Announcements extends React.Component { render () { return ( <div> <h3>Announcements</h3> {this.props.children || <p>Choose an announcement from the sidebar.</p>} </div> ); } } export default Announcements;
The Announcements component is a component that renders a bunch of announcement messages.
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import StatusList from 'mastodon/components/status_list'; import { FormattedMessage } from 'react-intl'; import { connect } from 'react-redux'; import { fetchTrendingStatuses, expandTrendingStatuse...
The status list component that is rendered when a status list is trending.
import React, { Component } from 'react'; class Winner extends Component { render(){ return (<div className="winner">Winner is {this.props.winner}</div>); } } export default Winner;
A component that is rendered as a hidden div with a wrapper around the inner component.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImagePanoramaVertical = (props) => ( <SvgIcon {...props}> <path d="M19.94 21.12c-1.1-2.94-1.64-6.03-1.64-9.12 0-3.09.55-6.18 1.64-9.12.04-.11.06-.22.06-.31 0-.34-.23-.57-.63-.57H4.63c-.4 0-.63.23-.63.57 0 .1.02...
A component that
"use strict"; import React from 'react'; import Header from './Header.js'; import {} from 'bootstrap/dist/css/bootstrap.css'; import {} from '../../css/app.css'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import getMuiTheme from 'material-ui/styles/getMuiTheme'; import darkBaseTheme from 'mate...
The application component
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, { Component } from 'react'; import { connect } from 'react-redux'; import { Container, Header, Title, Content, Text, Button, Icon } from 'native-base'; import { openDrawer } from '../../actions/drawer'; import { popRoute } from '../../actions/route'; import styles from './styles'; class BlankPage exten...
The default implementation of a blank page which is a component that can be rendered on a hidden hidden list.
/** * 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 Register from './Registe...
Provides a function to export a single node from the React Starter Kit.
import React from 'react'; import ProgressBar from 'ps-react-rod/ProgressBar'; /** 70% Progress */ export default function Example70Percent() { return <ProgressBar percent={70} width={150} />; }
Example70Percent - > Progress
import React, { Component } from 'react'; import { Segment, Button, Header, Divider, Form, Icon } from 'semantic-ui-react'; import fire from '../fire.js'; import { Redirect, Link } from 'react-router-dom'; import './Login.css'; class Login extends Component { constructor(props){ super(props); thi...
The login component which is a base class for all login actions.
import React, { Component } from 'react'; import jQuery from 'jquery'; import { hashHistory } from 'react-router'; class Signup extends Component { constructor(props) { super(props); this.state = { hint: '' }; } render() { return ( <div className="sign-up"> <table> <...
A component that can be used to sign up a user.
import React from 'react'; import ReactDOM from 'react-dom'; import { browserHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import { AppContainer } from 'react-hot-loader'; import { AsyncComponentProvider } from 'react-async-component'; import asyncBootstrapper from 'react-asy...
The main function that will render the app with a random key
import React from 'react'; import {render} from 'react-dom'; import Main from './components/App'; render(<Main />, document.getElementById('root')); //will hold router
Imports a React component and renders it into the DOM.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvVolumeUp = (props) => ( <SvgIcon {...props}> <path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91...
A component that exports a single node in a hierarchy that is a sequence of nodes
import React from 'react'; import Layout from '../components/Layout'; class NotFoundPage extends React.Component { render() { return ( <Layout location={this.props.location}> <h1>Not Found</h1> <p>You just hit a route that doesn&#39;t exist... the sadness.</p> </Layout> ); } } ...
The NotFoundPage class is used to render a 404 page.
'use strict'; import React from 'react'; import LinkedStateMixin from 'react/lib/LinkedStateMixin'; import Container from './Container'; import { Link } from 'react-router'; const DragAroundNaive = React.createClass({ mixins: [LinkedStateMixin], getInitialState() { return { hideSourceOnDrag: false ...
The main function of the logic that is used to show a hidden element while dragging it.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvRepeat = (props) => ( <SvgIcon {...props}> <path d="M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z"/> </SvgIcon> ); AvRepeat = pure(AvRepeat); AvRepeat.displayName = 'AvRepeat'; AvRepeat.mu...
A component that exports a sequence of React objects.
import React from 'react' import FilterLink from '../containers/FilterLink' const Footer = () => ( <footer> <span>SHOW:</span> <FilterLink filter='SHOW_ALL'>ALL</FilterLink> <FilterLink filter='SHOW_ACTIVE'>ACTIVE</FilterLink> <FilterLink filter='SHOW_COMPLETED'>COMPLETED</FilterLink> </footer> ) ...
A function to export a missing - block from a template.
import React from 'react'; import { render } from 'react-dom'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; render(<HelloWorld />, document.getElementById('react-root'));
Imports a component from a file that has no react - dom.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageFilterDrama = (props) => ( <SvgIcon {...props}> <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.61 5.64 5.36 8.04 2.35 8.36 0 10.9 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4...
Drama filter for images.
import React, { Component } from 'react'; import { withRouter } from 'react-router'; import Formsy from 'formsy-react'; import getMuiTheme from 'material-ui/styles/getMuiTheme'; import darkBaseTheme from 'material-ui/styles/baseThemes/darkBaseTheme'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; i...
Component that adds a single record to a table.
import React from 'react'; import { Link } from 'react-router'; import css from 'react-css-modules'; import styles from './styles'; export const Navigation = () => ( <ul styleName='navigation'> <li><Link to='/ui-kit/badges'>{`badges`}</Link></li> <li><Link to='/ui-kit/buttons'>{`buttons`}</Link></li> <l...
Exports a default navigation function for a sequence of resources.
import React from 'react'; import { Route, IndexRedirect } from 'react-router'; import { requireAuthentication as restrict } from './containers/AuthenticatedComponent'; import AppContainer from './containers/AppContainer'; import HeroPageLayout from './containers/HeroPageLayout'; import AdminPageLayout from './contain...
This package is used to render a single component. It is used to render a single component in the app.
import React from 'react'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown'; const pageFilename = 'api/backdrop'; const requireRaw = require.context('!raw-loader!./', false, /\/backdrop\.md$/); export default function Page({ do...
The default page for a single node - ui - backdrop
import React from 'react'; import PropTypes from 'prop-types'; import { Icon } from 'semantic-ui-react'; import { createLastFMLink } from '../../../../../utils'; import { favoriteTrackShape } from '../../../../../constants/propTypes'; import styles from './styles.scss'; function toFavoriteTrack({ artist, title, thumb...
JSX plugin for a single node in a music card.