code
stringlengths
26
5k
intent
stringlengths
3
2.56k
import React, { Component } from 'react'; import { Modal, Button } from 'react-bootstrap'; export default class Error extends Component { render() { console.log('Erro:' + JSON.stringify(this.props, null, 2)) let erro = 0; let mensagem = 'Erro desconhecido, nenhuma mensagem recebida.'; if (this...
Diese un componente Error
import React from 'react'; import warning from './routerWarning'; import invariant from 'invariant'; import { createRouteFromReactElement as _createRouteFromReactElement } from './RouteUtils'; import { component, components, falsy } from './InternalPropTypes'; var func = React.PropTypes.func; /** * An <IndexRoute> i...
The indexRoute is used to specify its parent s indexRoute.
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; export default class ImageLoader extends React.PureComponent { static propTypes = { alt: PropTypes.string, src: PropTypes.string.isRequired, previewSrc: PropTypes.string, width: PropTypes.number, ...
The ImageLoader class
import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route, IndexRoute, hashHistory, Link, Redirect } from 'react-router'; import App from './components/App'; import Home from './components/Home'; import Article from './components/Article'; import ArticleList from './components/Art...
Imports a single from the router.
import PropTypes from 'prop-types'; import React from 'react'; import classNames from 'classnames'; import createReactClass from 'create-react-class'; const Value = createReactClass({ displayName: 'Value', propTypes: { children: PropTypes.node, disabled: PropTypes.bool, // disabled prop passed to...
Creates a React class that represents a value of a select box.
/* * Copyright (C) 2015 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distribut...
The main function of the sequence.
/* * Copyright (C) Pootle contributors. * * This file is a part of the Pootle project. It is distributed under the GPL3 * or later license. See the LICENSE file for a copy of the license and the * AUTHORS file for copyright and authorship information. */ import assign from 'object-assign'; import React from 'rea...
The main entry point for the password reset action.
import React from 'react'; import PropTypes from 'prop-types'; import { OPERATOR_MODE, USAGE_MODE, TEXT_COPY } from '../Constants'; const Text = (props) => { let text = ''; if (props.operator_mode === OPERATOR_MODE.DISPLAY) { if (props.usage_mode === USAGE_MODE.FREEPLAY) { text = TEXT_COPY.THE_CODE_FOR; ...
The text of a node in a hierarchy is a text that can be displayed in a menu.
import React from 'react'; import Select from '@material-ui/core/Select'; import MenuItem from '@material-ui/core/MenuItem'; class WikiDataFormDropDownMenu extends React.Component { constructor(props) { super(props); this.state = { value: 1 }; } handleChange = event => { this.setState({ [event.targ...
A component that can be used to display a dropdown menu in a dropdown.
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import PropTypes from 'prop-...
Provides a way to render a single missing - node component in a browser.
import PropTypes from 'prop-types' import React from 'react' import clsx from 'clsx' import { navigate } from './utils/constants' class Toolbar extends React.Component { render() { let { localizer: { messages }, label, } = this.props return ( <div className="rbc-toolbar"> <span...
A toolbar for a node with no buttons.
import React from 'react' import ReactDOM from 'react-dom' import {BrowserRouter} from 'react-router-dom' import App from './App' import './index.css' ReactDOM.render( <BrowserRouter> <App/> </BrowserRouter>, document.getElementById('root'));
Imports a single node from the system.
import React from 'react' import { HashRouter, Switch, Route } from 'react-router-dom' import Home from 'routes/Home' import Grape from 'routes/Grape' import Violet from 'routes/Violet' import Brewngo from 'routes/Brewngo' function App() { return ( <HashRouter> <Switch> <Route exact path="/" compon...
The App function
/** * NotFoundPage * * This is the page we show when the user visits a url that doesn't have a route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a necessity for you then you can refactor it...
NotFoundPage - The page we show when the user visits a url that doesn t have a route .
import React, { Component } from 'react'; import { render } from 'react-dom' import { Provider } from 'react-redux' import { createStore } from 'redux' import todoApp from '../../redux/reducers' import CompApp from '../../redux/components/App'; let store = createStore(todoApp) export default class App extends Compone...
The base class for all components that are not part of a component in a component s hierarchy.
import React from 'react'; import PropTypes from 'prop-types'; export function Feature({ className, bgColor, reversed, image, title, excerpt, btnUrl, btnText, }) { return ( <section className={`pt5-l ${className}`} style={{ backgroundColor: bgColor }} > <figure className={`grid pt5-l items-en...
Provides a feature that exports a single object.
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import CommonMark from 'commonmark'; import ReactRenderer from 'commonmark-react-renderer'; import cx from 'classnames'; import css from './Markdown.css'; const parser = new CommonMark.Parser(); const renderer = new ReactRenderer(); export...
Extend Markdown component with common mark and renderer.
import React from 'react'; import PropTypes from 'prop-types'; import styled, { keyframes } from 'styled-components'; const circleFadeDelay = keyframes` 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } `; const Circle = (props) => { const CirclePrimitive = styled.div` width: 100%; heig...
Create a Circle component with a single style.
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import PropTypes from 'prop-...
A component that renders a single missing - node node in the DOM.
import React from 'react'; import PropTypes from 'prop-types'; import Typography from '../Typography'; import styles from './styles.css'; const BREAK_TEXT_LENGTH = 415; function TextImageElement(props) { let textLength = props.children.length; if (typeof props.children !== 'string') { textLength = pro...
Private function for generating a text image element.
import _ from 'lodash'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import { reprocessInteractiveImportItems, updateInteractiveImportItems } from 'Store/Actions/interactiveImportActions'; import { fetchLa...
Creates a component that can be used to display a language modal modal.
/** * React Static Boilerplate * https://github.com/koistya/react-static-boilerplate * Copyright (c) Konstantin Tarkus (@koistya) | MIT license */ import React, { Component } from 'react'; import '../components/Pages/Pages.scss'; import StoryList from '../components/Story/StoryList'; import getStories from '../co...
The base class for a single node
import React from 'react'; import CodeBlock from '../components/CodeBlock'; const compositionCode = `<Validator getValidationMessage={ numberValidator }> <NumberInput /> </Validator> <Validator getValidationMessage={ colorValidator }> <ColorPicker /> </Validator>`; export default class Slide extends React.Compon...
A base class for selecting a single node from a sequence of nodes.
import {Panel} from 'widget/panel/panel' import {RecipeList} from '../recipeList/recipeList' import {activatable} from 'widget/activation/activatable' import {compose} from 'compose' import {connect, select} from 'store' import {msg} from 'translate' import {v4 as uuid} from 'uuid' import {withRecipe} from 'app/home/bo...
Component that handles the select - recipe.
import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import _ from 'lodash'; import Icons from '../icons'; import { colors, boxShadows, ifThemeInPropsIsPresentUse, renderThemeKeyOrDefaultValue, renderThemeIfPresentOrDefault, } from '../styles'; const Button ...
Creates a button that can be rendered by a button on a button.
import React, { Component } from 'react'; export default class SearchBox extends Component { constructor(props) { super(props); this.state = { queryString: '' }; } onSearchQueryStringChanged(event) { } onSubmitted(event) { } render() { return ( <form className="Header-search-box" onS...
The base class for the search box.
import React from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; import Helmet from 'react-helmet'; import { selectCurrentUser, selectCategories, selectModalComponent, selectActiveSection, selectScrolledSection, selectSlideOutMenu } from 'core/App/selectors'; impo...
A component that maps state to props using Helmet.
/* * 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...
This function exports a single missing - node tag with a warning if the tag is missing.
/** * 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 Router from 'react-routi...
Provides a hidden hidden component with a link to a page in the application.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentSave = (props) => ( <SvgIcon {...props}> <path d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"/> </Svg...
A component that exports a single node in a hierarchy.
import React from 'react' import PropTypes from 'prop-types' import styled from 'styled-components' import { FormattedMessage } from 'react-intl' import { withFieldApi } from 'informed' import { Box, Flex } from 'rebass/styled-components' import { Form, RadioGroup } from 'components/Form' import ZapLogo from 'component...
A component that can be used to create a connection type.
import _extends from 'babel-runtime/helpers/extends'; import _typeof from 'babel-runtime/helpers/typeof'; import _defineProperty from 'babel-runtime/helpers/defineProperty'; import React from 'react'; import classNames from 'classnames'; var Marks = function Marks(_ref) { var className = _ref.className, vertic...
Creates a Marks component that can be used to mark a node.
import React from 'react' import { observer } from 'mobx-react' import moment from 'moment' const TransactionListItem = observer(props => { const tx = props.wallet.tx.get(props.search.tx[props.index]) return ( <div className={ 'list-item' + (props.index % 2 === 0 ? ' even' : '') + ...
React TransactionListItem
import React from 'react'; import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/styles'; import Grid from '@material-ui/core/Grid'; import Paper from '@material-ui/core/Paper'; import Typography from '@material-ui/core/Typography'; import { grey } from '@...
A component that renders a single node in a hierarchy that has a single repository.
import React from 'react'; import styled from 'styled-components'; const FrameHolder = styled.div` position: relative; width: 100%; &::after { content: ""; padding-bottom: 56.25%; display: block; width: 100%; } `; const IFrameComponent = styled.iframe` display: blo...
export default component
import React from 'react'; import {join} from "path"; import {RootContainer} from "react-server"; import Repo from "../lib/repo"; import DocTitle from "../components/page-title"; import DocBody from "../components/doc-body"; import DocContents from "../components/doc-contents"; import DataBundleCacheManager from '../m...
The default page implementation of a sequence of React components.
import React from 'react' class DragHandle extends React.Component { render() { return ( <div className="ReactSortableItemGroups__draghandle"> <svg className="ReactSortableItemGroups__draghandle-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 220" enable-background="new 0 0 100 220"> ...
DragHandle is a special component that can be rendered in a group of items.
import React, { Component } from 'react'; import gql from 'graphql-tag'; import { graphql } from 'react-apollo'; import { Link, hashHistory } from 'react-router'; import {Dropdown, NavItem, Button, Icon} from 'react-materialize' //queries class ComponentName extends Component { render(){ if(this.props.dat...
Demonstrate how to render a single component without having to load it from a database.
import React from 'react' import styles from './styles.module.scss' import content from './footer.json' export default function Footer() { return ( <footer className={styles.wrapper}> <h2 style={{ textAlign: 'center' }}>{content.content}</h2> </footer> ) }
The footer for the
import React, { Component } from 'react'; import { findDOMNode } from 'react-dom'; import PureRenderMixin from 'react-addons-pure-render-mixin'; import Ladda from 'ladda'; const laddaOptions = { buttonStyle: 'data-style', buttonColor: 'data-color', buttonSize: 'data-size', spinnerSize: 'data-spinner-size', s...
The component that will be rendered when the button is rendered.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageFilterBAndW = (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-2zm0 16l-7-8v8H5l7-8V5h7v14z"/> </SvgIcon> ); ImageFilterBAndW = pure(Im...
A filter that creates a component
import React from 'react'; const Emphasis = ({children}) => ( <em> {children} </em> ); export default Emphasis;
Create a default Emphasis function that exports a to a default function.
import React from 'react'; import PropTypes from 'prop-types'; import UpArrow from 'interface/icons/UpArrow'; import ISSUE_IMPORTANCE from 'parser/core/ISSUE_IMPORTANCE'; import Icon from 'common/Icon'; function getIssueImportance(importance) { switch (importance) { case ISSUE_IMPORTANCE.MAJOR: return <...
Generates a suggestion for a single node in a tree.
import map from 'lodash/map'; import isString from 'lodash/isString'; import { errorLog } from 'src/util/debugUtil'; import React, { Component } from 'react'; import Moment from 'react-moment'; import { Alert, Button, Panel } from 'react-bootstrap'; import Flexbox from 'flexbox-react'; const nItemsPerPage = 20; ...
DebugPage class which renders a page of debug errors.
import React from 'react'; import ReactDOM from 'react-dom'; import DeployToPortal from './src/deploy-to-portal'; export const documentActions = [ { label: 'Deploy to Dev Portal', hideAfterClick: true, action(context, spec) { const root = document.createElement('div'); ReactDOM.render( ...
Add action to deploy to Dev Portal
'use strict'; import React from 'react'; import PropTypes from 'prop-types'; import {bindActionCreators} from 'redux'; import {connect} from 'react-redux'; import {withCookies, Cookies} from 'react-cookie'; import {disableCookieWarning} from '../actions/cookieActions'; import {setCurrentLanguage} from '../actions/l...
A component that handles cookies when a state changes.
import React from 'react'; import SubHeader from './SubHeader'; import styles from './style'; import logoURL from './images/react-logo.svg'; const Header = () => { return <header className={styles.main}> <img className={styles.logo} src={logoURL} height="125"/> <div className={styles.wrap}> <h1 classN...
Diese Methode dalen Bloquee
import React from 'react'; import { Component } from 'react'; export default class App extends Component { render() { return ( <div>{this.props.children}</div> ); } }
The base class for all components that are not part of a component s children.
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NavigationArrowForward = (props) => ( <SvgIcon {...props}> <path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/> </SvgIcon> ); NavigationArrowForward = pure(NavigationArrowForward); Navigation...
A function to export a navigation arrow forward to a node in a hierarchy.
import React from 'react' import wrap from './minimalHalJsonVuex.js' import createI18n from './i18n.js' import documents from './documents/index.js' import { pdf } from '@react-pdf/renderer' export default { React, wrap, createI18n, pdf, documents }
export React ReactComponent
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorFormatColorText = (props) => ( <SvgIcon {...props}> <path fillOpacity=".36" d="M0 20h24v4H0z"/><path d="M11 3L5.5 17h2.25l1.12-3h6.25l1.12 3h2.25L13 3h-2zm-1.38 9L12 5.67 14.38 12H9.62z"/> </SvgIcon> );...
A component that renders a color - label in a series of icons.
/* © 2017 * @author Tu Nguyen */ import React, { Component } from 'react'; import PropTypes from 'proptypes'; import { Container } from 'flux/utils'; import { withTracker } from 'meteor/react-meteor-data'; import { Songs } from '../collections'; import AppStore from '../events/AppStore'; import SongList from './Song...
The tab - song component
/** * @Author: Jumorzhu * @Date: 2017-01-06 * @Email: 550928460@qq.com * @Last modified by: Jumorzhu * @Last modified time: 2017-01-14 */ require('normalize.css/normalize.css'); require('styles/App.scss'); import React from 'react'; class MeteorComponent extends React.Component{ constructor(props){ super(p...
A component that draws a random meteor on a canvas.
/** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import PropTypes from 'prop-types'; import React from 'react'; import classNames from 'classnames'; import { settings } from 'carbon-componen...
Generate a single missing - node tag with
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import MainSection from '../components/MainSection'; import * as EqualizerActions from '../actions/equalizer'; @connect( state => ({ equalizer: st...
The base class for all components that implement a single action.
/** * 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 { redTransparent, yellowTransparent } from '../styles'; const _preStyle = { display: 'b...
Generates a code block with dangerously setInnerHTML.
import React from 'react' import { config } from 'config' import { rhythm } from 'utils/typography' const OpenSource = ({ projects }) => { return ( <div> <h2>Open source </h2> <ul style={{ listStyle: 'none', margin: 0 }}> {projects.map(project => { return ( <li key={proj...
Imports a single node in the hierarchy.
import React from 'react'; import Button from 'material-ui/Button'; const ReUploadButton = (props) => { return props.dragDisabled ? ( <Button raised className="KeystoreUploader-button-reupload" onClick={props.enableDrag}> Reupload </Button> ): null; }; const UnlockButton = (prop...
The button that is used to upload a file to the server.
import 'babel-polyfill' import path from 'path' import { Server } from 'http' import Express from 'express' // eslint-disable-line import React from 'react' import { renderToString } from 'react-dom/server' import { match, RouterContext } from 'react-router' import { createStore } from 'redux' import { Provider } from...
The main logic for the middleware chain.
import React from 'react'; import PropTypes from 'prop-types'; import { withModules } from '../Modules'; import { stripesShape } from '../../Stripes'; import { ModuleHierarchyProvider } from '../ModuleHierarchy'; import { getEventHandlers } from '../../handlerService'; class HandlerManager extends React.Component { ...
The HandlerManager class is used to manage a series of components that are registered with a module hierarchy.
import React from 'react'; import Row from 'Row'; import Col from 'Col'; import ReactPlayground from './ReactPlayground'; import PropTable from './PropTable'; import Samples from './Samples'; import CollectionCode from '!raw-loader!Collection'; import CollectionItemCode from '!raw-loader!CollectionItem'; import collec...
Imports all non - standard non
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentSort = (props) => ( <SvgIcon {...props}> <path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"/> </SvgIcon> ); ContentSort = pure(ContentSort); ContentSort.displayName = 'ContentSort'; ContentSort.mui...
A component that exports a single node in a group of nodes.
import React from 'react'; import Home from '../routes/Home'; import Details from '../routes/Details'; import Profile from '../routes/Profile'; import SignIn from '../routes/SignIn'; export const routes = { getHomeRoute() { return { renderScene(navigator) { return <Home navigator={navigator} />; ...
export routes for all modules
/* eslint-disable */ import React, { Component } from 'react'; import TopNavBar from '../container/topNavBar'; import HomePage from '../pages/homePage'; import SideMenu from './sideMenu'; import LoginPage from '../pages/loginPage'; import $ from 'jquery'; import autoBind from '../hoc/autoBind'; class App extends Com...
Component class for a single node in the DOM.
import React from 'react'; import PropTypes from 'prop-types'; import scheduleIdleTask from '../features/ui/util/schedule_idle_task'; import getRectFromEntry from '../features/ui/util/get_rect_from_entry'; // Diff these props in the "unrendered" state const updateOnPropsForUnrendered = ['id', 'index', 'listLength', 'c...
The base class for all intersection observers.
import React from 'react' import Prompt from '../components/Prompt' const PromptContainer = React.createClass({ contextTypes: { router: React.PropTypes.object.isRequired }, getInitialState () { return { username: '' } }, handleUpdateUser (e) { this.setState({ username: e.target.va...
Create a container which can be used to render a confirmation dialog.
import React from 'react'; import { View, Text, TouchableWithoutFeedback, } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; import Collapsible from 'react-native-collapsible'; import Styles from '../styles/Styles'; import Color from '../styles/Color'; export default React.createC...
The default implementation of Sequence which renders a single sequence of nodes with no children.
import React from 'react'; import { Link } from 'react-router'; export default class NodeJS extends React.Component { render(){ return ( <div className="container"> <p className="lead">NodeJS</p> <p>NodeJS is the platform to run javascript on Google's V8 engine.</p> </div> ) } }
The default component for NodeJS.
import React from 'react' import PropTypes from 'prop-types' import { IconButton } from '@material-ui/core' import shallowCompare from 'react-addons-shallow-compare' import { withStyles } from '@material-ui/core/styles' import classNames from 'classnames' import ThemeTools from 'wbui/Themes/ThemeTools' import UISetting...
Renders the icons for a given type of node.
/* global window document */ import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter as Router } from 'react-router-dom'; import App from './components/App'; export default class AppClient extends Component { render() { return ( <Router> <App /> </R...
The main app client.
/** * External Dependencies */ import React from 'react' import PropTypes from 'prop-types' import { omit } from 'lodash' /** * Internal Dependencies */ import Icon from 'client/components/icon' export default class DrawerItem extends React.Component { static propTypes = { name: PropTypes.string } rend...
A component that renders a single
//// [jsxLibraryManagedAttributesUnusedGeneric.tsx] // @ts-ignore import React from 'react' declare const jsx: typeof React.createElement namespace jsx { export namespace JSX { export interface Element {} export interface ElementClass {} export interface ElementAttributesProperty {} ...
Create an object that inherits from a managed attribute.
import React from 'react'; import styled from 'styled-components'; import Field from '../Field'; import { FileButton as Select, FileInput } from '../FieldBox'; import Icon from '../../Icon/Icon'; import PropProvider from '../FieldPropProvider'; import { fieldFile as propTypes } from '../../../helpers/propTypes'; const...
Component that renders a single missing missing file.
import React, { Component } from 'react'; import Header from './components/home/header/Header'; import ValueProps from './components/home/ValueProps'; import CommunityResponse from './components/home/CommunityResponse'; import AdminInterface from './components/home/AdminInterface'; import ValueProps2 from './component...
Imports a single component into a HomePage class.
/** * * AttributeRow * */ import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { capitalize, get, has } from 'lodash'; import PopUpWarning from 'components/PopUpWarning'; import IcoContainer from 'components/IcoContainer'; import IcoBoolean from '.....
A component that renders a single missing key in a row of a model.
import React from 'react'; import FlatButton from 'material-ui/FlatButton'; import Popover from 'material-ui/Popover'; import Menu from 'material-ui/Menu'; import { Link } from 'react-router-dom' import Dropdown from './Dropdown' const css = require("./Header.scss"); import MuiThemeProvider from 'material-ui/styles/Mu...
A component that displays a header on a menu or a dropdown.
import React, { Component } from 'react'; import SearchBar from '../containers/search_bar'; import WeatherList from '../containers/weather_list'; export default class App extends Component { render() { return ( <div> <SearchBar /> <WeatherList /> </div> ); } }
The default implementation of a component that
import React, { Component } from 'react'; import Search from './Search'; import NavbarComponent from './NavbarComponent'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import Actions from '../../DataStore/Actions'; import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider...
React component that can be used to render a single action on a single state
import React from 'react' import h from "lib/ui/hyperscript_with_helpers" const SocketEditable = Cell => class extends Cell { _classNames(){ return super._classNames().concat([ (this.props.socketUserEditingEntryVal ? "socket-editing-entry-val" : "") ]) } _renderCellContents(){ return super._r...
A cell that is rendered when a user enters a socket - editing - entry - val property.
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { getPreview } from '../services/api'; import Loader from '../components/Loader'; class PreviewContainer extends Component { constructor(props) { super(props); this.state = { loading: true, error: false, ...
A component that renders the content of a node in a preview.
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdDvr(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M42 6c2.21 0 4 1.79 4 4l-.02 24c0 2.21-1.77 4-3.98 4H32v4H16v-4H6c-2.21 0-4-1.79-4-4V10c0-2.21 1.79-4 4-4h36zm0 28V10H6v24h36zm-4-18H16v4h22v-4zm0 8H16v4...
Dvr - related function for missing icons
import React, { Component } from 'react'; import s from './Home.css'; import Link from '../../components/Link'; class PropCard extends Component { constructor(props) { super(props); this.state = { }; } numberWithCommas(x) { if (x != undefined) return x.toString().replace(/\B(?=(\d{3})+(?!...
A component that can be used to display a series of non - zero non
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import {Router, browserHistory } from 'react-router'; import rootReducer from './reducers'; import routes from './routes'; import promise from 'redux-promise'; impo...
Imports a single unhandled object.
import React, { Component } from 'react'; import {root} from 'baobab-react/decorators'; import tree from './state'; import Router from './Router'; @root(tree) export default class App extends Component { render() { return ( <Router /> ); } }
The base class for all components that are not part of a React component.
/** * * This component is the skeleton around the actual pages, and should only * contain code that should be seen on all pages. (e.g. navigation bar) * */ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { createStructuredSelector } from 'reselect'; imp...
A component that can be rendered on all pages.
import React from 'react' import _ from 'lodash' const Error = ({error='Some error'}) => { return ( <div style={{height: '100%', background: '#D8000C'}}> <pre>{error.toString ? error.toString() : error}</pre> </div> ) } export default Error
The default error class for missing missing node - js errors.
/** * 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...
Provides a generic component that can be used to render a single missing component in a browser.
/* * FeaturePage * * List all the features */ import React from 'react'; import Helmet from 'react-helmet'; import { FormattedMessage } from 'react-intl'; import H1 from 'components/H1'; import messages from './messages'; import List from './List'; import ListItem from './ListItem'; import ListItemTitle from './Li...
Provides a function to render a single feature page.
import React from 'react' import { Card } from 'stardust' const HeaderCards = () => ( <Card.Group> <Card> <Card.Content> <Card.Header>Matthew Harris</Card.Header> <Card.Meta>Co-Worker</Card.Meta> <Card.Description>Matthew is a pianist living in Nashville.</Card.Description> </...
Imports the header - based
import App from 'next/app' import React from 'react' import { setState } from '../shared-module' setState(typeof window === 'undefined' ? 'UPDATED' : 'UPDATED CLIENT') class Layout extends React.Component { state = { random: false, } componentDidMount() { this.setState({ random: Math.random() }) } ...
The default component that is rendered when a component is rendered.
'use strict'; import React from 'react'; import PropTypes from 'prop-types'; import TreeNode from './node'; import defaultDecorators from './decorators'; import defaultTheme from '../themes/default'; import defaultAnimations from '../themes/animations'; class TreeBeard extends React.Component { render() { ...
A component that renders a tree with a single node.
import React from 'react' import PropTypes from 'prop-types' import serialize from 'serialize-javascript' import config from 'config' /* eslint-disable react/no-danger */ class Html extends React.Component { static propTypes = { title: PropTypes.string.isRequired, description: PropTypes.string.isRequired, ...
A component that renders a single missing - node warning warning
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageBurstMode = (props) => ( <SvgIcon {...props}> <path d="M1 5h2v14H1zm4 0h2v14H5zm17 0H10c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zM11 17l2.5-3.15L15.29 16l2.5-3.22L21 17H11z"/...
A component that renders a sequence of images in a sequence of icons.
import React from 'react'; import domUtils from './utils/domUtils'; import EventListener from './utils/EventListener'; // TODO: Merge this logic with dropdown logic once #526 is done. // TODO: Consider using an ES6 symbol here, once we use babel-runtime. const CLICK_WAS_INSIDE = '__click_was_inside'; function suppre...
A component that wraps a React component to handle the root close event on document click.
import Component from 'react-pure-render/component'; import Helmet from 'react-helmet'; import Locales from './Locales.react'; import React from 'react'; import linksMessages from '../../common/app/linksMessages'; import { FormattedDate, FormattedMessage, FormattedNumber, FormattedRelative, defineMessages } f...
export a single - component component with a single - component Helmet object
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { asyncConnect } from 'redux-connect'; import { isLoaded as isCollLoaded, getBookmarkCount, load as loadColl, search } from 'store/modules/collection'; import { clear, multiSelect, selectBookmark, selectPage } from 'store/modules/insp...
The base component for a collection of objects.
// // Component edit group form // import React from 'react'; import GroupName from 'containers/EditGroup/Form/GroupName'; import GroupRights from 'containers/EditGroup/Form/GroupRights'; import Users from 'containers/EditGroup/Form/Users'; import Buttons from 'containers/EditGroup/Form/Buttons'; /* eslint-disable re...
Component that renders a single group edit form.
import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import Icon from 'mastodon/components/icon'; export default class ClearColumnButton extends React.PureComponent { static propTypes = { onClick: PropTypes.func.isRequired, }; render () { return ...
A button that clears the column header when a user clicks on a confirmation button.
import React from 'react'; import styles from './styles.css'; const PlaceListItem = (props) => ( <div className="card col-sm-6"> <img className="card-img-top img-responsive" src={props.place.th} alt="Card" /> <div className={styles.cardblock}> <h4 className="card-title"> {`${props.place.as || '...
A component that displays a list of nodes that are missing a place.
'use strict'; import React from 'react'; import ItemTypes from './ItemTypes'; import { DragDropMixin } from 'react-dnd'; const itemDropTarget = { acceptDrop(component, item) { window.alert('You dropped ' + item.name + '!'); } }; const style = { height: '12rem', width: '12rem', color: 'white', padding...
Dustbin is a component that can be used to drop an item in a drop container.