code
stringlengths
26
5k
intent
stringlengths
3
2.56k
/** * Created by syrel on 31.05.17. */ import React from 'react'; import PresentationComponent from './PresentationComponent'; import Presentation from './Presentation'; import ElementQueries from 'css-element-queries'; import $ from 'jquery'; import _ from 'underscore'; class SvgComponent extends PresentationCompo...
Private function for generating a warning message for missing missing node - related elements.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorTitle = (props) => ( <SvgIcon {...props}> <path d="M5 4v3h5.5v12h3V7H19V4z"/> </SvgIcon> ); EditorTitle = pure(EditorTitle); EditorTitle.displayName = 'EditorTitle'; EditorTitle.muiName = 'SvgIcon'; ex...
A component that exports a let to a JSX EditorTitle
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let Adb = props => <SvgIcon {...props}> <path d="M5 16c0 3.87 3.13 7 7 7s7-3.13 7-7v-4H5v4zM16.12 4.37l2.1-2.1-.82-.83-2.3 2.31C14.16 3.28 13.12 3 12 3s-2.16.28-3.09.75L6.6 1.44l-.82.83 2.1 2.1C6.14 5.64 5 7....
A component that renders a single missing - missing
import 'babel-polyfill'; import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import configureStore from './utils/configureStore'; import App from './containers/App'; import { reducer, sagas } from '../../../build'; const store = configureStore({ normaliseStore: redu...
Imports a single and renders it in a layout.
/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import React from 'react'; import warning from 'fbjs/lib/warning'; function flattenChildren(children) { let content = '';...
Provides a function to create a host component that warns when a host component is missing its children.
import PropTypes from 'prop-types' import React from 'react' import { List } from 'immutable' const TransactionList = ({transactions, ntransactions, actions}) => { if (transactions.size === 0) { return ( <div className="transaction-list"> <h3> No recent transactions </h3> </div> ) } const prettyTimest...
Transaction list for a list of recent transactions
import React, { Component } from 'react'; import { Modal, View, Text, Button, TouchableOpacity, TouchableHighlight } from 'react-native'; import styles from './src/styles/styles'; export default class App extends React.Component{ state = { modalYesVisible: false, modalNoVisible: false, } setModalYesVisible(vi...
The base class for the keyboard - modal -
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-2016 Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; // import App from '../../compo...
Provides a function to export a single node as a React component.
import cx from 'classnames'; import marked from 'marked'; import React from 'react'; class Markdown extends React.Component { componentWillMount() { marked.setOptions({ gfm: true, tables: true, breaks: true, pedantic: false, sanitize: true, smartLists: true, smartypants:...
A component that renders a Markdown component.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorFormatListNumbered = (props) => ( <SvgIcon {...props}> <path d="M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z"/...
A component that exports a single node in a sequence of icons.
import React from 'react'; import hoistNonReactStatics from 'hoist-non-react-statics'; import { ModulesContext } from '../../ModulesContext'; function getDisplayName(WrappedComponent) { return WrappedComponent.displayName || WrappedComponent.name || 'Component'; } export default function withModules(WrappedComponen...
A component that wraps a component with a module - specific component.
import React from 'react'; import IconButton from 'material-ui/IconButton'; import ActionHome from 'material-ui/svg-icons/action/home'; const styles = { smallIcon: { width: 36, height: 36, }, mediumIcon: { width: 48, height: 48, }, largeIcon: { width: 60, height: 60, }, small: { ...
Example size of a bunch of functions that can be used to display a series of icons.
import React from 'react' import { connect } from 'react-redux' import { Card, CardText } from 'material-ui' import AddNote from '../containers/note/AddNote' import Notes from '../components/note/Notes' import { fetchNotes } from '../actions/notes' let fetched = false const style = { headerCard: { margin...
Component that displays a single sequence of notes.
import React from 'react'; import moment from 'moment'; import { truncate } from '../../../helpers/stringy'; import './Card.scss'; import '../../../assets/svg/table-lamp-simple.svg'; const Card = ({ title, agent, agency, phone, email, description, createdAt, index, id, deleteCard }) => { let momentCreatedAt = moment...
Generate a single - valued - array of strings containing the unique identifiers of the user s agents.
import React from 'react' import Confirm from './Confirm' import ShowOrderStatus from './ShowOrderStatus' const Notification = ({ order, confirmOrder, cancelOrder }) => ( <div className="notification"> <div className="module"> { order.status === 'In process' ? <ShowOrderStatus order={order} /> : ...
Notification for missing or invalid order
import React from 'react'; import styles from './App.css'; export default class App extends React.Component { constructor(props) { super(props); this.state = {test: 'foo'}; } render() { return ( <div className={styles.app}> bar </div> ); } }
The base class for all of the
import React from 'react'; class ProjectInfoList extends React.Component { shouldComponentUpdate() { return false; } render() { const { subtitle, list } = this.props; return ( <div className="project-info-list-container"> <h3 className="project-subtitle">{subtitle}:</h3> <ul c...
A component that renders a list of keys in a hierarchy.
import React, { Component } from 'react'; import Chrome from './Chrome'; import Page from './Page'; export default class App extends Component { render() { return ( <Chrome title="Hello World" assets={this.props.assets}> <div> <h1>Hello World</h1> <Page /> </div> ...
The base class for all components that can be rendered by a component.
import React from 'react'; import { render } from 'react-dom'; import createBrowserHistory from 'history/lib/createBrowserHistory'; import { Router, Route, IndexRoute } from 'react-router'; import Editor from './pages/editor'; import Wall from './pages/wall'; import style from '../css/style.less'; render( <Router ...
Imports a single node in the DOM.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvVolumeMute = (props) => ( <SvgIcon {...props}> <path d="M7 9v6h4l5 5V4l-5 5H7z"/> </SvgIcon> ); AvVolumeMute = pure(AvVolumeMute); AvVolumeMute.displayName = 'AvVolumeMute'; AvVolumeMute.muiName = 'SvgIcon'...
A component that exports a single node in a group of nodes with a volume mute.
import React from 'react' import { Input } from 'react-materialize' import { connect } from 'react-redux' import { addBType } from '../../../reducers/b-type-reducer' const SubNight = (props) => { const changeHandler = (event) => { let value = event.target.value let str = '' let restStr = '' if (value == 0) st...
Sub - night - related module
import React, { Component } from 'react'; import { Text } from 'react-native'; import { Card, CardSection } from './common'; class MainList extends Component { render() { return ( <Card> <CardSection> <Text>Item 1</Text> </CardSection> <CardSection> <Text>Item 2<...
MainList is a class that exports a list of items from a React component.
import React from 'react'; import calculateMinSpread from '../../util/calculateMinSpread'; import Area from './Area'; import {getStore} from '../../redux/redux-store'; export function buildPolygons(data) { const areaValues = data.data ?? {}; const {min, spread} = calculateMinSpread(Object.keys(areaValues).map(...
Builds polygon list from a given data object.
import React from 'react'; import { setStatic, wrapDisplayName } from 'recompose'; export default function includeStoryDetails(ComposedComponent) { const enhance = setStatic( 'displayName', wrapDisplayName(ComposedComponent, 'includeStoryDetails'), ); return enhance(({ storyDetails, ...props }) => ( ...
Include storyDetails inside a component
import React from 'react'; import routes from '../shared/routes'; import DevTools from '../shared/container/DevTools/DevTools'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import { Router, browserHistory } from 'react-router'; import { configureStore } from '../shared/redux/store/configu...
Imports a single node in the DOM and renders it if it is not already rendered.
import React from 'react'; import products from '../components/transaction/transaction-products'; import AdapterController from '../components/transaction/transaction-adapters'; import {ModalComponent} from '../components/modal/modal-component'; import {ModalActions} from '../stores/modal-store'; import ProductModal fr...
The base class for the hierarchy of a component that can be rendered by a user.
import React from 'react'; import s from './style.css'; import pageConfig from '../pageProps.json'; import SignUp from '../../components/SignUp'; import LobbyLayout from '../../components/LobbyLayout'; import history from "../../src/history"; import {ensureSessionExists,getSessionToken} from "../../core/sessionManager...
The base class for the non -
import React from 'react' import { Card, Col, Row } from 'antd' import ReplicaMember from '../components/ReplicaMember' import { connect } from 'react-redux' import DataRow from '../components/DataRow' class ReplicaMembers extends React.Component { render() { const { replica_set } = this.props const { membe...
A component that renders a single Invite.
import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import { Form } from 'react-redux-form' import Textfield from 'shared/form/Textfield' import Textarea from 'shared/form/Textarea' import CheckboxDetailsField from 'shared/form/CheckboxDetailsField' import formProps from '...
The main stage of the sequence of components that are used to create a sequence of nodes.
import React from 'react'; import PropTypes from 'prop-types'; const handleContextChange = (f, x) => e => f({ [x]: e.target.value }); const inputTypeMap = { numberFormat: 'number', pluralFormat: 'number', dateFormat: 'date', timeFormat: 'time', }; const ContextEditor = ({ context, setContextVa...
A function that exports a context editor for a sequence of tokens.
import React from 'react' const NotFoundPage = () => ( <div> <h1>NOT FOUND</h1> <p>You just hit a route that doesn&#39;t exist... the sadness.</p> </div> ) export default NotFoundPage
Provides a function to return a 404 page if the route is not found.
import React from 'react'; import Snackbar from 'material-ui/Snackbar'; import TextField from 'material-ui/TextField'; import RaisedButton from 'material-ui/RaisedButton'; export default class SnackbarExampleSimple extends React.Component { constructor(props) { super(props); this.state = { autoHideDur...
Example of how to show a Snackbar in the calendar.
import PropTypes from 'prop-types'; import React from 'react'; import Modal from 'Components/Modal/Modal'; import { sizes } from 'Helpers/Props'; import EditIndexerModalContentConnector from './EditIndexerModalContentConnector'; function EditIndexerModal({ isOpen, onModalClose, ...otherProps }) { return ( <Modal...
Imports and exports a modal modal.
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router'; import Button from './Button'; const LinkButton = props => ( <Link to={{ pathname: props.pathname, query: props.query }}> <Button {...props} /> </Link> ); LinkButton.propTypes = { pathname: PropTypes.string, ...
export Button from React
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; import App from './app/app'; AppRegistry.registerComponent('aitribe', () => App);
Package a missing component in the system
import React from 'react'; import Title from 'react-title-component'; import CodeExample from '../../../CodeExample'; import PropTypeDescription from '../../../PropTypeDescription'; import MarkdownElement from '../../../MarkdownElement'; import popoverReadmeText from './README'; import PopoverExampleSimple from './Ex...
Exports a single non - empty non
'use strict'; import React from 'react'; import PropTypes from 'prop-types'; import { ItemDetailList } from '@hms-dbmi-bgm/shared-portal-components/es/components/ui/ItemDetailList'; export default class SchemaView extends React.PureComponent { static keyTitleDescriptionMap = { '$schema' : { ...
A schema view that displays a list of items of a type that are not referenced by a specific type.
require("babel-core/register"); require("babel-polyfill"); import 'rc-slider/assets/index.css'; import React from 'react' import ReactDOM from 'react-dom' import Routes from './routes' import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import thunk from 'redux-thunk'; import...
Imports a bunch of modules and renders a single sequence of nodes.
import React from 'react'; import classNames from 'classnames'; class ModalTitle extends React.Component { render() { return ( <h4 {...this.props} className={classNames(this.props.className, this.props.modalClassName)}> { this.props.children } </h4> ); } } ModalTitle.pr...
A component that renders a modal modal.
import React from 'react'; import { MoodMusic } from './components/App'; // window.addEventListener('touchstart', function() { // var buffer = myContext.createBuffer(1, 1, 22050); // var source = myContext.createBufferSource(); // source.buffer = buffer; // source.connect(myContext.destination); // source.no...
Add event listener to buffer source and render a single unhandled element
import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; const useStyles = makeStyles(theme => ({ root: { fontWeight: 200, letterSpacing: '0.05em', color: theme.typography.body2.color, textTransform: 'uppercase', }, })); const ResourceInfoSpan = ({ className = '', children...
Exports a default resource info span for a node.
import React, { Component } from 'react'; import { inject, observer, } from 'mobx-react'; import autobind from 'autobind-decorator'; import IconButton from 'material-ui/IconButton'; import IconMenu from 'material-ui/IconMenu'; import MenuItem from 'material-ui/MenuItem'; import SortIcon from 'material-ui/svg-icon...
A component that will be rendered when a child of a menu is clicked.
import React, { Component } from 'react'; import SwipeableView from 'react-swipeable-views'; import styled from 'styled-components'; import Day from './Day'; export const Title = styled.h1` font-family: 'Love Ya Like A Sister', 'Arial', 'sans-serif'; font-size: 34px; `; export default class Schedule extends Compo...
Component that displays a schedule of days.
import React from 'react' import ReactDOM from 'react-dom' import createBrowserHistory from 'history/lib/createBrowserHistory' import { useRouterHistory } from 'react-router' import { syncHistoryWithStore } from 'react-router-redux' import createStore from './store/createStore'; import AppContainer from './containers/...
Initialize a single node with a specific state.
import React, { Component } from 'react'; import { Provider } from 'react-redux'; import { LayerProvider } from 'layer-react'; import Messenger from './containers/Messenger'; import ActiveConversation from './containers/ActiveConversation'; import DefaultPanel from './components/DefaultPanel'; import { IndexRoute, Rou...
Component that is rendered by a single component in a network.
import React from 'react' import {Router} from 'react-router/es6' import {Provider} from 'react-redux' import routes from '../routes' import DevTools from '../dev_tools' export default ({store, history}) => <Provider store={store}> <div> <Router history={history} routes={routes} /> <DevTools /> <...
Imports a single from React.
import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; import COMMON_STYLES from '../../styles/common'; export const NoResults = (props) => { const { text } = props; return ( <View style={styles.container}> <Icon name="...
export NoResults function
import React from 'react'; import { connect } from 'react-redux'; import * as actions from '../actions'; import IconButton from 'material-ui/IconButton'; import TextField from 'material-ui/TextField'; import Star from 'material-ui/svg-icons/toggle/star'; import StarBorder from 'material-ui/svg-icons/toggle/star-borde...
A component that displays a search bar with a hidden hidden input.
import React from 'react'; import FilterByText from '../../../../client/components/FilterByText'; import GenericTable from '../../../../client/components/GenericTable'; import { useTranslation } from '../../../../client/contexts/TranslationContext'; import { useResizeInlineBreakpoint } from '../../../../client/hooks/u...
Imports a bunch of functions that can be used to render a sequence of objects.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { fetchPosts } from '../actions/index'; // Link: A React component, which is an anchor tag. import { Link } from 'react-router'; class PostsIndex extends Component { // A Lifecycle method: automatically called by React when the ...
A component which is automatically called by a React component when it is going to be rendered by a DOM.
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './components/app'; import PostsIndex from './components/posts_index'; import PostsNew from './components/posts_new'; import PostShow from './components/post_show'; export default ( <Route path="/" component={App}> ...
default module that exports all the routes in the hierarchy
import React from 'react' import PropTypes from 'prop-types' import ReactDOM from 'react-dom' import styles from './Search.less' import { Input, Select, Button, Icon } from 'antd' class Search extends React.Component { state = { clearVisible: false, selectValue: (this.props.select && this.props.selectProps) ...
A component that can be used to render a search in a dropdown.
import React from 'react' import { reduxForm } from 'redux-form' export const fields = [] const validate = (values) => { const errors = {} return errors } type Props = { handleSubmit: Function, fields: Object, } export class <%= pascalEntityName %> extends React.Component { props: Props; defaultProps = ...
React - > React. Component
/* eslint-disable react/prop-types */ import React from 'react'; import { MessageBoxFunctionalLayout } from 'wix-style-react'; export default () => ( <MessageBoxFunctionalLayout title="Interruption Message" confirmText="Action" theme="blue" dataHook="alert-standard" > This is a generic message....
A default function to export a missing - in - memory critical message.
import React, { Component } from 'react'; import NodeStore from "../../stores/NodeStore"; import SessionStore from "../../stores/SessionStore"; import NodeForm from "../../components/NodeForm"; import ApplicationStore from "../../stores/ApplicationStore"; class UpdateNode extends Component { static contextTypes = {...
The update node component is a component that updates a node in a session.
"use strict" import React from 'react' import createLocation from 'history/lib/createLocation' import {renderToString } from 'react-dom/server' import routes from '../../assets/js/routes'; import configureStore from '../../assets/js/serverStore'; import { match } from 'redux-router/server'; import { Provider } from 're...
Default action for handling a single node in a browser.
import _ from 'lodash'; import React from 'react'; import ActionProgress from './actionProgress'; import Button from './button'; module.exports = React.createClass({ propTypes: { checkVar: React.PropTypes.object.isRequired, defaultProgressMsg: React.PropTypes.string, progressProps: React.PropTypes.obje...
The main function that creates a single action - progress - button which is rendered when a button is clicked.
import PropTypes from 'prop-types'; import React from 'react'; import c from 'classnames'; import { markdownToRemark, remarkToMarkdown } from 'EditorWidgets/Markdown/serializers' import RawEditor from './RawEditor'; import VisualEditor from './VisualEditor'; const MODE_STORAGE_KEY = 'cms.md-mode'; let editorControl; ...
A component that renders a single missing - asset block of Markdown.
import React from 'react' import {connect} from 'react-redux' import {pushState } from 'redux-router' import * as Actions from '../actions/AppActions' @connect( state => ({ login: state.login }) ) class Signup extends React.Component { render() { const {login, dispatch} = this.props const handl...
The signup component is a component that can be used to sign up a user s account.
import React from 'react'; import { Input } from '../../src'; export default class InputDemo extends React.Component { constructor(props) { super(props); } render() { return ( <div className="test-input"> <div className="test-input-eq "> <Input value="1223" onChange={(e) => {conso...
Demo component that displays a single input on a hidden input field.
import React, { Component } from 'react'; import CustomElementInput from './CustomElementInput' class ElementContent extends Component { render() { return ( <div> <h3> <CustomElementInput value={this.props.elementTitle} ...
export default ElementContent
/** * 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 withStyles from 'isom...
A component that displays a single missing - free sequence in the system.
import { FormControl, MenuItem, Select } from '@material-ui/core'; import React from 'react'; import cls from './style.module.scss'; import PropTypes from 'prop-types'; import clsx from 'clsx'; import I18n from '@iobroker/adapter-react/i18n'; const DAYS = [ 31, // 1 29, // 2 31, // 3 30, // 4 31, /...
Package that contains a single language specific language for a calendar.
'use strict'; import React from 'react'; import Radium from 'radium'; let BurgerIcon = Radium(React.createClass({ propTypes: { image: React.PropTypes.string, styles: React.PropTypes.object }, getLineStyle(index) { return { position: 'absolute', height: '20%', left: 0, right...
Create a BurgerIcon with a button that opens a menu.
import React from 'react'; import { render } from 'react-dom'; import { Provider } from 'react-redux'; import configureStore from './stores'; import App from './containers/App'; const store = configureStore(); render( <Provider store={store}> <App /> </Provider>, document.getElementById('app') );
Imports a single from React
import React, { Component } from 'react'; import { Text } from 'react-native'; import styles from '../../styles/styles'; import InPageImage from '../inPageImage'; import AnimalText from '../animalText'; import AnimalTemplate from '../animalTemplate'; const IMAGES = [ require('../../images/animals/agamaKocincinska/0...
Package containing all of the components that are not part of a component s children.
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from ...
A component that renders a link with a link to the navigation bar.
import React from 'react'; import { Button, ButtonGroup } from 'react-bootstrap'; const Truck = ({truck, onEdit, onDelete}) => { const edit = (event) => { onEdit(event, truck); } const deleteItem = (event) => { onDelete(truck.id) } return ( <div className="truck-card card"> <h2 className=...
The truck component
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import './reset.css'; import './index.css'; ReactDOM.render(<App />, document.getElementById('root'));
Imports a React application.
import PropTypes from 'prop-types' import React from 'react' import shallowCompare from 'react-addons-shallow-compare' import { Button } from '@material-ui/core' import { withStyles } from '@material-ui/core/styles' import classNames from 'classnames' import lightBlue from '@material-ui/core/colors/lightBlue' import St...
Displays a wizard that displays a single non - default next node in a hierarchy.
import React from 'react'; 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 produces a DevTools component e...
createDevTools creates a DevTools component from a single managed component.
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { connect } from 'react-redux'; import { injectIntl, defineMessages } from 'react-intl'; import Column from '../ui/compon...
The trends component is a component that can be used to render a trends list.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageFilterTiltShift = (props) => ( <SvgIcon {...props}> <path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69c1.11-.86 2.44-1.44 3.9-1.62zm7.32.19C16.84 3.05 15.01 2.25 13 2.05v2.02c1.46.18 2.79.76 3.9 1.62...
A component that returns a sequence of icons that can be applied to a component.
import React from 'react' export default function Duration ({ className, seconds }) { return ( <time dateTime={`P${Math.round(seconds)}S`} className={className}> {format(seconds)} </time> ) } function format (seconds) { const date = new Date(seconds * 1000) const hh = date.getHours() const mm ...
Generates a duration string
import React from 'react' import { connect } from 'react-redux' import { massDelete, massCancel, makeMassSelectedIdsSelector } from 'ducks/files' import FileMassActionsWrap from './styled/FileMassActionsWrap' function downloadHref (filesUrl, massSelectedIds) { return `${filesUrl}/mass_download?ids=${massSele...
The main function for the missing - node - js - react module.
import React, { Component } from 'react'; import PropTypes from '../../../prop_types'; import $ from 'jquery'; import { autobind, mixin } from '../../../utils/decorators'; import { difference } from 'lodash'; import { Modal, ModalHeader, ModalContent, ModalFooter } from '../../../components/modal'; import CloseModalBu...
A component that displays a modal with the permissions of the principals in the permission manager.
'use strict'; import React from 'react'; import ReactNative from 'react-native'; import PropTypes from 'prop-types'; import {ViewPropTypes} from 'react-native'; var { Component, } = React; var { StyleSheet, requireNativeComponent, } = ReactNative; export default class MessageList extends Component { constr...
The MessageList component is a class that represents a list of messages that can be displayed on a message list.
// DecisionButton.js // Round, bordered buttons for choosing BCI action type import React, { Component } from 'react'; import { Text, View, TouchableOpacity, StyleSheet, } from 'react-native'; import { MediaQueryStyleSheet } from 'react-native-responsive'; import * as colors from "../styles/colors"; export de...
A component that wraps a button with a fixed height and bordered buttons for choosing BCI action.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { itemsFetchData } from '../actions/items' class ItemList extends Component { componentDidMount(){ this.fetchData('http://5826ed963900d612000138bd.mockapi.io/items'); } render() { if (this.state.hasErr...
A component that can be used to render a list of items.
import React from 'react'; import Appear from './index'; import Arwes from '../Arwes'; export default () => ( <Arwes> <Appear animate> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim ve...
Export a single node from a React index.
import React from 'react' import { Field } from 'redux-form' import { Link } from 'react-router' import { FORM_FIELDS } from '../config/personal_information_config' export const PersonalInformation = (props) => ( <div> <h2>Personal Information</h2> <form> {FORM_FIELDS.map(field => <Field ...
export a default middleware for the personal information
import React from 'react'; import { Link } from 'react-router'; class Home extends React.Component { render() { return ( <div className="home"> <h2>This is the &lt;Home&gt; component</h2> <ul className="links"> <li className="links__item"> <i className="fa fa-check" ar...
A class that can be used to render a single node in a hierarchy.
import React from 'react'; import ErrorPage from 'pages/_error'; export default ({ variables }) => ( <ErrorPage statusCode={404} errorMessage={`Problem "${variables.id}" not found`} /> );
Default error page generator
import React from 'react'; import { Link } from 'react-router'; import { Item, Statistic, Container, Grid, Divider, Image, Card } from 'semantic-ui-react'; const About = () => <Container textAlign="center" className="about" fluid> <Grid columns={1}> <Grid.Column> <Grid.Row> <Item.Image ...
Package containing all of the n - ary features of a single language.
/** * Load the App component. * (All the fun stuff happens in "/ReactApp/containers/index.js") * * React Native Starter App * // */ 'use strict'; import React from 'react' import { AppRegistry } from 'react-native' import AppContainer from './ReactApp/containers/' AppRegistry.registerComponent('StarterKit', ()...
Load the App component if it is not loaded.
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call &...
Creates a new HashRouter component that uses the history API.
/** * Render a popout list heading */ import React from 'react'; import blacklist from 'blacklist'; import classnames from 'classnames'; var PopoutListHeading = React.createClass({ displayName: 'PopoutListHeading', propTypes: { children: React.PropTypes.node.isRequired, className: React.PropTypes.string, }, ...
Renders a popout list heading
import React, { Component } from 'react'; import styles from './styles.css'; export default class VideoAdd extends Component { // Start the popover closed state = { url: '', open: false, }; // When the popover is open and users click anywhere on the page, // the popover should close componentDidMo...
The video add component which adds a video to the popover.
/* eslint-disable */ import React from 'react'; import classNames from 'classnames'; export default class ButtonArea extends React.Component { static propTypes = { direction: React.PropTypes.string }; static defaultProps = { direction: 'vertical' }; render() { const {di...
A component that shows a single hidden area in a vertical or horizontal direction.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImagePanoramaWideAngle = (props) => ( <SvgIcon {...props}> <path d="M12 6c2.45 0 4.71.2 7.29.64.47 1.78.71 3.58.71 5.36 0 1.78-.24 3.58-.71 5.36-2.58.44-4.84.64-7.29.64s-4.71-.2-7.29-.64C4.24 15.58 4 13.78 4 12...
A component that
import React from 'react'; export default function withTick(milliseconds, condition, Component) { return class Tick extends React.Component { constructor() { super(); this.state = { now: new Date() }; } componentDidMount() { this.tickInterval = setInterval( () => condition(thi...
create a tick class that will tick the given milliseconds if the condition is true.
/** * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* @flow */ import React from 'react'; import { darkGray } from '../styles'; const footerStyle = { fontFamily: 'sans-serif', color:...
The main function of the missing - node package.
import Icon from '../Icon'; import React from 'react'; import PropTypes from 'prop-types'; import Typography from '../Typography'; import Wrapper from '../Wrapper'; import classNames from 'classnames'; import styles from './styles.css'; function PopoverMenuItem3(props) { return ( <Wrapper clas...
Demonstrates how to display a popup menu item in a popup box.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionAlarmOn = (props) => ( <SvgIcon {...props}> <path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.0...
A component that displays a series of action alarm on on a component.
import React from 'react' import { Header } from 'semantic-ui-react' const HeaderExampleDisabled = () => ( <Header as='h2' disabled> Disabled Header </Header> ) export default HeaderExampleDisabled
Imports a React component and exports a default header if the component is not found.
import React from 'react' import styles from './footer.css' class Footer extends React.Component { render() { return ( <div className={styles.footer}> Copyright © 2016-2017 getcha22.com | getcha22 | HaoXiang | 郝翔 | getcha576503369@gmail.com </div>); } } export default Footer
The footer component
import React from 'react'; import './Photo.css'; import b from 'b_'; const photo = b.lock('photo'); function Status(props) { if (props.userIsCreator || props.status === null) { return null; } return ( <div className={['control', photo('checker')].join(' ')}> <i className={`fa ...
Demonstration of how to render a single critical sequence of buttons.
import React from 'react'; import canUseDom from 'dom-helpers/util/inDOM'; import getOwnerDocument from 'dom-helpers/ownerDocument'; import getOwnerWindow from 'dom-helpers/ownerWindow'; import contains from 'dom-helpers/query/contains'; import activeElement from 'dom-helpers/activeElement'; import getOffset from 'd...
Get the height of the document and the size of the element.
import React from 'react'; import { Link } from 'react-router'; module.exports = () => ( <div className="m-header"> <div className="g-c"> <h1> <Link to="/">feng-ui</Link> </h1> <nav className="f-fr"> <Link activeClassName="is-active" to="/">Getting started</Link> <Link ...
export a function to generate a sequence of missing nodes.
import React from 'react' import { Grid } from 'semantic-ui-react' const GridExampleReversedComputer = () => ( <Grid reversed='computer' columns='equal'> <Grid.Row> <Grid.Column>Computer A Fourth</Grid.Column> <Grid.Column>Computer A Third</Grid.Column> <Grid.Column>Computer A Second</Grid.Colu...
This function imports a sequence of components from a semantic - ui - react module.