code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import PropTypes from 'prop-types'; import React from 'react'; import { Link } from 'react-router-dom'; const ListingLink = ({ children, listingId }) => <Link className="ListingLink" to={`/poster/${listingId}`}> {children} </Link>; ListingLink.propTypes = { children: PropTypes.node.isRequired, listingId: ...
Provides a listingLink for a node that is a child of a node with a listingId.
import React from 'react' import PropTypes from 'prop-types' import TableConfirmButtonsRow from 'patternfly-react/dist/js/components/Table/TableConfirmButtonsRow' const TableInlineEditRow = props => { const buttonsPosition = (window, rowDimensions) => { const position = {} if (props.last) { position.b...
TableConfirmButtonsRow is a component that can be used to display a confirmation or cancel button in the table.
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' const FieldsetText = (props, context) => { const spanProps = Object.assign({}, props) delete spanProps.text return ( <span {...spanProps}> {props.text(context.frigFieldset.index)} </span> ) } FieldsetText.propTypes = { text: React.PropTypes.func.isRequired, } FieldsetT...
React component that renders a text field with a missing key in the fieldset.
import React from 'react'; import axios from 'axios'; import PropTypes from 'prop-types'; import withStyles from 'isomorphic-style-loader/lib/withStyles'; class Dashboard extends React.Component { static propTypes = { news: PropTypes.arrayOf(PropTypes.shape({ title: PropTypes.string.isRequired, lin...
The base class for all missing components that are not part of a dashboard.
import React from 'react' import './tip-overview.css' import placeholder from './tip-placeholder.png' const TipOverview = () => ( <div className="tip-overview-container"> <h3 className="tip-header-placeholder">First tip of the month coming soon!</h3> <img className="tip-img-placeholder" src={placeholder} a...
The tip - overview function
import React from 'react'; import "./navbar-style.scss"; const Navbar = () => { return ( <div className="navbar col-12"> <h1 className="navbar-head">CrowdBoard</h1> </div> ) } export default Navbar;
export Navbar
/** * * 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 rendered by a button with a link to a react - router route
import React from 'react'; import { storiesOf } from '@storybook/react'; import { DndProvider } from "react-dnd"; import { action } from '@storybook/addon-actions'; import HTML5Backend from "react-dnd-html5-backend"; import FormConfiguration from './'; storiesOf('FormBuilder/FormConfiguration', module) .add('textInp...
Imports a bunch of components from a module.
//@flow import React from 'react'; import FunctionList from './FuncList'; import FunctionState from './FuncState'; import FunctionGraph from './FuncGraph'; import FunctionEditor from './FuncEditor'; import FileDialog from './FileDialog'; import GraphSettings from './GraphSettings'; import {MathJaxFixer} from './MathJ...
Default module that exports a single sequence of functions.
import React, { Component } from 'react'; import Helmet from 'react-helmet'; import { config } from 'config'; import { Link } from 'react-router'; import { prefixLink } from 'gatsby-helpers'; export default class NotFound extends Component { render () { return ( <div className="page page--not-found"> ...
The NotFound class
/* @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 IconFormatShapes(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconP...
IconFormatShapes - Icon format for icons
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationDiscFull = (props) => ( <SvgIcon {...props}> <path d="M20 16h2v-2h-2v2zm0-9v5h2V7h-2zM10 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 10c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/> ...
NotificationDiscFull is a component
'use strict' import React from 'react' const MainHeader = () => ( <header className='header' role='banner'> <a className='logo' href='./' role='logo'> <img src='svg/logo.svg' /> </a> <a className='btn-link' href='https://github.com/frontendbr/eventos' title='Anuncie seu evento'> ...
The main header for an uncie seu evento
import './style.less'; import Immutable from 'immutable'; import React from 'react'; import { render } from 'react-dom'; import { createStore, applyMiddleware } from 'redux'; import thunkMiddleware from 'redux-thunk'; import createLogger from 'redux-logger'; import { Provider } from 'react-redux'; import App from './co...
Imports a single node in the DOM and renders it as a hidden hidden node.
import React, { Component } from 'react'; import Panel from 'react-bootstrap/lib/Panel'; import Row from 'react-bootstrap/lib/Row'; import Col from 'react-bootstrap/lib/Col'; import Button from 'react-bootstrap/lib/Button'; import ButtonGroup from 'react-bootstrap/lib/ButtonGroup'; import Glyphicon from 'react-bootstr...
A component that displays a single sequence of errors that occur in a sequence of possible states.
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'; function isValidChild(object) { ...
Creates and returns a routes object from the given ReactChildren.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareTv = (props) => ( <SvgIcon {...props}> <path d="M21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.1-.9-2-2-2zm0 14H3V5h18v12z"/> </SvgIcon> ); HardwareTv = pure(Hardwar...
HardwareTv is a lightweight component that can be used to render a hardware TV.
import React, { Component } from 'react'; import '../App.css'; import { connect } from 'react-redux'; import { toggleVisibility } from '../actions/index'; import { Button } from 'semantic-ui-react'; export class ButtonContainer extends Component { render() { const text = this.props.text; const actived = (th...
The ButtonContainer class is a component that can be used to render a button with a filter.
import React from 'react'; import ShortCutButton from './ShortCutButton'; export default class SearchBar extends React.Component { constructor(props) { super(props); this. _handleChange = this. _handleChange.bind(this); this. _handleKeyPress = this. _handleKeyPress.bind(this); this.onClickShortCutButt...
A component that can be used to show a list of keywords.
import React from 'react' import {Link} from 'react-router' import {element} from './element' import localization from '../js/localization' const Button = React.createClass({ renderExtraAttributes(){ let options = {}, config = this.props.config; if (config.data && config.data.mode_to && config.data.mo...
The button component that is rendered by the button - bar component.
import React from 'react'; import { Link } from 'react-router-dom'; import { observer, inject, PropTypes as MobxPropTypes } from 'mobx-react'; import { Title, Button } from 'bloomer'; import Loader from '../Loader'; import Page from '../Page'; import './ProfileDetails.scss'; const ProfileDetails = ({ user: userStore }...
The main entry point for the profile - details section.
import React, { Component } from 'react'; class Buy extends Component { render() { return ( <button disabled={!this.props.enabled} onClick={(e) => this.props.cb(this.props.employeeId, this.props.snackId)}>Buy</button> ); }; } export default Buy;
A component that can be used to show a button that will be clicked on the button button.
import 'babel-polyfill'; import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import '../styles/main.scss'; import '../images/favicon.ico'; import configureStore from './stores/configureStore'; const store = configureStore(); function renderApp() { const App = requir...
Imports a bunch of components into the app
import React, { Component } from 'react'; import JSONTree from 'react-json-tree'; const styles = { actionBar: { paddingTop: 8, paddingBottom: 7, paddingLeft: 16 }, payload: { margin: 0, paddingLeft: 16, overflow: 'auto' } }; export default class LogMonitorAction extends Component { c...
A component that can be used to show a log monitor action.
import React from 'react'; import PropTypes from 'prop-types'; import FormElement from './FormElement'; import FormElementControl from './FormElementControl'; import FormElementError from './FormElementError'; import FormElementLabel from './FormElementLabel'; import { getUniqueHash } from '../../utils'; const Radio...
The base component for all radio group components.
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdHome(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <polygon points="20 41 20 29 28 29 28 41 38 41 38 25 44 25 24 7 4 25 10 25 10 41" /> </IconBase> ); } export default MdHome;
Generates a hidden hidden element with a non - empty icon base.
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Toggle from 'react-toggle'; import noop from 'lodash/noop'; import StatusContent from '../../../components/status_content'; import { MediaGallery, Video } from '../../ui/util/async-component...
The status check box class
import React from 'react'; import { storiesOf } from '@storybook/react'; import { action, decorateAction } from '../src'; const pickFirst = decorateAction([ args => args.slice(0, 1) ]); storiesOf('Button', module) .add('Hello World', () => ( <button onClick={action('hello-world')}>Hello World</button> )) ...
A component that renders a single action on a button.
import React from 'react'; import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer'; import EnemyInstances from 'parser/shared/modules/EnemyInstances'; import Events from 'parser/core/Events'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import SpellLink from 'common/SpellLink...
The base class for all of the possible judgment related methods.
import 'core-js'; import 'regenerator-runtime/runtime'; import 'whatwg-fetch'; import 'raf/polyfill'; import './init/DOMParserShim'; import React from 'react'; import ReactDOM from 'react-dom'; import Application from './components/Application'; import init from './init'; const {store} = init(); ReactDOM.render( ...
Imports a single application.
import React from 'react'; export default React.createContext();
Create a new React context if it doesn t exist.
import 'babel-core/polyfill'; import React from 'react'; import { Provider } from 'react-redux'; import App from './containers/App'; import configureStore from './store/configureStore'; const store = configureStore(); React.render( <Provider store={store}> {() => <App />} </Provider>, document.getElementByI...
Imports a single node in the DOM.
/* * * DashboardContainer * */ import React from 'react'; import Helmet from 'react-helmet'; export default class DashboardContainer extends React.PureComponent { constructor(props){ super(props); this.state ={ title:"", body:"", image:"", preview:"", } } handleTitle = (event) => { ...
A component that displays a hidden hidden
import React from 'react'; import SPELLS from 'common/SPELLS'; import RESOURCE_TYPES from 'game/RESOURCE_TYPES'; import { formatPercentage } from 'common/format'; import STATISTIC_ORDER from 'parser/ui/STATISTIC_ORDER'; import Statistic from 'parser/ui/Statistic'; import RegenResourceCapTracker from 'parser/shared/modu...
Creates a new object that can be used to track the regeneration of the given resource.
import React from 'react'; import Icon from '../Icon'; export default class SendIcon extends Icon { getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M4.02 42L46 24 4.02 6 4 20l30 4-30 4z"/></svg>;} };
This class is used to generate a color - based icon for a specific .
import React from 'react'; import packageJSON from '../../package.json'; let version = packageJSON.version; if (/docs/.test(version)) { version = version.split('-')[0]; } const PageHeader = React.createClass({ render() { return ( <footer className='bs-docs-footer' role='contentinfo'> <div c...
Private function to create a page header with a single warning.
// @flow strict import React from 'react'; import styles from './Icon.module.scss'; type Props = { name: string, icon: { viewBox?: string, path?: string } }; const Icon = ({ name, icon }: Props) => ( <svg className={styles['icon']} viewBox={icon.viewBox}> <title>{name}</title> <path d={icon.pa...
Exports a type to a component.
import React, { Component } from 'react'; import Home from './Home'; class App extends Component { render() { return ( <div> <h2>Welcome to React Simple</h2> <p > To get started, edit <code>src/components/App.js</code> or <code>src/components/Home.js</code> and save to reload. ...
The base class for the missing components.
import React from 'react'; import { FontIcon } from 'material-ui'; import { colors as Colors } from 'material-ui/styles'; const InactiveStatusLabel = ({ style }) => ( <FontIcon style={style} className="synicon-close" color={Colors.red400} /> ); export default InactiveStatusLabel;
export InactiveStatusLabel from React
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { actionCreators as paletteActions, viewConstants, selector } from '../'; import "./Palette.scss"; import FontIcon from 'react-md/lib/FontIcons'; import Paper from 'react-md/lib/Papers'; i...
A component that renders a palette in a palette layout.
import React from 'react'; import ReactDOM from 'react-dom'; import { curry } from 'lodash/fp'; const updateField = curry((update, state, initialState, fieldName, e) => { const value = e.target.value || initialState[fieldName]; const newState = Object.assign({}, state, { [fieldName]: value }); update(newState); ...
Displays a single missing - node error message if a missing - node error occurs.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { routeNodeSelector } from 'redux-router5'; import { VelocityComponent } from 'velocity-react'; import { compose } from 'recompose'; import { connect } from 'react-redux'; import { includesSegment } from 'router5.helpers'; import Link ...
A component that is rendered when a link is clicked on a route.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionRestorePage = (props) => ( <SvgIcon {...props}> <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-6zm-2 16c-2.05 0-3.81-1.24-4.58-3h1.71c.63.9 1.68 1.5 2.87 1.5 1.93 0 3....
A page that restores a component from a component s icon.
import React, { Component } from 'react'; import { Col, Grid, Jumbotron, Row } from 'react-bootstrap'; import Helmet from 'react-helmet'; import Header from '../components/Header'; import ResponsiveImages from '../components/ResponsiveImages'; import 'bootstrap/dist/css/bootstrap.css'; import '../styles/app.c...
A component that can be used to render a single sequence of words.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Route, Switch, Link, withRouter } from 'react-router-dom'; import { fetchUsers } from './actions'; import List from './views/list'; import Form from './views/form'; import Detail from './views/detail'; class Users extends Compon...
The users component which is a component that can be used to view a user s users list.
import React from 'react'; import Button from './Button'; import FormGroup from './FormGroup'; import InputBase from './InputBase'; import childrenValueValidation from './utils/childrenValueInputValidation'; class ButtonInput extends InputBase { renderFormGroup(children) { let {bsStyle, value, ...other} = this.p...
A component that can be used to render a form group and a button.
import React from 'react'; import PropTypes from 'prop-types'; import useUserCard from '../../hooks/useUserCard'; import UsernameBase from '.'; const { useCallback } = React; function UsernameWithCard({ user }) { const userCard = useUserCard(user); const onUsernameClick = useCallback((event) => { event.preven...
Generates a component that displays a button that displays a user s username with a user card.
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdRestaurantMenu(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M15.71 26.417l5.66-5.66L7.34 6.727c-3.12 3.12-3.12 8.19 0 11.31l8.37 8.38zm13.57-3.63c3.05 1.43 7.36.42 10.54-2.76 3.83-3.83 4.56-9.3 1.63-12....
Manages the restaurant menu of a component.
import React from 'react' import {renderToString} from 'react-dom/server' import {match, RouterContext} from 'react-router' import {stripIndents} from 'common-tags' import {minify} from 'html-minifier' import {SheetsRegistry} from 'react-jss' import {version} from '../package.json' import routes from './routes' import...
The default implementation of
import React from 'react'; import { render } from 'react-dom'; import { hashHistory } from 'react-router'; import { AppContainer } from 'react-hot-loader'; import { syncHistoryWithStore } from 'react-router-redux'; import Root from './containers/Root'; import configureStore from './store/configureStore'; import './app....
Imports a single node from the DOM and renders it with a history.
import React from 'react' const About = React.createClass({ render() { return <h1>About</h1> } }) export default About
Create a default class that displays a warning about a node.
import React from 'react'; import { withStyles } from '@material-ui/core/styles'; import { NavLink } from 'react-router-dom'; import ListItem from '@material-ui/core/ListItem'; import ListItemIcon from '@material-ui/core/ListItemIcon'; import Icon from '@material-ui/core/Icon'; const styles = theme => ({ listIcon: {...
A default function to create a link which can be used to link a single item in a list.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorFormatIndentIncrease = (props) => ( <SvgIcon {...props}> <path d="M3 21h18v-2H3v2zM3 8v8l4-4-4-4zm8 9h10v-2H11v2zM3 3v2h18V3H3zm8 6h10V7H11v2zm0 4h10v-2H11v2z"/> </SvgIcon> ); EditorFormatIndentIncrease...
A component that renders a block of content in a block of JSX.
import React, { Component } from 'react'; import TodoApp from './TodoApp'; import { createStore, combineReducers } from 'redux'; import { Provider } from 'react-redux'; import rootReducer from '../reducers'; const store = createStore(rootReducer); export default class Root extends Component { render() { return ...
The root component of a component that is not a component of a React component.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageGridOff = (props) => ( <SvgIcon {...props}> <path d="M8 4v1.45l2 2V4h4v4h-3.45l2 2H14v1.45l2 2V10h4v4h-3.45l2 2H20v1.45l2 2V4c0-1.1-.9-2-2-2H4.55l2 2H8zm8 0h4v4h-4V4zM1.27 1.27L0 2.55l2 2V20c0 1.1.9 2 2 2h...
A component that renders a series of icons that can be rendered on a grid of the image.
import React from 'react' import PropTypes from 'prop-types' import Context from '../Context' import DialogTooltip from './DialogTooltip' export class RegisterDialog extends React.Component { componentDidMount () { const { name, context } = this.props context.registerStep(name) } render () { const {...
A component that is rendered when a step of a dialog is selected.
// (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...
Component for a single node in the system.
import React from 'react'; import PropTypes from 'prop-types'; import {Form} from 'react-bootstrap'; import {reduxForm, Field} from 'redux-form/immutable'; import Captcha from 'react-google-recaptcha'; import {wrapEventStop} from '../../util'; import {siteKey} from '../../serverAPI'; const CaptchaComponent = ({input, ...
Component that renders a Captcha token.
import React from 'react' import { Switch } from 'react-router-dom' import { graphql } from 'react-apollo' import FetchCurrentUser from '@/account/queries/current-user' import { connect } from 'react-redux' import { load } from '@/account/redux/action-creators' import { Loading } from '@/components/await' // Routes im...
The base class for a single node that can be used to log a warning in the user s page.
import React from 'react'; import { connect } from 'react-redux'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../../components/column'; import ColumnHeader fro...
The public timeline component is a component that can be attached to a column in a table.
import PropTypes from 'prop-types'; import React from 'react'; import classnames from 'classnames'; const propTypes = { className: PropTypes.string, children: PropTypes.node, }; const CardSubtitle = ({ className, children }) => ( <h2 className={classnames('mdc-card__subtitle', className)} > {children}...
export a default subtitle for a
import React from 'react'; import { connect } from 'react-redux'; import { loginCallbackRequest } from './actions'; export class LoginCallback extends React.Component { // eslint-disable-line react/prefer-stateless-function static propTypes = { dispatchLoginCallbackRequest: React.PropTypes.func.isRequired, }; ...
A login callback that is used to dispatch a login request to the user.
import React from 'react'; import { cloneElement } from 'react'; export function shouldWarn(about) { console.warn.called.should.be.true; console.warn.calledWithMatch(about).should.be.true; console.warn.reset(); } /** * Helper for rendering and updating props for plain class Components * since `setProps` is de...
Renders an element with a new props object.
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import Motion from '../../ui/util/optional_motion'; import spring from 'react-motion/lib/spring'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage } fr...
A component that can be used to upload a single file to a media.
// @flow import React from 'react'; import { Text, TouchableOpacity, View } from 'react-native'; import { translate } from '../../../base/i18n'; import { Icon, IconClose } from '../../../base/icons'; import AbstractNotification, { type Props } from '../AbstractNotification'; import styles from './styles'; /** ...
Renders a notification with a single key - value pair.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareSecurity = (props) => ( <SvgIcon {...props}> <path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/> </SvgIcon> ); Hardwa...
Hardware security component
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import styles from './Textarea.scss'; export default class Textarea extends Component { static propTypes = { placeholder : PropTypes.string, defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), ...
A component that creates a text area with a single input field.
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import Avatar from '../../../components/avatar'; import IconButton from '../../../components/icon_button'; import DisplayName from '../../../components/display_name'; import { defineMessages, injec...
A reply indicator component that displays a message when a user clicks on a reply.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationTimeToLeave = (props) => ( <SvgIcon {...props}> <path d="M18.92 5.01C18.72 4.42 18.16 4 17.5 4h-11c-.66 0-1.21.42-1.42 1.01L3 11v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-....
A component that renders a sequence of components that can be used to show a notification time.
import React, { Component } from 'react'; import { StyleSheet, Text, View, AppRegistry } from 'react-native'; import { NativeRouter, Route, Link, Switch } from 'react-router-native'; import Home from './components/home'; import LoginContainer from './containers/LoginContainer'; import SignUpContainer from './containers...
The default component that is used to render a menu.
import _ from 'lodash' import faker from 'faker' import React from 'react' import { Accordion, Segment } from 'semantic-ui-react' const panels = _.times(3, () => ({ title: faker.lorem.sentence(), content: faker.lorem.paragraphs(), })) const AccordionExampleInverted = () => ( <Segment inverted> <Accordion pa...
creates a random accordion example
import React from 'react'; import ReactDOM from 'react-dom'; class DaleReact extends React.Component { render() { return <div>{ this.props.app } listo en React!</div>; } } ReactDOM.render(<DaleReact app="Miniact" />, document.getElementById( 'miniact' ) );
DaleReact component that renders a single component in a DOM.
import React from 'react'; import Faq from '@/modules/pages/client/components/Faq.component.js'; import { Trans, useTranslation } from 'react-i18next'; export default function FaqTribes() { const { t } = useTranslation('pages'); return ( <Faq category="circles"> <div className="faq-question" id="what-ar...
The base implementation of the base class that is used to generate a single - language language.
/* * 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...
The base class for all of the components that are part of a context.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorMonetizationOn = (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.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2...
A component that renders a series of components that can be used to visualize the component s components.
import React from 'react' import { render } from 'react-dom' import request from 'request' import BookDetail from './BookDetail.react' import Config from '../Config.react' const BookDetailApp = React.createClass({ getInitialState() { return { book: {}, loading: true } }, componentDidMount() { const b...
The main function that creates a book detail component.
import React, { Component } from 'react'; import { TransitionDemo } from 'components'; export default class Transition extends Component { constructor(props) { super(props); this.state = {}; } render() { return ( <div style={{width: '500px', margin: '0 auto'}}> <TransitionDemo /> ...
The default transition class
import React from 'react' import List from 'react-list' import { translate } from 'react-i18next' import { inject, observer } from 'mobx-react' /** Component */ import AddressOutputListItem from './AddressOutputListItem.js' @translate(['common']) @inject('gui', 'send') @observer class AddressOutputList extends React....
A component that can be used to mark or unmark a single node in a list of AddressOutputs.
import React from 'react'; import ReactDOM from 'react-dom'; import { CookiesProvider } from 'react-cookie'; import App from './components/App'; const appEl = document.getElementById('main-app'); ReactDOM.render( <CookiesProvider> <App /> </CookiesProvider>, appEl );
Imports a single element in the DOM.
import React from 'react'; import Scroll from 'react-scroll'; const ScrollElement = Scroll.Element; class AboutBand extends React.Component { shouldComponentUpdate() { return false; } render() { const languages = ['HTML', 'CSS', 'JavaScript', 'C#', 'SQL', 'PHP']; const tools = ['Meteor', 'React', '...
AboutBand Extraction for AboutBand.
import React from 'react'; import PropTypes from 'prop-types'; import SPECS from 'game/SPECS'; import ROLES from 'game/ROLES'; import PlayerTile from './PlayerTile'; import './PlayerSelection.scss'; const ROLE_SORT_KEY = { [ROLES.TANK]: 0, [ROLES.HEALER]: 1, [ROLES.DPS.MELEE]: 2, [ROLES.DPS.RANGED]: 2, }; fu...
The base implementation of the sorting algorithm.
import React from 'react'; //import composeNode from 'utils/composeNode'; import Textfield from 'components/form/Textfield'; import Select from 'components/form/Select'; import Cell from 'components/Cell'; import Cells from 'components/Cells'; import { formatSchema } from 'utils/utils'; import {configNode} from 'utils/...
A component that can be used to create a node in a tree.
import React from 'react'; import { render } from 'react-dom'; import {Bus} from 'baconjs'; import util from 'util' import BaseWidget from './basewidget'; var notificationLevels = { "nominal": 0, "normal": 1, "alert": 2, "warn": 3, "alarm": 4, "emergency": 5 }; let defaultValue = { state: 'nominal', ...
The base component for all notification types.
import PropTypes from 'prop-types'; import React from 'react'; /** * The Projects component for Listing two projects */ const Projects = ({ projects }) => ( <table> <tbody> <tr><td> { projects[ 0 ] } </td><td> { projects[ 1 ] } </td></tr> </tbody> </table> ); Projects.propTypes = { /** *...
The Projects component for listing two projects
/*** PRESENTATIONAL COMPONENT ***/ import React from 'react'; import styled from 'styled-components'; import Header, { SubHeader } from 'components/header'; import { fadein, fadein2 } from 'styles/animations'; import './page.css'; var FAExternalLink = require('react-icons/lib/fa/external-link'); const PanelGroup = s...
Component which is rendered when a component is rendered with a hidden hidden state.
import React, { Component } from 'react'; import reviews from './mocks/reviews'; import Widget from './widget'; import './App.scss'; class App extends Component { render() { return ( <div className="App"> <Widget reviews={reviews} totalCards={reviews.length} /> </div> ); } } export ...
The app class is a class that extends the base class for all components.
import React from 'react' import { BrowserRouter as Router, Route, Link } from 'react-router-dom' const RouterApp = () => ( <Router> <div style={{margin: 20}}> <Route exact path='/' component={Home} /> <Route path='/easy' component={EasyCourse} /> <Route path='/normal' component={NormalCo...
export RouterApp
import React from 'react'; import {renderToStaticMarkup, renderToString} from 'react-dom/server'; import {StaticRouter} from 'react-router'; import constants from '../../constants'; import Provider from './Provider'; function getRouter(location, context, defaultProps, routes) { return ( <StaticRouter location={l...
V4 React Router Templates
/** * Client entry point */ import React from 'react'; import { render } from 'react-dom'; import { AppContainer } from 'react-hot-loader'; import App from './App'; import { configureStore } from './store'; import transit from "transit-immutable-js"; // Initialize store const store = configureStore(transit.fromJSON(...
Renders a single node in the DOM that is not a react component and is not a react component.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router'; import api from '../lib/api'; class Confirmation extends Component { componentDidMount(){ if(!Object.keys(this.props.location.query).length > 0) return let code = this.props.location.query["code"]...
The Confirmation component is a component that can be used to confirm a user.
import React from 'react'; const IMAGE_SIZE = 18; const linkStyle = { marginRight: 8, }; const boxStyle = { borderRadius: 3, display: 'inline-block', height: IMAGE_SIZE, overflow: 'hidden', verticalAlign: 'middle', width: IMAGE_SIZE, }; const imageStyle = { display: 'block', height: IMAGE_SIZE, left: '50%',...
A component that renders a cloudinary image summary.
import React, { Component } from 'react'; import { orgId } from '../../services/api'; import SetOrganization from '../SelectOrg/SetOrganization'; import titleWithCaret from '../../helpers/caret'; function withOrganization(WrappedComponent, redirectPath) { return class CheckOrg extends Component { componentDidUpd...
The base class for the org - dropdown component.
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdHeadset(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M24 5C14.06 5 6 13.06 6 23v14c0 3.31 2.69 6 6 6h6V27h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V23c0-9.94-8.06-18-18-18z" /...
Header set for the icons
import React from 'react' import ReactDOM from 'react-dom' import { createStore, combineReducers, applyMiddleware } from 'redux' import { Provider } from 'react-redux' import createLogger from 'redux-logger' import createHistory from 'history/createHashHistory' import { createPagesReducer } from 'redux-pages' import ...
Imports a single from the DOM.
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import PropTypes from 'prop-...
Provides a way to render a single missing component in the system.
import { Box, Field, Flex, PasswordInput } from '@rocket.chat/fuselage'; import React from 'react'; import { ResetSettingButton } from '../ResetSettingButton'; export function PasswordSettingInput({ _id, label, value, placeholder, readonly, autocomplete, disabled, hasResetButton, onChangeValue, onResetButto...
Private function to export a single protected object.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let VerticalAlignBottom = props => <SvgIcon {...props}> <path d="M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z" /> </SvgIcon>; VerticalAlignBottom = pure(VerticalAlignBottom); VerticalAlignBottom.muiName = ...
A small utility to create a single node in a hierarchy.
import jdu from 'jdu'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import AutoSuggestInput from './AutoSuggestInput'; class AutoCompleteInput extends Component { // // Lifecycle constructor(props, context) { super(props, context); this.state = { suggestions: [] ...
A component that can be used to display a single item in the dropdown list.
import React from 'react'; import PropTypes from 'prop-types'; import Toggle from 'material-ui/Toggle'; import FieldTitle from '../../util/FieldTitle'; const styles = { block: { margin: '1rem 0', maxWidth: 250, }, label: { color: 'rgba(0, 0, 0, 0.298039)', }, toggle: { ...
A component that displays a boolean input that can be used to toggle a hidden element.