code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React, { Component } from 'react';
import CounterApp from './CounterApp';
import { createStore, applyMiddleware, combineReducers, compose } from 'redux';
import { devTools, persistState } from 'redux-devtools';
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
import thunk from 'redux-... | The base class for the sequence of non - unique components. |
import React from 'react';
import { PropTypes as T } from 'prop-types';
import moment from 'moment';
import { schemas } from 'openaq-data-format';
import config from '../../config';
const locationSchema = schemas.location;
export default function Metadata({
loc,
loc: {
data: { metadata },
},
}) {
if (!me... | Generate a single language tag that represents a single sequence of location - specific metadata. |
/**
* 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 CouchsurfingApp extends Component {
render() {
return (
<View style={styles.con... | A base class for a single missing - node node |
import React from 'react';
import Spinner from '../general/Spinner/Spinner.component';
import T from '../base/T';
export default class ProfileUpdateUser extends React.Component {
onSubmit = e => {
const obj = {
name: this.state.name,
image: this.props.imageId,
acceptedTerms: true,
over13:... | The base class for the profile update user component. |
import React, { Component } from 'react';
import { ActivityIndicatorIOS } from 'react-native';
export default class SpinnerNB extends Component {
prepareRootProps() {
const type = {
height: 80,
};
const defaultProps = {
style: type,
};
return computeProps(this.props, defaultProps... | The SpinnerNB class is used to render a Spinner in the browser. |
'use strict'; /* @flow */
import React from 'react';
import ReactCSS from 'reactcss';
import { Saturation, Hue, Alpha, Checkboard } from '../common';
import SketchFields from './SketchFields';
import SketchPresetColors from './SketchPresetColors';
export class Sketch extends ReactCSS.Component {
constructor() {
... | Create a new skeleton with all of the components that are attached to it. |
import React, { Component } from 'react';
import center from './Positions/posFace';
import selector from './Positions/symbol';
class Face extends Component {
render() {
let symbol = this.props.symbol;
let number = this.props.number;
// Fixes club positioning issue
if (symbol === '\u2663') {
center[2]['to... | A component that can be rendered as a Face. |
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
const TimelineHint = ({ resource, url }) => (
<div className='timeline-hint'>
<strong><FormattedMessage id='timeline_hint.remote_resource_not_displayed' defaultMessage='{resource} from other servers are ... | A function to export a warning when a resource is not available from other servers. |
import React, { Component } from 'react';
import sinon from 'sinon';
import Autosuggest from '../../src/Autosuggest';
import languages from '../plain-list/languages';
import { escapeRegexCharacters } from '../../demo/src/components/utils/utils.js';
const getMatchingLanguages = value => {
const escapedValue = escapeR... | The base class for the autosuggest app. |
import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import ColumnHeader fro... | The public timeline component is a component that can be attached to a timeline. |
import React from 'react'
type Props = {
};
export class <%= pascalEntityName %> extends React.Component {
props: Props;
render () {
return (
<div></div>
)
}
}
export default <%= pascalEntityName %>
| export a component with a series of props |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvPauseCircleFilled = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"/>
</SvgIcon>
);
AvPauseCircleFilled = pure(AvP... | A component that exports a single |
import React from 'react'
import { render } from 'react-dom'
import '../public/normalize.css'
import '../public/style.css'
const App = React.createClass ({
render () {
return (
<div className='app'>
<div className='landing'>
<h1>svideo</h1>
<input type='text' placeholder='Search... | Imports a single node with a tag containing a hidden input that is either a search or a growse all. |
import _Object$values from 'babel-runtime/core-js/object/values';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-... | Construct a button with a specific type. |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H6V6h12v12z" /></g>
, 'CropSquare');
| Create a series of icons for a single element in a series of icons. |
import React, { Component } from 'react';
import objectAssign from 'object-assign';
import LensPropTypes from '../../prop-types/Lens';
import clamp from 'clamp';
import dataUri from './assets/textured-lens-data-uri';
export default class PositiveSpaceLens extends Component {
static propTypes = LensPropTypes
s... | creates a posible space lens component which is a wrapper around a standardized lens. |
import React from 'react';
import { Link } from 'react-router-dom';
import { Icon, ICONS } from '../../shared';
export function Team({ team }) {
return (
<Link to={`/team/${team.$key}`} className="MyProfilePage_Teams_Team">
<Icon>{ICONS.TEAM}</Icon>
<div>{team.name}</div>
</Link>
);
}
| The team view of a user s page. |
import React from 'react';
import PropTypes from 'prop-types';
import { Box, Drop, Text, ThemeContext } from 'grommet';
const OneDrop = ({ align, target }) => (
<Drop align={align} target={target} stretch={false}>
<Box pad="small" />
</Drop>
);
OneDrop.propTypes = {
align: PropTypes.shape({}).isRequired,
... | Generate a single - node non - empty sequence of nodes that are not in the system. |
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router } from 'react-router-dom';
import { App } from './App';
import { Provider } from 'react-redux';
import createBrowserHistory from 'history/createBrowserHistory';
import { store } from './store';
import { saveState } from './loc... | Imports a single node in the browser history. |
import React from 'react'
export default props =>
<svg viewBox="0 0 100 125" {...props}>
<path
d="M47.215 8.002a42.128 42.128 0 0 0-11.063 1.437C13.799 15.43.476 38.522 6.466 60.877c5.99 22.355 29.083 35.677 51.438 29.687 22.355-5.99 35.677-29.082 29.687-51.437a4 4 0 1 0-7.719 2.062c4.871 18.179-5.852 36.7... | <svg viewBox = 0 100 125 > |
import React from 'react';
import { View } from 'react-native';
const CardSection = (props) => (
<View style={styles.containerStyle}>
{props.children}
</View>
);
const styles = {
containerStyle: {
borderBottomWidth: 1,
padding: 5,
backgroundColor: '#fff',
justifyCon... | A component that renders a single node in a card. |
/**
* app.js
*
* This is the entry file for the application, only setup and boilerplate
* code.
*/
import 'babel-polyfill';
/* eslint-disable import/no-unresolved, import/extensions */
// Load the manifest.json file and the .htaccess file
import '!file?name=[name].[ext]!./manifest.json';
import 'file?name=[name].... | This module is responsible for importing the main application s JS files. |
import Typography from '../Typography';
import IconImage from '../IconImage';
import ProgressCircle from '../ProgressCircle';
import LabelSmall from '../LabelSmall';
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './styles.css';
function GoalProgr... | General package for the n - node 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 ... | A component that renders a navbar with a header. |
import React from 'react'
import { storiesOf } from '@storybook/react'
import moment from 'moment'
import { Calendar, Views, DragableCalendar } from './helpers'
storiesOf('Event Durations', module)
.add('Daylight savings starts', () => {
return (
<DragableCalendar
defaultView={Views.DAY}
m... | Add event necessity of sequence sequence. |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
export default class Button extends React.PureComponent {
static propTypes = {
text: PropTypes.node,
onClick: PropTypes.func,
disabled: PropTypes.bool,
block: PropTypes.bool,
secondary: PropTypes.... | Button component that renders a button with a single component that has a single child. |
import React from 'react'
import ItemTypes from './ItemTypes'
import { DragSource } from 'react-dnd'
import { connect } from 'react-redux'
import withStyles from 'material-ui/styles/withStyles'
import AdjudicatorChip from 'containers/Asians/TabControls/_components/AdjudicatorChips/AdjudicatorChip'
const styles = them... | Imports a single by using a function that can be used to create a single node. |
import React from 'react';
import { StyleSheet, View } from 'react-native';
import Spinner from 'react-native-spinkit';
import colors from '../theme/colors';
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: col... | export default Loading |
import Blog from './components/Blog/Blog.react';
import ChatApp from './components/ChatApp/ChatApp.react';
import Contact from './components/Contact/Contact.react';
import Devices from './components/Devices/Devices.react';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import Logout from './components/Auth/L... | Component that is a component of a single type that can be rendered on the page. |
import React from 'react';
import { PureRenderMixin } from 'react/addons';
import AvatarItem from 'components/common/AvatarItem.react';
var ContactItem = React.createClass({
displayName: 'ContactItem',
propTypes: {
contact: React.PropTypes.object,
onSelect: React.PropTypes.func
},
mixins: [PureRende... | The contact item which is a list of all contacts that have a single contact. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentClear = (props) => (
<SvgIcon {...props}>
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
</SvgIcon>
);
ContentClear = pure(ContentClea... | A component that creates a content clear in a group of icons. |
import React from 'react';
const VideoDetail = ({video}) => {
if(!video){
return <div>Loading...</div>;
}
const videoId = video.id.videoId;
const url = 'https://www.youtube.com/embed/' + videoId; //Below es6 syntax
//const url = `https://www.youtube.com/embed/$(videoId)`;
return (
<div class... | export default function for missing colors |
import React from 'react';
import OrderRow from './order_row';
class OrdersTable extends React.Component {
render() {
const rows = this.props.orders.map((order, i) => {
return <OrderRow order={order} key={i} />;
});
return (
<table className='orders-table'>
<thead>
<tr>
... | A component that shows a sequence of conditions that can be found in a sequence of orders. |
import React from 'react';
/*:: type Props = {
foo?: ?string,
bar: number,
}; */
/*:: type State = { baz: number }; */
class Component extends React.Component/*:: <Props, State> */ {
}
| Missing component in a hierarchy. |
import React from 'react';
import transitions from '../styles/transitions';
import AutoLockScrolling from './AutoLockScrolling';
function getStyles(props, context) {
const {overlay} = context.muiTheme;
const style = {
root: {
position: 'fixed',
height: '100%',
width: '100%',
top: 0,
... | A component that renders a single hidden hidden |
// Copyright (c) 2016 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... | This function checks if a stacked bar chart with other children is rendered. |
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import Textarea from 'react-textarea-autosize';
impor... | A component that is rendered when a user presses enter or down on a key. |
import React from 'react';
import { Link, withRouter } from 'react-router';
import CSSModules from 'react-css-modules';
import styles from './Navigation.scss';
@withRouter
@CSSModules(styles)
class Navigation extends React.Component {
constructor(props) {
super(props);
this.state = {
searchInput: fals... | A component that is a menu that can be used to show a menu in the browser. |
import React from 'react'
import { render } from 'react-dom'
import { createStore, applyMiddleware } from 'redux'
import { Provider } from 'react-redux'
import thunk from 'redux-thunk'
import createLogger from 'redux-logger'
import App from './containers/App'
import reducer from './reducers'
import './index.css';
cons... | Imports a single node of a React component. |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M19.94 21.12c-1.1-2.94-1.64-6.03-1.64-9.12 0-3.09.55-6.18 1.64-9.12.04-.11.06-.22.06-.31 0-.34-.23-.57-.63-.57H4.63c-.4 0-.63.23-.63.57 0 .1.02.2.06.31C5.16 5.82 5.71 8.91 5.71 12c0 3.09-.55 6.18-1... | Missing color in a series of icons |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as Actions from './actions';
import { StatusBar, View } from 'react-native';
import FacebookTabBar from './components/FacebookTabBar';
import ErrorBar from './components/ErrorBar';
im... | Imports a single component with a single action creator. |
import React from 'react'
import { Radio } from 'stardust'
const RadioReadOnlyExample = () => (
<Radio label='This radio is read-only' readOnly />
)
export default RadioReadOnlyExample
| This module imports a non - radio element and exports it as a RadioReadOnlyExample. |
import React from 'react'
import ReactDOM from 'react-dom'
import Framework from './js/components/Framework.react'
import webUtil from './js/utils/webUtil'
webUtil.disableGlobalBackspace()
ReactDOM.render(<Framework />, document.getElementById('app')) | Imports a single component of a React application. |
import React from 'react';
const tags = [
'Friend',
'Family',
'Colleague',
'Teachers',
'Students',
'ClassMates',
];
const tagColor = [
'#CD3131',
'#74B49B',
'#0962EA',
'#141829',
'#FFCD38',
'#61105E',
];
function gettags(mails, filterAttr) {
const tags = {};
mails.forEach(mail => {
if (... | export default tags |
import React from 'react';
export default class extends React.Component {
static propTypes = {
name: React.PropTypes.string,
homeworld: React.PropTypes.string,
obiPlanet: React.PropTypes.string,
}
render() {
const textColor = this.props.homeworld === this.props.obiPlanet ... | A component that renders a single missing node in a hierarchy. |
import PropTypes from 'prop-types'
import React from 'react'
import classnames from 'classnames'
if (require('exenv').canUseDOM) {
require('./tab-border.scss')
}
const TabBorder = ({ children, Component, path, className, isActive, style }) => {
const optionalProps = {}
if (path) optionalProps.to = path
retu... | TabBorder is a tab - border component that can be used to align a tab - border. |
import React, { Component } from 'react';
import Facebook from '../../Icons/Facebook';
import LinkedIn from '../../Icons/LinkedIn';
import Dribbble from '../../Icons/Dribbble';
import Behance from '../../Icons/Behance';
import YouTube from '../../Icons/YouTube';
import Medium from '../../Icons/Medium';
import GitHub f... | Component that extends the Knockout s JS component. |
import React, { Component } from 'react';
import { noop, startsWith, endsWith } from 'lodash';
import cx from 'classnames';
import Button from '@material-ui/core/Button';
import { DropTarget } from 'react-dnd';
import { string, func, arrayOf, bool, shape, any } from 'prop-types';
import { withStyles } from '@material-u... | The base component for a single file input that can be selected or dropped. |
import React from 'react';
import _ from 'lodash';
import classnames from 'classnames';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import { CELLS_COUNT } from '../../utils/timetable';
import s from './timetable.scss';
// Ref: https://github.com/yangshun/nusmods-v3/tree/master/src/js
const Timeta... | default implementation of |
import React from 'react';
import { getClassesStatic } from './addons/get-classes';
const Card = (props) => (
<div className={ getClassesStatic('card', props) }>
{ props.children }
</div>
);
export default Card;
| export a default card |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAirlineSeatLegroomNormal = (props) => (
<SvgIcon {...props}>
<path d="M5 12V3H3v9c0 2.76 2.24 5 5 5h6v-2H8c-1.66 0-3-1.34-3-3zm15.5 6H19v-7c0-1.1-.9-2-2-2h-5V3H6v8c0 1.65 1.35 3 3 3h7v7h4.5c.83 0 1.... | A component that exports a sequence of notifications for the airline seat legroom. |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import leaveWord from './containers/leaveWord';
import list from './containers/list/list';
import registerServiceWorker from './registerServiceWorker';
import { Provider } from 'react-redux'
import store from './store';
import { Ro... | Imports a single application. |
/* eslint-disable react/prefer-stateless-function */
import React, { Component } from 'react';
import * as customPropTypes from 'customPropTypes';
import { metrics } from 'react-metrics';
import { connect } from 'react-redux';
import { asyncConnect } from 'redux-connect';
import Helmet from 'react-helmet';
import Modal... | A component that is rendered as a modal window. |
import React, { Component } from 'react';
import moment from 'moment';
import PropTypes from 'prop-types';
import cx from 'classnames';
import createDateObjects from './createDateObjects';
export default class Calendar extends Component {
static propTypes = {
/** Week offset*/
weekOffset: PropTypes.number.is... | The base component for all calendar components. |
import React from 'react';
import PropTypes from 'prop-types';
import { Route } from 'react-router-dom';
import { AuthConsumer } from '../../utils/auth/authProvider';
const PrivateRoute = ({ component, ...rest }) => {
const renderFn = (Component) => (props) => (
<AuthConsumer>
{({ isAuthenticated, signInRe... | Private route that renders a component if it is not authenticated. |
import React from 'react'
import { Component } from 'react'
class TodoInput extends Component {
_onAddToDo(){
var newTodo = this.refs.todo.value.trim();
this.props.onAddToDo(newTodo);
this.refs.todo.value="";
}
_getOnsen(){
axios.post('/api/onsen/list')
.then(function (res) {
console.log(re... | A component that can be used to add or remove a todo item. |
import React from 'react'
import { browserHistory } from 'react-router'
import Basic from './Basic/BasicComponent'
import Contact from './Contact/ContactComponent'
class PatientDemographics extends React.Component {
constructor() {
super()
this.TABS = {
BASIC: 'basic',
CONTACTS: 'contacts'
}... | The base component for all non - basic and non - contact components. |
import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var ColorColumn = React.createClass({
displayName: 'ColorColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.object,
},
renderValue () {
... | A component that displays a color box when a field is missing. |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Icon from 'mastodon/components/icon';
import AnimatedNumber from 'mastodon/components/animated_number';
export default class IconButton extends React.PureComponent {
static propTypes = {
className: PropTyp... | A button that is rendered when a button is clicked on a button. |
import PropTypes from 'prop-types'
import React from 'react'
import config from 'config:@lyra/google-maps-input'
import Button from 'part:@lyra/components/buttons/default'
import Dialog from 'part:@lyra/components/dialogs/default'
import Fieldset from 'part:@lyra/components/fieldsets/default'
import {
PatchEvent,
s... | A component that creates a dropdown of a single missing API key. |
import React from 'react';
export default class extends React.Component {
constructor(props) {
super(props);
this.state = {uiState: 'INIT'};
this.onSubmit = this.onSubmit.bind(this);
}
onSubmit(e) {
e.preventDefault();
this.setState({uiState: 'SENDING'});
this.props.enrollWithEmail(this.... | A component that can be used to render a single missing key sequence. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ItemAttributesEditor from './item-attributes-editor';
import LineAttributesEditor from './line-attributes-editor';
import HoleAttributesEditor from './hole-attributes-editor';
export default function AttributesEditor(_ref) {
var ele... | React - > Component |
import React from 'react'
import { render } from 'react-dom'
import { createStore } from 'redux'
import { Provider } from 'react-redux'
import App from './components/App'
import reducer from './reducers'
const store = createStore(reducer)
render(
<Provider store={store}>
<App />
</Provider>,
document.getEle... | Imports a single from React. |
import styles from './TextLink.less';
import React from 'react';
import PropTypes from 'prop-types';
import ChevronIcon from 'seek-asia-style-guide/react/ChevronIcon/ChevronIcon';
import classnames from 'classnames';
const renderChevron = chevron => {
if (!chevron) {
return null;
}
return (
<ChevronIco... | TextLink - Text link |
import React, { Component } from 'react';
import { browserHistory } from 'react-router';
import Header from '../../components/shared/header'
class homeContainer extends Component {
render() {
return (
<section>
<Header />
{this.props.children}
<div className="container">
... | The homeContainer class which renders a single Gate with a browser history. |
import React from 'react';
function Content({
children,
isVisible = true,
}) {
return (
<div style={style[isVisible]}>
{isVisible ? children : null}
</div>
);
}
const style = {
[true]: {},
[false]: {
display: 'none',
},
};
Content.propTypes = {
children: React.PropTypes.node,
isVi... | Content for |
/* eslint react/no-multi-comp: 0 */
import React, { Component } from 'react';
class Tag extends Component {
static propTypes = {
labelField: React.PropTypes.string,
onDelete: React.PropTypes.func.isRequired,
tag: React.PropTypes.object.isRequired,
removeComponent: React.PropTypes.func,
readOnly: ... | A component that wraps a tag with a label field and a remove component. |
import React from 'react';
import classNames from 'classnames';
// import theme from './theme/static';
import ThemeContext from './theme/context';
import ThemeSwitcher from './theme/Switcher';
import styles from './Header.css';
export default function Header() {
return (
<ThemeContext.Consumer>
{({ theme... | export default header |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPermPhoneMsg = (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.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.2... | A component that exports a sequence of action - perm - phone messages. |
import React from 'react'
import Link from 'next/link'
import glamorous from 'glamorous'
import {colors} from '../styles/global-styles'
const getPathname = pathname => {
return pathname === undefined ? '' : pathname
}
const basicLinkStyles =
// @css
{cursor: 'pointer'}
const anchorStyles =
// @css
{
te... | CSS functions for a single node |
import 'babel-core/polyfill';
import React from 'react';
import { Provider } from 'react-redux';
import App from './containers/App';
import configureStore from './store/configureStore';
const store = configureStore();
React.render(
<Provider store={store}>
{() => <App />}
</Provider>,
document.getElementByI... | Imports a single node in the DOM. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalTaxi = (props) => (
<SvgIcon {...props}>
<path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5H15V3H9v2H6.5c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.4... | A component that exports a sequence of MapsLocalTaxi objects. |
import React from 'react'
import VisibleChainList from '../containers/VisibleChainList'
import Sampler from './Sampler'
import UrlEntryBox from './UrlEntryBox'
const App = () => (
<div>
<h1>Streamkov</h1>
<VisibleChainList />
<Sampler />
<UrlEntryBox />
</div>
)
export default App
| export default app catch - all |
import React from 'react';
const style = {
position: 'absolute',
right: 0,
bottom: 0,
left:0,
minHeight: '50px',
padding: '1rem',
textAlign: 'center',
backgroundColor: '#222',
color: '#fff',
fontSize: 'small',
};
export const Footer = function(){
return (
<div style={style}>
<ul className="list-inline"... | Exports a footer with a single object. |
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { createStore } from 'redux'
import todoApp from './reducers'
import App from './components/App'
let store = createStore(todoApp)
render(
<Provider store={store}>
<App />
</Provider>,
document.getEleme... | Imports a single let. |
import React from 'react';
import PropTypes from 'prop-types';
import ReactModal from 'react-modal';
import { Img } from 'react-image';
import { connect } from 'react-redux';
import fetch from '../util/fetch';
import { getAliases } from '../api';
import saveIcon from '../images/icons/save.svg';
import exitIcon from '.... | The alias modal component |
import React from 'react'
import Avatar from 'react-ions/lib/components/Avatar'
import Button from 'react-ions/lib/components/Button'
import style from './style.scss'
class ExampleAvatar extends React.Component {
constructor(props) {
super(props)
}
state = {
letters: 'cf',
size: '100'
}
randomi... | Component that renders a random sequence of characters. |
/**
* Copyright (c) 2015-present, Alibaba Group Holding Limited.
* All rights reserved.
*
* @providesModule ReactTabBar
*/
'use strict';
import React from 'react';
import View from 'ReactView';
import TabBarItem from './TabBarItem.web';
import TabBarContents from './TabBarContents.web';
import assign from 'object... | Provides a tab bar with a single child of a TabBar. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvReplay = (props) => (
<SvgIcon {...props}>
<path d="M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"/>
</SvgIcon>
);
AvReplay = pure(AvReplay);
AvReplay... | A component that exports a single node in a sequence of nodes. |
import Telescope from '../components/lib/index';
import React from 'react';
let _ = require('underscore');
const Topics = {};
export default Topics;
| Imports the Telescope module and exports the Topics property. |
import React from 'react';
import translate from '../../../translate/translate';
import { connect } from 'react-redux';
import { coindGetStdout } from '../../../actions/actionCreators';
import Store from '../../../store';
class DaemonStdoutPanel extends React.Component {
constructor() {
super();
this.state =... | A component that displays a list of native coins that can be used to coin a user. |
import React from 'react';
import { Modal, Grid, CircularProgress, Typography } from '@material-ui/core';
const WaitingOverlay = (props) => {
let gridStyle = {
width: '100%',
height: '100%',
}
return (
<Modal open={props.open} disableAutoFocus={true}>
<Grid container st... | React - related module |
import React from 'react';
import PropTypes from 'prop-types';
import IconButton from './icon_button';
import { defineMessages, injectIntl } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
const messages = defineMessages({
unblockDomain: { id: 'account.unblock_domain', default... | A component that unblocks a domain if it is blocked. |
import React from 'react';
import Textarea from 'react-textarea-autosize';
import {Grid, Row, Col, Panel, FormGroup, Radio} from 'react-bootstrap';
import AppActions from '../actions/AppActions';
class AddTransaction extends React.Component {
handleSubmit(event) {
event.preventDefault();
var type = event.ta... | Adds a single transaction to a Bootstrap component. |
import test from 'tape';
import { CLIEngine } from 'eslint';
import eslintrc from '../';
import baseConfig from '../base';
import reactRules from '../rules/react';
const cli = new CLIEngine({
useEslintrc: false,
baseConfig: eslintrc,
// This rule fails when executing on text.
rules: {indent: 0},
});
function... | A rule that checks if a component is passed to a component constructor. |
import React from 'react'
import { storiesOf } from '@storybook/react'
import Specimen from 'v2/stories/__components__/Specimen'
import { EmbeddedChannel } from 'v2/pages/channel/EmbeddedChannelPage/components/EmbeddedChannel'
storiesOf('EmbeddedChannel', module).add('default', () => (
<Specimen>
<EmbeddedChan... | Imports a bunch of components from a specific module. |
import React from 'react'
import { connect } from 'react-redux'
import Instance from './Instance'
import ListSubheader from 'material-ui/List/ListSubheader'
export default connect(mapStateToProps)(({
round,
rooms,
adjudicatorScores
}) => {
const filterRooms = roomToMatch => roomToMatch.round === round._id
c... | React - redux - react - mapStateToProps |
import React from 'react'
import { connect } from 'react-redux'
import { getOMDBDetails } from './actionCreators'
import Header from './Header'
const { shape, string, func } = React.PropTypes
const Details = React.createClass({
propTypes: {
show: shape({
title: string,
year: string,
poster: str... | The action creator function for a series of action creators. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorVerticalAlignBottom = (props) => (
<SvgIcon {...props}>
<path d="M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"/>
</SvgIcon>
);
EditorVerticalAlignBottom = pure(EditorVerticalAlignBottom);
EditorVertical... | A component that exports a single |
'use strict';
exports.__esModule = true;
var _createHelper = require('./createHelper');
var _createHelper2 = _interopRequireDefault(_createHelper);
var _createEagerFactory = require('./createEagerFactory');
var _createEagerFactory2 = _interopRequireDefault(_createEagerFactory);
function _interopRequireDefault(obj... | Create a function that renders a component with a lazy loading strategy. |
/*
* Copyright 2016, Red Hat, Inc. and individual contributors as indicated by the
* @author tags. See the copyright.txt file in the distribution for a full
* listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public ... | Displays a single node in the hierarchy of components that display only side menu bar from frontend. |
import React from 'react';
import IconBase from 'react-icon-base';
export default class FaGift extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m23.7 30.3v-16h-7.1v16q0 0.5 0.4 0.8t1 0.3h4.3q0.6 0 1-0.3t0.4-0.8z m-10.2-18.9... | A component that displays a sequence of icons. |
// @flow
import React from 'react';
import styles from './style.css';
type Props = {
left: React.Component<*>;
right: React.Component<*>;
children: React.Component<*>;
};
const Main = (props: Props) => (
<div className={styles.container}>
<div className={styles.left}>{props.left}</div>
{
props.... | A component that can be rendered as a child of a node. |
import React from 'react';
export default class IndexList extends React.Component{
render(){
return (
<div>
<h1>这是主要内容列表</h1>
</div>
)
}
} | A component that can be used to index a node in a hierarchy. |
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import Recaptcha from '../src';
// site key
const sitekey = 'xxxxxxx';
// specifying your onload callback function
const callback = () => {
console.log('Done!!!!');
};
const verifyCallback = (response) => {
console.log(response... | The base class for all of the components that are not part of a react - dom hierarchy. |
/** @format */
/**
* External dependencies
*/
import React from 'react';
import PropTypes from 'prop-types';
import { omit } from 'lodash';
/**
* Internal dependencies
*/
import FormCheckbox from 'components/forms/form-checkbox';
import FormField from './form-field';
const CheckboxField = props => {
const { fie... | A component that allows to toggle the state of a single node in a group of components. |
import React from 'react';
import { render } from 'react-dom';
import { Tab, Tabs, TabList, TabPanel } from '../../src/index';
import '../../style/react-tabs.css';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
showA: true,
showB: true,
showC: true,
... | App class for a single missing - node sequence. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsDirectionsBike = (props) => (
<SvgIcon {...props}>
<path d="M15.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.... | A component that renders a sequence of icons that are used to render a sequence of icons. |
import React from 'react';
import classSet from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const Thumbnail = React.createClass({
mixins: [BootstrapMixin],
getDefaultProps() {
return {
bsClass: 'thumbnail'
};
},
render() {
let classes = this.getBsClassSet();
if(this.pr... | Generate a thumbnail for a single node. |
import React from 'react';
import styles from './app.less';
export default () => <div className={styles.root} />;
| Default module that exports a to a div. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.