code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React, { Component } from 'react';
import Section from 'shared/components/section/section';
import axios from 'axios';
import PropTypes from 'prop-types';
import config from 'config/environment';
import Form from 'shared/components/form/form';
import FormEmail from 'shared/components/form/formEmail/formEmail';
i... | Component that will be used to sign up a user s email address. |
import React from 'react';
import Icon from './Icon';
import './spinner.css';
export default function Spinner(props) {
return (
<span>
<Icon {...props} className="spinner" viewBox="0 0 100 100">
{/* Major arc */}
<path
id="path1"
strokeWidth="3px"
stroke="#000"... | Spinner - Spinner for missing node. |
import React from 'react'
import { Segment } from 'shengnian-ui-react'
const SegmentExampleCompact = () => (
<Segment compact>
Compact content.
</Segment>
)
export default SegmentExampleCompact
| Example of how to display a single |
import { makeStyles } from '@material-ui/core/styles'
import classnames from 'classnames'
import React from 'react'
import { ReactComponent as CustomerDataReversedIcon } from 'src/styling/icons/customer-nav/data/comet.svg'
import { ReactComponent as CustomerDataIcon } from 'src/styling/icons/customer-nav/data/white.sv... | Generate a template for a single node in a chain. |
import React from 'react'
export default () => {
return <ul>{items()}</ul>
}
const items = () => {
var out = new Array(10000)
for (let i = 0; i < out.length; i++) {
out[i] = <li key={i}>This is row {i + 1}</li>
}
return out
}
| React - specific export default |
// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... | A component that renders a single missing - node error warning or warning icon. |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import store from './store.js';
import UserForm from './components/user-form.js';
class App extends React.Component {
render() {
return (
<Provider store={store}>
<UserForm />
</Provider>
... | Package that extends a component that can be rendered by a component in a DOM. |
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import Modal from '@material-ui/core/Modal';
import Typography from '@material-ui/core/Typography';
import Input from '@material-ui/core/Input';
import { withStyles } from '@material-ui/core/styles';
import Button from... | A component that displays a modal modal with a single hidden hidden |
import React from 'react'
import { NavMenu } from 'components'
import {
CATALOG as catalogLink,
CATALOG_SORT_LINK as sortLink
} from 'constants/urls'
import { catalogCategories } from 'constants/catalogCategories'
const NavMenuContainer = props => {
const data = [
{
content: 'Топ продаж',
path: `... | A component that renders a nav menu with a series of items. |
'use strict';
import React from 'react';
export default React.createClass({
getDefaultProps() {
return {
height: 10,
color: '#0bD318'
}
},
render() {
var completed = this.props.completed;
if (completed < 0) {
completed = 0;
}
if (completed > 100) {
completed = 1... | The default constructor for a single node. |
import React from 'react';
import { Link } from 'gatsby';
import Layout from '../components/Layout';
const NotFoundPage = () => (
<Layout page="page">
<div className="container">
<article className="content" style={{ textAlign: `center` }}>
<h1 className="content-title">Error 404</h1>
<sect... | This module imports a missing page from a layout. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageTransform = (props) => (
<SvgIcon {...props}>
<path d="M22 18v-2H8V4h2L7 1 4 4h2v2H2v2h4v8c0 1.1.9 2 2 2h8v2h-2l3 3 3-3h-2v-2h4zM10 8h6v6h2V8c0-1.1-.9-2-2-2h-6v2z"/>
</SvgIcon>
);
ImageTransform = pure(I... | A component that renders a series of icons in a group of icons. |
import React, { Component } from 'react';
import { AppRegistry } from 'react-native';
import App from './app';
class RNApp extends Component {
render() {
return <App />;
}
}
AppRegistry.registerComponent('RNApp', () => RNApp);
| The RNApp component is a component that can be rendered by a React component. |
import React from 'react';
import {
StyleSheet,
Text,
View,
ViewPropTypes,
} from 'react-native';
import PropTypes from 'prop-types';
import moment from 'moment';
export default class Tag extends React.Component {
renderTagTime() {
if (!this.props.currentMessage.createdAt)
return null;
return (
<Text s... | A component that renders a single tag with a time - based style. |
import React from 'react';
import { charts } from './style';
import {
VerticalBarSeries,
XAxis,
XYPlot,
YAxis
} from 'react-vis';
export default function Charts({
highlight,
highlightedHour,
pickups,
select,
selectedHour
}) {
if (!pickups) {
return (<div style={charts} />);
}
const data = ... | Charts for pickups and pickups |
import React from 'react';
import { resolve } from '../styles';
export default class BladeNav extends React.Component {
static displayName = 'BladeNav';
static propTypes={
classes: React.PropTypes.object,
items: React.PropTypes.object,
};
constructor(props) {
super(props);
this.state = {
... | The BladeNav component is a component that can be rendered by a component that has a Blade list item. |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './styles.css';
import {createGraph} from "./pieChart";
import {updateGraph} from "./pieChart";
class PieChart extends React.Component {
constructor(props) {
super(props);
this.di... | Class for building a pie chart. |
import React from 'react';
import PropTypes from 'prop-types';
import { useDispatch } from 'react-redux';
//
import Translate from '@material-ui/icons/Translate';
import MenuItem from '@material-ui/core/MenuItem';
import Menu from '@material-ui/core/Menu';
import Button from '@material-ui/core/Button';
import ExpandMor... | Navigation - language selector |
import React from 'react';
import BootstrapMixin from './BootstrapMixin';
import Button from './Button';
import Dropdown from './Dropdown';
import SplitToggle from './SplitToggle';
class SplitButton extends React.Component {
render() {
let {
children,
title,
onClick,
target,
href,
... | A component that can be used to create a single node in a dropdown or a dropdown menu. |
import React from 'react'
const User = React.createClass({
render() {
return <h1>User: {this.props.params.id}</h1>
}
})
export default User
| Create a new User object with a hidden hidden field. |
import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { Heading, Paragraph } from 'components'
const Article = styled.article``
const Post = ({ title, body, ...props }) => {
return (
<Article {...props}>
<Heading level={2}>{title}</Heading>
<Para... | Create a post - type object that can be used to create a object. |
import React from 'react'
import { render } from 'react-dom'
import { Router, Route, IndexRoute, Link, IndexLink, browserHistory } from 'react-router'
import withExampleBasename from '../withExampleBasename'
const ACTIVE = { color: 'red' }
const App = ({ children }) => (
<div>
<h1>APP!</h1>
<ul>
<li>... | Imports a single - component from a browser history. |
import React from 'react'
import { Link } from 'react-router'
import styled from 'styled-components'
import CenteredItemPage from 'components/CenteredItemPage'
const Container = styled.div`
text-align: center;
`
export default class NotFound extends React.Component {
render () {
return (
<CenteredItem... | The default component for missing a page. |
import { Route, IndexRoute } from 'react-router';
import React from 'react';
import App from 'containers/App';
import NotFound from 'components/NotFound';
import CommentsList from 'components/CommentsList';
import NewComment from 'components/NewComment';
import { ROUTE_COMMENT_NEW } from 'constants';
export default [... | export a single route |
'use babel'
import React from 'react'
import ListItem from '../components/ListItemComponent'
import prop from 'prop-types'
const ListComponent = ({ items }) =>
<ul className='select-list list-group'>
{list(items)}
</ul>
export const list = items => items.map((item, n) =>
<ListItem
key={n}
text={ite... | Babel - style |
import Field from '../Field';
import React from 'react';
import Select from 'react-select';
import { FormInput } from '../../../admin/client/App/elemental';
/**
* TODO:
* - Custom path support
*/
module.exports = Field.create({
displayName: 'SelectField',
statics: {
type: 'Select',
},
valueChanged (newValu... | The actual component that creates a dropdown dropdown that can be used to select a value in a select box. |
import React from 'react';
import Root from './containers/Root';
React.render(
<Root />,
document.getElementById('root')
);
| Renders a into a DOM. |
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage, FormattedHTMLMessage } from 'react-intl';
import { formatAmount, toNtz, ABP_DECIMALS } from '../../utils/amountFormatter';
import { ABP, NTZ } from '../../containers/Dashboard/actions';
import ExchangeDialog from '../../containe... | Package that exports a single node in the hierarchy of a single node. |
import React from 'react';
import {formatAbbreviation, formatNumberWithMaxLength} from 'react-ui-basics/Size';
import './DiskUsage.css'
import {state} from "../stores/DiskUsageStore";
import {useStore} from "../stores/StoreUtils";
export const DiskUsage = () => {
const {free} = useStore(state)
return <div cla... | Devolve with React |
/**
* Copyright (c) 2013-present, Facebook, Inc. All rights reserved.
*
* This file provided by Facebook is for non-commercial testing and evaluation
* purposes only. Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCL... | PUBLIC CONSTRUCTORS This class renders a TeX component that displays a TeX block. |
import React from 'react'
import { reduxForm } from 'redux-form'
export const fields = []
const validate = (values) => {
const errors = {}
return errors
}
type Props = {
handleSubmit: Function,
fields: Object,
}
export class <%= pascalEntityName %> extends React.Component {
props: Props;
defaultProps = ... | React - > React. Component |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
class ConfirmDeleteDialog extends Component {
state= {
open: false,
}
openEditDialog = () => {
};
openDeleteDialog = () => {
... | A dialog that opens a modal dialog that deletes a single object. |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { fetchCommands } from 'Store/Actions/commandActions';
import QueuedTasks from './QueuedTasks';
function createMapStateToProps() {
return createSelect... | Create a component that can be used to handle a sequence of commands. |
import React from 'react';
import {
Table,
TableHeader,
TableHeaderColumn,
TableBody,
TableRow,
TableRowColumn,
} from 'material-ui';
export default class OptionsTable extends React.Component {
static propTypes = {
opts: React.PropTypes.array.isRequired,
onChange: React.PropTypes.func.isRequired,... | A component that renders a series of options that can be selected in a table. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentMail = (props) => (
<SvgIcon {...props}>
<path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/>
</SvgIcon>
);
ContentMail = pure(Conte... | A component that exports a single node in a sequence of nodes. |
import devboard from '../';
import React from 'react';
import Color from 'color-js';
import { combine } from '../lib/utils';
var definecard = devboard.ns('4. Thermometer demo');
definecard(`
This demo is of a component which was built iteratively using devboard.
Unfortunately, because you're looking at a static page... | The base component of the n - th node which is a list of all possible intermediary nodes. |
import React, { Component } from 'react';
import QuoteViewStore from '../stores/quoteViewStore';
import FaQuoteLeft from 'react-icons/lib/fa/quote-left';
class QuoteView extends Component{
constructor() {
super();
this.state={
content: QuoteViewStore.getContent()
};
}
componentWillMount(){
QuoteViewStor... | A component that can be used to render a quote view. |
/*global __DEVELOPMENT__*/
import Express from 'express';
import React from 'react';
import Location from 'react-router/lib/Location';
import config from './config';
import favicon from 'serve-favicon';
import compression from 'compression';
import httpProxy from 'http-proxy';
import path from 'path';
import serialize ... | Express Express API |
/* @flow */
'use strict'
import React from 'react'
import { View } from 'react-native'
import { storiesOf } from '@kadira/react-native-storybook'
import HomeOnBoardingView from '../../js/components/home/HomeOnBoardingView'
storiesOf('HomeOnBoardingView')
.addDecorator((story) => (
<View style={{marginTop: 20}}>... | Add a decorator to the object to show a warning when adding a site to a system. |
import React from 'react';
import Header from './header';
import UserMessageView from './UserMessageView';
import BranchManagement from './branchManagement';
import NetworkManagement from './networkManagement';
import { RestrictedTo } from './common';
const AdminDashboard = () => (
<div>
<Header />
<UserMe... | export AdminDashboard function |
import React from 'react'
import { render } from 'react-dom'
import { BrowserRouter as Router } from 'react-router-dom'
import { createResolveStore, ResolveReduxProvider } from '@resolve-js/redux'
import { createBrowserHistory } from 'history'
import { renderRoutes } from 'react-router-config'
import { routes } from '... | Imports a single node in the DOM. |
import React from 'react';
import {DraggableCore} from 'react-draggable';
class NavigatorView extends React.Component {
constructor(props) {
super(props);
this.state = {
NavigatorNode: [
{
id: 1,
content: '11111'
},
{
id: 2,
content: '2222... | A component that displays a navigation sequence in a browser. |
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router } from 'react-router';
import routes from './routes';
import configureStore from './store/configureStore';
import './material.min.css';
import './app.css';
const store = configureStore();
render(
<... | Imports a dead code. |
import React, { Component } from 'react';
import s from './Footer.scss';
import withStyles from '../../decorators/withStyles';
@withStyles(s)
class Footer extends Component {
render() {
return (
<footer className={s.pageFooter}>
© 2016 Sarah Vessels
</footer>
);
}
}
export default... | Footer class for a page |
import React from 'react'
import Helmet from 'react-helmet'
import { FlexGrid } from 'components'
import { getImagePath } from 'components/Image/Image'
import { GREEN_COLOR, GRAY_COLOR } from 'constants'
import s from './ItemPageTitle.sass'
const ItemPageTitle = ({title, meta, image, noTitle, isAvailable, amount}) =>... | Package that contains a list of items that can be found in a Helmet hierarchy. |
import React from 'react';
import ReactDOM from 'react-dom';
import './index.min.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
| Imports a single application. |
// @flow strict
import React from 'react';
import type { Entry, WidgetFor } from '../../types';
type Props = {
entry: Entry,
widgetFor: WidgetFor
};
const PostPreview = ({ entry, widgetFor }: Props) => {
const body = widgetFor('body');
const title = entry.getIn(['data', 'title']);
return (
<div classNa... | Renders a post with a series of missing nodes. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvLibraryMusic = (props) => (
<SvgIcon {...props}>
<path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 5h-3v5.5c0 1.38-1.12 2.5-2.5 2.5S10 13.88 10 12.5s1.12-2.5 2.5-2.5c.57... | A component that exports a single element in a mixture of icons. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationCall = (props) => (
<SvgIcon {...props}>
<path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-... | A component that renders a component with a component that is not part of a component. |
/* @flow */
'use strict';
import React from 'react';
import {Text, View, Platform } from 'react-native';
import NativeBaseComponent from '../Base/NativeBaseComponent';
export default class Subtitle extends NativeBaseComponent {
render() {
return(
<View><Text style={{color: this.getTheme().subtitleColor , font... | A component that renders a subtitle if it exists. |
import React, { Component } from 'react';
import ListItem from '../../index';
import { render } from 'react-dom';
import imgPath from './1.jpg'
import './index.less'
export default class ListDemo extends Component{
onClick=()=>{
alert('has clicked');
}
render() {
return (
<ul cl... | Package that exports a list of components. |
import React from 'react';
import styled, {keyframes} from 'styled-components';
import resume from '../images/resume.pdf';
import { theme, media } from '../styles';
const { colors, fontSizes } = theme;
const ExperienceContainer = styled.div`
display: flex;
flex-direction: column;
align-items: flex-start;
padd... | export default JSX plugin |
import React from 'react'
import loadScript from 'load-script'
import propTypes from '../propTypes'
import Base from './Base'
const SDK_URL = '//www.youtube.com/iframe_api'
const SDK_GLOBAL = 'YT'
const MATCH_URL = /^(?:https?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-)... | A component that implements YouTube s video API. |
import React from 'react'
export default () => {
return (
<ul>
{items()}
</ul>
)
}
const items = () => {
var out = new Array(10000)
for (let i = 0; i < out.length; i++) {
out[i] = <li key={i}>This is row {i + 1}</li>
}
return out
}
| The default function for returning a sequence of strings that can be used to generate a sequence of strings. |
import React from 'react';
const Calculator = () => {
return (
<div>
<h1>Calculator</h1>
</div>
);
};
export default Calculator;
| export default calculator |
// React
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
// Utilities
import { whichAnimationEvent, addAnimation } from '../libs/utils';
import classNames from 'classnames';
class ScoreBoard extends Component {
componentWillReceiveProps(nextProps) {
if(this.props.score != ... | A component that can be attached to a scoreboard. |
// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... | A component that renders a single critical block of content. |
/**
* @description Dashboard SVG Icon.
* @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon.
* @property {string} colorIndex - The color identifier to use for the stroke color.
* If not specified, this component will default to muiTheme.palette.textColor.
* @... | A component that renders a single critical color identifier. |
import React from 'react';
import ReactDOM from 'react-dom';
import { BestSeller } from './BestSeller';
export class BookList extends React.Component {
render() {
return (
<div>
<h1>Best Sellers</h1>
<div>
<ol>
<BestSeller
title="Glory and War Stuff for D... | The BookList class |
import React from 'react'
import { reduxForm } from 'redux-form'
export const fields = []
const validate = (values) => {
const errors = {}
return errors
}
type Props = {
handleSubmit: Function,
fields: Object,
}
export class <%= pascalEntityName %> extends React.Component {
props: Props;
defaultProps = ... | React - > React. Component |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
| Imports a single node in the DOM. |
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import Icon from '@material-ui/core/Icon';
import Typography from '@material-ui/core/Typography';
import theme from '../../theme';
const contentContainer = {
display: 'flex',
flexDirection: 'row',
... | Exports a single with a default styles |
import React from 'react';
import {Col} from 'react-bootstrap';
import { inject, observer } from 'mobx-react';
class CompleteColumn extends React.Component{
render(){
let completeGoals = this.props.goalStore.goalsArr.filter(goal => goal.status == 'complete');
let displayCompleteColumnGoals = completeGoals.ma... | A component that displays a complete column with a list of goals. |
import PropTypes from 'prop-types';
import React from 'react';
/**
* The callout component
*/
const Callout = ( page ) => {
return (
<div className={ `uikit-body uikit-grid callout` } >
<div className="container">
<div className="row">
<div className="col-md-12">
<div className="textwrapper callout... | The calendar for missing nodes |
/* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconLocalPostOffice(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...ic... | The default function for a missing node. |
import React from 'react';
import LoadingIndicator from 'flavours/glitch/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 Row from 'Row';
import Col from 'Col';
import ReactPlayground from './ReactPlayground';
import PropTable from './PropTable';
import Samples from './Samples';
import tableBorderless from '../../../examples/BorderlessTable';
import TableCode from '!raw-loader!Table';
const TablesPage = ... | Imports a single table page from a sequence of strings. |
import React from 'react';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
export default class ColumnBackButton extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,
};
handleClick = () => {
if (window.history && window.history.length === 1)... | The column back button class |
import React from 'react'
import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'
import * as actions from '../../actions/heroActions'
const Contact = (props) => {
window.console.log('MainContactProps: ', props)
return (
<div style={{width: '100%', paddingTop: 55}}>
<div>
<f... | Contact component that creates a component |
import React from 'react';
import {Link} from 'react-router';
import {connect} from 'react-redux';
import {addTodoItem, removeTodoItem} from './todoActions';
class TodoPage extends React.Component {
render() {
const {todos} = this.props;
return (
<section>
<h1 className="text-center">TodoPage... | A component that displays a list of work items that can be added and removed from the todo actions list. |
import React from 'react';
import PropTypes from 'prop-types';
import { length } from 'stringz';
export default class CharacterCounter extends React.PureComponent {
static propTypes = {
text: PropTypes.string.isRequired,
max: PropTypes.number.isRequired,
};
checkRemainingText (diff) {
if (diff < 0)... | The character counter component. |
import React from 'react';
import {ReverseLink} from 'react-router-reverse';
export default class WebsiteLanding extends React.Component {
render() {
return (
<section>
<h1>Websites</h1>
<ul>
<li><ReverseLink to="website-review">Review</ReverseLink></li>
<li><ReverseLin... | The website landing class. |
import React from 'react';
import assign from 'object-assign';
import styles from './App.css';
export default React.createClass({
render() {
const user = this.props.user;
return (
<dl>
<dt>id</dt>
<dd>{user.id}</dd>
<dt>name</dt>
<dd>{user.name}</dd>
<dt>year r... | The default function for returning a object with the given properties. |
import PropTypes from 'prop-types'
import React from 'react'
const DateHeader = ({ label, drilldownView, onDrillDown }) => {
if (!drilldownView) {
return <span>{label}</span>
}
return (
<a href="#" onClick={onDrillDown}>
{label}
</a>
)
}
DateHeader.propTypes = {
label: PropTypes.node,
d... | DateHeader - a calendar that displays a calendar block of calendar blocks that are not yet visible. |
/* eslint-disable */
import React from 'react'
import Route from 'react-router-dom/es/Route'
import Switch from 'react-router-dom/es/Switch'
import queryString from 'query-string'
//import analyticsCallback from './analyticsCallback'
export const cleanNullKeysFromObject = (object) => {
// Remove null values from o... | The default render function for a series of routes |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsPersonPin = (props) => (
<SvgIcon {...props}>
<path d="M19 2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 3.3c1.49 0 2.7 1.21 2.7 2.7 0 1.49-1.21 2.7-2.7 2.7-1.49 0-2... | A component that exports a sequence of icons that can be used to render a sequence of icons. |
'use strict';
import { Entity } from 'draft-js';
import ENTITY from '../entities';
import React from 'react';
import classNames from 'classnames';
class Annotation extends React.Component {
constructor (props) {
super(props);
this.state = {
isExpanded: false,
};
this.handleExpand = this._handleExpand.bind(t... | A component that can be used to render an annotation on a contentBlock. |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { mapToCssModules, tagPropType } from './utils';
const propTypes = {
tag: tagPropType,
className: PropTypes.string,
cssModule: PropTypes.object,
};
const defaultProps = {
tag: 'div'
};
const CardGroup =... | export a function to export a single tag in a card group |
'use strict';
import React from 'react';
class SourceForm extends React.Component {
constructor(props) {
super(props);
this.submit = this.submit.bind(this);
this.handleChange = this.handleChange.bind(this);
}
displayName() {
return 'SourceForm';
}
handleChange(key) {
return function (... | A component that displays a link to a user s name email or phone number. |
import React from 'react';
import Link from './Link';
class LinkButton extends React.Component {
render() {
return (
<div className={`LinkButton ${this.props.className} ${this.props.disabled ? 'disabled' : ''}`}>
<style global jsx>
{`
.LinkButton > a {
height: 29... | A component that renders a link button. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsTrain = (props) => (
<SvgIcon {...props}>
<path d="M12 2c-4 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h2.23l2-2H14l2 2h2v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.... | A function that exports a missing missing component in a group of icons. |
// external import
import React from 'react'
import PropTypes from 'prop-types'
// import cx from 'classnames'
import Header from '../header'
// import Footer from '../Footer'
import styles from './styles.js'
import Navigation from '../navigation'
export default class Layout extends React.Component {
static propTyp... | The layout class for a single object. |
import React from 'react';
import PropTypes from 'prop-types';
const Loading = ({ message }) => {
return (
<h1 className="loading">{message}</h1>
);
};
Loading.propTypes = {
message: PropTypes.string.isRequired
};
export default Loading;
| Imports React and PropTypes and exports a Loading function that can be used to load a missing dependency. |
import React from 'react';
import Button from './Button';
import Dropdown from './Dropdown';
import SplitToggle from './SplitToggle';
import splitComponentProps from './utils/splitComponentProps';
const propTypes = {
...Dropdown.propTypes,
// Toggle props.
bsStyle: React.PropTypes.string,
bsSize: React.PropT... | A component that can be used to split a dropdown menu into two dropdowns. |
import React from 'react';
import classNames from 'classnames';
const Table = React.createClass({
propTypes: {
striped: React.PropTypes.bool,
bordered: React.PropTypes.bool,
condensed: React.PropTypes.bool,
hover: React.PropTypes.bool,
responsive: React.PropTypes.bool
},
render() {
let c... | Creates a table with the given classes and children. |
import React from 'react';
import Drawer from 'material-ui/Drawer';
import { MenuItem } from 'material-ui/Menu';
import MenuIcon from 'material-ui-icons/Menu';
import IconButton from 'material-ui/IconButton';
import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
import { withStyles } from 'materi... | A component that opens a menu in the drawer and opens a menu in the menuIcon. |
import React from 'react';
import ReactDOM from 'react-dom';
import NavBar from './components/NavBar';
import Footer from './components/Footer';
const App = React.createClass({
render() {
return (
<div>
<NavBar />
{this.props.children}
<Footer />
</div>
)
}
});
export ... | The default module that exports a single node in a hierarchy. |
/*
* Copyright (C) 2015 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distribut... | The main function of the sequence of objects that can be dragged and removed. |
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Page1 from './Page1';
import Page2 from './Page2';
import {Route, Link} from 'react-router-dom';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
... | The base class for all components that are not part of a React application. |
import React from 'react';
import { FormGroup,FormControl,ControlLabel,HelpBlock } from 'react-bootstrap';
export function FieldGroup({ id, label, help, ...props }) {
return (
<FormGroup controlId={id}>
<ControlLabel>{label}</ControlLabel>
<FormControl {...props} />
{hel... | A function to generate a single FieldGroup from a React component. |
import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import { SpellLink } from 'interface';
import { formatPercentage } from 'common/format';
import { t } from '@lingui/macro';
import SoulFragmentsConsume from '../statistics/SoulFragmentsConsume';
import SoulFrag... | The base class for all non - terminal souls. |
/**
* @copyright 2015, Prometheus Research, LLC
*/
import React from 'react';
export default function Label({schema = {}, label = schema.label}) {
return label ? <label>{label}</label> : <noscript />;
}
| The default function for returning a missing label if the label is missing. |
import React from 'react'
import { Badge, Icon } from '../../../'
export default () => <Badge text={<Icon sm name="done" />}>Walk the dog</Badge>
| The default function for react - react - js |
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 = {... | The Grow component is a component that can be rendered with a transition that will be applied to the node. |
import React from 'react'
import ReactDOM from 'react-dom'
import ReactServer from 'react-dom/server'
import { Router, createMemoryHistory } from 'react-router'
import Helmet from 'react-helmet'
import { createMarkup } from './utilities'
import { App } from './components/app'
import Routes from './components/routes'
i... | Default webpack webpack plugin |
import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import DevTools from '../../containers/DevToolsWindow'
export default function createDevToolsWindow (store) {
const win = window.open(
null,
'redux-devtools', // give it a name so it reuses the same window
`... | Create a window |
import React from 'react'
import './About.css'
const About = props => (
<div className='About'>
<header className='About-header'>
<h2>A blurb about this app</h2>
</header>
</div>
)
export default About
| React - specific module that exports a single object. |
import React, { Component } from 'react';
import { Platform, View, StatusBar, StyleSheet } from 'react-native';
import WatchRecord from './WatchRecord';
import WatchFace from './WatchFace';
import WatchControl from './WatchControl';
let interval;
const initialState = {
stopWatch: false,
resetWatch: true,
... | A component that opens a watch. |
import React from 'react';
import warning from 'warning';
var { object } = React.PropTypes;
var TransitionHook = {
contextTypes: {
router: object.isRequired
},
componentDidMount() {
warning(
typeof this.routerWillLeave === 'function',
'Components that mixin TransitionHook should have a rou... | The transition hook is a mixin of the component that has a routerWillLeave method. |
// @flow
import React from 'react'
import { Provider } from 'react-redux'
// $ExpectError
const provider = <Provider />; // missing store
| missing store |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.