code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React from 'react'; // import { FormattedMessage } from 'react-intl'; import NavBar from './NavBar'; // import HeaderLink from './HeaderLink'; // import messages from './messages'; class Header extends React.Component { // eslint-disable-line react/prefer-stateless-function render() { return ( <Nav...
The default header class for a single node.
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage } from 'react-intl'; import classNames from 'classnames'; import Icon from 'mastodon/components/icon';...
A component that lists attachments of a single node.
import React from 'react'; import AvatarItem from 'components/common/AvatarItem.react'; class ContactItem extends React.Component { static propTypes = { contact: React.PropTypes.object, onToggle: React.PropTypes.func } constructor(props) { super(props); this.onToggle = this.onToggle.bind(this)...
The ContactItem component is a component that can be used to show a list of contacts.
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { fetchLists } from 'mastodon/actions/lists'; import { connect } from 'react-redux'; import { createSelector } from 'rese...
A component that renders a list panel with a navigation link to the lists of the current state.
import React from 'react'; import { Link } from 'react-router-dom'; import ScrollUpButton from 'react-scroll-up-button'; import SocialMedia from 'shared/components/socialMedia/socialMedia'; import centerLogo from 'images/icons/Medal-Icon.svg'; import styles from './footer.css'; const Footer = () => ( <div className=...
Imports the missing - node - related modules and exports a default Footer.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceNfc = (props) => ( <SvgIcon {...props}> <path d="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 18H4V4h16v16zM18 6h-5c-1.1 0-2 .9-2 2v2.28c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2...
Devuelve un Nfc
import React from 'react'; import CounterApp from './CounterApp'; import { createRedux } from 'redux'; import { Provider } from 'redux/react'; import * as stores from '../stores'; const redux = createRedux(stores); export default class App { render() { return ( <Provider redux={redux}> {() => <Cou...
The default class for a sequence of classes.
import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { FormattedMessage, injectIntl } from 'react-intl'; import api from '../../../api'; @injectIntl export default class EmbedModal extends ImmutablePureComponent { static propTypes...
Class for embed modal modal
import React from 'react' import toml from 'toml-js' import Helmet from 'react-helmet' import { config } from 'config' class TomlWrapper extends React.Component { render () { const data = this.props.route.page.data; return ( <div className="toml-container container"> <He...
A component that renders a single Invite.
import React from 'react' import { Image, Reveal } from 'semantic-ui-react' const RevealExampleFade = () => ( <Reveal animated='fade'> <Reveal.Content visible> <Image src='http://semantic-ui.com/images/wireframe/square-image.png' size='small' /> </Reveal.Content> <Reveal.Content hidden> <Imag...
Imports a single node in a tree.
import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import { withBootStrap, getBsClassName } from '../../shared/bsHOC'; import { SIZE, SIZE_MAP, DEVICE_SIZES, STYLE, STATE } from './BsStyles'; class Bar extends React.PureComponent { render() { const El = styled....
The base component for a component that is rendered as a
import React from 'react'; /* * Animated loader using css for those slow rpc calls * */ export default () => <div> <span className="Loader"> <div className="Loader-indicator"> <h1> <span>Loading</span> <span className="Loader-ellipsis"> <span className="Loade...
Show a single in the UI
/** * Created by saz on 3/26/17. */ import React, { Component } from 'react'; import {Link} from 'react-router-dom'; import _ from 'lodash'; import './Menu.css'; import Header from './Header'; import Api from './api'; class MenuContainer extends Component { constructor() { super(); this.state ...
A component that displays a menu of menu items.
import React from 'react'; import { render } from 'react-dom'; import 'whatwg-fetch'; import App from './component/app'; // Since the application is ABSOLUTELY static - there is no other pages, // etc, we can just download the metadata json and be done with it. let state = window.__INITIAL_STATE__; function rerend...
Imports the missing metadata from the server.
import React from 'react' import { node } from 'prop-types' import './Container.css' const Container = ({ children }) => ( <div className='lk-container'>{children}</div> ) Container.propTypes = { children: node } Container.defaultProps = { children: null } export default Container
React - specific module that imports a into a Container
/** * 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 withStyles from 'isomorp...
The main function of the hierarchy of a node.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationPersonalVideo = (props) => ( <SvgIcon {...props}> <path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12z"/> </SvgIcon> ); Notifi...
A component that exports a notification personal video.
import React from 'react' import Link from '../Link' import Logo from '../Logo' import './styles.css' const menuItems = [ { name: 'Home', href: '/' }, { name: 'About', href: '/about' }, { name: 'Try out Tux', href: '/' }, ] const Menu = () => ( <div className="Menu"> <Logo /> <ul className="Menu-list...
The menu for a single
import React from 'react'; import Icon from '../Icon'; export default class FlipToFrontIcon extends Icon { getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm4 8v-4H6c0 2.21 1.79 4 4 4zM6 18h4v-4H6v4zm24 24h4v-4h-4v4zm8-36H18c-2.2...
The FlipToFrontIcon class
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationCallMerge = (props) => ( <SvgIcon {...props}> <path d="M17 20.41L18.41 19 15 15.59 13.59 17 17 20.41zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5 7.5 8z"/> </SvgIcon> ); CommunicationCallMerge...
A component that renders a communication call with a mixture of the two icons.
import React from 'react'; import PropTypes from 'prop-types'; import { translate } from 'react-i18next'; import Panel from 'react-bootstrap/lib/Panel'; import PostActionButton from '../PostActionButton'; const renderStatusAction = (t, status, onSuccess, onError) => { if ('OK' === status) { return ( <PostA...
Ajoute une nationation de la chaine de es.
import React, { Component } from 'react'; import Section from 'shared/components/section/section'; import axios from 'axios'; import PropTypes from 'prop-types'; import config from 'config/environment'; import Form from 'shared/components/form/form'; import FormEmail from 'shared/components/form/formEmail/formEmail'; i...
Component that will be used to sign up a user s email address.
import React from 'react'; class AboutPage extends React.Component { render() { return ( <div> <h1>About me</h1> <p>I code at <a href='https://github.com/arpith'>github.com/arpith</a> and write at <a href='https://medium.com/@arpith'>medium.com/@arpith</a>.</p> <p>I also tweet at <...
A page that displays a page with a header that shows how to render a component.
import PropTypes from 'prop-types'; import React from 'react'; import { connect } from 'react-redux'; // import * as Utils from '../../utils'; import * as Basic from '../../components/basic'; import * as Advanced from '../../components/advanced'; /** * Table with confidential storage values * * @author Patrik Stlou...
A component that can be used to display a list of confidential storage values.
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path opacity=".3" d="M12 3C5.3 3 .8 6.7.4 7l3.2 3.9L12 21.5l3.5-4.3v-2.6c0-2.2 1.4-4 3.3-4.7.3-.1.5-.2.8-.2.3-.1.6-.1.9-.1.4 0 .7 0 1 .1L23.6 7c-.4-.3-4.9-4-11.6-4z" /><path d="M23 16v-1.5c0-1.4-1.1-2.5-2....
Missing Wifi BarLock
import React, { Component } from 'react'; import { render } from 'react-dom'; import { Router, IndexRoute, Route, browserHistory } from 'react-router'; import './sass/bulma.scss'; import Delegate from './components/Delegate'; import Home from './components/Home'; import OurStory from './components/OurStory'; import R...
Imports a single non - hotspot component.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceBluetooth = (props) => ( <SvgIcon {...props}> <path d="M17.71 7.71L12 2h-1v7.59L6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 11 14.41V22h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 5.83l1.88 1.88L13 9.59V5.83zm1.88 10.46...
Devuelve un objeto DeviceBluetooth
import React from 'react'; import Select from 'react-select'; import Highlighter from 'react-highlight-words'; var DisabledUpsellOptions = React.createClass({ displayName: 'DisabledUpsellOptions', propTypes: { label: React.PropTypes.string, }, getInitialState () { return {}; }, setValue (value) { this.setS...
This module exports a disabled option that can be used to disable a specific support level.
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './App'; ReactDOM.render(<App />, document.getElementById('root'))
Imports a React application.
import React from 'react'; import { Link } from 'react-router'; import { Alert, BlankState, Center, Spinner } from '../../../../elemental'; import DragDrop from './RelatedItemsListDragDrop'; import ListRow from './RelatedItemsListRow'; import { loadRelationshipItemData } from '../../actions'; import { TABLE_CONTROL_C...
The RelatedItemsList component is a component that can be used to display a list of related items.
import React, { Component } from 'react'; import { View, TextInput, StyleSheet } from 'react-native'; export default class SearchBar extends Component { render() { return ( <View style={styles.container}> <TextInput style={styles.input} p...
A component that shows a search bar in a text input.
import React from 'react'; import {connect} from 'react-redux'; import {get} from 'lodash'; import {SHORTLIST_CLEAR} from '../../../redux/shortlist.reducer'; export class Timeout extends React.Component { constructor(props) { super(props); // Disable timeout in development this.devmode = !!(get(process...
Create a timeout component that will handle the timeout of the application.
import React from 'react'; class Menu extends React.Component { render () { return ( <div className="ui inverted menu"> <a className="active item"> Home </a> <div className="right menu"> <a className="ui item"> Logout </a> </div> ...
A menu that is a menu item that is rendered on the left of a menu item.
import React from 'react' export default { app: React.PropTypes.shape({render: React.PropTypes.func.isRequired}), // React.PropTypes.instanceOf(require('./App.jsx')) fbRef: React.PropTypes.instanceOf(require('firebase')), history: React.PropTypes.shape({push: React.PropTypes.func.isRequired}), u: React.PropTyp...
The default configuration for missing missing components.
import React from 'react'; import Router from 'react-router'; import FastClick from 'fastclick'; import appRoutes from './routes/app'; import '../styles/main.css'; new Promise((resolve) => { if (window.addEventListener) { window.addEventListener('DOMContentLoaded', resolve); } else { window.attachEvent('...
Imports a promise that resolves when a window is loaded.
import React from 'react' import { connect } from 'react-redux' import { Route, IndexRedirect, Redirect, Link } from 'react-router' import Header from './containers/header' import App from './containers/app'; import About from './components/about'; class PageNotFound extends React.Component { render() { return ...
Imports a single page not found component.
import React from 'react'; class Announcements extends React.Component { render () { return ( <div> <h3>Announcements</h3> {this.props.children || <p>Choose an announcement from the sidebar.</p>} </div> ); } } export default Announcements;
The Announcements component is a component that renders a bunch of announcement messages.
import React from 'react' import ReactDOM from 'react-dom' import { createStore, applyMiddleware, compose } from 'redux' import createSagaMiddleware from 'redux-saga' import { Provider } from 'react-redux' import { Router, hashHistory } from 'react-router' import { syncHistoryWithStore, routerMiddleware } from 'react-r...
Imports a single node with optional middleware.
/* * SonarQube * Copyright (C) 2009-2016 SonarSource SA * mailto:contact AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License...
Displays a bulk update of a single key in a bulk update mode.
import React from 'react' import { useParams } from 'react-router' import toolsData from '../../tools/tools-data' import MultiStepForm from '../../components/MultiStepForm/MultiStepForm' const ToolViewer = () => { const { tool } = useParams() const toolData = toolsData[tool] return ( <div style={{ ...
The default ToolViewer function
/** * Created by Darkstar on 12/2/2016. */ 'use strict'; import { saveAppName } from '../../actions'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import React from 'react'; export class ProjectName extends React.Component { static propTypes = { name: PropTypes.any, value: Pr...
The base component for a single application name.
// Dependencies import React from 'react'; import PropTypes from 'prop-types'; import { getDimensions } from '../../lib/device'; // Style import './style.css'; const getResponsiveSrc = (x, src) => { src = src.replace('.jpg', ''); if (x > 1000) return `${src}_c.jpg`; if (x < 380) return `${src}_n.jpg`; return ...
Component missing - image
import React from 'react'; import PropTypes from 'prop-types'; const Icon = props => { return <i className={`fa ${props.className}`} />; }; Icon.propTypes = { className: PropTypes.string.isRequired }; export default Icon;
Exports a default icon for missing missing items.
import DocumentTitle from 'react-document-title'; import Html from './html.react'; import Promise from 'bluebird'; import React from 'react'; import Router from 'react-router'; import config from '../config'; import immutable from 'immutable'; import initialState from '../initialstate'; import routes from '../../client...
Renders a page with a higher order component.
import React from 'react'; import DropdownTrigger from './DropdownTrigger'; import DropdownList from './DropdownList'; import DropdownItem from './DropdownItem'; import dropdownManager from './DropdownManager'; import css from './drop-down.css'; class Dropdown extends React.Component { static defaultProps = { op...
A component that is rendered when a dropdown is expanded.
import React from 'react'; import { render } from 'react-dom'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; render(<HelloWorld />, document.getElementById('react-root'));
Imports a component from a file that has no react - dom.
import React from 'react' import { Route, Switch } from 'react-router-dom' import styled from 'styled-components' import { MeetingsForm, MeetingsList, MeetingsPage } from './Meetings' import { GroupsForm, GroupsList } from './Groups' import ActionButton from './ActionButton' const MeetingsContainer = () => <Conta...
Imports a single by default.
/** * 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 renders a single node in the hierarchy of a React component.
import React, { Component } from 'react'; import { IndexLink } from 'react-router'; import Navbar from 'react-bootstrap/lib/Navbar'; import Nav from 'react-bootstrap/lib/Nav'; import { Image, Row, Col } from 'react-bootstrap'; import Scroll from 'react-scroll'; const Link = Scroll.Link; const Events = Scroll.Events; ...
A component that is a bootstrap - able way of showing a header in a navbar.
import React from 'react'; import Component from '../component'; import {decorate} from '../utils/plugins'; import Notification_ from './notification'; const Notification = decorate(Notification_); export default class Notifications extends Component { template(css) { return (<div className={css('view')}> ...
Notification class for a single notification.
import React from 'react'; import './LabeledKnob.css'; import Knob from './Knob'; const defaultProps = { min: 0, max: 1, step: 'any', }; function LabeledKnob({ label, min, max, step, valueKey, config, onChange, }) { return ( <div> <div className="labeled-knob__label"> {label} ...
Private function to generate a single labeled Knob.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let PlaylistPlay = props => <SvgIcon {...props}> <path d="M19 9H2v2h17V9zm0-4H2v2h17V5zM2 15h13v-2H2v2zm15-2v6l5-3-5-3z" /> </SvgIcon>; PlaylistPlay = pure(PlaylistPlay); PlaylistPlay.muiName = 'SvgIcon'; ...
A component that exports a single node in a hierarchy.
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React from 'react'; // eslint-disable-line no-unused-vars import classNames from 'classnames'; import styles from './Navigation.less'; // eslint-disable-line no-unused-vars import withStyles from '../../decorators/withStyles'; // eslint-di...
A component that renders a navigation navigation menu.
/** * 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. */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; const styled = ([style]) => style .trim() .spli...
The base class for a single missing - user node.
import React from 'react'; import LongDateTime from 'foremanReact/components/common/dates/LongDateTime'; import { translate as __ } from 'foremanReact/common/I18n'; export const dateCellFormmatter = value => ( <LongDateTime seconds date={value} defaultValue={__('N/A')} /> );
export dateCellFormmatter from React
import React from 'react'; import _ from 'lodash'; const CurrentWind = React.createClass({ renderWindspeed(){ return _.isEmpty(this.props.weather.currently.windSpeed) ? '' : `${this.props.weather.currently.windSpeed} mph`; }, render() { const style = { ma...
Demonstration of the CurrentWind class.
import React from 'react'; import { storiesOf } from '@storybook/react'; import IconCard from 'shared/components/iconCard/iconCard'; storiesOf('shared/components/iconCard', module) .add('Default', () => ( <IconCard title="Title" fontAwesomeIcon="FaRoad" /> )) .add('With subText', () => ( ...
Imports the missing components.
'use babel' const forRN = function(name) { return `import React from 'react' import {View, Text} from 'react-native' import styles from './styles.js' export default class ${name} extends React.Component { static propTypes = { } render () { return ( <View style={styles.container}> <Text>${n...
Babel - style for - js
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let ViewModule = props => <SvgIcon {...props}> <path d="M4 11h5V5H4v6zm0 7h5v-6H4v6zm6 0h5v-6h-5v6zm6 0h5v-6h-5v6zm-6-7h5V5h-5v6zm6-6v6h5V5h-5z" /> </SvgIcon>; ViewModule = pure(ViewModule); ViewModule.mui...
A module that exports a sequence of icons.
import React from 'react' import DuckImage from '../assets/Duck.jpg' import './HomeView.scss' export const HomeView = () => ( <div> <h4>Welcome!</h4> <img alt='This is a duck, because Redux!' className='duck' src={DuckImage} /> </div> ) export default HomeView
export a default function to export a object
import React from 'react'; import { makeStyles, withStyles } from '@material-ui/core/styles'; import CircularProgress from '@material-ui/core/CircularProgress'; import LinearProgress from '@material-ui/core/LinearProgress'; const BorderLinearProgress = withStyles((theme) => ({ root: { height: 10, borderRadiu...
The default implementation of the nanomaton bar.
import React from 'react' export default ({ className, style }) => ( <svg width='13' height='14' viewBox='0 0 13 14' xmlns='http://www.w3.org/2000/svg' className={className} style={style}> <g strokeWidth='1' strokeLinecap='round' fill='none'> <path d='M0.5,11.5 C0.5,11.5 4.4593099,11.2023926 6.5,11.2023926...
Missing - sequence feature in SVG
import React, { Component } from 'react'; class LogoutButton extends Component { render() { return ( <button type="button" onClick={this.props.onClick} className="btn btn-warning"> Logout </button> ); } } export default LogoutButton;
A LogoutButton is a component that displays a warning in a browser.
import React from 'react'; import Title from '../Title/index'; import baseStyle from '../../common/Style/baseStyle.css'; // import Paper from 'material-ui/Paper'; import SwipeWrapper from '../../containers/SwipeWrapper/index'; import ProjectCard from '../ProjectCard/index'; const PortfolioSection = (() => <div class...
Imports a single and exports it as a default section.
import React from 'react'; const Link = ({active, children, setVisibilityFilter}) => { if (active) { return <span style={{color:'blue'}}>{children}</span>; } return ( <a href="#" onClick={e => { e.preventDefault(); setVisibilityFilter(); ...
Link to a node in the hierarchy of a node.
import React from 'react' export default class Certificate extends React.Component { render() { let classes = `List__item List__item--${this.props.status}` let buttonText = { 'connected': 'Disconnect', 'disconnected': 'Connect' }[this.props.status] return ( <li className={classes}>...
The certificate component which is rendered by a link to the certificate list.
import React from 'react' import Hero from './hero' export default () => ( <Hero title='FPS Player and Software Engineer'/> )
Imports a single Hero object.
import React from 'react' import { render } from 'react-dom' import { App } from './App' render(<App />, document.getElementById('root')) module.exports = App
Imports a bunch of components from React and react - dom.
import React from 'react'; import TodoActions from '../flux-infra/actions/TodoActions'; import TodoItem from './TodoItem.react'; var ReactPropTypes = React.PropTypes; export default class MainSection extends React.Component { constructor(props) { super(props); } render(){ var allTodos = th...
A component that shows all of the todos in the main section.
/** * Buttons * <Button text={'Server is down'} /> * * React Native Starter App * https://github.com/mcnamee/react-native-starter-app */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Button } from 'react-native-elements'; // Consts and Libs import { AppColors, AppFon...
A component that can be rendered as a button in a custom container.
import React from 'react'; export default function hamMenu1(props) { return ( <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="64px" height="64px" viewBox="0 0 64 64" enableBackground="new 0 0 64 64" xmlSpace="preserve" {...props}> <g tr...
HamMenu1 - HamMenu
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvGames = (props) => ( <SvgIcon {...props}> <path d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z"/> </SvgIcon> ); AvGames = pure(AvGames); AvGames.dis...
A function to export a single missing - missing
import React from 'react' import App from './components/App'; import $ from 'jquery' React.render( <App/>, document.getElementById('app') ); if (typeof window !== 'undefined') { window.React = React; }
Imports React and jQuery components
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import styles from './Edit.css'; export default class Edit extends Component { checkEnter = (e) => { if (e.key === 'Enter') { this.finishEdit(e); } }; finishEdit = (e) => { const value = e.target.value; if (this.p...
A component that displays a dropdown box in the edit box.
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 ...
Create a clearfix component that can be used to hide or hide a block of content.
import React from 'react'; import File from './File'; export default function Image(props) { return <File accept="image/*" {...props} />; }
export Image with no props
// Using inline searchform instead // import React, { Component } from 'react'; // class SearchForm extends Component { // render() { // return ( // <div> // <header className="text-center clearfix"> // <h1>Find Project Ideas or Add an Idea<i className="fa fa-plus-circle float-right" dat...
This module is used to create a searchform for a single sequence of items.
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 dropdown component that is used to toggle or activate a dropdown.
// @flow import React, { Component } from 'react'; import { Animated, StyleSheet, Text, TouchableWithoutFeedback, } from 'react-native'; import LinearGradient from 'react-native-linear-gradient'; import theme from '../../../../theme'; import { lighten, darken } from '../../../../utils/color'; export default c...
A component that displays a now button with a single color.
import React from 'react'; export default class NameOutput extends React.Component { render() { return ( <div> Hello {this.props.name}! </div> ); } }
A component that displays a name in a sequence of strings.
import React, { Component } from 'react'; class BootcampRepositoryConfigurationView extends Component { render () { return <div>Repository configuration</div>; } }; export default BootcampRepositoryConfigurationView;
A component that displays the bootcamp repository configuration.
import React from 'react' import { Tab } from 'shengnian-ui-react' const panes = [ { menuItem: 'Tab 1', render: () => <Tab.Pane attached={false}>Tab 1 Content</Tab.Pane> }, { menuItem: 'Tab 2', render: () => <Tab.Pane attached={false}>Tab 2 Content</Tab.Pane> }, { menuItem: 'Tab 3', render: () => <Tab.Pane attac...
Example of how to display a single in a menu.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageRotateRight = (props) => ( <SvgIcon {...props}> <path d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.7...
A component that renders a component that can rotate right on a left side of a group of nodes.
import React from 'react' import { connect } from 'react-redux' import { Grid, Statistic } from 'semantic-ui-react' import PropTypes from 'prop-types' const Stats = ({ getHello }) => { return ( <Grid columns={2} divided> <Grid.Row> <Grid.Column> <Statistic> <Statistic.Label>Sa...
Imports a single object that represents a sequence of components in a sequence of states.
/** * React Static Boilerplate * https://github.com/kriasoft/react-static-boilerplate * * Copyright © 2015-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'; ...
A static wrapper for the missing - node error message in the top - level hierarchy of a React component.
import React from 'react'; import {render} from 'react-dom'; import {Provider} from 'react-redux'; import {Router} from 'react-router'; import getStore from './store'; // import Layout from './pages'; import routes from './routes'; const App = (props) => { const {store, history, state} = props; // const store = g...
The default app which will render a component with a history and a history store.
import React from 'react'; import Rotate from './rotate'; import calcFill from './fill'; export default ({ fill = null, light = false, disabled = false, direction = 'down', colors = {}, style = {}, ...rest }) => ( <Rotate direction={direction}> {({ style: rotateStyle }) => ( <svg xml...
Default function for generating a single missing - node . js file.
import React from 'react' import shallowCompare from 'react-addons-shallow-compare' import PropTypes from 'prop-types' import { withStyles } from '@material-ui/core/styles' import { RouterDialog } from 'wbui/RouterDialog' import ProSceneContent from './ProSceneContent' const styles = { root: { maxWidth: '100%', ...
The base class for a single critical state.
import React from 'react'; import { parse } from 'react-docgen'; import CodeExample from '../../../components/CodeExample'; import ComponentHeader from '../../../components/ComponentHeader'; import PropTypeDescription from '../../../components/PropTypeDescription'; import Demo from './Demo'; // eslint-disable-next-lin...
export default page
import React from 'react'; import Anchor from '../Anchor'; import PropTable from '../PropTable'; import ReactPlayground from '../ReactPlayground'; import Samples from '../Samples'; export default function DropdownSection() { return ( <div className="bs-docs-section"> <h2 className="page-header"> <...
The default implementation of the non -
/** * Created by KangYe on 2017/4/26. */ import React from 'react'; import {connect} from 'react-redux'; import {Steps, Button, message } from 'antd'; const Step = Steps.Step; import '../css/Steps.css'; import DynamicForm from '../../src/components/DynamicForm'; function mapStateToProps(store) { return { ...
A component that renders a page
import React from 'react'; import PropTypes from 'prop-types'; const Navigation = ({components}) => { return ( <ul className="navigation"> { components.map( name => { return ( <li key={name}> <a href={`#${name}`}>{name}</a> </li> ) }...
export navigation for missing components
import React from 'react' import withApp from '../components/withApp' class Index extends React.Component { static getInitialProps (context) { const { isServer } = context return { isServer } } render () { const { greeting } = this.props return ( <div> <h2>Index page</h2> <h...
The default component for a series of components that can be rendered by a component in a browser.
'use strict'; import React from 'react'; /* eslint no-unused-vars:0 */ import {Route, DefaultRoute, NotFoundRoute} from 'react-router'; import App from './components/App'; import Widget from './components/smart/Widget'; import NotFound from './components/Notfound'; let Routes = ( <Route name="app" path="/" handler=...
export default Routes
import React from 'react'; import { render } from 'react-dom'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; render(<HelloWorld />, document.getElementById('react-root'));
Imports a component from a file that has no react - dom.
import React from 'react'; var CardContent = React.createClass({ render: function() { return <div className="card-content"> {this.props.children} </div>; } }); export default CardContent;
The default card content class
/* Copyright 2015, 2016 OpenMarket Ltd 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 in writing, s...
A component that displays a single critical critical
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionDashboard = (props) => ( <SvgIcon {...props}> <path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"/> </SvgIcon> ); ActionDashboard = pure(ActionDashboard); ActionDashboard.displayName...
A component that renders a single node in a group of nodes.
import $ from 'jquery' import React from 'react'; import gql from 'graphql-tag'; import {graphql} from 'react-apollo'; import moment from 'moment'; import {Link} from 'react-router'; import scrollToElement from 'scroll-to-element'; let Blog = React.createClass({ componentDidMount(){ require('../assets/css/main.c...
Private function to render a single warning in the browser.
/** * List of Recipes for a Meal Container * * React Native Starter App * https://github.com/mcnamee/react-native-starter-app */ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; // Actions import * as RecipeActions from '@redux/recipes/actions'; ...
The base class for a specific non - standard non