code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react'
import Types from './Types'
import Variations from './Variations'
const RailExamples = () => (
<div>
<Types />
<Variations />
</div>
)
export default RailExamples
| RailExamples - RailExamples of a |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { observer } from 'mobx-react';
import classnames from 'classnames';
import Appear from './effects/Appear';
export default @observer class StatusBarTargetUrl extends Component {
static propTypes = {
className: PropTypes.string,... | The status bar target URL class. |
import React from 'react';
import { Link } from 'react-router';
import styled from 'styled-components';
const StyledLink = styled(Link)`
color: tomato;
display: block;
margin: 0.5em 0;
font-family: Helvetica, Arial, sans-serif;
&:hover {
text-decoration: underline;... | A component that shows a list of categories that can be selected by a user. |
import React from 'react';
import CInP from './cinp';
import AddPackageDialog from './AddPackageDialog';
import PackageFile from './PackageFile';
import { Table, TableHead, TableRow, TableCell } from 'react-toolbox';
import { Link } from 'react-router-dom';
class Package extends React.Component
{
state = {
pa... | Package component that displays a list of packages that can be used to create a new component. |
import React from 'react';
import { SegmentedControl } from 'elemental';
const VALUE_OPTIONS = [
{ label: 'Is Checked', value: true },
{ label: 'Is NOT Checked', value: false },
];
function getDefaultValue () {
return {
value: true,
};
}
var BooleanFilter = React.createClass({
propTypes: {
filter: React.Pro... | A filter that can be used to filter a single node. |
// 3rd party css files
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
import '../node_modules/bootstrap/dist/css/bootstrap-theme.min.css';
import '../node_modules/react-bootstrap-table/dist/react-bootstrap-table.min.css';
// Import css declarations for the report
import './assets/main.css';
import '@l... | 3rd party css files |
import React from 'react'
import Modal from 'react-modal'
import {modalStyle} from '../style/modalStyle'
import {bindActionCreators} from 'redux'
import { connect } from 'react-redux'
import * as authActions from '../actions/userActions'
class LogoutModal extends React.Component {
constructor(...args) {
super(..... | A component that logs out a user in a modal window. |
import useStyles from 'isomorphic-style-loader/useStyles';
import React from 'react';
import PropTypes from 'prop-types';
import s from './Page.css';
export default function Page({ title, html }) {
useStyles(s);
return (
<div>
<h1>{title}</h1>
<div
// eslint-disable-next-line react/no-dange... | The default page implementation for missing - |
import React from 'react';
import SearchCarRowImage from './SearchCarRowImage';
export default class SearchCarRow extends React.Component {
constructor(props) {
super(props);
this.createMarkup = this.createMarkup.bind(this);
}
createMarkup(markup) {
return {__html: markup};
}
render() {
... | The base class for the search car row. |
'use strict';
import React from 'react';
import CountItem from '../components/level_counter/CountItem'
class Footer extends React.Component{
constructor(props) {
super(props);
}
render() {
return (
<footer>
</footer>
);
}
}
export default Footer;
| Footer class for a count - item counter. |
import React from 'react';
import styles from './todo.css'
export default (props) => {
return (
<li className={props.todo.completed ? styles.todo_done : styles.todo_pending} onClick={props.onTodoClicked}>{props.todo.name}</li>
);
};
| The default component for the missing - todo - menu. |
import React, { Component } from 'react';
//const SearchBar = () => {
// return <input />;
//};
// each class based object has a state object
// if state of search bar is changed then the render function is reran
class SearchBar extends Component{
// this is how we initialize state in a class based component
// ... | This is the base class for all class based objects that have a state object |
import React from 'react';
import PropTypes from 'prop-types';
import char1 from './images/char1.png';
import char2 from './images/char2.png';
import char3 from './images/char3.png';
import char4 from './images/char4.png';
import char5 from './images/char5.png';
import char1Active from './images/char1-active.png';
imp... | A component that renders a single sequence of characters that have a specific number of active characters. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderLeft = (props) => (
<SvgIcon {...props}>
<path d="M11 21h2v-2h-2v2zm0-4h2v-2h-2v2zm0-12h2V3h-2v2zm0 4h2V7h-2v2zm0 4h2v-2h-2v2zm-4 8h2v-2H7v2zM7 5h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2V3H3v18zM19 9h2V7h-2v2z... | A small function to create a component that renders a border around the left side of a menu. |
๏ปฟimport React from 'react';
const ImageUpload = ({uploadImage}) => {
return (
<div className="previewComponent">
<label for="upload-photo" className="btn btn-info btn-circle-lg" title="Change Image">
<i className="p-t-3 glyphicon glyphicon-camera"></i>
... | function to export a default image upload function |
import Field from '../Field';
import React from 'react';
import { FormInput } from '../../../admin/client/App/elemental';
/**
* TODO:
* - Remove dependency on jQuery
*/
// Scope jQuery and the bootstrap-markdown editor so it will mount
var $ = require('jquery');
require('./lib/bootstrap-markdown');
// Append/remo... | The actual component that is rendered when a bootstrap - markdown editor is mounted. |
import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const Types = () => (
<ExampleSection title='Types'>
<ComponentExample
title='Card'
description='A card displays sit... | The types of a sequence of components. |
import React from 'react';
import {Link} from 'react-router';
import classnames from 'classnames';
class Sidebar extends React.Component {
constructor(props, context) {
super(props, context);
console.log('==sidebar.js== constructor');
this.state = {
routes: [
{url: '/index', icon: 'home... | A Sidebar component that can be used to show a menu of children of a specific type. |
import React from 'react';
import PropTypes from 'prop-types';
import Color from 'color';
import { compose, setPropTypes } from 'recompose';
import { View, StyleSheet } from 'react-native';
import SafeAreaView from '@ui/SafeAreaView';
import Icon from '@ui/Icon';
import Touchable from '@ui/Touchable';
import ConnectedI... | Imports a single node in a hierarchy. |
import React from 'react';
import {
browserHistory,
Router,
Route,
IndexRoute,
} from 'react-router';
import Main from 'components/main';
import Login from 'containers/login';
import Logout from 'containers/logout';
import Door from 'containers/door/list';
import AddUser from 'containers/user/admin/add';
impor... | Imports all routes from the router. |
import React from 'react';
import d3 from 'd3';
import c3 from 'c3';
export default class Chart extends React.Component {
constructor(props) {
super(props);
}
componentDidMount() {
this.chartC3(this.props.weatherArray);
}
componentDidUpdate() {
this.chartC3(this.props.weatherArray);
}
chartC3... | The chart component |
import React from 'react'
import App from 'next/app'
import '../styles/global1.css'
import '../styles/global2.css'
class MyApp extends App {
render() {
const { Component, pageProps } = this.props
return <Component {...pageProps} />
}
}
export default MyApp
| A component that renders a single component in a chain of components. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let Crop = props =>
<SvgIcon {...props}>
<path d="M17 15h2V7c0-1.1-.9-2-2-2H9v2h8v8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2H7z" />
</SvgIcon>;
Crop = pure(Crop);
Crop.muiName = 'SvgIcon';
export... | A component that can be used to crop a block of icons. |
import React from 'react'
import { Provider } from 'react-redux'
import { createStore, combineReducers, applyMiddleware, compose } from 'redux'
import exampleReducer from 'src/reducers/example'
import { GRAPHQL_API_BASE_URL } from 'src/config'
import {
ApolloClient,
ApolloProvider,
createNetworkInterface,
Intr... | Imports a single header object from the network interface and creates a store for the given header object. |
import React from 'react';
import classNames from 'classnames';
import omit from 'omit.js';
const Icon = (props) => {
const { type, className = '', spin } = props;
const classString = classNames({
anticon: true,
'anticon-spin': !!spin || type === 'loading',
[`anticon-${type}`]: true,
... | A component that renders an anticon if the component is not already an icon. |
import test from 'ava';
import React from 'react';
import {renderToStaticMarkup} from 'react-dom/server';
import Alert from '../src/components/alert';
test('', t => {
const result = renderStatic();
t.true(result);
});
function renderStatic(props) {
return renderToStaticMarkup(<Alert {...props}/>);
}
| Imports a single alert and renders it to a static markup. |
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
// import
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
import React from 'react';
import { string, node } from 'prop-types';
import { Link as GatsbyLink } from 'gatsby';
import { OutboundLink } from 'ga... | Link - > |
import React from 'react';
import { browserHistory, Link } from 'react-router';
import { Menu, NavItem, Media, Heading, Text, Divider, InlineForm } from 'rebass';
import Recommended from './Recommended';
export default class Nav extends React.Component {
constructor(props) {
super(props);
this.state = {
... | The base class for all navigation items. |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Button from '../../components/button';
import Translation from '../../behaviours/translation';
function isDescendant(parent, child) {
let node = child.parentNode;
while (node != null) {
... | A Dropdown component that shows a dropdown menu that is a descendant of a given node. |
import React from 'react'
import { render } from 'react-dom'
import App from './components/App'
render(
<App />,
document.getElementById('mountApp')
)
| Imports a single element from a React container. |
import React from 'react';
import SvgIcon from 'material-ui/SvgIcon';
const GithubIcon = (props) => (
<SvgIcon viewBox="0 0 16 16" {...props}>
<path d="M8 0C3.58 0 0 3.582 0 8c0 3.535 2.292 6.533 5.47 7.59.4.075.547-.172.547-.385 0-.19-.007-.693-.01-1.36-2.226.483-2.695-1.073-2.695-1.073-.364-.924-.89-1.17... | A component that renders a missing missing |
import React from 'react';
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';
import { CardTitle, CardText, CardActions, RaisedButton, FlatButton } from 'material-ui';
export default createReactClass({
displayName: 'Confirmation',
propTypes: {
callbacks: PropTypes.object
... | The default function for adding a confirmation to a single node. |
import React from 'react';
export default class LoginForm extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div style={{visibility: this.props.visibility, position: 'fixed', fontFamily: ["Lucida Sans Unicode", "Lucida Grande", 'sans-serif'], fontSize: 12 + 'px', left: 40 + '... | The login form class |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {... | Link component that renders a link when a key is pressed on the right of a page. |
import React from 'react'
import Input from '../common/textInput'
import {Link} from 'react-router'
export default class extends React.Component {
static propTypes = {
memberKey: React.PropTypes.string.isRequired,
sit: React.PropTypes.shape({
sitter: React.PropTypes.string.isRequired,
date: React... | A component that displays a single critical sequence sequence. |
import styles from './StyleVariantA.css';
import React from 'react';
export default class StyleVariantA extends React.Component {
render() {
return(
<div className={styles.root}>
<p className={styles.text}>Style Variant A</p>
</div>
);
}
};
| A component that renders a single missing tag in the style variant. |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdDrafts(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M43.98 19L44 39c0 2.21-1.79 4-4 4H8c-2.21 0-4-1.79-4-4V19c0-1.44.77-2.69 1.9-3.4L24 5l18.1 10.6a4 4 0 0 1 1.88 3.4zM24 29l16.52-10.33L24 9 7.48 18.67 ... | Missing Drafts. |
import React from 'react';
import PropTypes from 'prop-types';
import Text from '../Text';
import { colors } from '../../lib/styling';
import styles from './styles';
const Icon = ({ icon, ...props }) => (
<Text className="text" color={colors.white} {...props}>
<style jsx>{styles}</style>
<i className={`icon-... | export Icon for missing node |
import PropTypes from 'prop-types'
import React from 'react'
import DocumentTitle from 'react-document-title'
import { Grid } from 'shengnian-ui-react'
import withDocInfo from 'docs/app/HOC/withDocInfo'
import ComponentDocHeader from './ComponentDocHeader'
import ComponentDocLinks from './ComponentDocLinks'
import Com... | Imports a single non - standard object. |
import React, { Component } from 'react';
import Header from './Header';
export default class App extends Component {
render () {
return (
<div className="container">
{/* Header */}
<Header/>
</div>
);
}
}
| The base class for all components that are not part of a React component. |
import React from 'react';
import Dialog from 'material-ui/Dialog';
import TextField from 'material-ui/TextField';
import FlatButton from 'material-ui/FlatButton';
import { connect } from 'react-redux';
import actions from './actions';
/* eslint react/jsx-boolean-value:0 */
const ChangePasswordDialog = props => (
... | A component that displays a modal window which allows to change the password of a user. |
import React from 'react';
class Calendar extends React.Component {
render () {
var events = [{
id: 0, title: 'essay due'
}];
return (
<div>
<h2>Calendar</h2>
<ul>
{events.map(event => (
<li key={event.id}>{event.title}</li>
))}
</ul>
... | A calendar is a component that can be rendered by a user. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import styles from './Menu.css';
import grid from '../../../../grid.css';
import { Navbar, Nav, NavItem, Button, Glyphicon, NavDropdown, MenuItem } from 'react-bootstrap';
import {
fetchCategories, set... | A component that is rendered in a menu. |
import React from 'react';
import PropTypes from 'prop-types';
import scheduleIdleTask from '../features/ui/util/schedule_idle_task';
import getRectFromEntry from '../features/ui/util/get_rect_from_entry';
// Diff these props in the "unrendered" state
const updateOnPropsForUnrendered = ['id', 'index', 'listLength', 'c... | The base class for all intersection observers. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFace = (props) => (
<SvgIcon {...props}>
<path d="M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-... | A component that exports a series of action - related icons. |
import React from 'react';
import ReactDOM from 'react-dom';
import './global.css'
import App from './components/App/App';
import registerServiceWorker from './registerServiceWorker';
import './test/yhtml5Utils';
import mock from './features/mock';
import axios from "axios";
import { square, cube } from './features/tre... | This module is used to render a single node in the browser. |
import React from 'react';
import { PureRenderMixin } from 'react/addons';
import classNames from 'classnames';
import DialogStore from 'stores/DialogStore';
export default React.createClass({
mixins: [PureRenderMixin],
getInitialState() {
return {
typing: null,
show: false
};
},
compon... | The default constructor for a sequence of components. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFeedback = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"/>
</SvgIcon>
);
ActionFeedback = pure(Acti... | A component that exports a single node in a sequence of nodes. |
import React from 'react';
import { findDOMNode } from 'react-dom';
import Popout from '../../../../shared/Popout';
import { Filters } from 'FieldTypes';
var ListFiltersAddForm = React.createClass({
propTypes: {
field: React.PropTypes.object.isRequired,
maxHeight: React.PropTypes.number,
onApply: React.PropTyp... | The ListFiltersAddForm component is a component that can be used to add a filter to a list. |
import React, { Component } from 'react';
import Colour from './Colour';
export default class Colours extends Component {
// propTypes
constructor(props) {
super(props);
this.state = {
mainStyle: {
display: 'flex',
flexDirection: 'column',
height: '100%',
width: '100%'
},
wrapperStyle... | A component that can be rendered as a colours. |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import App from './components/App';
import reducers from './reducers';
import 'bootstrap/dist/css/bootstrap.min.css'; // Bootstrap 4 Alpha 6
import './index.css';
c... | Imports a single node in the DOM. |
// @flow
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import styles from './Counter.css';
class Counter extends Component {
props: {
increment: () => void,
incrementIfOdd: () => void,
incrementAsync: () => void,
decrement: () => void,
counter: number
};
... | A component that displays a fade in if a user clicks on a counter. |
import React from 'react';
import test from 'ava';
import { shallow } from 'enzyme';
import { Footer } from '../../components/Footer/Footer';
test('renders the footer properly', t => {
const wrapper = shallow(
<Footer />
);
t.is(wrapper.find('p').length, 2);
t.is(wrapper.find('p').first().text(), 'ยฉ 2016 ... | Check if a footer is properly rendered |
import React from 'react'
import { Image, Segment } from 'shengnian-ui-react'
const SegmentExampleLoading = () => (
<Segment loading>
<Image src='/assets/images/wireframe/paragraph.png' />
</Segment>
)
export default SegmentExampleLoading
| Imports a single non - empty and exports it as a default SegmentExampleLoading object. |
import React from 'react';
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';
import _ from 'lodash';
import { result as _result } from 'lore-utils';
import { SchemaForm } from 'lore-react-forms';
import { RequestError } from 'lore-react-forms-bootstrap';
export default createReactC... | The default implementation of a sequence of functions that can be used to create a sequence of React classes. |
import React from 'react';
import PropTypes from 'prop-types';
import { Switch, Route } from 'react-router-dom';
import ColumnLoading from '../components/column_loading';
import BundleColumnError from '../components/bundle_column_error';
import BundleContainer from '../containers/bundle_container';
// Small wrapper t... | A route wrapper for the switch component that can be rendered inside a route. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
class Pagination extends Component {
render() {
const {
children,
className,
tag: Tag,
...attributes
} = this.props;
const classes = classNames(
'pagination... | A base class for pagination components. |
import React from 'react'
import { IndexLink, Link } from 'react-router'
import PropTypes from 'prop-types'
import './PageLayout.scss'
export const PageLayout = ({ children }) => (
<div className='container text-center'>
<h1>React Redux Starter Kit</h1>
<IndexLink to='/' activeClassName='page-layout__nav-ite... | PageLayout is a page layout that can be used to render a single node in a tree. |
import React from 'react';
import PropTypes from 'prop-types';
import { withState } from 'recompose';
import { find } from 'lodash';
import { Box } from '@rebass/grid';
import { getItems, getKeyExtractor } from './StyledSelect';
import Container from './Container';
const enhance = withState('selected', 'setSelected',... | The standard way to render a single unique key in a radio list. |
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
import configureStore from './store'
const store = configureStore()
const targetEl = document.getElementById('root')
const node = (<App store={store}/>)
ReactDOM.render(node, targetEl)
| Imports a bunch of components into a DOM. |
import React from 'react'
import TerminalActions from '../actions/TerminalActions'
import TerminalStore from '../stores/TerminalStore'
import _ from 'lodash'
class Terminal extends React.Component {
constructor(props) {
super(props)
this.state = {
title: 'Ready.',
content: [],
foldFlag: tru... | A terminal component that can be used to show a line in a terminal. |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { Router, IndexRoute, Route, browserHistory } from 'react-router'
import { syncHistoryWithStore, routerMiddleware , routerActions} from 'react-router-redux'
import { createStore, applyMiddleware, compose } from ... | Imports a single node in the DOM. |
import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import IconButton from '../../../components/icon_button';
const messages = defineMessages({
error: { id: 'bundle_modal_error.message', defaultMessage: 'Something went wrong while loading this comp... | A component that shows a modal modal dialog with a message to retry and close the modal. |
import Field from '../Field';
import React from 'react';
module.exports = Field.create({
displayName: 'TextareaField',
renderField () {
var styles = {
height: this.props.height
};
return <textarea name={this.props.path} styles={styles} ref="focusTarget" value={this.props.value} onChange={this.valueChanged... | A field that can be used to display a textarea field in a form. |
import React from 'react'
import Helmet from 'react-helmet'
import config from '../../data/SiteConfig'
import './index.css'
import '../css/atom-one-dark.css'
import '../css/syntax.css'
import '../css/animate.css'
export default class MainLayout extends React.Component {
getLocalTitle() {
function capitalize(str... | The main layout for a single node. |
import {createBrowserHistory} from 'history';
import React from 'react';
import {render} from 'react-dom';
import {createStore} from 'redux';
import {enableFocusMode} from './actions';
import {locationToReference} from './data/model';
import {updateStoreWithPassageText} from './data/fetcher';
import preferenceTracker,... | Imports the application store and the browser history. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageTimelapse = (props) => (
<SvgIcon {...props}>
<path d="M16.24 7.76C15.07 6.59 13.54 6 12 6v6l-4.24 4.24c2.34 2.34 6.14 2.34 8.49 0 2.34-2.34 2.34-6.14-.01-8.48zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.4... | A component that renders a series of images in a series of icons. |
'use strict';
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must e... | A component that can be used to specify a route s indexRoute. |
import React from 'react';
import invariant from 'invariant';
import { createRouteFromReactElement as _createRouteFromReactElement } from './RouteUtils';
import { formatPattern } from './PatternUtils';
import { falsy } from './InternalPropTypes';
var _React$PropTypes = React.PropTypes,
string = _React$PropTypes.st... | The redirect component is used to declare another URL path a client should have in a given state. |
import React from 'react';
import FoodFighterAction from '../actions/FoodFighterAction';
import FoodFighterStore from '../stores/FoodFighterStore';
/**
* Root App Component
*/
export default class App extends React.Component { // eslint-disable-line require-jsdoc
/**
* Depends stores
*
* @return {Store... | The base class for all of the components that are not part of the app. |
import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import MapChart from '../chart/MapChart';
import VectorMapMenu from './VectorMapMenu';
import * as stationActions from '../../actions/station';
import { numberIsBetween } from '../../utils/helper... | The base class for the VectorMapChart component. |
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.getElementById('root')
);
| Imports a single node in the hierarchy. |
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './containers/App';
import HomePage from './containers/HomePage';
export default (
<Route path="/" component={App}>
<IndexRoute component={HomePage} />
</Route>
);
| export default route |
import React from 'react'
import { Link } from 'react-router'
import Helmet from 'react-helmet'
import { config } from 'config'
import { prefixLink } from 'gatsby-helpers'
import bib from './bib'
import info from './info'
import PersonPage from '../../components/PersonPage'
export default class Index extends React.Co... | The main function for the Helmet index class. |
import React from 'react';
const NotFound = () => {
return (
<div>404: Not Found</div>
);
};
export default NotFound;
| 404 Not Found |
import React from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {Modal, Button} from 'react-bootstrap';
import _ from 'lodash';
import helper from '../../helpers/uiHelper';
import * as courseActions from '../../actions/courseActions';
import {departmentSelectListItem} fr... | A component that displays a modal dialog with a modal modal. |
import React from 'react'
import Types from './Types'
import Variations from './Variations'
const DividerExamples = () => (
<div>
<Types />
<Variations />
</div>
)
export default DividerExamples
| Example of how to render a in a widget. |
import React, { Component } from 'react';
import {
View,
Text,
Image,
Platform,
ScrollView,
StyleSheet
} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import Panel from '../component/panel';
import Navbar from '../component/navbar';
import Config from '../config';
import ViewP... | Component AboutPage View |
/**
* 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';
import './assets/style.css';
export default () => <p id="feature-css-inclusion">We love useless text.</p>;
| Deprecated. Use with caution! |
import React from 'react';
import { storiesOf } from '@kadira/storybook';
import { Field } from 'redux-form';
import InputText from './';
import FakeForm from '../../utils/FakeForm';
import { Provider, store } from '../../utils/formUtils';
function renderField(field) {
return (
<Field
name={field.name}
... | The default view of a field is a special case that includes some custom logic that will render the field. |
import React, { Component } from 'react';
import SearchBar from '../containers/search_bar';
import WeatherList from '../containers/weather_list';
export default class App extends Component {
render() {
return (
<div>
<SearchBar />
<WeatherList />
</div>
);
}
}
| The default app class |
import React from 'react';
import warning from './routerWarning';
import invariant from 'invariant';
import Redirect from './Redirect';
import { falsy } from './InternalPropTypes';
var _React$PropTypes = React.PropTypes;
var string = _React$PropTypes.string;
var object = _React$PropTypes.object;
/**
* An <IndexRedir... | The indexRedirect component is used to redirect to an indexRoute. |
import React from 'react';
import t from 'tcomb';
import { props } from 'tcomb-react';
import { pure, skinnable } from '../utils';
import { MomentDate, Value, Mode } from '../utils/model';
import MonthPickerTop from './MonthPickerTop';
import MonthPickerBody from './MonthPickerBody';
@pure
@skinnable()
@props({
chan... | A component that creates a month picker. |
import React from 'react';
import LoadingIndicator from '../../../components/loading_indicator';
// Keep the markup in sync with <BundleModalError />
// (make sure they have the same dimensions)
const ModalLoading = () => (
<div className='modal-root__modal error-modal'>
<div className='error-modal__body'>
... | Exports a single object to a modal window. |
import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import { setComposerStub } from 'react-komposer';
import DashboardFriends from '../dashboard_friends.jsx';
storiesOf('users.DashboardFriends', module)
.add('default view', () => {
return (
<DashboardFriends />
);
})
| Imports a module if it is not imported. |
import React from 'react';
import Slider from 'react-slick';
import './horizontal-carousel.less';
import FormInput from './FormInput';
import UploadImage from './upload-image';
import { Transition } from 'semantic-ui-react';
export default class HorizontalCarousel extends React.Component {
constructor(props){
s... | The HorizontalCarousel component which is a component that can be used to show a Bootstrap menu with a Bootstrap menu. |
import React, { Component } from 'react';
import { Text, View } from 'react-native';
import MapView from 'react-native-maps';
import { Router } from '../Nav';
import LogOut from '../LogOut';
import styles from './styles';
export default class Tracking extends Component {
constructor(props) {
super(props);
t... | The base class for tracking a car. |
import React from 'react';
import planList from './plans';
import {Menu, MenuItem, Popover} from 'material-ui'
var valid = require('card-validator');
const style = {
menuItem: {
width: '112px'
}
}
class SelectCard extends React.Component {
constructor(props) {
super(props);
this.sta... | A component that displays a single card in a modal box. |
import React from 'react'
import { translate } from 'react-i18next'
import { inject, observer } from 'mobx-react'
/** Ant Design */
import Popover from 'antd/lib/popover'
/** Components */
import WalletLock from './wallet/WalletLock.js'
import WalletUnlock from './wallet/WalletUnlock.js'
@translate(['common'])
@inje... | Component that creates a header that can be used to show a sequence of non - terminal non |
import React from 'react';
import _ from 'lodash';
import i18n from 'lib-app/i18n';
import API from 'lib-app/api-call';
import AdminPanelCustomFieldForm from 'app/admin/panel/users/admin-panel-custom-field-form';
import ModalContainer from 'app-components/modal-container';
import AreYouSure from 'app-components/are-y... | Component that renders a single admin panel custom - field. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionBackup = (props) => (
<SvgIcon {...props}>
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z... | A component that renders a series of action buttons. |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import noble from 'react-native-ble';
class advertisement_discovery extends Component {
render() {
return... | An abstract class that is used to display a single missing - node node in the system. |
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/App';
import Main from './containers/Main';
import AboutPage from './components/AboutPage.js';
export default (
<Route path="/" component={App}>
<IndexRoute component={Main}/>
<Route path="about" compo... | export default sequence number router |
import React from 'react';
import Modal from 'react-modal';
//import pureRender from 'pure-render-decorator';
import { Styles, FlatButton } from 'material-ui';
import AppCacheStore from 'stores/AppCacheStore';
import AppCacheActionCreators from 'actions/AppCacheActionCreators';
import { KeyCodes } from 'constants/Act... | The base component for adding a new contact to the app. |
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from '../../components/loading_indicator';
import { fetchFavourites } from '../../actions/interactions';
import { ScrollContainer } fr... | The favourites component is a component that can be used to display a list of favourited users. |
import React from 'react'
import Slick from 'react-slick'
import './Slider.scss'
var Slider = React.createClass({
render: function () {
var settings = {
dots: true,
infinite: true,
speed: 500,
// autoplay: true,
autoplaySpeed: 7500,
slidesToShow: 1,
slidesToScroll: 1,
... | The main function for the sliders. |
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import _extends from... | A component that can be used to toggle or toggle a dropdown. |
import React from 'react';
import styleSheets from './styleSheets';
const preloads = styleSheets.map((styleSheet, i) => (
<React.Fragment>
<link
as='style'
href={styleSheet.props.href}
key={`preload-${i}`}
rel='preload'
/>
{styleSheet}
</React.Fragment>
));
export default prelo... | Imports all missing - missing |
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 |
'use strict';
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
} from 'react-native';
export default class WelcomeText extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</... | A component that is rendered by a component that is not a component of a list view. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.