code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceNetworkWifi = (props) => ( <SvgIcon {...props}> <path fillOpacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/><path d="M3.53 10.95l8.46 10.54.01.0...
Devuelte un component des DevNetworkWifi
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, { Component } from 'react'; import './Navigation.scss'; class Navigation extends Component { render() { return ( <div className="Navigation"> <p className="title">Git-Auto-Deploy</p> </div> ); } } export default Navigation;
A component that renders a navigation in a Bootstrap - styled way.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorBorderColor = (props) => ( <SvgIcon {...props}> <path d="M17.75 7L14 3.25l-10 10V17h3.75l10-10zm2.96-2.96c.39-.39.39-1.02 0-1.41L18.37.29c-.39-.39-1.02-.39-1.41 0L15 2.25 18.75 6l1.96-1.96z"/><path fillOp...
A component that exports a border color in a block of icons.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvFiberNew = (props) => ( <SvgIcon {...props}> <path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zM8.5 15H7.3l-2.55-3.5V15H3.5V9h1.25l2.5 3.5V9H8.5v6zm5-4.74H11v...
A function to create a new object that can be used to render a single node in a hierarchy.
/** * 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 Layout from '../../co...
React Starter Kit API
import React from 'react'; export const MoonSmall = ({ color = 'lightgreen' }) => <g id="moonSmall" fill={color} stroke="black" strokeWidth="10000" > <path id="coreMoonSmall" d="M497127 32545c2678,0 5332,102 7959,299 -22799,16480 -37639,43291 -37639,73572 0,50104 40617,90722 90721,90722 9673,0 18989,-1520 ...
This module exports a single node in the tree of React s hierarchy.
import React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import { withKnobs, boolean, number, text } from '@storybook/addon-knobs'; import TextArea from '../TextArea'; import TextAreaSkeleton from '../TextArea/TextArea.Skeleton'; const TextAreaProps = ...
Imports a single node in a TextArea.
import React from 'react' import { Router, Route, hashHistory, IndexRoute } from 'react-router' import Main from '../components/Main' const routes = ( <Router history={hashHistory}> <Route path='/' component={Main}> </Route> </Router> ); export default routes
routes - export
import React from 'react'; import ReactDOM from 'react-dom'; import { FormField, FormInput, FormSelect } from 'elemental'; const MODE_OPTIONS = [ { label: 'Contains', value: 'contains' }, { label: 'Exactly', value: 'exactly' }, { label: 'Begins with', value: 'beginsWith' }, { label: 'Ends with', value: 'endsWith'...
A custom filter that can be used to filter text input and select elements.
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.getElementById('root') );
Imports a single node in the hierarchy.
import React from 'react' import { useForm } from 'react-hook-form' import { useStateMachine } from 'little-state-machine' import { Stack } from '@chakra-ui/core' import updateAction from './updateAction' import Modal from './../Modal' import ModalForm from '../ModalForm' import ModalField from '../ModalField' const ...
Generate a single warning warning
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsRateReview = (props) => ( <SvgIcon {...props}> <path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 14v-2.47l6.88-6.88c.2-.2.51-.2.71 0l1.77 1.77c.2.2.2.51 0 .71L8.47 14H6zm1...
A component that renders a missing missing component in a hierarchy.
import classNames from 'classnames'; import React from 'react'; import { bsClass, bsStyles, getClassSet, splitBsProps } from './utils/bootstrapUtils'; import { State, Style } from './utils/StyleConfig'; class Label extends React.Component { hasContent(children) { let result = false; React.Children.forEac...
A class that extends a bootstrap label with a default class and styles.
'use strict'; import React from 'react'; export default function (props, state) { return ( <div className='formulae'> {state.displayFormulae.map(function(formula) { return <span key={formula.id} onClick={this.handleClick.bind(this, formula)} className={this.dynamicClass(formula.operator)}>{formula...
The default function for missing node - related properties.
import React, { Component } from 'react'; import { render } from 'react-dom'; import { AppContainer } from 'react-hot-loader'; import Demo from '../originReduxCombineReducer'; render( <AppContainer> <Demo /> </AppContainer>, document.getElementById('app'), ); if (module.hot) { module.hot.accep...
Imports a single component from React and react - dom.
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; import Icon from 'mastodon/components/icon'; const filename = url => url.split('/').pop().split('#')[0].split('?')[0]; export ...
Package that exports AttachmentList
// @flow import React from 'react'; class MyComponent1 extends React.Component { componentWillReceiveProps(nextProps: Props) {} } class MyComponent2 extends React.Component { shouldComponentUpdate(prevProps: Props, prevState: State) {} } class MyComponent3 extends React.Component { componentWillUpdate(prevPro...
A component that is not part of a critical state.
import React from 'react'; import Skillcard from './Skillcard'; import SkillHeader from './SkillHeader' class Skills extends React.Component { render(){ return( <div className="skillContainer container"> <SkillHeader soft={this.props.soft} /> { this.props.list.map(skill => <Skillcard key={...
The Skills component which is rendered by a component that has a skill card and a skill header.
import React from 'react'; import { StyleSheet, View, Dimensions, } from 'react-native'; import MapView from 'react-native-maps'; import PriceMarker from './PriceMarker'; const { width, height } = Dimensions.get('window'); const ASPECT_RATIO = width / height; const LATITUDE = 37.78825; const LONGITUDE = -122.4...
Package that provides a marker for a specific type of object.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let KeyboardArrowLeft = props => <SvgIcon {...props}> <path d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z" /> </SvgIcon>; KeyboardArrowLeft = pure(KeyboardArrowLeft); KeyboardArrowLeft.muiName = 'S...
A component that exports a sequence of keys that are not part of a component.
import React from 'react'; import classnames from 'classnames'; import ItemsTableCell from '../../../admin/src/components/ItemsTableCell'; import ItemsTableValue from '../../../admin/src/components/ItemsTableValue'; var BooleanColumn = React.createClass({ displayName: 'BooleanColumn', propTypes: { col: React.PropT...
A column that can be used to show a boolean value in the list.
import React from 'react'; import PropTypes from 'prop-types' import { TouchableHighlight, View, FlatList, StyleSheet } from 'react-native'; import { RkStyleSheet, RkTheme, RkText } from 'react-native-ui-kitten'; export class CategoryMenu extends React.Component { constructor(props) { super(props)...
A component that can be used to display a menu of items in a menu.
import React from 'react'; import { createDevTools } from 'redux-devtools'; import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; export default createDevTools( <DockMonitor toggleVisibilityKey="ctrl-h" changePositionKey="ctrl-w" > <LogMonitor /> ...
createDevTools creates a new devtools object with a single node with a single hierarchy of React elements.
import React from 'react' import { PropTypes } from 'prop-types'; import { List, ListItem } from 'material-ui/List' import classes from './ProviderDataForm.scss' import AccountCircle from 'material-ui/svg-icons/action/account-circle' export const ProviderData = ({ providerData }) => ( <div className={classes.contai...
React - specific - component
import React from 'react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faInfoCircle } from '@fortawesome/pro-regular-svg-icons/faInfoCircle' export default class FARInfoCircle extends React.Component { render () { return (<FontAwesomeIcon {...this.props} icon={faInfoCircle} />) } }
A component that renders a FontAwesomeIcon with a FARInfoCircle.
/* * Copyright (C) Pootle contributors. * * This file is a part of the Pootle project. It is distributed under the GPL3 * or later license. See the LICENSE file for a copy of the license and the * AUTHORS file for copyright and authorship information. */ import React from 'react'; import Modal, { ModalFooter } ...
A component that displays a modal dialog with a modal header and a modal footer.
import React from 'react' import PropTypes from 'prop-types' import { TweenOneGroup } from 'rc-tween-one' const enterAnim = [ { opacity: 0, x: 30, backgroundColor: '#fffeee', duration: 0, }, { height: 0, duration: 200, type: 'from', delay: 250, ease: 'easeOutQuad', onComplet...
Create a sequence of components with a single animation table.
import React from 'react' import { SubspaceProvider } from 'react-redux-subspace' import { RandomGif } from '../randomGif' import { RandomGifPair } from '../randomGifPair' import { RandomGifPairPair } from '../randomGifPairPair' import { Button } from '../button' import { Counter } from '../counter' const App = () => ...
The default implementation of
import React from 'react' import BrandGallery from '../components/BrandGallery' export default () => ( <BrandGallery brand='Ste' /> )
export default function
import React from 'react'; import Field from '../Field'; import { GlyphButton, FormInput } from '../../../admin/client/App/elemental'; module.exports = Field.create({ displayName: 'URLField', statics: { type: 'Url', }, openValue () { var href = this.props.value; if (!href) return; if (!/^(mailto\:)|(\w+\:\...
The default component for the link - based link
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 'core-js/fn/object/assign'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/Main'; // Render the main component into the dom ReactDOM.render(<App />, document.getElementById('app'));
Renders the main component into the main DOM.
import React from 'react'; import SPELLS from 'common/SPELLS/index'; import { formatPercentage } from 'common/format'; import { calculateAzeriteEffects } from 'common/stats'; import Analyzer from 'parser/core/Analyzer'; import TraitStatisticBox, { STATISTIC_ORDER } from 'interface/others/TraitStatisticBox'; const MAX...
A class that exports a sequence of events that can be handled by the Overwhelming Power algorithm.
import React from 'react'; import DropDownMenu from 'material-ui/DropDownMenu'; import MenuItem from 'material-ui/MenuItem'; export default class DropDownMenuLabeledExample extends React.Component { constructor(props) { super(props); this.state = {value: 2}; } handleChange = (event, index, value) => th...
A component that can be used to show a dropdown menu for the user.
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'; var Calendar = React.createClass({ render: function () { return ( <div> <p>Calendar</p> </div> ); } }); module.exports = Calendar
The calendar module
import React from 'react'; import {findDOMNode} from 'react-dom'; import {Map as IMap} from 'immutable'; import { FormGroup, FormControl, ControlLabel, ButtonToolbar, Button, Col } from 'react-bootstrap' import './location.css'; const NewCity = React.createClass({ getInitialState(){ ...
Private function to create a new bootstrap - protected object with a sequence of states.
import React from 'react'; import { StyleSheet, View, Text, Dimensions, } from 'react-native'; import MapView from 'react-native-maps'; const { width, height } = Dimensions.get('window'); const ASPECT_RATIO = width / height; const LATITUDE = 37.78825; const LONGITUDE = -122.4324; const LATITUDE_DELTA = 0.092...
Provides a function that renders a single missing node in a map.
/* * Copyright (C) Pootle contributors. * * This file is a part of the Pootle project. It is distributed under the GPL3 * or later license. See the LICENSE file for a copy of the license and the * AUTHORS file for copyright and authorship information. */ import cx from 'classnames'; import React from 'react'; i...
A component that renders a single missing - node error in the hierarchy of items that match a search query.
import React from 'react' import { Checkbox } from 'semantic-ui-react' const CheckboxExampleRadio = () => ( <Checkbox radio label='Radio choice' /> ) export default CheckboxExampleRadio
Imports a component that can be used to show a checkbox in a checkbox example.
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 render a bootstrap - only form control.
/** * * PlaylistHeader * */ import React from 'react'; import Avatar from 'material-ui/Avatar'; import ListItem from 'material-ui/List/ListItem'; import ListIcon from 'material-ui/svg-icons/action/list'; const style = { padding: '15px 62px', }; const PlaylistHeader = () => ( <ListItem disabled leftAvata...
Initialize a single object.
import 'babel-polyfill' import React from 'react' import { render } from 'react-dom' import { Provider } from 'react-redux' import App from './controllers/App' import configureStore from './store/configureStore' const store = configureStore() render( <Provider store={store}> <App /> </Provider>, document.ge...
Imports a single and renders it to the DOM.
import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import RIEStatefulBase from './RIEStatefulBase'; export default class RIESelect extends RIEStatefulBase { static propTypes = { options: PropTypes.array.isRequired }; finishEditing = () => { // ...
A component that renders a single key sequence that can be selected by a user.
import React from 'react'; // eslint-disable-line no-unused-vars import { storiesOf, action } from '@kadira/storybook'; import SelectField from '../../../src/components/stateless/SelectField'; // eslint-disable-line no-unused-vars const options = { 'opt1': 'Option 1', 'opt2': 'Option 2', 'opt3': 'Option 3'...
Imports a component that implements a series of functions that can be used to create a select field.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { injectIntl, intlShape } from 'react-intl'; import muiThemeable from 'material-ui/styles/muiThemeable'; import { Activity } from '../../containers/Activity'; import { ResponsiveMenu } from 'mater...
A component that can be used to display a single confirmation confirmation.
/*jshint esversion: 6 */ import React from 'react'; import PropTypes from 'prop-types'; import $ from 'jquery'; import {LinkContainer} from 'react-router-bootstrap'; export default class MapLink extends React.Component { //we do expect mapID constructor(props) { super(props); this.state = {name:"Loading.....
The base class for a map link that links to the map s name.
'use strict'; import React from 'react'; import { Field } from 'redux-form/immutable'; import Section from '../../components/Section'; import InputField from '../../components/InputField'; import File from './components/File'; import Hero from '../../components/Hero'; export default class AddItemContent extends Reac...
The AddItemContent component which renders a single single item in a sequence of hidden hidden fields.
import React from 'react'; import { Router, browserHistory } from 'react-router'; import ReactDOM from 'react-dom'; import routes from './routes'; ReactDOM.render( <Router history={browserHistory}>{routes}</Router>, document.getElementById('root') );
Imports a single node in the DOM.
import React from 'react' import { __RouterContext } from 'react-router-dom' export function useRouter() { return React.useContext(__RouterContext) } export function ScrollToTop({ children }) { const { location: { pathname }, } = useRouter() React.useEffect(() => { window.scrollTo(0, 0) }, [pathname...
React - specific functions
import React from 'react'; import App from './containers/App'; import 'todomvc-app-css/index.css'; React.render( <App />, document.getElementById('root') );
Renders a in the top - level DOM.
import React, { Component } from 'react'; import Header from './Header'; import Main from './Main'; import AppNav from './AppNav'; class App extends Component { render() { return ( <div className="home"> <AppNav ref="leftNav" /> <Header onTouchTap={this._onLeftIconButtonTouchTap.bind(this)...
The App class
import React from 'react'; export default class Account extends React.Component { render() { return ( <div> <p>This is your account information</p> </div> ) } }
Create a new group of unique elements in the given array.
import React, { Component } from 'react'; import { connect } from "react-redux"; import NeedLogin from "./../generics/need_login"; import Chat from "./chat"; import ChatServidor from "./chat_servidor"; class Soporte extends Component { constructor(props) { super(props); } /** * Es una forma de captu...
Carga un componento de un nuevo cualquier de error
import React from 'react'; import DelayedAppear from '../Transition/DelayedAppear'; import './StoryBody.scss'; function StoryBody({ children }) { return ( <DelayedAppear> <div className="StoryBody"> {children} </div> </DelayedAppear> ); } export default StoryBody;
The default StoryBody class
import React from 'react'; import TreeNode from './TreeNode'; import dir from '../input/dir'; class App extends React.Component { render() { return ( <ul> <li> <TreeNode node={dir[0]} url=""/> </li> </ul> ) } } export default App;
The default app class.
import React from 'react'; require('./Carbon.css'); class Carbon extends React.Component { componentDidMount() { if (process.env.NODE_ENV !== 'production') { return; } const script = document.createElement('script'); script.setAttribute('async', ''); script.src = '//cdn.carbonads.co...
A class that extends React. Component which is not a component of a CarbonAD component.
// @flow import React from 'react'; import Todo from './Todo'; import type { Todos, Id } from '../types/todos'; export type Props = { todos: Todos, onTodoClick: (id: Id) => void }; const TodoList = ({ todos, onTodoClick }: Props) => ( <ul> {todos.map(todo => ( <Todo key={todo.id} {...todo} onClick=...
Package that contains a list of Todo objects.
import React from 'react'; import classNames from 'classnames'; class ModalHeader extends React.Component { render() { return ( <div {...this.props} className={classNames(this.props.className, this.props.modalClassName)}> { this.props.closeButton && <button cla...
A modal header that shows a modal dialog.
import React from 'react'; import ReactDOM from 'react-dom'; import App from './containers/App'; import 'todomvc-app-css/index.css'; ReactDOM.render( <App />, document.getElementById('root') );
Imports a single node in the DOM.
import React from 'react'; import SvgIcon from '../../SvgIcon'; const ActionBugReport = (props) => ( <SvgIcon {...props}> <path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-...
A component that exports a bug report for a series of icons.
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from 'babel-runtime/helpers/inherits'; import _extends from...
A component that can be used to toggle or toggle a dropdown.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorInsertPhoto = (props) => ( <SvgIcon {...props}> <path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/> </SvgIcon> ); EditorI...
A component that renders a component that can be inserted into a component that is not visible in a component.
import React, { Component } from 'react'; import { Card } from 'react-bootstrap'; import { Link } from "react-router-dom"; import { withFirebase } from '../Firebase'; import { getUsername } from '../Helpers'; import 'bootstrap/dist/css/bootstrap.css'; import './GameSelector.css'; class GameSelector extends Component...
The base component for all game - related components.
import React, { Component } from 'react'; import Box from 'grommet/components/Box'; import Heading from 'grommet/components/Heading'; import List from 'grommet/components/List'; import ListItem from 'grommet/components/ListItem'; import Meter from 'grommet/components/Meter'; import Value from 'grommet/components/Value'...
The TodoAppDashboard class
/** * * ToggleOption * */ import React from 'react'; import { injectIntl, intlShape } from 'react-intl'; const ToggleOption = ({ value, message, intl }) => ( <option value={value}> {message ? intl.formatMessage(message) : value} </option> ); ToggleOption.propTypes = { value: React.PropTypes.string.isRequir...
A function to toggle a specific option in a dropdown.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageTransform = (props) => ( <SvgIcon {...props}> <path d="M22 18v-2H8V4h2L7 1 4 4h2v2H2v2h4v8c0 1.1.9 2 2 2h8v2h-2l3 3 3-3h-2v-2h4zM10 8h6v6h2V8c0-1.1-.9-2-2-2h-6v2z"/> </SvgIcon> ); ImageTransform = pure(I...
A component that renders a series of icons in a group of icons.
import React from 'react'; import ItemsTableCell from '../../components/ItemsTableCell'; import ItemsTableValue from '../../components/ItemsTableValue'; var EmailColumn = React.createClass({ displayName: 'EmailColumn', propTypes: { col: React.PropTypes.object, data: React.PropTypes.object, }, renderValue () { ...
The email column component
/** * Copyright 2020 Google LLC * * 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...
Generate a single missing - node tag for a service.
import React from 'react'; import UsersNavBar from '../components/UsersNavBar'; import FormContainer from './FormContainer'; export default () => ( <div> <UsersNavBar label="User Profile" screen="user/profile" /> <FormContainer /> </div> );
export default
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageFilterVintage = (props) => ( <SvgIcon {...props}> <path d="M18.7 12.4c-.28-.16-.57-.29-.86-.4.29-.11.58-.24.86-.4 1.92-1.11 2.99-3.12 3-5.19-1.79-1.03-4.07-1.11-6 0-.28.16-.54.35-.78.54.05-.31.08-.63.08-.9...
A component that returns a sequence of icons that can be used to render a component.
/** * Copyright 2016, Sumit Rai * Copyrights licensed under the New MIT License. See the accompanying LICENSE file for terms. */ 'use strict'; import React from 'react'; class ItemLayout extends React.Component { render() { const { props } = this; return ( <div className="item"> ...
A component that renders a node in a tree with a header and a footer.
import React, { Component } from 'react'; import { Col, Row } from 'reactstrap'; import Dinheiro from './Dinheiro.js'; import Header from './Header.js'; import Lista from './Lista.js'; import Mensagens from './Mensagens.js'; class Dashboard extends Component { constructor(props) { super(props); this.state...
Component that is rendered when a component is mounted.
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' // export default () => ( <div> <h1 style={{ textAlign: 'center' }}>Welcome to React-Static</h1> <img src="" alt="" style={{ display: 'block', margin: '0 auto' }} /> </div> )
A default function to export a from a React module.
// Copyright (c) 2016 Yusuke Nunokawa (https://ynunokawa.github.io) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to us...
A component that renders a single key in the webmap.
/* * Revision History: * Initial: 2017/10/22 Wang RiYu */ import React from 'react'; import { Card, Select, Col, Button } from 'antd'; const Option = Select.Option; const options = [ { id: '0', label: 'Go' }, { id: '1', label: '语法' }, { id: '2', label: '框...
- > Create a node with a series of children.
import React from 'react' import Prologue from './Prologue' import January2012 from './January2012' import July2012 from './July2012' import May2013 from './May2013' import Summer2013 from './Summer2013' import Remnants from './Remnants' import '../../styles/stoneQuest.css' export default () => ( <div className="...
Imports a single node from the system.
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import App from './components/App'; import reducers from './reducers'; import store from "./middleware/store" import 'bootstrap/dist/css/bootstrap.css'; import injectTapEventPlugin from 'react-tap-event-plugin' inject...
Imports a single node in the DOM.
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 _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 wraps a component with a bootstrap class that is used to render a bootstrap - only component.
import React from 'react'; import Codemirror from 'react-codemirror'; export default () => ( <div> <div className="docs-desc top-margined"> <b>Using custom react component for pre-built toolbar options</b> <div className="docs-desc top-margined"> Custom react components can be used for exitin...
Custom react component for color - picker options.
import React from 'react' import { Header, Image } from 'semantic-ui-react' const HeaderExampleImage = () => ( <Header as='h2'> <Image circular src='/images/avatar/large/patrick.png' /> Patrick </Header> ) export default HeaderExampleImage
Imports a missing - tag tag and returns a default header example image.
import React from 'react'; import ReactDOM from 'react-dom'; import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap/dist/css/bootstrap-theme.css'; import './index.css'; import Root from './containers/Root'; import configureStore from './redux/configureStore'; const store = configureStore(); ReactDOM.render( ...
Imports a single node in the DOM.
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import registerServiceWorker from './registerServiceWorker'; import 'bootstrap/dist/css/bootstrap-reboot.css'; import 'bootstrap/dist/css/bootstrap.css'; import './index.css'; //import pdfMake from '../node_modules/pdfmake/build/pdfm...
Imports a single component with a ReactDOM.
import React, { Component } from 'react'; /* Note: When this decorator is used, it MUST be the first (outermost) decorator. Otherwise, we cannot find and call the fetchData and fetchDataDeffered methods. */ export default function connectData(fetchData, fetchDataDeferred) { return function wrapWithFetchDa...
A component that wraps a component with a connectData method.
import React, { Component } from 'react'; import ProgressBar from 'ProgressBarAndroid'; export default class SpinnerNB extends Component { prepareRootProps() { const type = { height: 40, }; const defaultProps = { style: type, }; return computeProps(this.props, defaultProps); } ...
A wrapper for a React component that renders a progress bar with a color and a progress indicator.
import React, { Component } from 'react'; import Scroll from 'react-scroll'; let Link = Scroll.Link; class Navigation extends Component { constructor() { super(); this.state = { active: 'section_home' } }; handleSetActive = (to) => { this.setState({ active: to...
A navigation class that can be used to navigate to a specific section of a page.
import React from 'react'; import test from 'ava'; import sinon from 'sinon'; import { FormattedMessage } from 'react-intl'; import { PostCreateWidget } from '../../components/PostCreateWidget/PostCreateWidget'; import { mountWithIntl, shallowWithIntl } from '../../../../util/react-intl-test-helper'; const props = { ...
Tests if a specific component is a post - create widget.
/** * 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, { Component } from 'react'; import { View, Modal, Platform, ActionSheetIOS, TouchableOpacity } from 'react-native'; import { connectStyle } from '@shoutem/theme'; import { Text } from './Text'; import { Button } from './Button'; import { ViewNB } from './View'; import { Icon } from './Icon';...
Component that is used to show a modal action sheet.
import React, { Component } from 'react'; import { StyleSheet, Text, View, } from 'react-native'; export default class SelectionView extends Component { render() { return ( <View style={styles.container}> <Text style={styles.welcome}>SelectionView</Text> </View> ); } } const styl...
The SelectionView class
import React from 'react'; import Field from '../Field'; import { Button, FormInput, InputGroup } from 'elemental'; module.exports = Field.create({ displayName: 'PasswordField', getInitialState () { return { passwordIsSet: this.props.value ? true : false, showChangeUI: this.props.mode === 'create' ? true :...
Private function to create a password field.
import React from 'react' import { translate } from 'react-i18next' import { inject, observer } from 'mobx-react' import { action, computed, extendObservable, reaction } from 'mobx' /** Ant Design */ import AutoComplete from 'antd/lib/auto-complete' import Button from 'antd/lib/button' import Input from 'antd/lib/inpu...
Component that gets a new address from a popover.
import React from 'react'; import classNames from 'classnames'; import DialogActionCreators from 'actions/DialogActionCreators'; import DialogStore from 'stores/DialogStore'; import AvatarItem from 'components/common/AvatarItem.react'; class RecentSectionItem extends React.Component { static propTypes = { di...
A component that renders a recent section of a dialog.
import React from 'react'; export default props => ( <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42" {...props}> <title>Artboard 1 copy 43</title> <path fill="#1B3240" d="M19.11 22.13l-1.62 1.28a37.59 37.59 0 0 1-7.34 4.51.48.48 0 0 1-.71-.18 37.78 37.78 0 0 1-6.27-14.13A5.29 5.29 0 0...
9. 1. 1 - 19.
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des...
Creates a new PanelContent component that wraps a component in a panel.
import React from 'react' import createStory from '../../storybook/createStory' import Image from '../../src/Image' const sourceUrl = 'https://raw.githubusercontent.com/Node-us/ui-kit/master/screenshots/web.png' createStory('Image', module) .add('with fit `contain`', () => <Image fit='contain' src={...
Imports a bunch of non -
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdMovie(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M36 8l4 8h-6l-4-8h-4l4 8h-6l-4-8h-4l4 8h-6l-4-8H8c-2.21 0-3.98 1.79-3.98 4L4 36c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V8h-8z" /> </IconBase> ); }...
Manages the missing icons in the MdMovie section of the MdPanel.