code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react'
import Player from './player'
class PlayerList extends React.Component {
render() {
let { players } = this.props
return (
<div>
{
players.map((p, pI) => (
<Player
key={pI}
player={p}
playerIndex={pI}
... | The base class for a single node that contains a series of unique keys and a series of unique values. |
import React from 'react'
import './example.scss'
import DocumentTitle from 'react-document-title'
import { config } from 'config'
export default class Sass extends React.Component {
render () {
return (
<DocumentTitle title={`${config.siteTitle} | Hi sassy friends`}>
<div>
<h1
... | Generate a Sass class that exports a single Invite. |
'use strict';
import React, { Component } from 'react';
import {
Image,
Platform,
StyleSheet,
} from 'react-native';
import ListItem from '../../components/ListItem';
import WelcomeText from './WelcomeText';
export default class WelcomeScreen extends Component {
static navigationOptions = {
title: 'Welc... | A default navigation class that displays a welcome screen. |
import React from 'react';
import App from './containers/App';
import 'todomvc-app-css/index.css';
React.render(
<App />,
document.getElementById('root')
);
| Renders a in the top - level DOM. |
import R from 'ramda';
import React from 'react';
import classNames from 'classnames/bind';
import styles from './FilterOptions.styl';
const cx = classNames.bind(styles);
export default class FilterOptions extends React.Component {
constructor() {
super();
}
render() {
const options = this.props.opt... | A component that can be used to create a filter options. |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import withStyles from 'isomorp... | Provides a function to generate a single missing - node node from a React Starter Kit. |
// @flow
import { makeStyles } from '@material-ui/styles';
import React from 'react';
type Props = {
/**
* Label used for accessibility.
*/
accessibilityLabel: string,
/**
* Additional class name for custom styles.
*/
className: string,
/**
* Children of the component.
... | A component which can be used to show a button in a custom style. |
import React from 'react';
import Select from 'react-select';
function logChange() {
console.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments)));
}
var DisabledUpsellOptions = React.createClass({
displayName: 'DisabledUpsellOptions',
propTypes: {
label: React.PropType... | The disabled upsell option is a dropdown that can be used to select a specific support level. |
// @flow weak
import React from 'react';
import { MuiThemeProvider, createMuiTheme } from 'material-ui/styles';
import Typography from 'material-ui/Typography';
import Button from 'material-ui/Button';
function theme(outerTheme) {
return createMuiTheme({
typography: {
fontFamily:
'-apple-system,sy... | Generate a theme for a weak weak theme. |
import React from 'react';
import {Provider} from 'react-redux';
import ReactDOM from 'react-dom';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import injectTapEventPlugin from 'react-tap-event-plugin';
import './index.css';
import chronoTheme from './chrono-theme';
import store from './redux/st... | Imports a single element and renders it in the root DOM. |
import React from 'react'
import translation from './../translation'
const {clipboard} = require('electron')
export default class Copyable extends React.Component {
constructor () {
super()
this.state = {
'copied': false
}
}
onClick () {
var text = this.props.textToCopy || this.props.tex... | A component that copies a single node into a clipboard. |
import cx from 'classnames'
import _ from 'lodash'
import PropTypes from 'prop-types'
import React from 'react'
import {
childrenUtils,
customPropTypes,
getElementType,
getUnhandledProps,
META,
SUI,
useTextAlignProp,
} from '../../lib'
/**
* A card can contain content metadata.
*/
function CardMeta(pr... | A meta - object that can be used to render a card. |
import 'bootstrap/less/bootstrap.less';
import './assets/docs.css';
import './assets/style.css';
import './assets/carousel.png';
import './assets/logo.png';
import './assets/favicon.ico';
import './assets/thumbnail.png';
import './assets/thumbnaildiv.png';
import 'codemirror/mode/htmlmixed/htmlmixed';
import 'codemir... | Imports the codemirror library and renders the component. |
import React from 'react';
import { Link } from 'gatsby';
export default function Nav({ onMenuToggle = () => {} }) {
return (
<nav id="nav">
<ul>
<li className="special">
<a
href="#menu"
onClick={e => {
e.preventDefault();
onMenuToggle()... | export default Nav |
import React from 'react';
import Todo from './Todo';
const TodoList = ({ todos, onRemove, onToggle }) =>
<div>
<h2>{todos.count()} items in my todo list</h2>
<ul>
{todos
.map((todo, i) =>
<Todo
key={i}
... | export default TodoList |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
<App />,
document.getElementById('app'),
);
| Imports a single React element. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Header, Title, Content, Button, Icon, Text, Body, Left, Right, Input, Item } from 'native-base';
import { Actions } from 'react-native-router-flux';
imp... | A component that is a component that is a child of a card navigation. |
import React from 'react';
import cx from 'classnames';
class Badge extends React.Component {
render() {
let {
className, newIcon, children, ...props
} = this.props;
let classes = {
badge: true,
'new': newIcon
};
return (
<span className={cx(classes, className)} {...prop... | A badge class that renders a single node with a badge. |
/**
* Dependencies.
*/
import React from 'react'
import ReactDOM from 'react-dom'
import Badge from '..'
/**
* Render badge.
*/
ReactDOM.render(
<Badge id="com.petrofeed.workidapp"/>,
document.querySelector('main')
)
| Renders a single unknown node in the DOM. |
import React from 'react';
import validator from 'validator';
import { FormErrors } from './partials';
import {
Button,
Input,
ButtonInput
} from 'react-bootstrap';
import { AppActions } from '../actions/AppActions';
import { AppStore } from '../stores/AppStore';
export class SignupForm extends React.Component... | The signup form class |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilterCenterFocus = (props) => (
<SvgIcon {...props}>
<path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 9... | A component that |
import React from 'react'
import { IndexLink, Link } from 'react-router'
import PropTypes from 'prop-types'
import Avatar from 'material-ui/Avatar';
import Checkbox from 'material-ui/Checkbox';
import {Card, CardActions, CardHeader, CardText} from 'material-ui/Card';
import FileFolder from 'material-ui/FontIcon';
impor... | A component that renders a single node in a group of nodes. |
/*
* @Author: alexpelletier
* @Date: 2016-03-23 22:17:30
* @Last Modified by: alexpelletier
* @Last Modified time: 2016-03-24 05:44:31
*/
import React from 'react';
import request from 'superagent';
import MatchesTable from '../Elements/MatchesTable'
import PitStats from '../Elements/PitStats'
import RobotStats f... | JS Component for showing a single failure in a network. |
import React from 'react';
import Playground from 'component-playground';
import {
Colors,
Sizes,
Grid,
Cell,
Callout,
} from 'react-foundation';
export const CalloutDocs = () => (
<section className="callout-docs">
<Grid>
<Cell large={12}>
<h2>Callout</h2>
<div>
<h3>Ba... | export default calendar |
import React from 'react';
export default class JediSlot extends React.Component {
render() {
const { jedi } = this.props;
return <li className="css-slot">
{jedi && !jedi.fetching && <div style={jedi.isInCurrentPlanet ? { color: 'red' } : null}>
<h3>{jedi.name}</h3>
<h6>Homeworld: {jedi... | A component that renders a missing slot in the hierarchy of the component s children. |
import _extends from 'babel-runtime/helpers/extends';
/* eslint-disable react/prop-types */
import React from 'react';
var Track = function Track(props) {
var className = props.className,
included = props.included,
vertical = props.vertical,
offset = props.offset,
length = props.length,
... | Creates a track that can be hidden or visible. |
import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const GridContentExamples = () => (
<ExampleSection title='Content'>
<ComponentExample
title='Rows'
description='A r... | export a default GridContentExamples for a sequence of words |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { match, Router, browserHistory, applyRouterMiddleware } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import { ReduxAsyncConnect } from 'redux-async-connect'
import { useScroll ... | Imports a single component in the app. |
import React from 'react';
import validate from '../utils/validate';
import validationStates from '../utils/validation_states';
// ValueValidationComponent is an abstract component.
// The static props of this class will not be inherited on IE <= 10,
// see: https://babeljs.io/docs/usage/caveats/#classes-10-and-below-... | The base class for all ValueValidationComponent. |
// @flow
import React, { Component } from 'react';
import { Experiment } from 'jspsych-react';
import { Segment } from 'semantic-ui-react';
import callbackHTMLDisplay from '../utils/jspsych/plugins/callback-html-display';
import callbackImageDisplay from '../utils/jspsych/plugins/callback-image-display';
import {
par... | Provides a component that renders a timeline of a single type. |
import React from 'react';
import moment from 'moment';
import PullRequestDate from './PullRequestDate';
class PullRequest extends React.Component {
render() {
const {pr} = this.props;
const avatarStyle = {
marginRight: 10
};
const approved = pr.participants.reduce((... | A component that displays a pull request when a node is missing a failure. |
/**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import Button from '../Button';
const SecondaryButton = (props) => <Button kind="secondary" {...props} />;
expor... | Demonstrates how to render a missing button in a tree. |
import React from 'react';
import TodoActions from './actions';
export default React.createClass({
create(e) {
e.preventDefault();
var task = this.refs.newTask.value;
TodoActions.create({"name": task});
},
render() {
return (
<form onSubmit={this.create}>
<label>
Add task
<input type="te... | The default implementation of a that creates a new task. |
import React from 'react'
import PropTypes from 'prop-types'
import {
Button,
useDataProvider,
useTranslate,
useUnselectAll,
useNotify,
} from 'react-admin'
import { useDispatch } from 'react-redux'
export const BatchPlayButton = ({
resource,
selectedIds,
action,
label,
icon,
className,
}) => {
... | Create a button that plays a batch of items in a group. |
import React from 'react';
import IconBase from 'react-icon-base';
export default class FaCopyright extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m28.7 24v2.4q0 1.1-0.8 2t-2.1 1.3-2.7 0.8-2.6 0.2q-4.6 0-7.6-3.1t-3.1-7.7q... | A component that shows a sequence of icons that can be used to show a sequence of icons. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageBurstMode = (props) => (
<SvgIcon {...props}>
<path d="M1 5h2v14H1zm4 0h2v14H5zm17 0H10c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zM11 17l2.5-3.15L15.29 16l2.5-3.22L21 17H11z"/... | A component that renders a sequence of images in a sequence of icons. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { destroySession } from './actions';
class SessionDestroy extends Component {
componentWillMount() {
this.props.destroySession();
this.props.history.push('/');
}
render() {
return <div></div>;
}
}
export defau... | A component that will destroy the session when the component is destroyed. |
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 brand. |
import React from 'react';
const NoticeMessage = (props) => {
let alert;
// Display load alert if alert is present
if (props.alertLoaded) {
alert = (
<div className='alert alert-success' role='alert'>
<button type='button'
className='close'
aria-label='Close'
... | The default alert message for the user |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageMonochromePhotos = (props) => (
<SvgIcon {...props}>
<path d="M20 5h-3.2L15 3H9L7.2 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 14h-8v-1c-2.8 0-5-2.2-5-5s2.2-5 5-5V7h8v12zm-3... | A component that renders a series of monochrome Photos. |
import React, { Component } from 'react';
import { Link } from 'react-router';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<h1>React Logbook</h1>
<div className="App-intro">
<ul className="A... | The base class for all of the modules that extend the base class. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let DialerSip = props =>
<SvgIcon {...props}>
<path d="M17 3h-1v5h1V3zm-2 2h-2V4h2V3h-3v3h2v1h-2v1h3V5zm3-2v5h1V6h2V3h-3zm2 2h-1V4h1v1zm0 10.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.01.24l-2.2 2.2c-2.83-1... | A component that can be used to render a single missing component. |
'use strict';
import React from 'react';
import { DropTarget } from 'react-dnd';
import InprogressListsItem from './inprogress_list_item';
const listTarget = {
drop(props, monitor) {
const list = monitor.getItem();
props.onMoveList({
list: list.list,
destination: 'inprogressLists'
});
}
};
... | Default drop target for a list |
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
| Imports a single application. |
/*
* React.js Starter Kit
* Copyright (c) 2014 Konstantin Tarkus (@koistya), KriaSoft LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import './Navbar.less';
import React from 'react'; // eslint-disable-line no-unused-vars
... | Provides a hidden hidden field with a link to the top of a Kitlot. |
// This file is part of Indico.
// Copyright (C) 2002 - 2022 CERN
//
// Indico is free software; you can redistribute it and/or
// modify it under the terms of the MIT License; see the
// LICENSE file for more details.
import React from 'react';
import ReactDOM from 'react-dom';
import {WTFDurationField} from 'indico/... | This file is part of Indico. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Image, View } from 'react-native';
import { Content, Text, List, ListItem, ProgressBar } from 'native-base';
import { firebaseApp } from "../auth/authentication";
import { Font } from 'exponent';
import FontAwesome from 'react-nat... | The base component that is used to show a side bar in a navigation bar. |
import React from 'react';
import { Router, Route, Link, Redirect } from 'react-router';
var App = React.createClass({
render() {
return (
<div>
<ul>
<li><Link to="/user/123">Bob</Link></li>
<li><Link to="/user/abc">Sally</Link></li>
</ul>
{this.props.children}
... | The main function that creates a hierarchy of all components that are not part of a component hierarchy. |
import React from 'react'
import Radium from 'radium'
import NavLink from '../containers/NavLink.js'
const rowStyle = {
textAlign: 'center',
'@media (min-width: 320px)' : {
marginTop: '30px'
},
'@media (min-width: 375px)' : {
marginTop: '40px'
},
'@media (min-width: 414px)' : {
marginTop: '5... | export default NavLink |
import React from 'react';
import CONFIG from '../../config';
import swal from 'sweetalert';
class SceneControls extends React.Component {
constructor() {
super();
}
takeSnapshot() {
let canvas = $(this.props.controlManager.canvas);
canvas.addClass('faded');
$.ajax({
url: CONFIG.imgurEndpoint,
type... | The component that is used to render the color picker. |
/**
* app.js
*
* This is the entry file for the application, only setup and boilerplate
* code.
*/
// Needed for redux-saga es6 generator support
import 'babel-polyfill';
// Import all the third party stuff
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
impor... | This module is responsible for importing the n - ary component and adding it to the app s state. |
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 list of media items. |
import React from 'react'
import Content from './Content'
import Types from './Types'
import Variations from './Variations'
const CardExamples = () => (
<div>
<Types />
<Content />
<Variations />
</div>
)
export default CardExamples
| export a default function to export a |
import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { Router, Route } from 'react-router'
import { createHistory } from 'history'
import { syncReduxAndRouter } from 'redux-simple-router'
import store from './store'
import HomeView from './views/home'
import GamesVie... | Imports a single object. |
import React from 'react';
import { storiesOf, addDecorator, action, linkTo } from '@kadira/storybook';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import MobileTearSheet from './MobileTearSheet';
import weatherData from '../api/data';
import forecastData from '../api/forecast';
import CityInf... | The main function that imports all of the modules that are not part of the Kadira API. |
import React from 'react';
import Section from '~/components/section';
import styled from 'styled-components';
import Typography from '~/components/typography';
import PageSection from "~/components/page-section";
import CalloutButton from './button';
import withSettings from "~/enhancers/with-settings";
const Callout... | A function to generate a calendar section with a single page section. |
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import {test} from 'tape';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import WorldMap from '../../src/js/components/WorldMap';
import CSSClassnames from '../../src/js/utils/CSSClassnames';
const CLASS_ROOT = CSSClas... | 9. 2. 2 |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-... | A component that renders a single key sequence in the DOM. |
import React from 'react';
import PropTypes from 'prop-types';
import { Button, FormGroup, ControlLabel, FormControl, HelpBlock, Alert } from 'react-bootstrap';
import { VBForm, connectForm } from '../../../src/Forms';
const Actions = ({ form }) => {
const isValid = form.isValid();
return (
<Button type="submi... | Private function to render a single missing - key error input or password input. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvForward10 = (props) => (
<SvgIcon {...props}>
<path d="M4 13c0 4.4 3.6 8 8 8s8-3.6 8-8h-2c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6v4l5-5-5-5v4c-4.4 0-8 3.6-8 8zm6.8 3H10v-3.3L9 13v-.7l1.8-.6h.1V16zm4.3-1.8c0 .3 0... | A component that renders a missing - |
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; };
import invariant from 'invariant';
import React from 'react';... | Creates a component that wraps a given component with a router. |
import React from 'react';
import PropTypes from 'prop-types';
import Typography from 'material-ui/Typography';
import Grid from 'material-ui/Grid';
import Button from 'material-ui/Button';
import { browserHistory as history } from 'react-router';
import SectorForm from '../../../forms/fields/projectFields/sectorField/... | Package that exports a single non - |
import React from 'react'
import tw, { css } from 'twin.macro'
export const Preview = React.forwardRef(function Preview(props, ref) {
return (
<div
{...props}
tw="block relative bg-gradient-to-t"
css={{
height: 'max(40rem, 30vmin)',
marginTop: '-40rem',
'--tw-gradient-fr... | A component that renders a block relative to the background of a node. |
/**
* Created by zhbhun on 2015/9/17.
*/
import React from 'react';
import {Window, Modal, Confirm, Tip} from './bootstrap';
import assign from 'object-assign';
// modal demo
class ModalDemo extends React.Component {
constructor(props) {
super(props);
this.state = {
show: false
... | Demonstrates how to show a modal dialog and a confirmation dialog. |
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, { Component } from 'react';
import classnames from 'classnames';
import api from '../../utils/api-interface';
import StripeCheckout from 'react-stripe-checkout';
class UserPaymentBlock extends Component {
constructor(props) {
super(props);
this.state = {
errorMessage: '',
paymentInProgress: f... | A component that can be used to create a user payment block. |
/**
* Created by david on 2/22/17.
*/
import React from 'react';
import { View } from 'react-native';
const CardSection = (props) => {
return (
<View style={styles.containerStyle}>
{props.children}
</View>
);
};
const styles = {
containerStyle: {
borderBottomWidth: 1,
padding: 5,
ba... | Provides a function to create a nested view with a single child. |
import React from 'react';
import './Mute.css';
export default (props) => {
if (props.color) {
this.color = props.color;
} else {
this.color = '#4df7ca';
}
return (
<svg className="mute" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<polyline stroke={this.color} points="8.47 14.91 11.07 17.74... | default function for the NestedLinks module |
// @flow
import React, { Component } from 'react';
import { withRouter } from 'react-router'
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import LanguagePair from '../components/LanguagePair';
import * as glosorActions from '../actions/glosorActions';
class HomePage extends Compon... | The HomePage component is a component that can be used to render a language pair with a glosor action. |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react';
import styles from './Feedback.css';
import withStyles from '../../decorators/withStyles';
@withStyles(styles)
class Feedback extends Component {
render() {
return (
<div className="Feedback... | The base class for the missing - missing |
import React from 'react';
class Grades extends React.Component {
render () {
return (
<div>
<h2>Grades</h2>
</div>
);
}
}
export default Grades;
| The Grades component. |
// @flow
import React, { Component } from 'react';
export default class App extends Component {
props: {
children: HTMLElement
};
render() {
return (
<div>
{this.props.children}
</div>
);
}
}
| The base class for a sequence of children. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvLoop = (props) => (
<SvgIcon {...props}>
<path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.... | A small function to create a missing - loop element in a series of icons. |
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, { Component } from 'react';
import FontAwesome from 'react-fontawesome'
import Tooltip from 'rc-tooltip';
import { Link } from 'react-router';
import 'rc-tooltip/assets/bootstrap.css';
import _ from 'lodash';
export default class Apartment extends Component {
constructor(props) {
super(props);
... | A component that shows a single critical sequence sequence |
import React from 'react';
import test from 'ava';
import { shallow } from 'enzyme';
import PostList from '../../components/PostList';
const posts = [
{ name: 'Prashant', title: 'Hello Mern', slug: 'hello-mern', cuid: 'f34gb2bh24b24b2', content: "All cats meow 'mern!'" },
{ name: 'Mayank', title: 'Hi Mern', slug: ... | Check if a specific exists in the system |
import PropTypes from "prop-types";
import React from 'react';
import {
Card,
CardBody,
CardHeader,
Col,
FormGroup,
Input,
Row,
Label
} from 'reactstrap';
import CopyButton from './CopyButton';
import { calculateUnits } from '../services/unitConverter';
class Converter extends React.Component {
cons... | A component that converts a single key to a list of possible units. |
/*
* This file is part of the Kreta package.
*
* (c) Beñat Espiña <benatespina@gmail.com>
* (c) Gorka Laucirica <gorka.lauzirika@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import './../../scss/components/_section-... | Package containing functions for adding a missing missing node in the hierarchy. |
import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import appBarReadmeText from './README';
import AppBarExampleIcon from './ExampleI... | export default appBarPage |
import React from 'react';
import 'styles/core.scss';
export default class CoreLayout extends React.Component {
static propTypes = {
children : React.PropTypes.element
}
render () {
return (
<div className='page-container'>
<div className='view-container'>
{this.props.children}
... | The base class for the missing layout. |
import React from 'react';
import { Redirect } from '@docusaurus/router';
function Home() {
return <Redirect to="/react-native-navigation/docs/before-you-start/" />;
}
export default Home;
| Imports a component and redirects to the page before you start. |
import React from 'react';
import {Link} from 'react-router';
// import { remote } from 'electron';
const Notifications = ({ DOToken, updateToken }) => (
<div className="full-page">
<div className="notification-content">
<div className="list-group">
<a href="#" className="list-group-item active">
... | The Notifications component of a object. |
import React from 'react'
import { translate } from 'react-i18next'
import { inject, observer } from 'mobx-react'
/** Ant Design */
import Select from 'antd/lib/select'
@translate(['common'])
@inject('send', 'wallet')
@observer
class AccountFilter extends React.Component {
constructor(props) {
super(props)
... | A filter that filters out non - existent |
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
import Rea... | The base component for all user - specific users. |
import React from 'react'
import { createHistory, useBasename } from 'history'
import { Router, Route, Link } from 'react-router'
import data from './data'
require('./app.css')
const history = useBasename(createHistory)({
basename: '/sidebar'
})
class Category extends React.Component {
render() {
const categ... | The main logic for the hierarchy hierarchy. |
import React from 'react';
import { render } from 'react-dom';
import { App } from './App';
render(<App />, document.getElementById('main'));
| Imports a React component and renders it into the main DOM. |
import React from 'react'
// renders a single list, handles the list of lists
const ItemInput = React.createClass({
onKeyAddContent: function(evt) {
if (evt.keyCode === 13 && !evt.shiftKey) {
evt.preventDefault()
this.props.dispatchAddItem({
// NOTE: ASSUMING CLIENT ONLY, no xss sanitization
... | Renders a single list of items with a single item. |
import React from 'react';
import Router from 'react-router';
import routes from './routes';
import fetchData from './utils/fetch-data';
let first = true;
const rehydrate = () => {
const data = window.DATA;
delete window.DATA;
return data;
};
const render = (Root, state, data) => {
React.render(<Root data={... | Imports a bunch of modules that can be imported by a browser. |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
/* eslint-disable */
import 'babel/polyfill';
import React from 'react';
import Router from 'react-router';
var Redirect = Router.Redirect;
import FastClick from 'fastclick';
import App from './components/App';
import HomePage from './components/... | The main function that runs the application. |
import App from './app/App.react';
import Auth from './auth/Page.react';
import Firebase from './firebase/Page.react';
import Home from './home/Page.react';
import Me from './me/Page.react';
import NotFound from './notfound/Page.react';
import Profile from './me/Profile.react';
import React from 'react';
import Setting... | createRoutes - Creates routes for all components |
import React from 'react'
import { Card, CardImage, Text, Heading, Section } from 'rebass'
import { Grid, Row, Col } from 'react-flexbox-grid';
const Pets = () => (
<Section>
<Row center="xs">
<Col xs={12} sm={3}>
<Card>
<CardImage width={256}
src={require('./photos/fred.jpeg'... | export default Pets from a single node in a system |
import React from 'react';
import { FormattedMessage, FormattedHTMLMessage } from 'react-intl';
import { WarningNotice } from '../common/Notice';
const localMessages = {
title: { id: 'errors.storySwitchover.title', defaultMessage: 'Update for Story-Level Searches' },
intro: { id: 'errors.storySwitchover.intro', de... | This module exports a warning that the user has requested to switch to Story - based searches. |
import React from 'react';
var Avatar = require('../Avatar');
//<SearchResultListItem item=[] />
class SearchResultListItem extends React.Component {
render() {
var item = this.props.item;
if (item["title"]) {
item.type = 3;
} else if (item["intro"]) {
item.type = 2... | A component that shows a list of items that can be found in a list of items. |
// import React, { Component } from 'react';
import React from 'react';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import App from './components/app/App';
import Home from './components/home/Home';
// 两种写法都可以
// export default class Routers extends Component {
// render() {
// re... | export Routers class |
import React from 'react';
import createChainableTypeChecker from './utils/createChainableTypeChecker';
function validate(props, propName, componentName, location, propFullName) {
const propValue = props[propName];
const propType = typeof propValue;
if (React.isValidElement(propValue)) {
return new Error(
... | Validates that a given property is a valid ReactElement or DOMElement. |
import React, { Component } from 'react';
import { StyleSheet, ScrollView, View, Text } from 'react-native';
import { theme, Badge, Icon } from 'react-native-app-components';
export default class BadgesIcons extends Component {
constructor(props) {
super(props);
}
render() {
return (
<ScrollView... | Component that displays a badges icon when a user hits a modal box. |
import React from 'react';
import PropTypes from 'prop-types';
import { IntlProvider, addLocaleData } from 'react-intl';
import { getLocale } from '../locales';
const { localeData, messages } = getLocale();
addLocaleData(localeData);
export default class AdminComponent extends React.PureComponent {
static propType... | The base component for missing children. |
import React from 'react'
import { Router, Route, hashHistory } from 'react-router'
import markdownPage from 'components/markdownPage'
import App from 'pages/App'
import Home from 'pages/Home'
import Simple from 'pages/examples/Simple'
import ComplexValues from 'pages/examples/ComplexValues'
import File from 'pages/exa... | routes - > routes - > routes |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import '../node_modules/bootstrap/dist/css/bootstrap.css';
import '../node_modules/bootstrap/dist/css/bootstrap-theme.css';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root'),
);
| Imports a single node in the DOM. |
import React, { Component } from 'react';
import 'bootstrap/dist/css/bootstrap.css';
import '../App.css';
import PropTypes from 'prop-types';
class CalculateButton extends Component {
render() {
return (
<button id="calc-btn" name="calc-btn" className="btn btn-success" onClick={this.props.calcFunc}>Figur... | A component that can be rendered as a button to the user. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.