code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React from 'react'; // Exported from redux-devtools import { createDevTools } from 'redux-devtools'; // Monitors are separate packages, and you can make a custom one import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; // createDevTools takes a monitor an...
Private function to export a single node from redux - devtools
import React from 'react'; const IconCircleText = ({label, style, center, className}) => { let cls = 'rh-icon-circle-text'; if (style) { cls += '-' + style; } if (center) { cls += ' margin-center'; } if (className) { cls += ' ' + className; } return (<div className={cls}> <span>{lab...
export IconCircleText default
import React from 'react' import { makeStyles } from '@material-ui/core/styles' import PhoneIcon from '@material-ui/icons/PhoneAndroid' import LaptopIcon from '@material-ui/icons/Laptop' import FileIcon from '@material-ui/icons/Usb' import ErrorIcon from '@material-ui/icons/Error' import Paper from '@material-ui/core/P...
Generate a single single - node error message for a single node in a network network.
import React from 'react' import { Icon } from 'semantic-ui-react' const IconExampleFitted = () => ( <div> <p>Tight spacing</p> <Icon fitted name='help' /> <p>Tight spacing</p> </div> ) export default IconExampleFitted
Example of missing - block - wise resistance.
import React from 'react'; import ReactDOM from 'react-dom'; import './less/index.less'; import App from './App'; import registerServiceWorker from './utils/registerServiceWorker'; //TMP dependacy for material var injectTapEventPlugin = require("react-tap-event-plugin"); injectTapEventPlugin(); ReactDOM.render(<App ...
Imports a single application and registers a service worker.
import React from 'react'; import QueueAnim from 'rc-queue-anim'; import Menu from './Menu'; import IconMenu from './IconMenu'; import DropdownMenu from './DropdownMenu'; const Menus = () => ( <section className="container-fluid with-maxwidth chapter"> <QueueAnim type="bottom" className="ui-animate"> <div ...
module containing functions for handling missing modules
import React from 'react' import { Divider, Segment } from 'shengnian-ui-react' const DividerExampleSection = () => ( <Segment> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore... <Divider section /> Lorem ipsum dolor sit amet, consectetur adipiscing eli...
Imports a single node from the system.
import React from 'react'; export default class AccordionPanel extends React.Component { render() { return( <div class="container"> <div class="row"> <div class="col-lg-12"> <div class="panel-group" id="accordion"> <div class="panel panel-defaul...
Extend the accordion panel with a custom render method.
import React, { Component } from 'react'; import { View, ProgressViewIOS, ProgressBarAndroid, Platform } from 'react-native'; class HorizontalProgressComp extends Component { render() { if (Platform.OS === 'android') { return ( <ProgressBarAndroid styleAttr="Horizontal" colo...
HorizontalProgressComp is a class that renders a hidden component with progress bar.
/* * This file is part of the "Agave react UI" package * * Copyright (c) 2016 Stepanov Nickolay <nickorsk2020@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * */ import React from 'react'; import { Button } from 'react-b...
The main component of the package.
import React from 'react'; import { Container, Row, Col } from 'reactstrap'; const Footer = ({gh}) => { const [user, repo] = gh.split('/'); return ( <div className="footer mt-1"> <Container fluid> <Row> <Col className="text-center"> <p className="social"> <ifra...
Imports the missing - node error messages from GitHub.
import DockMonitor from 'redux-devtools-dock-monitor' import LogMonitor from 'redux-devtools-log-monitor' import React from 'react' import { createDevTools } from 'redux-devtools' const DevTools = createDevTools( <DockMonitor changePositionKey='ctrl-q' toggleVisibilityKey='ctrl-h' > <LogMonitor /> </...
import DockMonitor from redux - devtools - dock - monitor from redux - devtools - log - monitor
import svgMarkup from './AndroidIcon.svg'; import React from 'react'; import Icon from '../private/Icon/Icon'; export default function AndroidIcon({ ...props }) { return <Icon markup={svgMarkup} {...props} />; } AndroidIcon.displayName = 'AndroidIcon';
AndroidIcon is a static function that returns an AndroidIcon
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageFilterCenterFocus = (props) => ( <SvgIcon {...props}> <path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 9...
A component that displays a filter center on the top of a block of a 2D group.
import React from 'react'; import Item from './Item'; import Wrapper from './Wrapper'; function ListItem(props) { return ( <Wrapper> <Item> {props.item} </Item> </Wrapper> ); } ListItem.propTypes = { item: React.PropTypes.any, }; export default ListItem;
ListItem exports a single item in a sequence of items that can be found in a sequence of items.
import React from 'react'; import classNames from 'classnames'; import CustomPropTypes from './utils/CustomPropTypes'; const Row = React.createClass({ propTypes: { /** * You can use a custom element for this component */ componentClass: CustomPropTypes.elementType }, getDefaultProps() { re...
The default row class which is rendered when a component is missing a custom element.
import React from 'react'; export default <div style={{ maxHeight: 25 }}>NMR</div>;
default component that displays a warning if the component is not available.
// @flow import React, { Component } from 'react'; import styles from './Sidebar.scss'; export default class Sidebar extends Component { render() { return ( <section className={styles.container}> <header className={styles.header}> <h1 className={styles.headerHeading1}>Header</h1> ...
Sidebar class for a single node in the system
import React from 'react'; import 'react-circular-progressbar/dist/styles.css' import Landing from "./components/Landing"; import {initFirebase} from "./firebase/fire"; import {store} from './store/DataStore' import Spinner from "./components/Spinner"; import Dashboard from "./components/Dashboard"; export default cla...
The app component is a component that can be rendered in a browser.
import React, { Component } from 'react'; import PT from 'prop-types'; import { connect } from 'react-redux'; import { settingsFetchAction, settingsSaveAction, settingsChangeAction, } from '../../data/settings/duck'; import Loading from '../../components/Loading/Loading'; import SettingsConfig from './SettingsCon...
A component that can be attached to a settings container.
import React from 'react'; import ReactMixin from 'react-mixin'; import addons from 'react/addons'; import DialogActionCreators from 'actions/DialogActionCreators'; import AvatarItem from 'components/common/AvatarItem.react'; const {addons: { PureRenderMixin }} = addons; @ReactMixin.decorate(PureRenderMixin) class ...
A component that renders a single missing - contact record in a section of a dialog.
import React from 'react' // Exported from redux-devtools import { createDevTools } from 'redux-devtools' // Monitors are separate packages, and you can make a custom one import LogMonitor from 'redux-devtools-log-monitor' import DockMonitor from 'redux-devtools-dock-monitor' // createDevTools takes a monitor and pr...
Private function to export a single node from a React component.
import React from 'react'; import assign from 'object-assign' import classnames from 'classnames'; import { View } from "./View.js" import Utils from "./common/Utils.js" import './ListItem.scss' import ArrowRight from 'react-icons/lib/io/ios-arrow-forward'; export class ListItem extends React.Component { ...
A component that creates a list item with a single child of a list item.
import React from 'react' import App from 'next/app' import '../styles/global.css' class MyApp extends App { render() { const { Component, pageProps } = this.props return <Component {...pageProps} /> } } export default MyApp
A component that can be rendered by a component in a page.
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import * as serviceWorker from './serviceWorker'; ReactDOM.render(<App />, document.getElementById('root')); // If you want your app to work offline and load faster, you can change // unregister() to register()...
Imports a single application.
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; const ColumnLink = ({ icon, text, to, href, method }) => { if (href) { return ( <a href={href} className='column-link' data-method={method}> <i className={`fa fa-fw fa-${icon} column-link__icon`}...
A column link that links to a node in a tree.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionReceipt = (props) => ( <SvgIcon {...props}> <path d="M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-...
A component that renders a series of action receipt icons.
import React from 'react'; import ReactDOM from 'react-dom'; import Root from './Root'; ReactDOM.render( <Root />, document.getElementById('root') );
Imports React from ReactDOM and renders it into the DOM.
/* This file is a part of libertysoil.org website Copyright (C) 2016 Loki Education (Social Enterprise) This program 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, either version 3 of the License, o...
Displays a single missing node in the system that is not part of a standard password sequence.
import React from 'react'; import { Menu, Breadcrumb, Icon } from 'antd'; const ReactRouter = require('react-router'); module.exports = React.createClass({ getInitialState: function() { return { current: 'dashboard' } }, handleClick: function(e) { this.setState({ ...
A component that displays a sequence of
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import { Table, Alert, Button , Row , Col } from 'react-bootstrap'; import { Bert } from 'meteor/themeteorchef:bert'; import { Capitalize } from '../../../modules/utilities'; import { SortReturnRecentOne, StripHtml ...
Imports a single non - approved paper.
import React from 'react' import {Radio} from 'antd' const Button = Radio.Button; const TransitionStateButton = (props) => { return ( <Button value={props.state.targetState}>{props.state.event}</Button> ); }; export default TransitionStateButton
React component that imports a bunch of components from a Radio component.
import React from 'react'; import ApiFunction from './ApiFunction'; import Heading from '../content/Heading'; import ApiDescription from './ApiDescription'; const ApiClass = ({ name, children, minLevel, comment }) => { const items = children.filter(item => item.kindString === 'Method' && item.flags.isPublic); ite...
Generates a single API class that can be used to create a React component.
import React from 'react'; const <NAME> = (parameters) => ( <div>{parameters}</div> ); export default <NAME>;
Missing - node - error error handler
import React from 'react'; class Grades extends React.Component { render () { return ( <div> <h2>Grades</h2> </div> ); } } export default Grades;
The Grades component.
import React from 'react'; import ClassNames from 'classnames'; import FontIcon from '../font_icon'; import style from './style'; class Input extends React.Component { static propTypes = { children: React.PropTypes.any, className: React.PropTypes.string, disabled: React.PropTypes.bool, error: React.P...
A component that can be used to enter a single key sequence.
import { setTransform, isTransformSupported } from './utils'; import React from 'react'; import classnames from 'classnames'; export function getScroll(w, top) { let ret = w[`page${top ? 'Y' : 'X'}Offset`]; const method = `scroll${top ? 'Top' : 'Left'}`; if (typeof ret !== 'number') { const d = w.document; ...
Private functions - Component componentDidMount and componentDidUpdate
import React from 'react'; import { Link } from 'gatsby'; import { Helmet } from 'react-helmet'; import kebabCase from 'lodash/kebabCase'; import Sidebar from '../components/Sidebar'; import { graphql } from 'gatsby'; class TagsRoute extends React.Component { render() { const { title } = this.props.data.site.sit...
The base route for all tags.
import React from 'react'; import Title from 'react-title-component'; import MarkdownElement from '../../MarkdownElement'; import communityText from './community.md'; const Community = () => ( <div> <Title render={(previousTitle) => `Community - ${previousTitle}`} /> <MarkdownElement text={communityText} />...
Package that exports a Community component.
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import InnerHeader from '../../account/components/header'; import ActionBar from '../../account/components/action_bar'; import MissingIndicator from '../../../components/missing_indicator'; import ...
A component that renders a missing block block mention report and unblock domain.
import React from 'react'; import Icon from '../Icon'; export default class ColorLensIcon extends Icon { getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M24 6C14.06 6 6 14.06 6 24s8.06 18 18 18c1.66 0 3-1.34 3-3 0-.78-.29-1.48-.78-2.01-.47-.53-.75-1.22-.75-...
ColorLensIcon exports a color lens icon.
// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import CSSClassnames from '../../../utils/CSSClassnames'; import Intl from '../../../utils/Intl'; import Props from '../../../utils/Pro...
A component that renders a checkmark icon.
import React, { Component } from 'react'; export default class AddProject extends Component { state = { projectId: '', }; submit = (e) => { e.preventDefault(); this.props.onAdd(this.state.projectId); } render() { return ( <form onSubmit={this.submit}> <div><label htmlFor="proj...
AddProject - Add a project to a node.
import React from 'react'; import ContentWrapper from 'components/ContentWrapper'; const NotFoundPage = () => ( <ContentWrapper> <section className="content"> Not found page </section> </ContentWrapper> ); export default NotFoundPage;
Default 404 page
import React from 'react' import { connect } from 'react-redux' import Avatar from 'material-ui/Avatar' import Chip from 'material-ui/Chip' export default connect(mapStateToProps)(({ team, teamStandings, teamsById, institutionsById, round }) => { return ( <Chip avatar={ <Avatar> ...
React - redux - mapStateToProps
import React from 'react'; import PropTypes from 'prop-types'; import { compose, lifecycle } from 'recompose'; import { reduxForm, Field } from 'redux-form'; import { WK_API_KEY_URL } from 'common/constants'; import { requiredValid, emailValid, minLengthValid, confirmPasswordValid, } from 'common/validations';...
The default implementation of a single - component
import React from 'react' import PropTypes from 'prop-types' import Immutable from 'immutable' import moment from 'moment' import styles from './Content.less' const Content = ({ info, comment, curLesson }) => { const commentText = comment.getIn(['suggestion', 'student']) const gradeTime = info.get('gradetime') r...
React JSX module
import React from 'react'; import { Carousel } from './Carousel'; import { Link } from 'react-router'; import {Router, Route, browserHistory, IndexRoute} from 'react-router'; export class ProductDetail extends React.Component { constructor() { super(); this.state = { item: {}, store: {} }; } ...
Component which displays a list of all items in the system that are not part of a system.
'use strict'; import React from 'react'; import cx from 'classname'; import axios from 'axios'; import Promise from 'bluebird'; import capitalize from 'capitalize'; import empty from 'is-empty'; class Pokemon extends React.Component { constructor(props) { super(props); this.state = { pokemon: {}, ...
The base component for all pokemon components.
import React from 'react'; import { styled } from 'styletron-react'; import Link from '../Link'; import { withTheme } from '../../util/ThemeContext'; import formatDate from '../../util/formatDate'; const Article = withTheme( styled('div', ({ $theme, $collection }) => ({ display: 'flex', flexDirection: 'colu...
Exports a single missing - block block of a theme.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NavigationChevronRight = (props) => ( <SvgIcon {...props}> <path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/> </SvgIcon> ); NavigationChevronRight = pure(NavigationChevronRight); NavigationChevronRigh...
A component that exports a navigation chooser right on top of a node.
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 axios from 'axios'; import ReviewList from './ReviewList'; class StudentDashboard extends React.Component { constructor() { super(); this.state = { missions: [], } } componentWillMount() { axios.get('/api/missions') .then((res) => { this.set...
A component that displays a series of missions and a list of review lists.
import React from 'react' export default function ClientHeader ({item}) { return ( <div className='media'> <div className='media-left'> <figure className='image is-32x32'> {typeof item.$imageProgress !== 'undefined' ? <progress className='progress is-small' value={it...
Public function to generate a single header for a single node.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import * as LocationActions from '../../../actions/LocationGenerators'; import LocationList from './LocationList'; import AddNewButton from '../../common/AddNe...
The base class for all locations that are not part of a state.
import React from 'react'; import {StyleSheet, View, Text, Image} from 'react-native'; import {SharedElementTransition} from 'react-native-navigation'; const SHOW_DURATION = 240; const HIDE_DURATION = 200; class Item extends React.Component { static navigatorStyle = { navBarHidden: true, drawUnderNavBar: t...
Create a single item that can be rendered by a node in a view.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwarePhonelink = (props) => ( <SvgIcon {...props}> <path d="M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z"/> ...
Hardware Phonelinks are used to display a link to a hardware icon.
'use strict' import React from 'react' export default function prettify (Component) { class Prettify extends React.Component { static displayName = 'Prettify' static propTypes = { children: React.PropTypes.array } componentDidMount () { window.prettyPrint(null, React.findDOMNode(this.r...
A component that is prettified if it has a component that has a children.
/* * SonarQube * Copyright (C) 2009-2016 SonarSource SA * mailto:contact AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License...
Creates a component that can be rendered or destroyed by a component in a container.
import React, { Component } from 'react'; import { Link } from 'react-router'; import numeral from 'numeral'; import Avatar from '../widgets/Avatar'; import { ProfileTooltipOrigin } from '../widgets/tooltip/ProfileTooltip'; import { getUpvotes, getDownvotes, } from '../helpers/voteHelpers'; import './LikesList.scss...
A component that shows up and downvotes and shows up and down votes.
import React from 'react'; import classNames from 'classnames'; import CustomPropTypes from './utils/CustomPropTypes'; const Grid = React.createClass({ propTypes: { /** * Turn any fixed-width grid layout into a full-width layout by this property. * * Adds `container-fluid` class. */ fluid...
Creates a grid component that can be rendered with a custom element.
import React from 'react'; import { Input } from 'cf-component-input'; class InputComponent extends React.Component { constructor(props) { super(props); this.state = { inputValue: 'Hello World' }; this.handleChange = this.handleChange.bind(this); } handleChange(e) { const value = e.tar...
A component that can be used to enter a hidden field in a dropdown list.
/** * NotFoundPage * * This is the page we show when the user visits a url that doesn't have a route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a neccessity for you then you can refactor i...
NotFoundPage - The page we show when the user visits a url that doesn t have a route missing exception.
/** * * Button.react.js * * A common button, if you pass it a prop "route" it'll render a link to a react-router route * otherwise it'll render a link with an onclick */ import React from 'react'; import styles from './styles.css'; function Button(props) { const className = props.className ? props.className ...
A button that can be used to show a link with a route on a button.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceLocationDisabled = (props) => ( <SvgIcon {...props}> <path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06c-1.13.12-2.19.46-3.16.97l1.5 1.5C10.16 5.19 11.06 5 12 5c3.87 0 7 3.13 7 7 0 .94-.19 1.84-.5...
Missing device location disabled in a hierarchy
import React, { Component } from 'react'; import { View, Text, TouchableOpacity, Image, StyleSheet } from 'react-native'; import Girl from './Girl'; import NavigationBar from './NavigationBar'; export default class Boy extends Component { constructor(props) { super(props); thi...
A component that can be used to show a Boy.
import React from 'react' import { Image, Reveal } from 'semantic-ui-react' const RevealExampleHidden = () => ( <Reveal animated='small fade'> <Reveal.Content visible> <Image src='http://semantic-ui.com/images/wireframe/square-image.png' size='small' /> </Reveal.Content> <Reveal.Content hidden> ...
Imports a sequence of non - hidden components from the semantic - ui - react module.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvWeb = (props) => ( <SvgIcon {...props}> <path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z"/> </SvgIcon> ); AvWeb = pur...
A component that exports a single node in a sequence of icons.
import React from 'react' import { Grid, Image } from 'semantic-ui-react' const GridExampleVerticalAlignmentRow = () => ( <Grid columns={4} centered> <Grid.Row verticalAlign='top'> <Grid.Column> <Image src='http://semantic-ui.com/images/wireframe/image.png' /> </Grid.Column> <Grid.Colum...
This function imports a bunch of components from the semantic - ui - react module.
import React from 'react'; import classNames from 'classnames'; /* |-------------------------------------------------------------------------- | AppFooter |-------------------------------------------------------------------------- | | Stateless component | */ const AppFooter = props => ( <div className={c...
Demonstrates how to render a single object.
import React from 'react'; class IssueIcon extends React.Component { render() { return ( <svg height="1em" width="0.875em" className={ this.props.className } > <path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7S10.14 13.7 7 13.7 1.3 11.14 1.3 8s2.56-5.7 5.7-5.7m0-1.3C3.14 1 0 4.1...
A component that can be rendered as an icon in a tree.
import React from 'react'; import { connect } from 'react-redux'; import { deleteProfile } from '../../actions/DeleteProfile-actions'; import { Link } from 'react-router-dom'; import { userLogoutSuccess } from '../../actions/auth-actions'; class DeleteProfile extends React.Component { constructor(props) { ...
A component that will delete a user s profile.
import React from 'react'; import styles from './CenteredLayout.css'; export const CenteredLayout = ({ children }) => ( <div className={styles.container}> {children} </div> ); export default CenteredLayout;
The centered layout is a view that displays a container with a single child element.
import React, { Component } from 'react'; import { Link } from 'react-router-dom'; // MaterialUI import RaisedButton from 'material-ui/RaisedButton'; class ResetPasswordSent extends Component { render() { return ( <div> <p>An email has been sent to the address provided with instructions on how to reset you...
The reset password component is a component that can be used to send a password reset email to a user.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionInfo = (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 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/> </SvgIcon> ); ActionInfo = pure(ActionInfo); ActionI...
A component that exports a series of action information for a series of nodes.
import React from 'react'; import ContentLayout from '../../layout/ContentLayout'; import VideoIFrame from '../../VideoIFrame'; export default function HomageToBarraganPage() { return ( <ContentLayout header="color interactions" subheader="completed - march 2017" ...
A default color interactions page that displays a single color alert.
import React, { Component } from 'react'; import { dispatch } from 'rerx/core'; import { helper } from 'rerx/utils'; export class Button extends Component { constructor(props) { super(props); const thisEvent = helper.thisEvent.bind(this); this.event = { click: thisEvent('click') }; this....
Create a button that can be used to show a button on a button group.
import React from 'react' import classes from './SponsorsItem.scss' const determineSize = (size) => { switch (size) { case 4: return {'maxWidth': '375px'} case 3: return {'maxWidth': '225px', 'maxHeight': '150px'} case 2: return {'maxWidth': '150px'} case 1: return {'maxWidth'...
React - > SponsorsItem
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import App from './App'; import { BrowserRouter as Router } from 'react-router-dom'; export default class Root extends Component { render() { return ( <Router> <App /> </Router> ); } } Root.propTypes = { h...
The base class for the hierarchy of a component.
import React from 'react'; const DOB = () => ({ dobNext(){ var data = $("#questionInput").val(); if(data){ Session.set('dob', data); FlowRouter.go("/register/8"); }else{ alert("Please enter your birthday."); } }, render() { return ( <div id="jiyuu"> <h2 cla...
DobNext function that exports a single sequence of tokens.
import React from 'react'; import BaseChecklist from 'parser/shared/modules/features/Checklist/Module'; import CastEfficiency from 'parser/shared/modules/CastEfficiency'; import Combatants from 'parser/shared/modules/Combatants'; import PreparationRuleAnalyzer from 'parser/shared/modules/features/Checklist/Preparation...
Create a checklist that can be used to render a single checklist.
import React from 'react'; import Title from 'react-title-component'; import {GridList, GridTile} from 'material-ui/GridList'; import IconButton from 'material-ui/IconButton'; import FontIcon from 'material-ui/FontIcon'; import MarkdownElement from '../../MarkdownElement'; import showcaseText from './showcase.md'; con...
Imports a single node with a series of components.
/** * 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
import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route, hashHistory} from 'react-router' import IndexHello from './components/IndexHello'; import NotFound from './components/NotFound'; import Usr from './components/Usr'; ReactDOM.render( ( <Router history={hashHistory}> ...
Imports a sequence of Nagios.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { fetchAlbumPhotos } from '../actions'; import Loader from './Loader'; import Gallery from 'react-photo-gallery'; import Measure from 'react-measure'; import Lightbox from 'react-images'; class AlbumPhotos extends Component { com...
The AlbumPhotos component which is used to show a list of photos in a specific album.
import React from 'react'; import Simple from './Simple'; import WithPlaylist from './WithPlaylist'; import Unstyled from './Unstyled'; import CustomPlaylist from './CustomPlaylist'; import Fixed from './Fixed'; const rowStyle = {display: 'flex', marginTop: '40px'}; const playlistContainerStyle = {margin: 'auto'}; ex...
export default function
import React from 'react'; import {Link} from 'react-router'; import FooterStore from '../stores/FooterStore' import FooterActions from '../actions/FooterActions'; class Footer extends React.Component { constructor(props) { super(props); this.state = FooterStore.getState(); this.onChange = this.onChange....
The Footer component is a component that is used to show a bunch of characters in the FooterStore.
import React, { Component } from 'react'; import { BrowserRouter, Switch, Route } from 'react-router-dom'; import SiteHeader from './components/SiteHeader/SiteHeader'; import Navigation from './components/Navigation/Navigation'; import OffCanvasPanel from './components/OffCanvasPanel/OffCanvasPanel'; import BtnContain...
Class to render a single missing - node style guide.
import React from 'react'; import classNames from 'classnames'; import BootstrapMixin from './BootstrapMixin'; import CustomPropTypes from './utils/CustomPropTypes'; const Popover = React.createClass({ mixins: [ BootstrapMixin ], propTypes: { /** * An html id attribute, necessary for accessibility ...
Creates a new Popover with the given properties.
import React from 'react' export const Filters = () => ( <> <svg width={0} height={0}> <defs> <filter id="high-threshold"> <feColorMatrix type="saturate" values="0" /> <feComponentTransfer> <feFuncR type="discrete" tableValues="0" /> <feFuncG type="discret...
Export a single n - sequence sequence from a React module.
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; import reportWebVitals from './reportWebVitals'; ReactDOM.render( <React.StrictMode> <App /> </React.StrictMode>, document.getElementById('root') ); // If you want to start measuring performance in yo...
Imports a single node and renders it as a hidden element.
import React from 'react'; import ReactDOM from 'react-dom'; import { Router, IndexRoute, Route } from 'react-router'; import createBrowserHistory from 'history/lib/createBrowserHistory'; import { IndexPage, UploadPage, BuildsPage, SettingsPage, LoginPage } from './pages'; ReactDOM.render( <Router history={createBro...
Imports the application - container and renders it in a browser history.
import React from 'react' export const Multiplier = (props) => ( <div style={{ margin: '0 auto' }} > <h2>Multiplier: {props.counter}</h2> <button className='btn btn-default' onClick={props.increment}> Double </button> {' '} <button className='btn btn-default' onClick={props.doubleAsync}> ...
A component that multiplies a number of nodes with a double - counter.
import React from 'react' import ReactDOM from 'react-dom' import Root from './components/Root' import store from './store' ReactDOM.render( <Root store={store} />, document.getElementById('root') )
Imports a single from ReactDOM.
import React from 'react' const Header = () => null export default Header
The Header function that returns a default Header object.
import React from 'react'; import ReactDOM from 'react-dom'; import AppContainer from './components/AppContainer'; import '../styles/base.scss'; ReactDOM.render( <AppContainer />, document.getElementById('root') );
Imports a single node in the DOM.
import React from 'react'; import { requireNativeComponent } from 'react-native'; const RNCellView = requireNativeComponent('RNCellView', null); export default class TableViewCell extends React.Component { constructor(props) { super(props); this.state = { width: 0, height: 0 }; } render() { return ...
TableViewCell is a class that extends a React component that is used to render a table view cell.
import React from 'react'; import { View, Text, Platform, StatusBar, TouchableOpacity } from 'react-native'; import {autobind} from 'core-decorators'; import {connectStyle} from '../core/Theme'; import {translate} from '../core/I18n'; import { tx } from '../utils/internal'; // 消息提示 @translate('core.MessageVi...
A component that displays a tip message in the message dialog.
import React from 'react' import shallowEqual from '../util/shallowEqual' export default class Switch extends React.Component { static propTypes = { onText: React.PropTypes.string.isRequired, offText: React.PropTypes.string.isRequired, id: React.PropTypes.string, label: React.PropT...
A component that implements a bootstrap switch.
import React from 'react'; import PropTypes from 'prop-types'; import { NavLink, withRouter } from 'react-router-dom'; import { FormattedMessage, injectIntl } from 'react-intl'; import { debounce } from 'lodash'; import { isUserTouching } from 'flavours/glitch/util/is_mobile'; import Icon from 'flavours/glitch/componen...
A component that renders a tabs bar with a link to a tab in the tabs - bar.