code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import createSagaMiddleware from 'redux-saga';
import App from './components/App';
import reducer from './reducers';
import rootSaga from './sagas';
const sagaMidd... | Imports a single node in the DOM. |
import BemusePackageResources from 'bemuse/resources/bemuse-package'
import React from 'react'
import SCENE_MANAGER from 'bemuse/scene-manager'
import URLResource from 'bemuse/resources/url'
import audioContext from 'bemuse/audio-context'
import query from 'bemuse/utils/query'
import { resolveUrl } from 'url'
import { ... | The main function of the main function. |
import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import SerialConnection from '../components/SerialConnection';
export const SerialComponent = () => (
<div>
<SerialConnection />
</div>
)
SerialComponent.propTypes = {... | A component that wraps a single unhandled component in a Serial component. |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdSignalWifi1BarLock(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<g>
<path
d="M40.3 18c.7 0 1.4.1 2.1.2l4.2-5.2c-.9-.7-9.8-8-23.3-8S.9 12.3 0 13l23.3 29 7-8.7V28c0-5.5 4.5-10 10-10z"
o... | Manages the sequence of possible negative negative |
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import LightNotification from '../../containers/notification/LightNotification';
import { getCallToActionChildren } from './getCallToActionChildren';
const Container = styled.div`
flex-basis: 100%;
`;
const CallT... | Light notification action |
import React from 'react';
import Dashboard from './Dashboard';
import GlobalNav from './GlobalNav';
class App extends React.Component {
render() {
var courses = COURSES;
return (
<div>
<GlobalNav />
<div style={{ padding: 20 }}>
{this.props.children || <Dashboard courses={co... | The base App class. |
import React from 'react';
import evalDependsOn from '../../../fields/utils/evalDependsOn';
module.exports = React.createClass({
displayName: 'FormHeading',
propTypes: {
options: React.PropTypes.object
},
render () {
if (!evalDependsOn(this.props.options.dependsOn, this.props.options.values)) {
return nu... | The function that creates a component that can be used to render a dropdown dropdown list. |
/**
* AppList -> ResizeContainer
*/
import React from 'react';
import classnames from 'classnames';
import debounce from 'lodash/debounce';
import PropTypes from 'prop-types';
import css from './ResizeContainer.css';
class ResizeContainer extends React.Component {
static propTypes = {
children: PropTypes.func... | Create a component that can be rendered when the app list is resized. |
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 ... | Create a menu item with a single child component that is rendered when a menu item is clicked. |
import React from 'react'
import Link from 'next/link'
const MyLink = React.forwardRef((props, ref) => (
<a {...props} ref={ref}>
Click me
</a>
))
export default () => (
<Link href="/" passHref>
<MyLink />
</Link>
)
| A component that renders a with a link to the next link in the chain. |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import styles from './Header.scss';
import withStyles from '../../decorators/withStyles';
import Link from '../../utils/Link';
import Navigation from '../Navigation';
@withStyles(styles)
class Header {
render() {
... | Demonstrates how to render a single necessarse of a single necessarse. |
import React from 'react';
import AutoComplete from 'material-ui/AutoComplete';
class SearchBox extends React.Component {
constructor() {
super();
this.state = {
searchText: ''
};
this.search = this.search.bind(this);
this.handleUpdateInput = this.handleUpdateInput.bind(this);
}
searc... | A component that shows a search in the Google search page. |
// import React from 'react'
class BlurryImage extends React.Component {
constructor(props) {
super(props);
this.state = {
style: {
overflow: "hidden",
backgroundImage: "url(" + this.props.placeholder + ")",
backgroundSize: "cover",
... | A component that shows a blurry image. |
/* @flow */
// React
import React from 'react'
// UI
import { Item } from 'semantic-ui-react'
import ReactDisqusThread from 'react-disqus-thread'
// Custom UI
import {
PostDate,
PostCategory,
PostTag,
PostComments
} from 'components'
// Types
import type { Post, Tag, Category } from 'types'
type Props = {
... | Short post component |
import React from 'react';
import DocumentTitle from 'react-document-title';
import { prefixLink } from 'gatsby-helpers';
import $ from 'jquery';
import _ from 'lodash';
export default class Index extends React.Component {
constructor(props) {
super(props);
}
componentDidMount() {}
render () {
retur... | The Index class is a class |
import React from 'react';
import classNames from 'classnames';
import './Card.css';
const Card = ({ highlight, voted, show, suit, score }) => {
const cardClass = classNames('Card', { highlight, voted, show });
return (
<div className={cardClass}>
<div className="front face">
{
!show
... | export a default card |
import React from 'react';
import {connect} from 'react-redux';
import UsersAdd from '../components/UsersAdd';
const calculateNextIndex = (state) => {
return Math.max(0, ...state.users.map(x => x.id)) + 1;
};
const mapStateToProps = (state) => ({
nextIndex: calculateNextIndex(state)
});
export default connec... | Imports a bunch of modules that are required to add users to a state. |
import React from 'react';
import Application from '../../molecules/application';
import List from '../../layouts/list';
export default function ApplicationList() {
return (
<List title="Applications" service="active">
<Application name="Docker" />
<Application name="Flask" />
<Application nam... | The application list |
import React from 'react';
import ContestPreview from './ContestPreview';
const ContestList = ({ contests, onContestClick }) => (
<div className="ContestList">
{Object.keys(contests).map(contestId =>
<ContestPreview
key={contestId}
onClick={onContestClick}
{...contests[contestId]} /... | A component that renders a list of all the missing missing nodes. |
import React from 'react';
import truncate from 'lodash/truncate';
import { Link } from 'mirrorx';
import { List, DataTable, TextField, BelongsToField } from '../../../../src';
import Filters from './Filters';
export default (props) => (
<List model="posts" filters={<Filters />} {...props}>
<DataTable>
<Te... | The default implementation of which returns a sequence of objects that can be found in a post. |
/* @flow */
import React, { Component } from 'react';
import MoneyItem from './MoneyItem'
export default class Coupon extends Component {
render() {
let {couponInfo, couponName} = this.props
let couponValue = ''
let couponColor = undefined
if(!couponInfo.promoteType) {
couponValue = couponInf... | The Coupon class |
import React from 'react'
import { Divider, Image } from 'semantic-ui-react'
const src = 'http://semantic-ui.com/images/wireframe/image.png'
const ImageExampleVerticallyAligned = () => (
<div>
<Image src={src} size='tiny' verticalAlign='top' /> <span>Top Aligned</span>
<Divider />
<Image src={src} siz... | Example of how to align a with a vertical alignment |
import App from './components/app.component';
import AppHomeRoute from './routes/app-home.route';
import React from 'react';
import ReactDOM from 'react-dom';
import Relay from 'react-relay';
Relay.injectNetworkLayer(
new Relay.DefaultNetworkLayer('http://192.168.99.100:5000/graphql', {
credentials: 'same-origin... | Imports a single node in the network layer and renders it in a network layer. |
import styles from './IconPreview.less';
import React from 'react';
import {
Icon
} from 'seek-asia-style-guide/react';
export default function IconPreview() {
return (
<div className={styles.root}>
<Icon type="education" size="large" />
<Icon type="experience" size="large" />
<Icon type="re... | Default icons for missing icons |
import React from 'react';
import PropTypes from 'prop-types';
import { classes } from './End.st.css';
class End extends React.Component {
static propTypes = {
children: PropTypes.node,
};
render() {
const { children } = this.props;
return <div className={classes.end}>{children}</div>;
}
}
export... | end component of a node |
import React, { Component } from 'react';
import { render } from 'react-dom';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import { Provider } from 'react-redux';
import { createStore, compose } from 'redux';
import { addLocaleData ... | Package that imports all of the components that are not found in the system. |
import React from 'react';
/**
* Maps children that are typically specified as `props.children`,
* but only iterates over children that are "valid components".
*
* The mapFunction provided index will be normalised to the components mapped,
* so an invalid component would not increase the index.
*
* @param {?*} ... | Determines if the Child container has one or more valid components. |
import React from 'react'
import TodoForm from 'containers/TodoForm'
import TodoList from 'containers/TodoList'
import TodoItemsLeft from 'containers/TodoItemsLeft'
import TodoFilter from 'containers/TodoFilter'
const TodoWidget = () => (
<div className='todo-widget'>
<TodoForm />
<TodoList />
<To... | Imports a single todo widget from a sequence of containers. |
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 f from 'lodash'
import { TokenRow } from './Tokens'
import ui from '../../lib/ui.coffee'
import UI from '../../ui-components/index.coffee'
import setUrlParams from '../../../lib/set-params-for-url.coffee'
const t = ui.t
class TokenCreatedPage extends React.Component {
render (props =... | A component that creates a page of tokens that are not part of a token sequence. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationVpnLock = (props) => (
<SvgIcon {...props}>
<path d="M22 4v-.5C22 2.12 20.88 1 19.5 1S17 2.12 17 3.5V4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h5c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1zm-.8 0h-3.4v-.5c0-.94.76-... | NotificationVpnLock is a component |
import React from 'react';
import {
Row,
Col,
Icon,
Grid,
Panel,
Image,
Table,
Button,
PanelBody,
PanelHeader,
PanelContainer,
} from '@sketchpixy/rubix';
class GalleryItem extends React.Component {
constructor(props) {
super(props);
this.state = {
active: this.props.active || fa... | Component that handles a single sequence of non - |
import React from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
const InputField = ({ meta: { touched, error, warning }, ...props }) => (
<div
className={`form-input-${props.type} ${classNames({
'form-input-error': (error || warning) && touched,
})}`}
>
<label
... | InputField for a |
// @flow
import React, { Component } from 'react';
import { observer } from 'mobx-react';
import { action } from 'mobx';
import List from 'material-ui/List';
import Header from './Header';
import PatientItem from './PatientItem';
import type PatientStore from './store';
type Props = {
patientStore: PatientStore,
... | A component that can be rendered by a user to add a new key to a store. |
import React from 'react'
export default class VendorIdInput extends React.Component {
state = { inputValue: '' }
componentDidMount = (newProps) => {
if (this.props.value) {
this.setState({ inputValue: this.props.value })
}
}
onChange = (event) => {
this.setState({ inputValue: event.current... | The VendorIdInput component |
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
export default class DisplayName extends React.PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,
others: ImmutablePropTypes.list,
};
render () {
const { account, others } = this.pro... | The display name of a node in a hierarchy. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let ExposurePlus1 = props =>
<SvgIcon {...props}>
<path d="M10 7H8v4H4v2h4v4h2v-4h4v-2h-4V7zm10 11h-2V7.38L15 8.4V6.7L19.7 5h.3v13z" />
</SvgIcon>;
ExposurePlus1 = pure(ExposurePlus1);
ExposurePlus1.muiNam... | Imports a single node in a hierarchy. |
import React from 'react';
import withRoot from 'docs/src/modules/components/withRoot';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import markdown from './list-item-avatar.md';
function Page() {
return <MarkdownDocs markdown={markdown} />;
}
export default withRoot(Page);
| The default implementation of a that creates a page with a Markdown documentation. |
import React from 'react';
import Item from './Item';
import Wrapper from './Wrapper';
function ListItem(props) {
return (
<Wrapper>
<Item>
{props.item}
</Item>
</Wrapper>
);
}
ListItem.propTypes = {
item: React.PropTypes.any,
};
export default ListItem;
| ListItem exports a single item in a sequence of items that can be found in a sequence of items. |
import React from 'react';
export default class Fav extends React.Component {
static propTypes = {
path: React.PropTypes.string
}
constructor(props) {
super(props);
//// Create link element and it's attributes
//let favicon = document.createElement('link');
//let rel = document.createAttrib... | Create a component that renders a favicon on the page. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link, Redirect } from 'react-router-dom';
import PropTypes from 'prop-types';
import Form from './Form';
import { retrieve, update, reset } from '../../actions/{{{lc}}}/update';
import { del } from '../../actions/{{{lc}}}/delete';... | The base component for a sequence of components that can be updated or deleted. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionLock = (props) => (
<SvgIcon {...props}>
<path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.... | A component that renders a single action lock in a series of icons. |
import React from 'react'
import { Router, Route, IndexRoute, hashHistory } from 'react-router'
import App from './App'
import Home from './Home'
import ConnectScrollsExample from './ConnectScrollsExample'
import KineticScrollExample from './KineticScrollExample'
const Root = () => (
<div>
<Router history={ha... | export Root function |
// Copyright 2004-present Facebook. All Rights Reserved.
import React from 'react';
export default class CheckboxWithLabel extends React.Component {
state = {isChecked: false};
onChange = () => {
this.setState({isChecked: !this.state.isChecked});
};
render() {
return (
<label>
<input
... | A component that checks if a checkbox is checked. |
/* @flow */
import React from 'react';
import { View } from 'react-native';
import { Spinner, Text } from 'native-base';
import { colors } from 'app/settings';
import styles from './styles';
type Props = {|
children?: string,
|};
const LoadingMessage = ({ children }: Props) =>
<View style={styles.LoadingMessage}... | Imports a single node in a hierarchy. |
import React from 'react';
import './BottomLink.css';
/**
* React component of a section bottom link.
*/
export class BottomLink extends React.Component {
render() {
return (
<button className="BottomLink" onClick={this.props.onClick}>{this.props.text}</button>
);
}
}
| Top link component |
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
import Header from './header';
export default class About extends Component {
constructor(props) {
super(props);
}
render() {
return (
<View style={{flexDirection:'column', flex:1, backgroundCo... | Component that displays a warning when a node is missing a node. |
import React, { Component } from 'react';
import CompactProblem from '../Components/CompactProblem'
import ProblemForm from '../Components/ProblemForm';
class ProblemListView extends Component {
render() {
return (
<div className="ProblemListView">
{this.props.problems.map(problem => {
... | A component that renders a problem list view. |
import './index.css';
import React from 'react';
const TwoColumnLayout = ({ children }) =>
<div className="TwoColumnLayout">
<div className="TwoColumnLayout-left">
{children[0]}
</div>
<div className="TwoColumnLayout-right">
{children[1]}
</div>
</div>;
export default TwoColumnLayout;
| TwoColumnLayout is a helper function to create a TwoColumnLayout with a single child. |
import React from 'react';
import ReactDOM from 'react-dom';
import JqxTagCloud from '../../../jqwidgets-react/react_jqxtagcloud.js';
import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js';
class App extends React.Component {
componentDidMount() {
this.refs.hideItem.on('click', (event) => {
... | JSX App Class |
import PropTypes from 'prop-types'
import React from 'react'
import TransferList from './transferlist.js'
import { List } from 'immutable'
const DownloadList = ({downloads, onDownloadClick, onClearClick}) => (
<div className="downloads">
<h3> Downloads </h3>
<TransferList transfers={downloads} onTransferClick={on... | export DownloadList default props |
import React from 'react'
import toml from 'toml-js'
import Helmet from 'react-helmet'
import { config } from 'config'
module.exports = React.createClass({
propTypes () {
return {
route: React.PropTypes.object,
}
},
render () {
const data = this.props.route.page.data
return (
<div>
... | The base component for a missing missing key. |
import React from 'react';
import { App } from './App';
React.render(<App />, document.getElementById('root'));
| Imports the Ngan App and renders it in the root element. |
import React from 'react';
import {
View,
Text,
StyleSheet,
TextInput,
TouchableOpacity
} from 'react-native';
import Ripple from 'react-native-material-ripple';
import { FontAwesome } from '@expo/vector-icons';
import CompanyBox from '../components/companies/companyBox';
import CommentList from '../componen... | A component that displays a single node in a company s details box. |
import React from 'react';
import List from 'modules/pages/list';
export default () => (
<div className="row row--no-gutter col-full-height scroll">
<div className="col-xs-12 col-sm-12 col-md-10 col-lg-8 col-md-offset-1 col-lg-offset-2">
<List />
</div>
</div>
);
| The default export function for missing - React - availables. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAirlineSeatFlat = (props) => (
<SvgIcon {...props}>
<path d="M22 11v2H9V7h9c2.21 0 4 1.79 4 4zM2 14v2h6v2h8v-2h6v-2H2zm5.14-1.9c1.16-1.19 1.14-3.08-.04-4.24-1.19-1.16-3.08-1.14-4.24.04-1.16 1.19-1.1... | A component that exports a sequence of notifications for a specific airline. |
import classNames from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import { NavLink, withRouter } from 'react-router-dom';
import { FormattedMessage, injectIntl } from 'react-intl';
import { debounce } from 'lodash';
import { isUserTouching } from '../../../is_mobile';
export const lin... | The TabsBar component is a component that renders a list of links to the tabs - bar. |
import React from 'react'
import Reflux from 'reflux'
import classnames from 'classnames'
import LanguageActions from './LanguageActions'
import LanguageStore from './LanguageStore'
const LanguageSelector = React.createClass({
getInitialState: function(){
return {
'store': LanguageStore.getData... | Create a language selector that can be used to select a language in a sequence of keys. |
/*
* Copyright (C) 2015 Actor LLC. <https://actor.im>
*/
import React from 'react';
import DialogActionCreators from 'actions/DialogActionCreators';
import KickUserActionCreators from 'actions/KickUserActionCreators';
import KickUserStore from 'stores/KickUserStore'
import AvatarItem from 'components/common/Avata... | Component which is a component that can be used to manage a group of users. |
import React from 'react'
import styles from './FormSubmitFeedback.scss'
export default ({children, type = 'success'}) => {
return (<span className={styles[type]}>{children}</span>)
}
| Default function for returning a |
import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React from 'react';
import DropdownToggle fr... | A component that can be used to toggle a dropdown toggle. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionRowing = (props) => (
<SvgIcon {...props}>
<path d="M8.5 14.5L4 19l1.5 1.5L9 17h2l-2.5-2.5zM15 1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 20.01L18 24l-2.99-3.01V19.5l-7.1-7.09c-.31.05-.61.07-.91.07v-... | A component that renders a series of action icons. |
import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosSunnyOutline extends React.Component {
render() {
if(this.props.bare) {
return <g>
<style type="text/css">
.st0{fill:#010101;}
</style>
<g>
<rect x="247" y="96" class="st0" width="18" height="56"></rec... | A component that renders a sequence of Ios sunny components. |
import React from 'react'
import {
Text,
View,
Button
} from 'react-native'
import * as cards from '../cards'
import { ReadLoud, ManitouInfo } from './TextViews'
import { NextFooter } from './Buttons'
export const Result = ({participant, result}) => {
if (!result) {
return (
<View>
<ReadLoud ... | Dodaje dane kategorii nie |
import React from 'react';
import Style from '../Style';
import {
AppRegistry,Image,
Text,View,Button,Alert, ToastAndroid,TouchableOpacity,Slider
} from 'react-native';
import { StackNavigator } from 'react-navigation';
import MovieRow from '../components/MediaRow';
import MediaList from '../components/MediaList'
i... | The HomeScreen component that displays a menu of a single song. |
import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import cx from 'classnames';
import CartIcon from 'react-icons/lib/md/shopping-cart';
import {toggleModal} from '../store/actions/cart';
const CartPreview = ({
count,
isLoading
}) => (
<a
disabled={... | Initialize a single node that displays a cart preview of a single item. |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { Router, browserHistory } from 'react-router';
import promise from 'redux-promise';
import routes from './routes';
import reducers from './reducers';
cons... | Imports a single node in the DOM. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePhotoSizeSelectSmall = (props) => (
<SvgIcon {...props}>
<path d="M23 15h-2v2h2v-2zm0-4h-2v2h2v-2zm0 8h-2v2c1 0 2-1 2-2zM15 3h-2v2h2V3zm8 4h-2v2h2V7zm-2-4v2h2c0-1-1-2-2-2zM3 21h8v-6H1v4c0 1.1.9 2 2 2zM3 7H... | A small component that renders a series of icons that can be selected by a user. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalCellularConnectedNoInternet2Bar = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M22 8V2L2 22h16V8z"/><path d="M14 22V10L2 22h12zm6-12v8h2v-8h-2zm0 12h2v-2h-2v2z"/>
</SvgIcon>
);
Devi... | Dev - signal cellular connected no internet 2 bar |
import React from 'react';
// eslint-disable-next-line
import LogIcon from 'ringcentral-widgets/components/LogIcon';
const props = {};
props.currentLocale = 'en-US';
/**
* A example of `LogIcon`
*/
const LogIconDemo = () => (
<LogIcon
{...props}
/>
);
export default LogIconDemo;
| A demo of how to render a |
/*
* 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... | This file is part of Canvas. It is part of Canvas. It is part of Canvas. |
import {Consumer} from './pageableContext'
import {msg} from 'translate'
import PropTypes from 'prop-types'
import React from 'react'
export const PageableInfo = props => {
const renderDefaultInfo = ({count, start, stop}) =>
<div>
{msg('pagination.info', {count, start, stop})}
</div>
... | A pageable - based info - generator for . js |
import React from 'react';
import styled from 'styled-components';
import {TextHighlightBanner, Button as SharedButton} from '../shared';
import {BannerWrapper as SharedBannerWrapper} from '/component/base/TextHighlight';
import AmpStoryPage from '/component/amp/AmpStoryPage';
const Button = styled(SharedButton)`
p... | export default protected component |
/**
* Created by jf on 15/11/4.
*/
import React from 'react';
import classNames from 'classnames';
import {Button} from '../button/index';
import Icon from '../icon/index';
class Msg extends React.Component {
static propTypes = {
type: React.PropTypes.string,
buttons: React.PropTypes.array
... | A component that can be used to show a single missing key sequence. |
/**
*
* ToggleOption
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, intlShape } from 'react-intl';
const ToggleOption = ({ value, message, intl }) => (
<option value={value}>
{message ? intl.formatMessage(message) : value}
</option>
);
ToggleOption.propTypes = {
va... | Provides a toggle option for a single missing - missing node in a group of nodes. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationCallMade = (props) => (
<SvgIcon {...props}>
<path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"/>
</SvgIcon>
);
CommunicationCallMade = pure(CommunicationCallMade);
CommunicationCallMade.displ... | A function to create a communication |
import React, { Component } from 'react';
import axios from 'axios';
class SoundList extends React.Component {
constructor(props) {
super(props);
this.state = {
sound: []
};
}
componentDidMount() {
axios.get(`http://localhost:8080/sounds`)
.then(res => {
this.setState({ soun... | The base class for a list of sound objects. |
import React from 'react'
import { createDevTools } from 'redux-devtools'
import LogMonitor from 'redux-devtools-log-monitor'
import DockMonitor from 'redux-devtools-dock-monitor'
export default createDevTools(
<DockMonitor
toggleVisibilityKey='ctrl-h'
changePositionKey='ctrl-q' >
<LogMonitor />
</Dock... | import react - devtools |
import _ from 'lodash';
import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
const {addons: { PureRenderMixin }} = addons;
@ReactMixin.decorate(PureRenderMixin)
class UserProfileContactInfo extends React.Component {
static propTypes = {
phones: React.PropTypes.arr... | A component that displays a list of users who have a single contact. |
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Alert
} from 'react-native';
import AndroidScanner from './AndroidBarcodeScanner';
import LoginButton from './LoginButton';
import OrderList from '../ui/OrderList'
import OrderDetail from '../ui/OrderDetail'
// impor... | Create a new BarcodeScanner with the given props. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageAudiotrack = (props) => (
<SvgIcon {...props}>
<path d="M12 3v9.28c-.47-.17-.97-.28-1.5-.28C8.01 12 6 14.01 6 16.5S8.01 21 10.5 21c2.31 0 4.2-1.75 4.45-4H15V6h4V3h-7z"/>
</SvgIcon>
);
ImageAudiotrack = p... | A component that exports a sequence of images. |
/*
* 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 navigating menu. |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import css from './styles.css';
class Home extends Component {
render() {
return (
<div className={css.Home}>
<h2>What is this? </h2>
A react component rendering a resizable box.
<h2> Why? </h2>
... | The default implementation of which is a class that can be used to render a resizable container. |
/*
* ReadmePage
*
* This is the page users see when they click the "Setup" button on the HomePage
*/
import React, { Component } from 'react';
import { Link } from 'react-router';
export default class ReadmePage extends Component {
render() {
return (
<div>
<h2>Further Setup</h2>
<p>As... | The page where the user has selected a component and is able to show up in the page. |
import React from 'react'
import invariant from 'invariant'
import { createRouteFromReactElement } from './RouteUtils'
import { formatPattern } from './PatternUtils'
import { falsy } from './PropTypes'
const { string, object } = React.PropTypes
/**
* A <Redirect> is used to declare another URL path a client should b... | This module is used to declare a route that should be routed to when a client requests a given URL. |
import React from 'react';
function Loader({ size, color, className = '', style = {} }) {
return (
<div className={className} style={style}>
<svg
className={`${size ? size : 'w-24 h-24'} stroke-current ${
color ? color : ''
} mx-auto`}
viewBox="0 0 38 38"
xmlns="ht... | Generate a Loader that loads a single node in the hierarchy. |
import React from 'react';
export default class LabelColors extends React.Component {
render() {
return (
<div className="con">
<div className="p">
<div className="p__body">
<span className="lbl lbl--red">Red</span>
<span className="lbl lbl--blue">Blue</span>
... | Generate a single label color sequence from a sequence of label colors. |
import {connect} from 'react-redux';
import React from 'react';
import PropTypes from 'prop-types';
import {redo, undo} from '../../actions/index.js';
import './Toolbar.css';
function UnconnectedToolbar(props) {
const {dispatch, history} = props;
const undoLink = (
<span
key='undoLink'
... | Demonstration of the UnconnectedToolbar class. |
import React from 'react';
export default React.createClass({
shouldComponentUpdate() {
return false;
},
render() {
return (
<footer className="footer hidden-print">
<div className="container">
<div className="row">
... | Create a new hidden class with a single hidden element. |
/**
* Created by apache on 15-12-5.
*/
import React from 'react';
import NoticePointActions from '../actions/NoticePointActions';
import NoticePointStore from '../stores/NoticePointStore';
class NoticePoint extends React.Component {
constructor(props) {
super(props);
this.state = NoticePointStore... | A component that shows a single notice point. |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdMyLocation(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M24 16c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm17.88 6H46v4h-4.12c-.92 8.34-7.54 14.96-15.88 15.88V46h-4v-4.12C13.66 40.96 7.04 34.34... | The MdMyLocation function |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let BrandingWatermark = props =>
<SvgIcon {...props}>
<path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16h-9v-6h9v6z" />
</SvgIcon>;
BrandingWatermark = pure(Branding... | A small function to create a single element in a hierarchy. |
import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'gatsby';
import {
Field,
Label,
Control,
Input,
TextArea,
Container,
Title,
Subtitle,
Section,
Hero,
HeroBody,
Button,
Notification,
} from 'bloomer';
function ContactPage({ isSubmitted = false }) {
/* esli... | Private function for generating a single missing - residue |
import React from 'react';
import _ from 'lodash';
import VisibilityStore from 'stores/VisibilityStore';
import MessageActionCreators from 'actions/MessageActionCreators';
import MessageItem from 'components/common/MessageItem.react';
let _delayed = [];
let flushDelayed = () => {
_.forEach(_delayed, (p) => {
... | The MessagesSection component is a component that can be used to show a message in a specific month. |
import React from 'react'
export default class CreateRecipeRLCMS extends React.Component {
render() {
return (
<div style={{margin: '1rem 2rem', display: 'grid', gridGap: '1rem', color: '#ccc'}}>
<div>
Monitoring land cover and land use change is important fo... | A component that creates a single key sequence sequence |
/**
* 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 Content from './Content'... | Provides a function to create a new node in the hierarchy. |
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import IconButton from '../../../components/icon_button';
import { defineMessages, injectIntl } from 'react-intl';
import UploadProgressContainer from '../containers/upload_progress_container';
imp... | The base component for the upload form. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvPlaylistAddCheck = (props) => (
<SvgIcon {...props}>
<path d="M14 10H2v2h12v-2zm0-4H2v2h12V6zM2 16h8v-2H2v2zm19.5-4.5L23 13l-6.99 7-4.51-4.5L13 14l3.01 3 5.49-5.5z"/>
</SvgIcon>
);
AvPlaylistAddCheck = pure... | A component that exports a single missing - missing |
import blacklist from 'blacklist';
import classnames from 'classnames';
import React from 'react';
import { Container } from 'elemental';
var PrimaryNavItem = React.createClass({
displayName: 'PrimaryNavItem',
propTypes: {
className: React.PropTypes.string,
children: React.PropTypes.node.isRequired,
href: Reac... | The primary navigation component is a component that can be used to show a navigation bar in the navigation bar. |
import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var LocalFileColumn = React.createClass({
renderValue: function () {
var value = this.props.data.fields[this.props.col.path];
if (!value || !value.filename) ret... | The LocalFileColumn component is a component that renders a single interior field of a file in a table. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.