code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareDeveloperBoard = (props) => (
<SvgIcon {...props}>
<path d="M22 9V7h-2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2v-2h-2V9h2zm-4 10H4V5h14v14zM6 13h5v4H6zm6-6h4... | Hardware Developer Board |
import React from 'react';
import NextHead from 'next/head';
import { string } from 'prop-types';
const defaultDescription = '';
const defaultOGURL = '';
const defaultOGImage = '';
const Head = props => (
<NextHead>
<meta charSet="UTF-8" />
<title>{props.title || ''}</title>
<meta name="description" con... | React - specific module that exports a single meta tag with a default description url and image. |
// @flow
import React, { Component } from 'react';
import ChatMessage from './ChatMessage';
type Props = {
/**
* Additional CSS classes to apply to the root element.
*/
className: string,
/**
* The messages to display as a group.
*/
messages: Array<Object>,
};
/**
* Displays a... | A component that displays a list of messages as a group of messages. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalCarWash = (props) => (
<SvgIcon {...props}>
<path d="M17 5c.83 0 1.5-.67 1.5-1.5 0-1-1.5-2.7-1.5-2.7s-1.5 1.7-1.5 2.7c0 .83.67 1.5 1.5 1.5zm-5 0c.83 0 1.5-.67 1.5-1.5 0-1-1.5-2.7-1.5-2.7s-1.5 1.7-1.5 2... | A component that renders a missing - |
import React, { Component } from 'react';
import './App.css';
import IngredientPage from './IngredientPage';
import AddIngredientPage from "./AddIngredientPage";
const ingredientPage = 'ingredientPage'
class App extends Component {
constructor(props) {
super(props);
this.state = {
curr... | The base class for all app - level components. |
import React from 'react';
import createFragment from 'react-addons-create-fragment';
export function createChildFragment(fragments) {
const newFragments = {};
let validChildrenCount = 0;
let firstKey;
// Only create non-empty key fragments
for (const key in fragments) {
const currentChild = fragments[k... | Create a new child fragment with the given children. |
import React from 'react';
function Lock() {
return (
<svg width="12px" height="13px" viewBox="0 0 12 13" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
<g transform="translate(-856.000000, -233.000000)" fill="#3E3E3E">
... | Diagram for the sequence of tokens that are related to a specific lock. |
import React from 'react'
const NotFoundPage = () => (
<div>
<h1>NOT FOUND</h1>
<p>You just hit a route that doesn't exist... the sadness.</p>
</div>
)
export default NotFoundPage
| Provides a function to return a 404 page if the route is not found. |
import React from 'react';
import {
StyleSheet,
View,
Text,
Dimensions,
} from 'react-native';
import MapView from 'react-native-maps';
import flagBlueImg from './assets/flag-blue.png';
import flagPinkImg from './assets/flag-pink.png';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = w... | A component that shows a marker when a user presses a marker. |
import React from 'react'
import { browserHistory, Router } from 'react-router'
import { Provider } from 'react-redux'
import PropTypes from 'prop-types'
class App extends React.Component {
static propTypes = {
store: PropTypes.object.isRequired,
routes: PropTypes.object.isRequired,
}
shouldComponentUpd... | The base App class. |
import React from 'react';
import {string} from 'prop-types';
import Link from 'gatsby-link';
import {invertedLink, link} from '../../styles';
export default function InternalLink({to, variant, children}) {
return <Link to={to} css={'inverted' === variant ? invertedLink : link}>{children}</Link>;
}
InternalLink.pro... | Internal link helper |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalLaundryService = (props) => (
<SvgIcon {...props}>
<path d="M9.17 16.83c1.56 1.56 4.1 1.56 5.66 0 1.56-1.56 1.56-4.1 0-5.66l-5.66 5.66zM18 2.01L6 2c-1.11 0-2 .89-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 ... | A component that exports a sequence of icons that can be used to render a sequence of maps. |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App.jsx';
ReactDOM.render(
<App />,
document.getElementById('app')
);
| Imports a single element in the DOM. |
import React from 'react';
const SongInfo = ({image, title, artist, album}) =>
<div className="Player-song">
<img className="Player-songImage" src={image} />
<div className="Player-songInfo">
<p className="Player-text Player-text--title"> {title} </p>
<p className="Player-text"> {artist} </p>
... | export default SongInfo |
import React from 'react';
import type { ElementType, Element } from 'react';
import classNames from 'classnames';
if(process.env.WEBPACK) require('./avatar.css');
type ProvidedProps = {
classes: Object,
component: ElementType,
};
export type Props = {
/**
* Used in combination with `src` or `srcSet` to
... | The main function for the node. |
import React from 'react';
import Typography from './Typography';
export default {
path: '/typography',
action() {
return <Typography />;
},
};
| export. |
import React from 'react';
import NavMain from './NavMain';
import PageHeader from './PageHeader';
import PageFooter from './PageFooter';
export default class Page extends React.Component {
render() {
return (
<div>
<NavMain activePage="support" />
<PageHeader
title="Nee... | The default implementation of a single page that can be used to render a single page. |
import React, { Component } from 'react';
import { StatusBar } from 'react-native';
import { connect } from 'react-redux';
import { Drawer } from 'native-base';
import { Router, Scene } from 'react-native-router-flux';
import { closeDrawer } from './actions/drawer';
import Login from './components/login/';
import Ho... | AppNavigator is a component that visits a menu with a single key - value drawer. |
import React, { Component } from 'react';
import Grid from './Grid.js';
const types = ["Line", "Bar", "Table", "Area"];
const names = ['Apple Store Q4’13', 'Sedi Chart', 'iPhone Sales', 'Black Friday Report', 'Air Assault Combined'];
const values = [100].map(i => {
return {
name: names[parseInt(Math.random()*(na... | export a component with a random name type date and id |
import React from 'react';
import './App.scss';
import Dashboard from './components/Dashboard/Dashboard';
const App = () =>
<div className="App">
<Dashboard />
</div>;
export default App;
| export default app |
import React from 'react'
import kendo from 'kendo'
import { findWidget } from '../ReactCommon'
const $ = kendo.jQuery;
const PropTypes = React.PropTypes;
function noResultsOnDataBound(e) {
var widget = e.sender;
var noItems = widget.list.find(".noResults");
if (!widget.dataSource.view()[0]) {
no... | Component that displays a Bootstrap - styled dropdown box with a Bootstrap - styled dropdown box. |
import React from 'react'
import ReactDOM from 'react-dom'
import EPICSComponent from './epicscomponent.js'
module.exports = class EPICSCanvas extends EPICSComponent {
constructor(props){
super(props)
}
onChange(pv) {
this.draw(pv)
}
draw(pv) {
this.initCanvas()
if (this.bb == "yes") { th... | A component that can be rendered on a canvas. |
import React from 'react';
import { View } from 'react-native';
import EventList from '../shared/EventList';
import container from './container';
import styles from './styles';
export function AssignedEventList({events}) {
return <View style={styles.container}>
<EventList events={events} />
</View>;
}
expor... | export default container |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageControlPointDuplicate = (props) => (
<SvgIcon {...props}>
<path d="M16 8h-2v3h-3v2h3v3h2v-3h3v-2h-3zM2 12c0-2.79 1.64-5.2 4.01-6.32V3.52C2.52 4.76 0 8.09 0 12s2.52 7.24 6.01 8.48v-2.16C3.64 17.2 2 14.79 2 ... | A component that duplicates an icon with a different name. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let PresentToAll = props =>
<SvgIcon {...props}>
<path d="M21 3H3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h18c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2zm0 16.02H3V4.98h18v14.04zM10 12H8l4-4 4 4h-2v4h-4v-4z" />
</SvgI... | A component that renders a series of icons that are present to all. |
// Sprite component bridged with native component (react-native 0.29)
// By William Ngan, 7/2016
import React, { Component } from 'react';
import { requireNativeComponent, NativeModules, findNodeHandle } from 'react-native';
// refers to Sprite.swift we have in XCode
const SpriteNative = requireNativeComponent('Sprit... | Component that is bridged with native components |
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
ReactDOM.render(<App />, document.getElementById('root'))
| Import ReactDOM from react - dom |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageColorLens = (props) => (
<SvgIcon {...props}>
<path d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4... | Missing color lens |
import React, { Component } from 'react';
import ApolloClient, { gql } from 'apollo-boost';
import { ApolloProvider, Query } from 'react-apollo';
const GET_PIKA = gql`
{
pokemon(name: "Pikachu") {
name
}
}
`;
const client = new ApolloClient({
uri: 'https://graphql-pokemon.now.sh/graphql',
});
cla... | The base implementation of the nagios - pokemon - data component. |
import React from 'react';
import {
FlexibleWidthXYPlot as XYPlot,
DiscreteColorLegend,
XAxis,
YAxis,
LineSeries,
} from 'react-vis';
import Analyzer from 'parser/core/Analyzer';
import Panel from 'interface/others/Panel';
import { formatDuration, formatNumber } from 'common/format';
import RuneBreakdown fr... | export RuneDetails class |
import warning from './routerWarning'
import React from 'react'
const { object } = React.PropTypes
/**
* The RouteContext mixin provides a convenient way for route
* components to set the route in context. This is needed for
* routes that render elements that want to use the Lifecycle
* mixin to prevent transitio... | RouteContext mixin provides a convenient way for route components. |
/**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import React, { Component } from 'react';
export default class extends Component {
render() {
return (
<div>
<h1>About Us</h1>
<p>Coming s... | The default implementation of which is a class that implements the logic for the missing - component - related logic. |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App/App';
import registerServiceWorker from './registerServiceWorker';
import './index.css';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
| Imports a single application. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Card } from 'material-ui/Card';
import compose from 'recompose/compose';
import inflection from 'inflection';
import ViewTitle from '../layout/ViewTitle';
import Title from '../layout/Title';
im... | Demonstrates how to render a show component. |
import React from 'react'
import Dropzone from 'react-dropzone'
const OverlayDropzone = ({ active, accept, children, message,
onDragEnter, onDragLeave, onDrop }) => {
const overlayStyle= {
position: 'absolute',
top: 0,
right: 0,
bottom: 0,
left: 0,
padding: '5em 0',
background: 'rgba(0,... | Generates a dropzone |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdCreate(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M6 34.495v7.5h7.5l22.13-22.13-7.5-7.5L6 34.495zm35.41-20.41c.78-.78.78-2.05 0-2.83l-4.67-4.67c-.78-.78-2.05-.78-2.83 0l-3.66 3.66 7.5 7.5 3.66-3.66z" ... | Create a missing - icon on top of |
import React from 'react'
import { render } from 'react-dom'
import { browserHistory, Router, Route, Link } from 'react-router'
import withExampleBasename from '../withExampleBasename'
import './app.css'
const App = ({ children, routes }) => {
const depth = routes.length
return (
<div>
<aside>
... | The main function for the module. |
import React from 'react';
import ajax from 'superagent';
import { Link } from 'react-router';
import {
Input,
ButtonInput
} from 'react-bootstrap';
export class ResetRequestForm extends React.Component {
constructor() {
super();
this.state = {
pending: false,
email: '',
emailSent: fa... | Demonstrates how to render a reset request form. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSearch = (props) => (
<SvgIcon {...props}>
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 1... | A component that exports a sequence of action icons. |
import React from 'react';
import Button from '../src/Button';
import Dropdown from '../src/Dropdown';
import NavItem from '../src/NavItem';
export default
<Dropdown trigger={
<Button>Drop me!</Button>
}>
<NavItem>one</NavItem>
<NavItem>two</NavItem>
<NavItem divider />
<NavItem>three</NavItem>
</Dropdow... | export default |
import React from 'react';
const TenDayWeatherCard = (props) => {
return (
<div className={props.className}>
<h3 className="date">{props.month}/{props.date}</h3>
<img className="weatherIcon"
src={props.weatherIcon} alt={props.iconAlt}></img>
<p className="dailyTemps">
L <span c... | The TenDayWeatherCard component that renders a single missing - day block in a calendar. |
import React from 'react';
import ReactDOM from 'react-dom';
import {Route, Switch} from 'react-router';
import {BrowserRouter} from 'react-router-dom';
import Login from './Login';
import Home from './Home';
import Monitor from './Monitor';
import 'bootstrap/dist/css/bootstrap.css';
import {AuthProvider} from './Aut... | Package that imports a single application. |
import React from 'react';
import PropTypes from 'prop-types';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './NotFound.css';
class NotFound extends React.Component {
static propTypes = {
title: PropTypes.string.isRequired,
};
render() {
return (
<div className={s... | The default component that displays a 404 not found error message. |
import React from 'react';
import SpellLink from 'common/SpellLink';
import SPELLS from 'common/SPELLS';
import { formatPercentage } from 'common/format';
import Analyzer from 'parser/core/Analyzer';
import calculateEffectiveHealing from 'parser/core/calculateEffectiveHealing';
import StatisticListBoxItem from 'inter... | The base class for all talent events. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import moment from 'moment';
import { Container, Header, Loader } from 'semantic-ui-react';
import { getAllReceivedMessages } from '../../../actions/inboxActions';
import MessagesTable from './MessagesTable';
import { changeContactField, s... | The component that is rendered when a user receives a message. |
import React from 'react';
import { StyleSheet, Text, View, TouchableOpacity, Button, KeyboardAvoidingView } from 'react-native';
import {DocumentPicker, ImagePicker} from 'expo';
import { NavigationActions } from 'react-navigation';
import customstyles from '../../../assets/styles/customstyles';
import customtext from... | The base app class which is used to render a single user - specified token. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialPersonAdd = (props) => (
<SvgIcon {...props}>
<path d="M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>
</... | A component that exports a sequence of components that can be used to render a sequence of components. |
import StyleSheet from 'react-style';
import React from 'react';
import UserRegisterCard from '../components/UserRegisterCard';
import UserResetPasswordCard from '../components/UserResetPasswordCard';
import UserResetPasswordByEmailCard from '../components/UserResetPasswordByEmailCard.js';
import QueryUserCard from '.... | The default Homepage is a page that contains all of the user - defined components. |
import classNames from 'classnames';
import React from 'react';
import elementType from 'react-prop-types/lib/elementType';
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
const propTypes = {
componentClass: elementType,
};
const defaultProps = {
componentClass: 'div',
};
class Row ... | A component that wraps a component in a row that can be rendered by a bootstrap component. |
import PropTypes from 'prop-types';
import React from 'react';
import cx from 'classnames';
/**
* @class Dialog
*/
export default class Dialog extends React.Component {
static propTypes = {
children: PropTypes.any,
className: PropTypes.string,
};
static defaultProps = {};
render() {
const { chil... | A component that wraps a dialog with a series of children. |
import React from 'react';
import { Steps, Icon } from 'antd';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { user } from 'actions';
const Step = Steps.Step;
class Button extends React.Component {
constructor(props){
super(props)
}
render(){
return <div>
<Steps>
... | Component that is a button that can be used to show a menu of users. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionOpenWith = (props) => (
<SvgIcon {...props}>
<path d="M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z"/>
</SvgIcon>
);
ActionOpenWith = pure(Act... | ActionOpenWith - ActionOpenWith |
import React from 'react';
import { Header } from 'react-navigation';
import { View } from 'react-native';
import colors from '../../../design';
export default props => (
<View style={{ backgroundColor: colors.mainColor }}>
<Header {...props} style={{ backgroundColor: 'transparent' }}/>
</View>
); | export default |
import React from 'react';
import Icon from '../Icon';
export default class LightbulbOutlineIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path fill="#010101" d="M18 42c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2v-2H18v2zm6-38c-7.73 0-14 6.27-14 14 0 4.76 2... | A lightbulb outline icon for a single node. |
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import Toast, { StyledP } from 'mcs-lite-ui/lib/Toast/Toast';
import A from 'mcs-lite-ui/lib/A';
import Transition from 'react-motion-ui-pack';
import { NAV_WIDTH } from '../../containers/DashboardLayout/styled-compon... | Imports a single missing - node node with styled - components. |
import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
export default createDevTools(
<DockMonitor
toggleVisibilityKey='ctrl-h'
changePositionKey='ctrl-q' >
<LogMonitor />
</... | createDevTools creates a new devtools object from a single node. |
/**
* Created by fandongyang on 2016/11/30.
*/
import React, { Component } from 'react';
import {
StyleSheet,
View,
Text
} from 'react-native';
import Account from '../test2';
import Title from '../common/title'
import ScrollableTabView, {DefaultTabBar, } from 'react-native-scrollable-tab-view';
cl... | A component that renders a single Sequence. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionLightbulbOutline = (props) => (
<SvgIcon {...props}>
<path d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1... | A light light that shows a single action on a light. |
'use strict' /* eslint import/no-unresolved: 0 */
import React from 'react'
import reactCSS from 'reactcss'
import { Container, Grid } from 'react-basic-layout'
import Docs from 'react-docs'
import Markdown from '../../../modules/react-docs/lib/components/Markdown'
import documentation from '../../documentation'
imp... | Renders a single Sequence with optional padding. |
import React from 'react';
import { View } from 'react-native';
import JALogo from '../ja-logo';
import JATagline from '../ja-tagline';
import styles from './style';
// Brand header used in several views
const JAHeader = () => (
<View style={styles.container}>
<JALogo />
<JATagline />
</View>
);
export d... | The default header used in the view |
import React from 'react';
import _ from 'lodash';
import CheckBox from 'components/uiElements/CheckBox/CheckBox';
import './staff-enrollment-notifications.less';
class StaffEnrollmentNotifications extends React.Component {
constructor(...args) {
super(...args);
this.state = {
checked: {}
};
}
... | A component that can be used to show a notification when a user enters a phone or email. |
import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import... | A component that can be rendered by a component that is not yet rendered by a component. |
import _extends from 'babel-runtime/helpers/extends';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { customPropTypes, getElementType, getUnhandledProps, META, SUI } from '../../lib';
/**
* A group of images.
*/
function ImageGroup(props) {
var children = props... | A group of images. |
import React from 'react';
import PropTypes from 'prop-types';
const ColumnSubheading = ({ text }) => {
return (
<div className='column-subheading'>
{text}
</div>
);
};
ColumnSubheading.propTypes = {
text: PropTypes.string.isRequired,
};
export default ColumnSubheading;
| export a column subheading |
/**
* 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 from 'react';
export default () => (
<span id="feature-shell-env-variables">
{process.env.REACT_APP_SHELL_ENV_MESSAG... | Demonstrates how to export a missing - type error message from the system. |
import React from 'react';
import PropTypes from 'prop-types';
import './Hero.sass';
const Hero = ({lang, title,
hero640, hero960, hero1280, hero1920, hero2560, hero3840}) => {
return (
<div className="hero">
<picture className="hero__img-div">
<source media="(min-width: 2561px)" srcSet={`${hero3... | High level function to create a Hero object. |
import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import ItemDamageDone from 'Main/ItemDamageDone';
class Stampede exte... | The base class for all talent - specific events. |
import React from 'react';
export const Footer = () => {
var badgeUrl = 'https://play.google.com/store/apps/details?id=com.fnp.showman&utm_source=' +
'global_co&utm_medium=prtnr&utm_content=Mar2515&utm_campaign=PartBadge&pcampaignid=' +
'MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1';
return (
... | The main function of the module. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvFastForward = (props) => (
<SvgIcon {...props}>
<path d="M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"/>
</SvgIcon>
);
AvFastForward = pure(AvFastForward);
AvFastForward.displayName = 'AvFastForward';
AvFastForw... | A function to export a missing - free - forward node. |
/**
* 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 example extends Component {
render() {
return (
<View style={styles.container}>... | A component that can be rendered by a component that is not a component of a component type. |
import React from 'react'
import { Link } from 'react-router'
import { prefixLink } from 'gatsby-helpers'
import Helmet from "react-helmet"
import { config } from 'config'
export default class Index extends React.Component {
render () {
return (
<div>
<Helmet
title={config.siteTitle}
... | The index class |
import React from 'react'
export default () => <div>b</div>
| The default function for the nanomsg - tag export. |
import React from 'react';
class AddPointButton extends React.Component {
constructor(props) {
super(props);
this.initialState = {
value : '',
remark : ''
};
this.state = this.initialState;
}
render() {
return (
<div className... | Adds a button to add a point. |
import React from 'react'
import Link from 'react-router-dom/Link'
import withStyles from 'material-ui/styles/withStyles'
import classNames from 'classnames'
import Button from 'material-ui/Button'
import Headline from './Headline'
const styles = theme => ({
root: {
backgroundColor: '#ffffff'
},
rootPaddin... | Imports a theme s CSS hierarchy and returns a default CSS hierarchy. |
import React, { Component } from 'react';
import Github from './github';
import PublicKeyTransform from './public_key_transform';
class PublicKeyForm extends Component {
render() {
return (
<div className="publickeyform">
<form
onSubmit={ e => {
e.preventDefault();
... | Package for public key form |
import React from 'react';
class MyComponent extends React.Component {
static defaultProps: DefaultProps = {};
props: Props;
state: State = {};
defaultProps: T;
static props: T;
static state: T;
a: T;
b = 5;
c: T = 5;
method() {}
}
const expression = () =>
class extends React.Component {
st... | A component that is not part of a component s hierarchy. |
import _ from 'lodash';
import React from 'react';
import Modal from 'react-modal';
import addons from 'react/addons';
import ReactMixin from 'react-mixin';
import { Styles, TextField } from 'material-ui';
import AddContactStore from 'stores/AddContactStore';
import AddContactActionCreators from 'actions/AddContactA... | The base component for adding a contact to a phone number. |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './style.module.css';
const CssLogo = ({ animate }) => {
const wrapperClass = classNames({
[styles.wrapper]: true,
[styles.active]: animate,
});
return (
<div className={styles.conta... | export default CSS logo for a single node |
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 {connectToStores} from 'fluxible-addons-react';
import ContentUsageStore from '../../../../stores/ContentUsageStore';
import ContentUsageList from './ContentUsageList';
class ContentUsagePanel extends React.Component {
render() {
return (
<div ref="contentUsag... | The contentUsagePanel component is a component that can be used to show a list of content usage. |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App/App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
| Imports a single node in the DOM. |
import React from 'react';
import Interface from './Interface';
const Container = (props) => (
/* This class instantiates the headers and grid.*/
<div className="Container max">
<div className="clearfix Header">
<h2 className="m0 ml4 mt1 brand">
<a href="https://github.com/rewonc/pastalog" target... | The default implementation of which creates a container with the given properties. |
/**
* 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';
function load(id = 0) {
return [
{ id: id + 1, name... | The base class for a missing - user - related component that is not part of the standard JSFFI convention. |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Image
} from 'react-native';
/**----导入外部的组件----**/
var Main = require('../../component/MLMain/MLMain');
var Dimensions = r... | Micro - UI application sequence |
import React from 'react';
import classNames from 'classnames';
class ModalBody extends React.Component {
render() {
return (
<div
{...this.props}
className={classNames(this.props.className, this.props.modalClassName)}>
{this.props.children}
</div>
);
}
}
ModalBody.prop... | A component that renders a modal modal. |
// This is an example of how to replace components with your own custom UI logic.
import React from 'react';
// You can import the original OSS component if you'd just like to wrap it.
import OSSPluginExample from '../../../src/main/js/components/PluginExample';
// Add your own CSS by importing files directly
import ... | This is a very simple example of how to replace components with your own custom UI logic. |
import React from 'react';
<<<<<<< HEAD
import { BrowserRouter as Router } from 'react-router-dom';
=======
>>>>>>> 23d814bedfd5c07e05ea49d9a90053074a4c829a
import Header from './components/Header';
import Content from './components/Content';
import Footer from './components/Footer';
<<<<<<< HEAD
=======
import './App... | Package that imports a single node into a single App. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBrightnessAuto = (props) => (
<SvgIcon {...props}>
<path d="M10.85 12.65h2.3L12 9l-1.15 3.65zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM14.3 ... | Devuelte un objeto DeviceBrightnessAuto |
import React from 'react';
import './drawerStyles.css';
const Description = ({description}) => {
return (
<div id="explanation-popup" className="modal fade" tabIndex="-1" role="dialog" aria-labelledby="exampleModalLiveLabel" style={{display: 'none'}} aria-hidden="true">
<div className="modal-dialog" role="... | description - description of a single node |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import reducers from './reducers';
import HomeScreen from './components/home_screen/home_screen';
... | Imports a single node in the DOM. |
import React from 'react';
import { Table } from 'reactstrap';
const Example = (props) => {
return (
<Table striped>
<thead>
<tr>
<th>#</th>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
</tr>
</thead>
<tbody>
<tr>
... | Generate a default missing - node - tag for missing - node - tag - list |
import React from 'react';
import { render } from 'react-dom';
import Ribbon from 'react-github-fork-ribbon';
import DemoEditor from './components/DemoEditor';
// Import your routes so that you can pass them to the <Router /> component
// eslint-disable-next-line import/no-named-as-default
// Only render in the brows... | Renders a single node in the browser |
/**
* Copyright 2017 Goldman Sachs.
* 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... | Creates a new component with a short name that matches the given tag name. |
import React from 'react';
const Notifications = () =>
<main>
<h2>{'Notifications'}</h2>
</main>;
Notifications.displayName = 'Notifications';
export default Notifications;
| The Notifications module |
import React from 'react';
import PropTypes from 'prop-types';
export default function CarouselCaptionDisplay({ classNamePrefix = 'carousel', caption = '' }) {
return (<span className={`${ classNamePrefix }__caption`}>{caption}</span>);
}
if (process.env.NODE_ENV !== 'production') {
CarouselCaptionDisplay.propTyp... | Exports a carousel with a caption |
import React from 'react';
import { EditorContainer } from 'components/editor';
import { StructureMonitorContainer } from 'components/structureMonitor';
import { GalleryContainer } from 'components/gallery';
import { Provider} from 'react-redux';
require('styles/app')
export default class App extends React.Component {
... | The base class for all of the components that are not part of a single hierarchy. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPrint = (props) => (
<SvgIcon {...props}>
<path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/>
</... | A component that renders a single node in a sequence of nodes. |
import React from 'react';
import { string } from 'prop-types';
const Comment = ({ fill, ...props }) =>
<svg
fill={fill}
height="24"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path d="M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l... | A component that exports a sequence of colors. |
import React from 'react';
import styled from '@emotion/styled';
import ExternalProject from './ExternalProject.js';
const Content = styled.div`
display: flex;
justify-content: center;
flex-wrap: wrap;
padding: 0 200px;
@media (max-width: 720px) {
padding: 0;
}
`;
const ContentWrapper = styled.div`
... | export default JSX plugin |
import React from 'react';
import Router from 'react-router';
import createRoutes from './views/createRoutes';
import { Provider } from 'react-redux';
const getFetchData = (component={}) => {
return component.WrappedComponent ?
getFetchData(component.WrappedComponent) :
component.fetchData;
};
export functi... | The main router function. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.