code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React from 'react'; import {MenuLink} from './menu.link'; export function AssignDashboardPanel(props, context) { return ( <div className="col-md-4 col-md-offset-8 panel-container"> <h3> Tableau de bord <MenuLink /> </h3> <hr/> <p className="help-block">Pas encore im...
Assigns a dashboard panel to a single node in the hierarchy.
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import ReduxPromise from 'redux-promise'; import App from './components/app'; import reducers from './reducers'; const createStoreWithMiddleware = applyMiddleware(...
Imports a single node in the DOM.
import React from 'react'; import Router from 'react-router'; import App from '../components/App/App.react.js'; import ReposController from '../components/ReposController/ReposController.react.js'; import RepoDetailsController from '../components/RepoDetailsController/RepoDetailsController.react.js'; let Route = Route...
Imports the Navigator and routes.
import React from 'react' import {Link} from 'react-router' import Msg from '../../i18n/Msg' import SmartMenuList from './NavMenuList' export default class SmartMenuItem extends React.Component { static contextTypes = { router: React.PropTypes.object.isRequired }; render() { const item = this.props.i...
A component that renders a single missing - key menu item.
import React from 'react'; import ITEMS from 'common/ITEMS'; import Analyzer from 'Parser/Core/Analyzer'; import Combatants from 'Parser/Core/Modules/Combatants'; import ItemDamageDone from 'Main/ItemDamageDone'; import SoulHarvest from '../../Talents/SoulHarvest'; class TheMasterHarvester extends Analyzer { stati...
The master harvester is a class that exports the base logic for the master harvester.
import React, { Component } from 'react'; import { removeRemember, editRemember, showModal, moveRemember } from '../actions'; export default class extends Component { constructor() { super(); this.editRemember = this.editRemember.bind(this); } editRemember(text, id) { this.props.dispatch(sho...
A component that can be used to show a modal dialog when a user edits a key in a sequence.
/** * 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'; // Initialize store const store = configureStore(window.__INITIAL_STATE__); const mountApp = document.getEleme...
Renders a single node in the DOM that is not part of a react - dom hierarchy.
import { test } from 'tap' import React from 'react' import Enzyme, { shallow } from 'enzyme' import Adapter from 'enzyme-adapter-react-16' import JSONTree from 'react-json-tree' import PropsViewer from '../src' Enzyme.configure({ adapter: new Adapter() }) test('props-viewer should generate a component', (t) => { ...
Test if a specific component is missing
import React from 'react' import { Link } from 'gatsby' import styled from 'styled-components' import SEO from '../components/Seo' import GlobalStyles from '../styles/global' const Container = styled.section` align-items: center; background-image: url('https://muniz95.com.br/assets/img/john-404.gif'); backgroun...
Imports a missing - page node with missing - components.
import React from 'react'; import PropTypes from 'prop-types'; import { dataAttributes } from './utils'; function wrappedChild(children, data) { const child = React.Children.only(children); if (child.type === Trackable) return child; return React.cloneElement(child, data); } function Trackable(props) { con...
A component that can be tracked by a component s children.
import React from 'react'; import { render } from 'react-dom'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; render(<HelloWorld />, document.getElementById('react-root'));
Imports a component from a file that has no react - dom.
import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; class App extends Component { render() { return ( <div className="App"> <div className="App-header"> <img src={logo} className="App-logo" alt="logo" /> <h2>Welcome to React</h2> ...
The base class for all components that are not in React.
import React from 'react'; import Turret from './Turret'; import TankBody from './TankBody'; import LifeBar from './LifeBar'; import { TANK_RADIUS } from '../../simulation/constants'; class EnemyTank extends React.Component { constructor(props) { super(props); this.radius = TANK_RADIUS; this.rotation = ...
Enemy tank component
import React from 'react'; import { TabNavigator } from 'react-navigation'; import Icon from 'react-native-vector-icons/FontAwesome'; import Main from './Main/Main'; import SearchStudents from './Students/Students'; import SearchCompanies from './Companies/Companies'; import SearchInstitutions from './Institutions/Inst...
Imports a single tab - navigator from React.
import React from 'react' import styles from './main.less' import { config } from '../../utils' const Footer = () => <div className={styles.footer}> {config.footerText} </div> export default Footer
Imports a single and returns a Footer
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...
Create a breadcrumb item that is rendered when a link is clicked.
import React from 'react'; import Router, { Link } from 'react-router'; import Navbar from 'react-bootstrap/lib/Navbar'; import Nav from 'react-bootstrap/lib/Nav'; const NAV_LINKS = { 'getting-started': { link: 'getting-started', title: 'Getting started' }, 'components': { link: 'components', tit...
The main navigation navigation component.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import ReactEcharts from 'echarts-for-react'; import { updateOption } from '../../../redux/dynamicEchart/reducer'; class DynamicChartComponent extends Component { constructor(props) { super(props); this.fetchNewDate = this.fetch...
Dynamic chart component
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import Multiselect from 'bapmrl-react-multiselect'; class WithGroups extends Component { constructor(props) { super(props); this.state = { items: { '0': { key: '0', label: 'Group 0', option...
The base class for the with - groups component.
import React, { Component } from 'react'; import { AppRegistry } from 'react-native'; import App from './rn/app.js'; class RNRouter extends Component { render() { return <App /> } } AppRegistry.registerComponent('RNRouter', () => RNRouter);
The RNRouter component is a component that can be rendered by a react - native component.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageLooksTwo = (props) => ( <SvgIcon {...props}> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.11-.9 2-2 2h-2v2h4v2H9v-4c0-1.11.9-2 2-2h2V9H9V7h4c1.1 0 2 .89 2 ...
A component that exports a component that can be used to render a component in a layout.
import React from 'react'; import ReactDOM from 'react-dom'; import injectTapEventPlugin from 'react-tap-event-plugin'; import Main from './Main'; // Our custom react component //Needed for onTouchTap //Can go away when react 1.0 release //Check this repo: //https://github.com/zilverline/react-tap-event-plugin injectT...
Imports a react component and renders it into the app div.
import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import { Button } from 'bloomer'; // TODO: make student specific UI const Student = ({ student: s }) => ( <React.Fragment> <pre>{JSON.stringify(s, null, 4)}</pre> <Button render={props => <Link to={`...
A component that renders a critical block of a student.
import React, { Component } from 'react'; class Header extends Component { render() { return ( <header className="header"> <div className="container"> <h1 className="header_title">Framer modules</h1> <a className="add-plugin" href="https://github.com/interacthings/framer-modules...
The header for the missing - missing
/* eslint-disable max-len, no-return-assign */ import React from 'react'; import PropTypes from 'prop-types'; const SurveyQuestion = ({questionIndexNumber, questionText, ratingsObjectArray, selectedRatingValue, selectedRatingClass, onChange}) => { let ratingRows = []; const groupName = `groupName${questionIn...
Generates a hidden hidden input that displays a radio group with a single radio element with a single rating.
/* ######################################################################### # # Copyright (C) 2019 OSGeo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # ...
A component which displays a single missing - missing node in the system if it is missing.
// @flow import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import MuiThemeProvider from '@material-ui/core/styles/MuiThemeProvider' import { createMuiTheme } from '@material-ui/core/styles' import grey from '@material-ui/core/colors/grey' import deepOrange from '@materi...
React - redux component
import React, { Component } from 'react'; import Result from './result'; const Display = (props) => { var shortList = props.results; var newArray = shortList.slice(0, 25); const resultsList = newArray.map((item) => { return ( <Result artistName={item.artistName} trac...
A component that displays a list of results if no results are found.
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import _ from 'lodash'; import { fetchPosts, deletePost } from '../actions'; class PostsIndex extends Component { componentDidMount() { this.props.fetchPo...
The PostsIndex class
import React from 'react'; import ITEMS from 'common/ITEMS'; import ItemLink from 'common/ItemLink'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; export default { descriptions: { // lv15 [SPELLS.MASTER_OF_SUBTLETY_TALENT.id]: <span>Default talent for burst-damage build. Incr...
A function to export a list of items that can be talent and damage.
import React from 'react'; import PropTypes from 'prop-types'; import styles from '../styles/orderItem.scss'; import { Strings } from '../model/Strings'; import classNames from 'classnames'; import { Link } from 'react-router'; const OrderItem = ({ orderId }) => <Link to={'/order/' + orderId } className={s...
Create a function that displays a sequence of messages that are not present in the order.
import React from 'react' import SvgIcon from '@mui/material/SvgIcon' const GitHubIcon = (props) => { return ( <SvgIcon width={22} height={22} viewBox="0 0 100 100" {...props}> <path d={ 'M65.6 65.4c2.9-.3 5.1-2.8 5-5.8-.1-3-2.6-5.4-5.6-5.4h-.2c-3.1.1-5.5 2.7-5.4 5.8.1 1.5.7 2.8 1.6 3.7-3...
Missing icons in a GitHub icon.
import React from 'react' import { Label } from 'semantic-ui-react' const LabelExampleBasic = () => ( <div> <Label as='a' basic> Basic </Label> <Label as='a' basic pointing> Pointing </Label> <Label as='a' basic image> <img src='/images/avatar/small/elliot.jpg' /> Elliot ...
Generate a label example for a sequence of nodes.
/** * 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, { Component } from 'react'; import withStyle...
A component that renders a single node in the hierarchy of a React component.
import React from 'react'; import PropTypes from 'prop-types'; import 'highlight.js/styles/github-gist.css'; import Highlight from '../../Highlight'; import './style.css'; const DocsContent = ({ title, content, editUrl }) => ( <div id="docs-content"> <div className="content"> <h2 className="title">{title}...
Generate a hidden section of a single node.
import React from 'react'; import PropTypes from 'prop-types'; import { Table as PfTable } from 'patternfly-react'; import { noop } from 'foremanReact/common/helpers'; import EmptyState from 'foremanReact/components/common/EmptyState'; import Pagination from 'foremanReact/components/Pagination/PaginationWrapper'; impo...
Imports a single node in a table.
import React from 'react'; import Gravatar from 'react-gravatar'; var Option = React.createClass({ propTypes: { addLabelText: React.PropTypes.string, className: React.PropTypes.string, mouseDown: React.PropTypes.func, mouseEnter: React.PropTypes.func, mouseLeave: React.PropTypes.func, option: React.PropTy...
The option component that is rendered when a user clicks on a node in a dropdown list.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceSignalCellular0Bar = (props) => ( <SvgIcon {...props}> <path fillOpacity=".3" d="M2 22h20V2z"/> </SvgIcon> ); DeviceSignalCellular0Bar = pure(DeviceSignalCellular0Bar); DeviceSignalCellular0Bar.displayN...
Devolve a device - signal cellular 0 bar
import React from 'react'; import { findDOMNode } from 'react-dom'; import { FormField, FormInput, FormRow, FormSelect } from 'elemental'; const MODE_OPTIONS = [ { label: 'Exactly', value: 'equals' }, { label: 'Greater Than', value: 'gt' }, { label: 'Less Than', value: 'lt' }, { label: 'Between', value: 'between' ...
The default filter for a number field
import React from 'react'; import classNames from 'classnames'; import SafeAnchor from './SafeAnchor'; const MenuItem = React.createClass({ propTypes: { header: React.PropTypes.bool, divider: React.PropTypes.bool, href: React.PropTypes.string, title: React.PropTypes.string, target: ...
Creates a menu item that can be used to show a dropdown menu.
import React from 'react'; import Camp from './Camp'; import AddCamp from './AddCamp'; import CampList from './CampList'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import BackButton from './BackButton'; import FaceBookIntegration from 'FaceBookIntegration'; import ProfileButton ...
The base component for all of the related camps that are not related to a discussion.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionSchedule = (props) => ( <SvgIcon {...props}> <path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H...
A component that renders a series of action schedules for a series of components.
import React, { Component } from 'react'; import { markdown } from 'markdown'; class BinsViewer extends Component { render() { const rawHTML = markdown.toHTML(this.props.bin.content); return ( <div className="col-xs-4"> <h5>Output</h5> <div dangerouslySetInnerHTML={{ __html: rawHTML }}...
A component that renders a single node in the bin content.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentMarkunread = (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-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/> </SvgIcon> ); ContentMarkunread ...
A component that renders a series of icons that can be used to render a series of icons.
import svgMarkup from './CloseIcon.svg'; import React from 'react'; import Icon from '../private/Icon/Icon'; export default function CloseIcon(props) { return <Icon markup={svgMarkup} {...props} />; } CloseIcon.displayName = 'CloseIcon';
Create a close icon
require('./Examples.less'); require('./Autosuggest.less'); import React, { Component } from 'react'; import { findDOMNode } from 'react-dom'; import BasicExample from './BasicExample/BasicExample'; import CustomRenderer from './CustomRenderer/CustomRenderer'; import MultipleSections from './MultipleSections/MultipleSe...
The base class for all components that are not part of the menu.
import chrome from 'chrome'; import React from 'react'; import ReactDOM from 'react-dom'; import LinkList from './components/LinkList'; const target = document.getElementById('LinkList'); function domainPattern(domains) { // ['foo.com', 'bar.com'] // /^(?:[\w-]+\.)*(?:foo\.com|bar\.com)+$/i if (!domains || doma...
Package that contains a list of links that can be blocked.
import React from 'react'; import Form from '../app/form/Form'; import TextGroup from '../app/form/TextGroup'; import RadioGroup from '../app/form/RadioGroup'; import RadioElement from '../app/form/RadioElement'; import Submit from '../app/form/Submit'; export default class Register extends React.Component { render()...
The Register component is a component that can be used to register a user with a password.
import React, { Component } from 'react'; export default function withStorage(Cmp) { return class WithStorage extends Component { storage = window.localStorage || {}; setItems = (items) => { Object.keys(items).forEach(key => { this.storage[key] = items[key]; ...
WithStorage - A component that has a local storage object.
import React from 'react'; import LoginForm from './../../../components/form-login/form-login'; import style from './Login.less'; const Login = props => { const {LogIn, loggedIn, userName, errorMessage} = props; const onSubmitHandler = (credentials) => { LogIn(credentials); }; return ( <div className...
Login component.
import React from 'react'; import ReactDOM from 'react-dom'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'; import ManagerView from './component/manager/managerView.js' import ProgrammerView from './component/programmer/programmerView' import ProgrammerTask from './component/programmer/programmerT...
This module imports a single component and renders it in a layout.
import React from 'react'; import PropTypes from 'prop-types'; import { DATA_HOOKS } from '../constants'; const Slide = ({ dataHook, className, children, image, width, gutter, imagePosition, imageFit, }) => ( <div data-hook={dataHook} className={className} style={{ flex: '0 0 auto',...
Provides a function to create a slide that can be used to slide a node inside a container.
import React from 'react'; import ReactDOM from 'react-dom'; const filePickerDriverFactory = ({element, wrapper, component}) => { const error = element.querySelector(`[data-hook=filePicker-error]`); const input = element.querySelector(`input`); const subLabel = element.querySelector(`[data-hook="sub-label"]`); ...
The filePickerDriverFactory provides a function that creates a component that can be used to create a filePicker.
import { Meteor } from 'meteor/meteor'; import React from 'react'; import { render } from 'react-dom'; import injectTapEventPlugin from 'react-tap-event-plugin'; import Noty from 'noty'; import App from '../imports/ui/App.jsx'; import '../imports/startup/accounts-config.js'; Meteor.startup(() => { injectTapEventPlu...
Imports a single noty.
import React from 'react'; export const hello = 'hello, world'; export function Hello() { return ( <span>{hello}</span> ); }
export a React component
import React, { Component } from 'react'; import { Container } from 'semantic-ui-react'; export default class ScreenDescription extends Component { render() { return ( <Container text> {this.props.children} </Container> ); } } ScreenDescription.propTypes = { children: React.PropType...
The ScreenDescription class is used to display a single node in a menu.
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import Icon from 'mastodon/components/icon'; export default class ColumnHeader extends React.PureComponent { static propTypes = { icon: PropTypes.string, type: PropTypes.string, active: PropTypes.bool, ...
A component that renders a column header when a button is clicked on a column.
import React from 'react'; import { Link } from 'react-router'; import { Time } from '../Time'; /** * Renders a course row */ export function CourseTableRow (props) { const courseDetailPath = `/admin/course/${props.data.id}`; const creatorDetailPath = `/admin/user/${props.data._creatorId}`; const courseViewPat...
Renders a table with a single entry in the course table
import React from 'react'; import Analyzer from 'parser/core/Analyzer'; import DamageTakenTableComponent, { MITIGATED_MAGICAL, MITIGATED_PHYSICAL, MITIGATED_UNKNOWN } from 'interface/others/DamageTakenTable'; import Panel from 'interface/others/Panel'; import SPELLS from 'common/SPELLS'; import SPECS from 'game/SPECS';...
Damage taken by a specific action on a specific target.
import React from 'react'; export default () => ( <svg fill="#FFFFFF" height="36" viewBox="0 0 24 24" width="36" xmlns="http://www.w3.org/2000/svg"> <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/> <path d="M0 0h24v24H0z" fill="none"/> </svg> );
Default middleware for missing missing nodes.
import React, { Component } from 'react'; import { Link } from 'react-router'; import styles from './HowDoes.css'; export default class HowDoes extends Component { render() { return ( <div className={styles.container}> <Link to="/" className={styles.home}></Link> <Link to="/HowDoes/2" c...
The how does component
import React from 'react'; import { reduxForm, SubmissionError, clearSubmitErrors } from 'redux-form'; import PropTypes from 'prop-types'; import Button from 'material-ui/Button'; import { withStyles } from 'material-ui/styles'; import Grid from 'material-ui/Grid'; import Snackbar from 'material-ui/Snackbar'; import Ty...
A component that displays a single user in a hidden hidden state.
import React from 'react' import PropTypes from 'prop-types' import Helmet from 'react-helmet' import PageTemplateDetails from '../components/PageTemplateDetails' import Header from '../components/Header' import Footer from '../components/Footer' class PageTemplate extends React.Component { render () { const { t...
A page template that renders a single object.
/* Copyright (C) 2017 ethbets * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD license. See the LICENSE file for details. */ import React, { Component } from 'react'; import Paginate from 'react-paginate'; import EbetsJson from 'build/contracts/Ebets.json'; imp...
Component that is used to render a BetList with a specific category.
/* * This file is part of the Kreta package. * * (c) Beñat Espiña <benatespina@gmail.com> * (c) Gorka Laucirica <gorka.lauzirika@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ import React from 'react'; import {connec...
Very basic component that displays a single failure in a Kreta network.
/* eslint-disable react/display-name */ /* eslint-disable react/prop-types */ import React, { Component } from 'react'; import { EditorState } from 'draft-js'; import removeBlock from '../modifiers/removeBlock'; const CreateBlock = (Block, editorState, onChange) => class extends Component { constructor() { supe...
Create a block component that can be rendered when a block is created.
import React from 'react'; import equip from './equip'; const Refresher = ({ refresh }) => ( <svg onClick={refresh} style={{ display: 'inline-block', color: 'rgb(255, 255, 255)', fill: 'currentcolor', height: '24px', width: '24px', ...
Demonstration of the function that exports a single refresher.
import React from 'react' import './Drawer.scss' import { IndexLink, Link } from 'react-router' import Drawer from 'material-ui/Drawer' import MenuItem from 'material-ui/MenuItem' import Subheader from 'material-ui/Subheader' let leftNavTop = { fontSize: '24px', color: 'rgb(255, 255, 255)', lineHeight: '64px', ...
A drawer that opens a menu
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import 'babel-core/polyfill'; import path from 'path'; import express from 'express'; import React from 'react'; import ReactDOM from 'react-dom/server'; import Router from './routes'; import Html from './components/Html'; const server = global....
Register the API middleware and the server - side rendering
import React from 'react'; import SvgIcon from '../../SvgIcon'; const 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.62l1.42-1.43zM19.93 11h2.02c-.2-2.0...
A component that renders a series of icons that can be applied to a component.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; class FreeBird extends Component { render() { const { className, tag: Tag, ...attributes } = this.props; const classes = classNames( 'container free-bird', ...
Extend a component with a free - bird class.
import React from 'react'; class About extends React.Component { render(){ return( <div className="jumbotron"> <h1>We are Broadbandchoices</h1> <h2>The best broadband comparison tool in the market.</h2> <p>We are Damo, Ranj, Rob, Alex, Ben, Walshy...
About is a class that exports a single component with a single error message.
import React from 'react'; import JSONTree from './JSONTree'; const styles = { actionBar: { paddingTop: 8, paddingBottom: 7, paddingLeft: 16 }, payload: { margin: 0, overflow: 'auto' } }; export default class LogMonitorAction extends React.Component { renderPayload(payload) { return...
A component that displays a log monitor action.
import React from 'react'; import {connect} from 'react-redux'; import * as bookActions from '../actions/bookActions'; class Book extends React.Component { constructor(props) { super(props); } submitBook(input){ this.props.createBook(input); } render(){ let titleInput; return( <div> ...
Demonstrates how to render a book.
import React, { Component } from 'react'; import { AppRegistry } from 'react-native'; import App from './components/App'; export default class reactNativeLambdaStarter extends Component { render() { return ( <App/> ); } } AppRegistry.registerComponent('reactNativeLambdaStarter', () => reactNativeLam...
Imports a component that is not a react - native component.
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { StyleSheet, Text, View, Animated, Dimensions } from 'react-native'; import { Actions } from 'react-native-router-flux'; import Button from "react-native-button"; var {...
Component that is not part of the standard React Native App
import React from 'react'; import DatePicker from 'material-ui/DatePicker'; function disableWeekends(date) { return date.getDay() === 0 || date.getDay() === 6; } function disableRandomDates() { return Math.random() > 0.7; } /** * `DatePicker` can disable specific dates based on the return value of a callback. *...
DatePickerExample disable specific dates
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Container, Header, Title, Content, Button, Icon, InputGroup, Input, Textarea } from 'native-base'; import { openDrawer } from '../../actions/drawer'; import styles from './styles'; class NHInputGroup extends Component { // esl...
NHInputGroup class for a sequence of NHInputGroup objects.
import React from 'react'; import { render } from 'react-dom'; import { browserHistory } from 'react-router'; import { syncHistoryWithStore } from 'react-router-redux'; import Root from './containers/Root'; import configureStore from './store/configureStore'; const store = configureStore(); const history = syncHistory...
Imports a single node in the DOM and renders it with a history.
import path from 'path' import fs from 'fs' import ReactRoutes from '../components/_routes/' import ReactData from '../components/_routes/example/data.js' import versions from '../versions.json' import React from 'react' import ReactRouter from 'react-router' const expiresIn = 1000 * 60 * 60 * 24 const html = fs.read...
export a single node
import React from 'react' import DebuggerTab from './DebuggerTab' BETON.require('workspace', init) function init(workspace) { // workspace.setTabContent('debugger', () => <DebuggerTab/>) }
Initialize a node with a specific debugger.
import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; import TableContainer from '@material-ui/core/TableContainer'; import TableHead from '@...
Basic table showing all the neccesary sequence of non - zero values.
/* eslint-disable */ import React from 'react'; export default props => { const { width = '100%', height = '100%' } = props; const fixedWidth = width.toString().indexOf('%') !== -1 ? width : `${width}px`; const fixedHeight = height.toString().indexOf('%') !== -1 ? height : `${height}px`; const style = ...
A component that renders a missing missing node in the editor.
import React from 'react'; import Switch from 'react-bootstrap-switch'; const ClassList = ({classes}) => { return ( <div className="panel-body"> <div className="table-responsive"> <table className="table table-bordered table-hover table-striped"> <thead> <tr> <th/> ...
Private function to generate a ClassList from a list of classes.
import React from 'react'; const NotFound = () => ( <p> Sorry, we cannot found this page. </p> ); export default NotFound;
Missing page.
// @flow /* eslint-disable react/prop-types */ import React, { Component } from 'react'; import type { Node } from 'react'; import cx from 'classnames'; import { isScrolledIntoView } from 'app/lib/dom'; import throttle from 'app/lib/throttle'; import styles from './styles.styl'; type Props = { className?: string,...
A component that is rendered when a node is scrolled into view.
// @flow import React, { Component } from 'react'; import type { Item } from '../../Types'; import Container from './Container'; import Text from './Text'; /** * The type of the React {@code Component} props of * {@link NavigateSectionListItem}. */ type Props = { /** * Function to be invoked when an it...
A component that navigates to a list of items in a section.
import React, { Component } from 'react'; import Modal from 'react-modal'; import MyModal from './modal'; const MODAL_A = 'modal_a'; const MODAL_B = 'modal_b'; const DEFAULT_TITLE = 'Default title'; class SimpleUsage extends Component { constructor(props) { super(props); this.state = { title1: DEFAUL...
A component that can be used to show a modal modal.
/* * Copyright (C) 2017 - 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...
Component that displays a single missing - node node in the page dialog.
import React from 'react' export default props => ( <p> Home </p> )
Check if a component is missing or missing
import React from 'react'; import { AppRegistry, View, Text, Linking } from 'react-native'; import { createAppContainer, createBottomTabNavigator, NavigationActions } from 'react-navigation'; import { ApolloClient } from 'apollo-client'; import { ApolloProvider } from 'react-apollo'; import { createHttpLink } from 'apo...
The main React component that creates a window with a bundle that can be rendered to the screen.
import React from 'react' export default ({ width, height, x, y, children }) => { const style = { width, height, transform: `translate3d(${x}px, ${y}px, 0)`, position: 'absolute', top: 0, left: 0, border: `1px solid`, transition: `transform .2s` } return ( <div style={style}...
default function to render a
import React from 'react'; import { history } from 'react-router/lib/HashHistory'; import { Router, Route, Link } from 'react-router'; var App = React.createClass({ render() { return ( <div> <p> This illustrates how routes can share UI w/o sharing the url, when routes have no pa...
The main function that creates all of the components that are not part of the router.
import React from 'react'; import { connect } from 'react-redux'; import Query from '../../components/query'; import Filter from '../../components/filter'; import Sorter from '../../components/sorter'; import './styles/product-list-container.css'; import { ProductList } from '../../components/generic-list'; import { se...
The base product list container class.
import React from 'react'; import { Link } from 'react-router'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PersonList from '../components/PersonList'; import styles from './IndexPage.pcss'; const IndexPage = props => { const { persons, deletePerson } = props; return ( <section className...
The default index page for a single node.
/** * 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. * * @emails react-core */ 'use strict'; import MarkdownPage from 'components/MarkdownPage'; import PropTypes from 'prop-types'; import Re...
Provides a function to export a single object.
// @flow import React, { Component } from 'react'; import { Linking, View } from 'react-native'; import { WebView } from 'react-native-webview'; import { type Dispatch } from 'redux'; import { openDialog } from '../../../../base/dialog'; import { translate } from '../../../../base/i18n'; import { JitsiModal, setActiv...
A component that displays a dial in summary dialog.
import React from 'react'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import RaisedButton from 'material-ui/RaisedButton'; const customContentStyle = { width: '100%', maxWidth: 'none', }; /** * The dialog width has been set to occupy the full width of browser throug...
DialogExampleCustomWidth is a class that displays a dialog with custom width.
import React from 'react'; import DatePicker from 'material-ui/DatePicker'; /** * `DatePicker` can be implemented as a controlled input, * where `value` is handled by state in the parent component. */ export default class DatePickerExampleControlled extends React.Component { constructor(props) { super(props)...
Example of a date picker that can be controlled by a date input.
import React, { Component } from 'react'; import Graph from './scripts/components/graph' export default class App extends React.Component { state = { dataSetIndex: 0 , } static defaultProps = {views: [["day"],["simpleDay"],["Macs"]]} selectDataset(event) { this.setState({dataSetIndex: event.target.value}); ...
The base component for a series of data sets.