code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
import PropTypes from 'prop-types';
import { PostBody } from '../../components/PostBody';
const BlogPostPreview = ({ entry, widgetFor }) => (
<PostBody
isPreview
html={widgetFor('body')}
title={entry.getIn(['data', 'title'])}
type="post"
hero={entry.getIn(['data', 'hero'])}
auth... | A blog post preview that displays a post with a specific type. |
import React from 'react';
const Spinner = ({}) => {
return (
<div className="spinner">
<div className="bounce1"></div>
<div className="bounce2"></div>
<div className="bounce3"></div>
</div>
);
}
export default Spinner;
| The default Spinner function. |
import React from 'react';
import { Provider } from 'react-redux';
import { IntlProvider } from 'react-intl';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import en from 'mastodon/locales/en.json';
import configureStore from 'mastodon/store/configureStore';
import { h... | Imports a bunch of components from a module. |
import React from 'react'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
const Types = () => {
return (
<ExampleSection title='Types'>
<ComponentExample
title='Types'
description=... | export default Types |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCropOriginal = (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 16H5V5h14v14zm-5.04-6.71l-2.75 3.54-1.96-2.36L6.5 17h11l-3.54-4.71z"... | A component that exports a component that can be used to crop an image. |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z" /></g>
, 'ModeEdit');
| Create a series of icons for a single node in a group of icons. |
import React from 'react';
import IconMenu from 'material-ui/IconMenu';
import MenuItem from 'material-ui/MenuItem';
import IconButton from 'material-ui/IconButton';
import MoreVertIcon from 'material-ui/svg-icons/navigation/more-vert';
/**
* Simple Icon Menus demonstrating some of the layouts possible using the `anc... | Icon Menus demonstrating some of the layouts possible using the anchorOrigin and targetOrigin properties. |
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './layout/App';
import ImdbPage from './pages/ImdbPage.js';
import NotFoundPage from './pages/NotFoundPage.js';
export default (
<Route path="/" component={App}>
<IndexRoute component={ImdbPage} />
<Route path="*" c... | export default route |
import React from 'react'
import { render } from 'react-dom'
import CandidateEvents from './components/candidate-events'
render(<CandidateEvents />, document.getElementById('app'))
| Imports a component and renders it as a CandidateEvents element. |
import React, { Component } from 'react';
import { Link } from 'react-router'
class App extends Component {
render() {
return (
<div>
<div className="ui secondary pointing menu">
<Link to="/" className="item">首页</Link>
<Link to="/... | Create a new component with unique attributes. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationCancel = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7... | A component that exports a navigation cancel navigation to a component that can be used to cancel the navigation. |
import React from 'react';
import PropTypes from 'prop-types';
const SearchColumns = ({ columns, query, onChange, classNames }) => {
const onQueryChange = (event) => {
onChange({
...query,
[event.target.name]: event.target.value
});
};
return (
<tr>
{columns.map((column, i) => (
... | The columns that are used in the search engine are required to have a single column with a single filter. |
// @flow
import React from 'react';
import withRoot from 'docs/src/modules/components/withRoot';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import markdown from 'docs/src/pages/discover-more/showcase.md';
function Page() {
return <MarkdownDocs markdown={markdown} />;
}
export default with... | A helper to create a page with a single node. |
import React from 'react';
class Assignments extends React.Component {
render () {
return (
<div>
<h3>Assignments</h3>
{this.props.children || <p>Choose an assignment from the sidebar.</p>}
</div>
);
}
}
export default Assignments;
| A component that can be rendered by a component |
/**
* Copyright 2017 Yuichiro Tsuchiya
*
* 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 agr... | Generates a single missing - check - group element with a hidden input that is not checked. |
/**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import glob from 'glob'
import { join, dirname } from 'path'
import React from 'react'
import ReactDOM from 'react-dom/server'
import Html from '../components/Html'
imp... | React Static Boilerplate |
import React from 'react'
import {TextBox} from 'react-uwp'
const Component = props => <TextBox {...props} style={{
margin: '10px 0',
width: '100%'
}} />
export default Component
| A component that can be used to display a sequence of items in a text box. |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { ThemeProvider as StyledThemeProvider } from 'styled-components';
import { PersistGate } from 'redux-persist/integration/react';
import { ConnectedRouter } from 'connected-react-router';
import { configureStore,... | Imports a single node in the DOM. |
/*
* Copyright (C) 2010 - 2020 VREM Software Development <VREMSoftwareDevelopment@gmail.com>
*
* 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: //w... | MISSING - A FUNCTIONS - A FUNCTIONS - A FUNCTIONS - A FUNCTIONS - B |
import React, { Component } from 'react';
import SelectField from 'material-ui/lib/select-field';
import MenuItem from 'material-ui/lib/menus/menu-item';
import { ipcRenderer } from 'electron';
export default class PlaylistSelector extends Component {
constructor(props) {
super(props);
... | The PlaylistSelector class |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class unison extends Component {
render() {
return (
<View style={styles.container}>
... | The base class for a single missing - node node that is not a component of a component type. |
import React from 'react'
import { Dropdown } from 'shengnian-ui-react'
const options = [
{ key: 1, text: 'One', value: 1 },
{ key: 2, text: 'Two', value: 2 },
{ key: 3, text: 'Three', value: 3 },
]
const DropdownExampleUpwardSelection = () => (
<Dropdown upward search selection options={options} placeholder=... | Example of how to select a specific node in a hierarchy. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceGpsNotFixed = (props) => (
<SvgIcon {...props}>
<path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7... | Devuelte un objeto DeviceGpsNotFixed |
import React from 'react'
import AutoResponsive from 'autoresponsive-react'
const autoresponsiveProps = {
itemMargin: 10,
horizontalDirection: 'left',
verticalDirection: 'top',
containerHeight: null,
containerWidth: null,
itemClassName: 'item',
transitionDuration: '.8',
transitionTimingFunction: 'easeI... | Imports a component with a series of items that can be selected in a container. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import Helmet from 'react-helmet';
import { IndexLink } from 'react-router';
import { usage, todo } from './styles';
import { example, p, link } from '../homepage/styles';
import { setConfig } from '../../actions';
class Usage extends Com... | The base component for all usage - related components. |
/**
* @fileOverview The Create Post component.
*/
import React from 'react';
export default class CreatePost extends React.Component {
render() {
return (
<div>
<textarea rows='1' cols='50' placeholder='Type your post title here' onChange={this.props.updatePostTitle}></textarea>
<textare... | The Create Post component which creates a post if it doesn t already exist. |
import React from 'react'
import Button from 'material-ui/Button'
export default ({
onBack,
onNext
}) =>
<div
className={'flex flex-row justify-end mt3'}
>
<Button
onClick={onBack}
children={'BACK'}
/>
<Button
variant={'raised'}
color={'primary'}
onClick={onNext}
... | A component that renders a single on a button. |
import React from 'react';
class Dashboard extends React.Component {
render () {
return (
<div>
<h3>Course Dashboard</h3>
</div>
);
}
}
export default Dashboard;
| The Dashboard class. |
import classnames from 'classnames';
import evalDependsOn from '../utils/evalDependsOn.js';
import React from 'react';
import { findDOMNode } from 'react-dom';
import { FormField, FormInput, FormNote } from '../../admin/client/App/elemental';
import blacklist from 'blacklist';
import CollapsedFieldLabel from '../compon... | The default implementation of a component that creates a nested field. |
import React, { Component } from 'react';
import GenericWidget from './helpers/GenericWidget';
import './WindWidget.css';
class WindWidget extends Component {
render() {
return (
<GenericWidget class="WindWidget"
isOn={this.props.speed > 0}
value1={this.props.direction}
value... | A component that can be rendered in a way that is not part of a widget. |
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 pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilterCenterFocus = (props) => (
<SvgIcon {...props}>
<path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 9... | A component that |
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import AnimationCounter from './AnimationCounter';
const styles = {
container: {
position: 'relative',
width: '100%',
height: '100%',
},
badge: {
WebkitTransition: 'all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms',
Mo... | Component that displays a warning when a count of nodes is reached. |
import React from 'react';
import GroupSelector from './GroupSelector';
export default {
title: 'admin/settings/GroupSelector',
component: GroupSelector,
};
export const _default = () => <GroupSelector />;
| export default component |
/**
* ErrorMessage module.
* @module @massds/mayflower-react/ErrorMessage
* @requires module:@massds/mayflower-assets/scss/01-atoms/error-msg
* @requires module:@massds/mayflower-assets/scss/01-atoms/svg-icons
* @requires module:@massds/mayflower-assets/scss/01-atoms/svg-loc-icons
*/
import React from 'react';
im... | Renders error message for a single node in order to display a single node in a group of nodes. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesKitchen = (props) => (
<SvgIcon {...props}>
<path d="M18 2.01L6 2c-1.1 0-2 .89-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.11-.9-1.99-2-1.99zM18 20H6v-9.02h12V20zm0-11H6V4h12v5zM8 5h2v3H8zm0 7h2v5H8z"/>
... | A component that exports a sequence of icons that can be used to render a sequence of icons. |
import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import { formatPercentage } from 'common/format';
import Analyzer from 'parser/core/Analyzer';
import StatisticBox, { STATISTIC_ORDER } from 'interface/others/StatisticBox';
class Flametongue extends Analyzer {
... | Flametongue is a class that displays the most frequent uptime of the user. |
import React from 'react';
import Row from '../../src/Row';
import Col from '../../src/Col';
import ReactPlayground from './ReactPlayground';
import PropTable from './PropTable';
import store from './store';
import Samples from './Samples';
import tab from '../../examples/Tab';
class TabsPage extends React.Component {... | Package that exports a single page of a tabs component. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatStrikethrough = (props) => (
<SvgIcon {...props}>
<path d="M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"/>
</SvgIcon>
);
EditorFormatStrikethrough = pure(EditorFormatStrikethrough);
Edit... | A function to export a single node in a sequence of components. |
import React from 'react';
import { withRouter } from 'react-router-dom';
import { Dropdown } from 'semantic-ui-react';
import TextIcon from '../../components/TextIcon/TextIcon';
import routes from '../../routes';
const DROPDOWN_MENU = [
{ icon: 'edit', title: 'Editor', to: process.env.PUBLIC_URL + '/' },
{ icon: ... | export default page selector |
import React from 'react';
import PropTypes from 'prop-types';
import UpArrow from 'Icons/UpArrow';
import ISSUE_IMPORTANCE from 'Parser/Core/ISSUE_IMPORTANCE';
import Icon from 'common/Icon';
import Wrapper from 'common/Wrapper';
function getIssueImportance(importance) {
switch (importance) {
case ISSUE_IMPO... | Generates a single - component error message for a single node. |
import React from 'react';
import PropTypes from 'prop-types';
import Link from 'react-router/lib/Link';
const ColumnLink = ({ icon, text, to, href, method, hideOnMobile }) => {
if (href) {
return (
<a href={href} className={`column-link ${hideOnMobile ? 'hidden-on-mobile' : ''}`} data-method={method}>
... | A column link that links to a column in a tree. |
/**
* 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';
const title = 'Setting';
e... | Provides a function to create a new Kit object. |
import React from 'react';
import TodoForm from './todoForm';
export default function() {
return (
<div>
<h3>TODO List</h3>
<TodoForm />
</div>
);
}
| export default function |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCamera = (props) => (
<SvgIcon {...props}>
<path d="M9.4 10.5l4.77-8.26C13.47 2.09 12.75 2 12 2c-2.4 0-4.6.85-6.32 2.25l3.66 6.35.06-.1zM21.54 9c-.92-2.92-3.15-5.26-6-6.34L11.88 9h9.66zm.26 1h-7.49l.29.5 4... | A component that exports a component that displays a camera on the top of a series of icons. |
import React from 'react';
import {Route, Switch} from 'react-router';
import {
App,
NotFound,
UserPage,
RepoPage,
HomePage
} from 'containers';
export default () => {
const routes = (
<Switch>
<Route exact path="/" component={HomePage} />
<Route path="/:login" component={UserPage} />
... | Imports the missing routes from the system. |
import React from 'react';
import {useDeps} from 'react-simple-di';
import {composeAll, withTracker} from 'react-komposer-plus';
import Register from '../../components/users/register';
export default composeAll(
useDeps()
)(Register);
| Imports a single component from React and combines it with a register. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationPhoneMissed = (props) => (
<SvgIcon {...props}>
<path d="M6.5 5.5L12 11l7-7-1-1-6 6-4.5-4.5H11V3H5v6h1.5V5.5zm17.21 11.17C20.66 13.78 16.54 12 12 12 7.46 12 3.34 13.78.29 16.67c-.18.18-.29.43-.29.71... | Missing NotificationPhoneMissed component |
import React from 'react'
import { Link } from 'react-router'
import { connect } from 'react-redux'
import { hideWindow } from '../nw/Window'
import './Navbar.scss'
class Navbar extends React.Component {
render() {
const icon = (this.props.status === 'ONLINE') ? 'signal' : 'flash'
const iconClass = 'glyphic... | A component that opens a window in a network network with a navigating navigation. |
/**
* 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 function to render a single missing - node node in the hierarchy of React components. |
import React from 'react';
import PropTypes from 'prop-types';
import css from './example.module.scss';
function Example({children, titleId} = {}) {
return (
<div className={css.el}>
{children}
</div>
);
}
function DoubleSection({children}) {
return <div className={css.doubleS... | export default missing - node |
/**
* 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 neccessity for you then you can refactor i... | NotFoundPage - The page we show when the user visits a url that doesn t have a route missing exception. |
import React, { Component } from 'react';
import AppBar from 'react-toolbox/lib/app_bar';
export default class Header extends Component {
render() {
return (
<AppBar fixed flat>
<span>Reddit Gallery</span>
</AppBar>
)
}
}
| The header class for a single node. |
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 ... | Creates a radio with a label and a radio input. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationPhoneLocked = (props) => (
<SvgIcon {...props}>
<path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5... | NotificationPhoneLocked is a special component that can be used to show a notification phone locked icon. |
import React, { Component } from 'react';
import PricingTable from '../sales/pricing-table';
import SocialMediaBar from '../sales/social-media-bar';
import Rotator from '../sales/rotator';
const bronzeFeatures = ['Really cool', 'Pretty cheap', 'Awesome'];
const silverFeatures = ['A couple features', 'Pretty neat'];
c... | The base class for all components that are not part of a component s hierarchy. |
/**
* The external dependencies.
*/
import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { withHandlers } from 'recompose';
/**
* The internal dependencies.
*/
import { preventDefault } from 'lib/helpers';
/**
* Render an item that can be associated.
*
* @param {O... | Renders a single node that can be associated with a component. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let Transform = props =>
<SvgIcon {...props}>
<path d="M22 18v-2H8V4h2L7 1 4 4h2v2H2v2h4v8c0 1.1.9 2 2 2h8v2h-2l3 3 3-3h-2v-2h4zM10 8h6v6h2V8c0-1.1-.9-2-2-2h-6v2z" />
</SvgIcon>;
Transform = pure(Transform... | A component that renders a single node in a group of nodes that are not part of a component. |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdStayCurrentLandscape(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M2.02 14c0-2.21 1.77-4 3.98-4h36c2.21 0 4 1.79 4 4v20c0 2.21-1.79 4-4 4H6c-2.21 0-4-1.79-4-4l.02-20zM38 14H10v20h28V14z" />
</IconBa... | Manages the current landscape state of a node. |
import React from 'react'
import PropTypes from 'prop-types'
import {Link} from 'next-url-prettifier'
import {Router} from '../routes'
export default class GreetingPage extends React.Component {
static getInitialProps ({query: {lang, name}}) {
return {lang, name}
}
renderSwitchLanguageLink () {
const {l... | A page that renders a single node in a language specific fashion. |
import React from 'react'
import { Block, Row } from 'jsxstyle'
import { DARK_GRAY } from '../Theme'
import LogoImage from '../logo.png'
const Logo = ({ size = 230, shadow = true }) => (
<Row
background={DARK_GRAY}
width={size+'px'}
height={size+'px'}
alignItems="center"
justifyContent="center"
... | Imports a single from React. |
// Dependencies
import React from 'react';
import { Route, Switch } from 'react-router-dom';
// Container
import Home from '../components/Home';
import Page404 from '../components/Page404';
const Routes = () =>
<Switch>
<Route exact path="/channel" component={Home} />
<Route exact path="/channel/:name" component... | Imports a managed managed sequence of routes. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesRvHookup = (props) => (
<SvgIcon {...props}>
<path d="M20 17v-6c0-1.1-.9-2-2-2H7V7l-3 3 3 3v-2h4v3H4v3c0 1.1.9 2 2 2h2c0 1.66 1.34 3 3 3s3-1.34 3-3h8v-2h-2zm-9 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1... | A function to create a default placeholder for missing icons. |
import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';
import Analyzer from 'Parser/Core/Analyzer';
import calculateEffectiveHealingStacked from 'Parser/Core/calculateEffective... | Justice through Sacrifice |
/*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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/li... | External code that exports a single missing - node error message to a user s page. |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImagePhoto = (props) => (
<SvgIcon {...props}>
<path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/>
</SvgIcon>
);
ImagePhoto.displayName = 'ImagePhoto';
ImagePho... | Missing icons are rendered as images in a series of icons. |
import React from 'react'
import { storiesOf } from '@storybook/react-native'
import AlertMessage from './AlertMessage'
storiesOf('AlertMessage')
.add('Default', () => (
<AlertMessage
title='ALERT ALERT'
/>
))
.add('Hidden', () => (
<AlertMessage
title='ALERT ALERT'
show={false}
... | Imports a bunch of non - standard JSX functions that are used to create a sequence of alert messages. |
import React from 'react';
import { Alert, Col, Grid, Row } from 'react-bootstrap';
import { connect } from 'react-redux';
import { Router, Route } from 'react-router-dom';
import AppNavbar from './AppNavbar';
import history from '../history';
import Login from './pages/login';
import Items from './pages/items';
impor... | Imports a single page with a single message. |
import React from 'react';
import { Link, graphql } from 'gatsby';
import Helmet from 'react-helmet';
import { css } from '@emotion/core';
import Bio from '../components/Bio';
import Layout from '../components/Layout';
import LogoLarge from '../components/LogoLarge';
import Container from '../components/Container';
im... | The BlogIndex component is a component that renders a Helmet index page. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionViewArray = (props) => (
<SvgIcon {...props}>
<path d="M4 18h3V5H4v13zM18 5v13h3V5h-3zM8 18h9V5H8v13z"/>
</SvgIcon>
);
ActionViewArray = pure(ActionViewArray);
ActionViewArray.displayName = 'ActionViewA... | A action view array that can be used to render a series of action icons. |
import React from 'react';
import FontIcon from 'material-ui/FontIcon';
import IconButton from 'material-ui/IconButton';
import ActionHome from 'material-ui/svg-icons/action/home';
const IconButtonExampleComplex = () => (
<div>
<IconButton tooltip="Font Icon">
<FontIcon className="muidocs-icon-action-home"... | Example of how to use a sequence of functions. |
import React from 'react'
import invariant from 'invariant'
import { createRouteFromReactElement } from './RouteUtils'
import { component, components } from './PropTypes'
const { string, func } = React.PropTypes
/**
* A <Route> is used to declare which components are rendered to the
* page when the URL matches a gi... | The route is rendered to the top of the DOM when a URL matches a given pattern. |
import React, { Component } from 'react';
import {
Dimensions,
StyleSheet,
View,
ScrollView,
TouchableWithoutFeedback,
Text,
Easing,
Animated,
} from 'react-native';
const AnimatedScrollView = Animated.createAnimatedComponent(ScrollView);
const window = Dimensions.get('window');
const styles = StyleSh... | The base component for a single node. |
import React from 'react'
import classnames from 'classnames'
import { withStyles } from '@material-ui/core/styles'
import { useTranslation } from 'react-i18next/hooks'
import Typography from '@material-ui/core/Typography'
import Grid from '@material-ui/core/Grid'
import Title from '../components/Title'
import info fro... | default component for missing - block |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderRight = (props) => (
<SvgIcon {...props}>
<path d="M7 21h2v-2H7v2zM3 5h2V3H3v2zm4 0h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2v-2H3v2zm8 0h2v-2h-2v2zm-8-8h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm8 8h2v-2h-2v2zm4-4h... | A component that renders a border around the right side of a menu. |
import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
const style = {
margin: 12,
};
const RaisedButtonExampleSimple = () => (
<div>
<RaisedButton label="Default" style={style} />
<RaisedButton label="Primary" primary={true} style={style} />
<RaisedButton label="Secondary" se... | A component that can be used to show a bunch of missing nodes. |
import PropTypes from 'prop-types'
import React from 'react'
function validate(value, props) {
return {
valid: true,
cleanedValue: value,
}
}
class BaseEditor extends React.Component {
static propTypes = {
editReplace: PropTypes.any,
value: PropTypes.any,
abort: PropTypes.func,
update: P... | A base editor for a single key - value pair. |
import React from 'react'
import Modal from './index'
import { storiesOf, action } from '@kadira/storybook'
const Container = ({ children }) => (
<div
style={{ maxWidth: '350px', border: 'dashed 1px pink', height: '500px' }}
>
{children}
</div>
)
const actions = {
onRequestClose: action('close'),
on... | Imports a single non - modal modal and a modal to show a hidden hidden |
import React from 'react';
const Page = function render(props) {
const page = props.getPage(props.page);
return (
<div
className="page content-card"
dangerouslySetInnerHTML={{ __html: page.body }} // eslint-disable-line react/no-danger
/>
);
};
Page.propTypes = {
page: React.PropTypes.stri... | The default page implementation. |
/**
*
* @title 位置
* @description tab页签头的位置,可以在['top','bottom','left','right']中选择。当页签宽度超过容器宽度时,可以左右、上下滑动,容纳更多标签。
*
*/
import React, { Component } from 'react';
import Select from "bee-select";
import Tabs from '../../src';
const {TabPane} = Tabs;
const {Option} = Select;
class Demo4 extends Component {
const... | Demonstrates how to show a single key sequence in the system. |
import React from 'react'
import { connect } from 'react-redux'
import { RiotApi } from 'riot-api'
import { RiotActions } from 'store/riot'
class SummonerSpellCard extends React.Component {
static propTypes:{
summonerSpellId: React.PropTypes.number.isRequired,
summonerSpellImages: React.PropTypes.o... | A component that renders a summoner spell image if the user has provided a summoner spell image. |
import 'babel-core/polyfill';
import React from 'react';
import Root from './containers/Root';
React.render(
<Root />,
document.getElementById('root')
);
| Imports a from React |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
} from 'react-native';
import App from './App'
AppRegistry.registerComponent('Firechat', () => App);
| The base implementation of which is used to register a missing non - |
/* eslint-env browser */
/* global process */
import React from 'react';
import { Router } from 'react-router';
import { Provider } from 'react-redux';
import cookie from './utils/cookie';
import routes from './routes';
import { routerStateChange } from './actions/router';
import { createRedux } from './utils/redux';
... | The base class for a single node |
import React from 'react';
import { IndexRoute, Route } from 'react-router';
import App from 'containers/app';
import Game from 'modules/game/components/Game';
export default (
<Route path="/" component={ App }>
<IndexRoute component={ Game } />
<Route path="game" component={ Game } />
</Route>
); | default module exports |
import React from 'react';
import { Link } from 'react-router';
import Navbar from '../../src/Navbar';
import Nav from '../../src/Nav';
const NAV_LINKS = {
'introduction': {
link: '/introduction.html',
title: 'Introduction'
},
'getting-started': {
link: '/getting-started.html',
title: 'Getting st... | The main navigation navigation for a single node. |
import React from 'react';
require('./AppLogin.css');
class AppLogin extends React.Component{
render(){
return (
<div className="login">
<nav className="nav">
<div className="nav-container">
<a href="/"><span className="nav-back"></span></a>
<p className="nav-title">登录</p>
</div>
<... | AppLogin is a special class that can be used to create a console - based application login. |
import React from 'react';
import { storiesOf } from '@storybook/react';
import Heading from './Heading';
export default storiesOf('Headings', module)
.add('semantic headers', () =>
<div>
<Heading.H1>Heading H1</Heading.H1>
<Heading.H2>Heading H2</Heading.H2>
<Heading.H3>Heading H3</Heading.H3... | Imports the missing - word header information from the module. |
import React from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import SimpleList from '../kit/SimpleList'
import { fetchCandidates } from '../candidate/actions'
class Candidates extends React.Component {
static propTypes = {
candidates: React.PropTypes.object,
fetchCandid... | A component that can be rendered by a component that has a list of all possible candidates. |
import React from 'react';
export default {
propTypes: {
onChange: React.PropTypes.func,
value: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.array,
]),
valueLink: React.PropTypes.shape({
value: React.PropTypes.string.isRequired,
requestChange: React.Pro... | Imports and exports a single missing - required property. |
// @flow
import React, { Component } from 'react';
import { connect } from 'react-redux';
import stateReturn from '../store/state-return.js';
import fileOpen from '../actions/fileOpen.js';
class Header extends React.Component {
constructor(props) {
super(props);
this.saveProject = this.saveProject.bind(this... | Demonstrates how to render a header when a file is opened or closed. |
import React from 'react';
import $ from 'jquery';
class single extends React.Component {
render() {
return (
<div>
<div class="single-page main-grid-border">
<div class="container">
<div class="product-desc">
<div class="col-md-7 product-view">
<h2>Lorem Ipsu... | The default implementation of a single node that is rendered as a hidden hidden |
import adaptReactLikeRenderEngine from './adaption/adaptReactLikeRenderEngine';
import React from 'react';
import ReactNative from 'react-native';
const {
createElement,
defineComponent,
defineClassComponent,
defineFunctionalComponent,
defineStandardComponent,
isElement,
isRenderable,
... | export a single React - like render engine |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
<App />, document.getElementById('root')
)
| Imports a single node from the DOM. |
import React, { Component } from 'react';
import { Col, Grid, Row, Panel, Image } from 'react-bootstrap';
class About extends Component {
render() {
return (
<div>
<Grid>
<Row>
<Col xs={12} mdOffset={2}>
Application is created by:
</Col>
... | Component that is rendered when a single node in the system has no related components. |
import React from 'react';
export default React.createClass({
render() {
const { cx, cy, stroke, payload } = this.props;
if (cx !== +cx || cy !== +cy) { return null; }
if (payload.value > 250) {
return (
<svg x={cx - 10} y={cy - 10} width={20} height={20} fill="red" viewBox="0 0 1024 1024... | A component that renders a tag that represents a sequence of components that can be rendered. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvPlayCircleOutline = (props) => (
<SvgIcon {...props}>
<path d="M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 ... | A small function to create a hidden element that displays a color icon that can be played in a circle. |
import React, { Component } from 'react';
import {stack as d3Stack, stackOffsetWiggle} from 'd3-shape';
import {range, transpose} from 'd3-array';
import {
XYPlot,
makeWidthFlexible,
AreaSeries
} from 'react-vis';
import Button from '../../../../components/uielements/button';
const FlexibleXYPlot = makeWidthFle... | A component that displays a stream graph when a user hovers on a series. |
import React from 'react'
import { connect } from 'react-redux'
import PropTypes from 'prop-types'
const Notification = ({type, text}) => {
return (
<div className={'notification ' + type}>
{text}
</div>
)
}
Notification.propTypes = {
type: PropTypes.string,
text: PropTypes.string
}
const mapSt... | export Notification from react - redux |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import List from './list';
import Pages from './pages';
import Search from './search';
export default class Customers extends Component {
render() {
const { list } = this.props;
return (
<div>
<div className="row">
<div clas... | Initialize a custom class that can be used to render a single object. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.