code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
import classNames from 'classnames';
import DialogActionCreators from 'actions/DialogActionCreators';
import DialogStore from 'stores/DialogStore';
import AvatarItem from 'components/common/AvatarItem.react';
class RecentSectionItem extends React.Component {
static propTypes = {
di... | A component that renders a recent section of a dialog. |
// Copyright 2016 Juan Carlos Orozco
// Licensed under the Apache License, Version 2.0 (the "License");
// https://github.com/JC-Orozco/BlocksIDE
import React, { Component } from 'react';
import './App.css';
import 'react-tabs/style/react-tabs.css';
import Layout1 from './components/Layout1.jsx';
import Blockly from '... | Component that is a component that is rendered in the main workspace. |
import Typography from 'material-ui/Typography';
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
const styleSheet = theme => ({
label: {
color: theme.palette.common.formLabel,
paddingBottom: '5px',
},
});
const ItemColumnCell = (props) => {
... | ItemColumnCell - > ItemColumnCell |
require.main.paths.splice(0, 0, process.env.NODE_PATH);
import remote from 'remote';
var Menu = remote.require('menu');
import React from 'react';
import SetupStore from './stores/SetupStore';
import ipc from 'ipc';
import machine from './utils/DockerMachineUtil';
import metrics from './utils/MetricsUtil';
import templ... | This module is exported to allow the application to be run in a background. |
import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'react-redux';
import App from './containers/App.js';
import configureStore from './store/store.config.js';
const store = configureStore()
ReactDOM.render(
<Provider store={store}><App id='file-upload' /></Provider>,
document.getE... | Imports a single node in the DOM. |
import PropTypes from 'prop-types'
import Lookup from './lookup'
import Select from './select'
import Toggle from './toggle'
import Daterange from './daterange'
import React from 'react'
class Overview extends React.Component {
static propTypes = {
filters: PropTypes.array,
results: PropTypes.object,
on... | Overview component for a single key sequence. |
import React from 'react';
import PropTypes from 'prop-types';
import StyledSideLink from './StyledSideLink';
const SideLink = (props) => <StyledSideLink {...props}>{props.children}</StyledSideLink>
SideLink.propTypes = {
children: PropTypes.any,
}
export default SideLink;
| SideLink is a component that can be rendered by a component that has no children. |
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 modal dialog component that displays a modal dialog with a modal modal - like element. |
import React, { Component } from 'react';
export default class Landon extends Component {
render() {
return (
<div>Landon</div>
);
}
}
| export default component |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { View, Platform } from 'react-native';
import { Container, Header, Title, Fab, Button, IconNB, Left, Right, Body, Icon } from 'native-base';
import { Actions } from ... | Component that is a component that has a single key in a navigation stack. |
import React from 'react'
import Box from './Box'
export default function ScrollView({ extend, children, ...props }) {
return (
<Box
{...props}
shrink={1}
grow={1}
maxHeight="100%"
extend={{
WebkitOverflowScrolling: 'touch',
overflow: 'auto',
...extend,
... | The default scroll view for a sequence of children. |
import React from 'react';
import Helmet from 'react-helmet';
import { renderToString, renderToStaticMarkup } from 'react-dom/server';
import { StaticRouter } from 'react-router-dom';
import { AsyncComponentProvider, createAsyncContext } from 'react-async-component';
import asyncBootstrapper from 'react-async-bootstrap... | The default application middleware that handles the response of a React application. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let YoutubeSearchedFor = props =>
<SvgIcon {...props}>
<path d="M17.01 14h-.8l-.27-.27c.98-1.14 1.57-2.61 1.57-4.23 0-3.59-2.91-6.5-6.5-6.5s-6.5 3-6.5 6.5H2l3.84 4 4.16-4H6.51C6.51 7 8.53 5 11.01 5s4.5 2.01 4... | Youtube Search For |
import React from 'react'
import {
customPropTypes,
getElementType,
getUnhandledProps,
META,
} from '../../lib'
import Checkbox from '../../modules/Checkbox'
import FormField from './FormField'
/**
* Sugar for <Form.Field control={Checkbox} />.
* @see Checkbox
* @see Form
*/
function FormCheckbox(props) {... | A component that renders a single checkbox or checkbox - based checkbox. |
import React from 'react';
import {Link} from 'react-router';
export default class extends React.Component {
constructor(props) {
super(props);
this.onSubmit = this.onSubmit.bind(this);
}
onSubmit(e) {
e.preventDefault();
this.props.loginWithPassword(this._emailInput.value, this._passwordInput.v... | A component that can be used to login with a password. |
import React from 'react';
export default (components, className, onClick) => (
<div className={className + ' horizontal'} onClick={onClick}>
{components[0]}
{components[1]}
</div>
);
| Default function for adding a hidden hidden component to a list of components. |
import React from 'react'
import { storiesOf } from '@storybook/react-native'
import Standard from './standard'
import Partial from './partial'
import WithGradient from './with-gradient'
import Grouped from './grouped'
import ShowcaseCard from '../showcase-card'
storiesOf('LineChart')
.addDecorator((getStory) => ... | Imports a bunch of non - standard |
/*
* 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 { StyleSheet, Text, View, FlatList } from 'react-native';
import { List, ListItem, Avatar } from 'react-native-elements'
import Icon from 'react-native-vector-icons/MaterialIcons';
const myIcon = (<Icon name="trending up" size={30} color="#900" />)
import colors from '../colors.js'
imp... | The list item that is rendered by a friend list item. |
// @flow
import React from 'react'
import Reader from '../reader'
type Props = {
navigation: {
navigate: Function,
},
screenProps: {
actions: {
setReadData: Function,
},
},
}
type State = {
isScannedOnce: boolean,
}
export default class Scan extends React.Component {
props: Props
stat... | A base class for scanning a series of nodes. |
import Field from '../Field';
import React from 'react';
import { FormInput } from '../../../admin/client/App/elemental';
/**
* TODO:
* - Remove dependency on jQuery
*/
// Scope jQuery and the bootstrap-markdown editor so it will mount
var $ = require('jquery');
require('./lib/bootstrap-markdown');
// Append/remo... | The actual component that is rendered when a bootstrap - markdown editor is mounted. |
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
export default class SettingText extends React.PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,
settingKey: PropTypes.array.isRequired,
label: PropT... | The SettingText class |
/**
* 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 Layout from '../../co... | Provides a function to create a new component in the hierarchy. |
import React from 'react';
import { Button, Col } from 'react-bootstrap';
/*"Restet" button component*/
class GodButtonReset extends React.Component {
constructor(props) {
super(props);
this.state = {
pantheon: 'All',
godclass: 'All',
isSelected: true,
pictureClassName: "God-picture-div green"
};
... | A component that can be used to reset a component. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationArrowDownward = (props) => (
<SvgIcon {...props}>
<path d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"/>
</SvgIcon>
);
NavigationArrowDownward = pure(NavigationArrowDownward);
Na... | A component that exports a navigation arrow downward to the top of a node. |
import React from 'react'
import { firebase, googleAuthProvider } from '../firebase/firebase'
import PropTypes from 'prop-types'
import Nav from '../components/Nav';
import { HighlightButton } from '../components/Button'
import { HighlightLink } from '../components/Link'
import { P, PLight, BigTitle } from '../componen... | export default connect |
import React from 'react'
import { Image, Loader, Segment } from 'semantic-ui-react'
const LoaderExampleInverted = () => (
<Segment inverted>
<Loader active inverted />
<Image src='http://semantic-ui.com/images/wireframe/short-paragraph.png' />
</Segment>
)
export default LoaderExampleInverted
| Example of how to render a sequence of blocks with a loader active. |
//------------------------------------------------------------------------------
// Copyright IBM Corp. 2015
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org... | Adds a header to a single missing - missing component in the system. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceLocationDisabled = (props) => (
<SvgIcon {...props}>
<path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06c-1.13.12-2.19.46-3.16.97l1.5 1.5C10.16 5.19 11.06 5 12 5c3.87 0 7 3.13 7 7 0 .94-.19 1.84-.5... | Missing device location disabled in a hierarchy |
import React from 'react';
import moment from 'moment';
/**
* Handles education component
*/
const Education = props => {
/**
* Gets education items
*/
const getEducation = props.educationData.map(function(item, index) {
const startDate = moment(item.startDate).format('MMM, YYYY');
const endDate = mom... | Get the Education component |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Button, Form } from 'react-bootstrap';
import { getCollectionLink } from 'helpers/utils';
import { collection as collectionErr } from 'helpers/userMessaging';
import { AppContext } from 'store/contexts';
import Modal from 'componen... | A component that can be used to delete a collection of records. |
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 pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBluetoothSearching = (props) => (
<SvgIcon {...props}>
<path d="M14.24 12.01l2.32 2.32c.28-.72.44-1.51.44-2.33 0-.82-.16-1.59-.43-2.31l-2.33 2.32zm5.29-5.3l-1.26 1.26c.63 1.21.98 2.57.98 4.02s-.36 2.82-.9... | A component that exports a series of components that are not part of a device - bluetooth - linking. |
import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleGroupVertical = () => (
<Button.Group attached='top' vertical>
<Button>Feed</Button>
<Button>Messages</Button>
<Button>Events</Button>
<Button>Photos</Button>
</Button.Group>
)
export default ButtonExampleGroup... | This module imports a bunch of buttons into a single button group. |
import React, { Component } from 'react';
import {BrowserRouter as Router} from 'react-router-dom';
import {Route} from 'react-router-dom';
import './App.css';
import Welcome from './Welcome';
import Navigation from './Navigation';
import ArtistContentContainer from './artist/ArtistContentContainer';
import AlbumConte... | The main function for the application. |
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { version, source_url } from 'mastodon/initial_state';
import StackTrace from 'stacktrace-js';
export default class ErrorBoundary extends React.PureComponent {
static propTypes = {
children: Prop... | The ErrorBoundary class is a class that can be used to handle unexpected errors. |
/* eslint-disable global-require, no-console */
import React from 'react'
import { connect } from 'react-redux'
import { Form, actions as formActions } from 'lightning-forms'
import { actions } from './reducer'
import { remote } from 'electron'
import { actions as accountsActions } from '../accounts'
import { Currency... | The default action for a single node - chain payment action. |
import React from 'react';
import {Card, CardActions, CardHeader, CardMedia, CardTitle, CardText} from 'material-ui/Card';
import FlatButton from 'material-ui/FlatButton';
const CardExampleWithAvatar = () => (
<Card>
<CardHeader
title="URL Avatar"
subtitle="Subtitle"
avatar="images/jsa-128.jpg"... | Generate a list of all components of a single card. |
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* @flow */
import React from 'react';
import { redTransparent, yellowTransparent } from '../styles';
const _preStyle = {
display: 'b... | Generates a code block with dangerously setInnerHTML. |
import React from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import EditLink from './EditLink';
@lore.connect(function(getState, props){
const tweet = props.tweet;
return {
user: getState('user.byId', {
id: tweet.data.user
})
};
})
class Tweet extends React.Component... | The base component for a single missing node in a list group. |
import React, { Component } from 'react';
import classNames from 'classnames';
import Box from './Box';
class Segments extends Component {
render() {
let {
className,
...rest
} = this.props;
let cx = classNames(
'segments',
className
);
return (
<Box
ts
... | Generates a segments component that renders a single segment. |
'use strict';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import { curator_page, userMatch, queryKeyValue, external_url_map } from '../globals';
import { RestMixin } from '../rest';
import VariantInterpretationSummaryHeader from './hea... | A component that creates a variant interpretation summary for a specific object. |
import React from 'react'
import PropTypes from 'prop-types'
// external-global styles must be imported in your JS.
import normalizeCss from 'normalize.css'
import resetcss from 'styles/reset.less'
import hljscss from 'styles/hljs.css'
// import normalizeCss from 'normalize.css'
import s from './Layout.css'
import ... | A component that renders a node in a layout. |
import React from 'react';
import Title from 'react-title-component';
import MarkdownElement from '../../MarkdownElement';
import installationText from './installation.md';
const Installation = () => (
<div>
<Title render={(previousTitle) => `Installation - ${previousTitle}`} />
<MarkdownElement text={insta... | The default installation function |
import React from 'react'
import { View, Text } from 'react-native'
export const ConfirmationModal = props => (
<View>
<Text>
{'Bico'}
</Text>
</View>
)
| export ConfirmationModal from react - native |
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, browserHistory } from 'react-router';
// Components
import HomePage from './home/home-page';
import MoviesPage from './movies/movies-page';
import ContactPage from './contact/contact-page';
import BookingPage from './cart/booking-page... | Imports a single node in the DOM. |
import PropTypes from 'prop-types';
import React from 'react';
import Modal from 'Components/Modal/Modal';
import ArtistIndexOverviewOptionsModalContentConnector from './ArtistIndexOverviewOptionsModalContentConnector';
function ArtistIndexOverviewOptionsModal({ isOpen, onModalClose, ...otherProps }) {
return (
... | Imports and exports ArtistIndexOverviewOptions. |
import Expo from 'expo';
import React, { Component } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { StackNavigator } from 'react-navigation';
import ListsHome from '../views/lists_home';
import ListsDetails from '../views/lists_detail';
const ListsTabView = ({ navigation }) => (
<Lis... | Imports the default navigation of |
// @flow
import React from 'react';
import Relay from 'react-relay/classic';
import classNames from 'classnames';
import JobTitle from './JobTitle';
type Props = {
job: {
url: string
},
className: string,
style: Object
};
class JobLink extends React.PureComponent<Props> {
render() {
const { job, c... | A component that links to a specific type of object in a job type. |
/*
* schema:
*
* "id": "LPySUCH",
* "title": "Episode 1",
* "description": "Artist: Yuuki Hagure http://myanimelist.net/people/22227/Hagure_Yuuki",
* "datetime": 1444440612,
* "type": "image/png",
* "animated": false,
* "width": 1280,
* "height": 720,
* "size": 1146833,
* "views": 7620,
* "bandwidth": 8738... | Component that represents a single branch of a sequence. |
import React from 'react';
export default class ParagraphNode extends React.Component{
static get nodeType(){
return 'paragraph';
}
constructor(props){
super(props);
}
render(){
return (
<a>{this.props.children} </a>
);
}
} | The ParagraphNode class is used to represent a sequence of nodes that are rendered as a paragraph. |
import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import Mastery from 'parser/druid/restoration/modules/core/Mastery';
import { formatNumber } from 'common/format';
import SPELLS from 'common/SPELLS';
import TraitStatisticBox, { STATISTIC_ORDER } from 'interface/others/TraitStatisticBox';
import S... | Grove Tending is a base class for all Grove - Tending events. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationExpandLess = (props) => (
<SvgIcon {...props}>
<path d="M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"/>
</SvgIcon>
);
NavigationExpandLess = pure(NavigationExpandLess);
NavigationExpandLess.displa... | A component that exports a navigation - expand - less element. |
import React from 'react'
import { Checkbox } from 'semantic-ui-react'
const CheckboxExampleShorthandObject = () => (
<Checkbox label={{ children: 'Make my profile visible' }} />
)
export default CheckboxExampleShorthandObject
| Provides a shortcut for CheckboxExample objects that can be used to show a single checkbox in a tree. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
class Slider extends Component {
constructor(props) {
super(props);
this.state = {
value: this.props.setting.value,
};
}
render() {
const { theme } = this.props;
return (
<div className="setting slider">... | A component that handles the dropdown dropdown. |
import React from 'react';
import { EditorBlock } from 'draft-js';
function SchemataUp(props) {
return (
<div>
<span className="up_span">
<EditorBlock {...props} />
</span>
</div>
);
}
export default SchemataUp;
| SchemataUp - Schemata for a single node. |
import React from 'react'
import { View, Modal } from 'react-native'
import DebugConfig from '../../App/Config/DebugConfig'
import RoundedButton from '../../App/Components/RoundedButton'
import PresentationScreen from './PresentationScreen'
export default class DevscreensButton extends React.Component {
constructor ... | Component that displays a Devscreens button. |
import React from 'react';
import styled from 'styled-components';
import Link from 'components/Link';
const Wrapper = styled.div`
margin: 0 auto 50px;
text-align: center;
a {
color: #ff670f;
margin: 0 10px;
}
`;
const Nav = () => (
<Wrapper>
<Link to="/">/home</Link>
<Link to="/about">/abo... | export a default navigation function |
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Home from '../../components/home/Home';
import * as HomeActions from '../../actions/home/home';
function mapStateToProps(state) {
return {
counter: state.counter
};
}
function mapDispatchToProps(dispatch) {
return bind... | Imports a page that is a subclass of Home. |
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { Router, Route } from 'react-router';
import configureStore from '../store/configureStore';
import App from './App';
import UserPage from './UserPage';
import RepoPage from './RepoPage';
const store = configureStore();
export de... | The root component of a sequence of components. |
import React from 'react';
import './style.scss';
export default (props) => {
return (
<div className="loader">
<div className="dot"></div>
<div className="dot"></div>
<div className="dot"></div>
</div>
);
};
| Demonstration of the default export of Failure. |
import React from 'react';
import {storiesOf, action} from '@kadira/storybook';
import SwitchButton from './switch-button';
const styles = {
padding: '20px',
'backgroundColor': '#deecee',
'height': '80vh'
};
storiesOf('SwitchButton', module)
.addDecorator(getStory => (
<div style={styles}>{getStory()}</di... | A module that imports a single unknown node. |
import React from 'react';
import { render } from 'react-dom';
import createSagaMiddleware from 'redux-saga';
import { batchedSubscribe } from 'redux-batched-subscribe';
import { spawn } from 'redux-saga/effects';
import compose from 'redux';
import App from './App';
import actionCreator from './actionCreator';
import... | Bootstraps a component with a given options. |
import React from 'react';
export function Arrow({ className = undefined }) {
return (
<svg
className={className}
xmlns="http://www.w3.org/2000/svg"
width={24}
height={8}
viewBox="0 0 24 8"
>
<defs>
<filter
id="zaxo0jk8xa"
width="110.4%"
... | Arrow function for linking a single node to a single node. |
import { remote } from 'electron';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { inject, observer } from 'mobx-react';
import PaymentStore from '../../stores/PaymentStore';
import SubscriptionForm from '../../components/subscription/SubscriptionForm';
const { BrowserWindow } ... | The subscription form screen component which is used to display a single payment form. |
import React from 'react';
import ReactDOM from 'react-dom';
import TweenMax, { Bounce } from 'gsap';
import Draggable from 'gsap/src/uncompressed/utils/Draggable';
/**
Comments here
*/
/* eslint no-console: 0 */
/* eslint arrow-body-style: 0 */
/* eslint react/jsx-no-bind: 0 */
export default class Disc extends Reac... | The Disc component is a component that is rendered when a container is rendered. |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const ActionBookmark = (props) => (
<SvgIcon {...props}>
<path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"/>
</SvgIcon>
);
ActionBookmark.displayName = 'ActionBookmark';
ActionBookmark.muiName = 'SvgIcon';
export default Actio... | ActionBookmark - ActionBookmark |
import React from 'react'
import { checkIfEmailVerified } from 'js/authentication/helpers'
class FirebaseAuthenticationUIAction extends React.Component {
componentDidMount() {
// See if the user verified their email address so that we can
// log the verification. It would be better to user a cloud
// fun... | The base component that is used to display a cloud token in the UI. |
import AbstractTests from 'mangojuice-react-core/tests';
import React from 'react';
import ReactDOM from 'react-dom';
import Subscribe from 'mangojuice-react';
AbstractTests(React, ReactDOM, Subscribe, 'React');
| Imports all packages that are not part of the react - core. |
import React from 'react'
import {connect} from 'react-redux'
import CardActions from '../actions/card'
import Card from './card'
import { withRouter } from 'react-router'
import Answer from './answer'
import CardState from '../redux/cardState'
import { Button } from 'react-toolbox/lib/button'
class Dashboard extends ... | A component that displays a modal modal dialog with a modal modal modal. |
/**
*
* ToggleOption
*
*/
import React from 'react';
import { injectIntl, intlShape } from 'react-intl';
const ToggleOption = ({ value, message, intl }) => (
<option value={value}>
{message ? intl.formatMessage(message) : value}
</option>
);
ToggleOption.propTypes = {
value: React.PropTypes.string.isRequir... | A function to toggle a specific option in a dropdown. |
import React from 'react';
import addons from '@storybook/addons';
import { Panel } from './components/Panel';
import { ADDON_ID, PANEL_ID } from '../shared';
const addChannel = api => {
const channel = addons.getChannel();
addons.addPanel(PANEL_ID, {
title: 'Viewport',
render() {
return <Panel ch... | Imports a bunch of components into a single channel. |
import React from 'react';
import {BaseMixin, ElementaryMixin, LsiMixin} from './../../common/common.js';
import Glyphicon from './../../bricks/glyphicon.js';
import Link from './../../bricks/link.js';
import './text-input.less';
const INPUT_TYPE_TEXT = 'text';
const INPUT_TYPE_PASSWORD = 'password';
const INPUT_TY... | A component that renders a text input with a link to a text input. |
import React from 'react';
import StyleSheet from 'react-style';
import {
Paper,
} from 'material-ui';
import colors from '../utils/colors';
class ConvoList extends React.Component {
render() {
let convos = this.props.convos.map((c) => {
let selected = this.props.curConvo && c.id === this.props.curConv... | A component that lists all of the components in a group of items. |
import { action } from '@storybook/addon-actions';
import { text } from '@storybook/addon-knobs';
import { storiesOf } from '@storybook/react-native';
import React from 'react';
import { Text } from 'react-native';
import Button from '.';
import CenterView from '../CenterView';
storiesOf('Button', module)
.addDecora... | Add decorator to generate a sequence of components. |
import React from 'react';
import {
BackAndroid,
} from 'react-native';
import AppActions from '../Actions/AppActions';
// import DrawerStore from '../Stores/DrawerStore';
const Back = {
setNavigator(navigator) {
BackAndroid.addEventListener('hardwareBackPress', () => {
// if (DrawerStore.get().op... | Imports a single window from the BackAndroid system. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentFlag = (props) => (
<SvgIcon {...props}>
<path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"/>
</SvgIcon>
);
ContentFlag = pure(ContentFlag);
ContentFlag.displayName = 'ContentFlag';
ContentFlag.muiName = '... | A component that exports a single |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionCode = (props) => (
<SvgIcon {...props}>
<path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"/>
</SvgIcon>
);
ActionCode = pure(ActionCode);
ActionCode.di... | A component that renders a single action code in a series of icons. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageBrightness4 = (props) => (
<SvgIcon {...props}>
<path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13... | A component that renders a skeleton skeleton image that is not visible in the image. |
import React, { Component } from 'react';
import { CenteredContainer, Text } from '../app/components';
import { Platform } from 'react-native';
export default class HomePage extends Component {
render() {
return (
<CenteredContainer>
<Text style={{ textAlign: 'center' }}>
{Platform.selec... | The HomePage class |
import React from 'react';
import Analyzer, { SELECTED_PLAYER, SELECTED_PLAYER_PET } from 'parser/core/Analyzer';
import Events from 'parser/core/Events';
import calculateEffectiveDamage from 'parser/core/calculateEffectiveDamage';
import { formatThousands } from 'common/format';
import SPELLS from 'common/SPELLS';
... | The base class for all unknown words. |
'use strict';
import './dash-dates-styles.postcss';
import React from 'react';
import moment from 'moment';
import _ from 'underscore';
import utils from '../../scripts/helpers/utils';
class DashboardDates extends React.Component {
constructor(props) {
super(props);
this.props = props;
this.state = {};... | A component that displays a list of dates for a dashboard. |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { HeadingOne, HeadingThree } from '../vanilla-modules/heading';
import styles from './user-avatar.css';
export class UserAvatarView extends Component {
render() {
const { auth, user } = t... | A component that renders a user avatar if the user is authenticated. |
import { connect } from 'react-redux';
import React, { Component } from 'react';
import { View, StatusBar } from 'react-native';
import Navigation from '../Navigation/AppNavigation';
import StartupActions from '../Redux/StartupRedux';
import ReduxPersist from '../Config/ReduxPersist';
// Styles
import styles from './... | The base class for the root container. |
import fs from 'fs';
import express from 'express';
import React from 'react';
import { renderToString } from 'react-dom/server';
import { match, RoutingContext } from 'react-router';
import ContactsApp from './app/component/contact-app.jsx';
const app = express();
app.set('views', './');
app.set('view engine', 'ejs'... | Express app that renders a list of contacts |
import React from 'react'
class Chat extends React.Component {
constructor(props) {
super(props)
this.state = {
text: '',
}
this.setText = this.setText.bind(this)
this.sendMessage = this.sendMessage.bind(this)
}
componentDidUpdate() {
this.refs.messages.scrollTop = this.refs.messag... | A component that is a chat with a series of messages. |
/**
* 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 PropTypes from 'prop-types';
import React from 'react';
import cx from 'classnames';
import { settings } from 'carbon-components';
co... | Provides a function to generate a single missing - missing radio button with optional label. |
import React from 'react';
export default () => {
return <div>Let's put the fun back in functional!</div>;
};
| The default export function that returns a hidden element that can be used to render a functional error message. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatBold = (props) => (
<SvgIcon {...props}>
<path d="M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1... | A component that renders a single node in a hierarchy of icons. |
import React from 'react'
import { Checkbox, Form } from 'semantic-ui-react'
const FormExampleFieldLabelElement = () => (
<Form>
<Form.Field
control={Checkbox}
label={<label>I agree to the Terms and Conditions</label>}
/>
</Form>
)
export default FormExampleFieldLabelElement
| Imports a from React and exports it as a FormExampleFieldLabelElement |
// @flow weak
// Higher order component for focusing elements by ValidationError.
import React from 'react';
import { ValidationError } from '../../common/lib/validation';
import { findDOMNode } from 'react-dom';
const focus = (errorProp) =>
(WrappedComponent) => class Wrapper extends React.Component {
component... | A component that focuses on a weakly - focusable field in a DOM. |
import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import... | A component that can be rendered by a component that is not yet rendered by a component. |
import React, { Component } from 'react';
import classnames from 'classnames';
import Dragger from '../DragResize/Dragger';
class TracksHeaderCell extends Component {
static propTypes = {
children: React.PropTypes.node,
id: React.PropTypes.string,
width: React.PropTypes.number,
c... | A component that can be used to show a header cell in a table. |
import React, { Component } from 'react';
import LinkButton from 'shared/components/linkButton/linkButton';
import Section from 'shared/components/section/section';
import ApprovedSchools from './approvedSchools/approvedSchools';
import PartnerSchools from './partnerSchools/partnerSchools';
import OnlineSchools from '.... | Component class for code - schools. |
import React from 'react';
import { useTheme } from '@turntwo/react-ui';
import Link from './Link';
import Typography from './Typography';
import Ratio from './Ratio';
import Image from './Image';
import FollowButton from './FollowButton';
const DashboardPlayer = ({ player }) => {
const { title, fieldPlayerImage, f... | Displays a single hidden tag that displays a link to a field in a dashboard. |
import React from 'react'
import { IndexLink, Link } from 'react-router'
import PropTypes from 'prop-types'
import './PageLayout.scss'
import AppBar from 'material-ui/AppBar'
import Toolbar from 'material-ui/Toolbar'
import Button from 'material-ui/Button'
import IconButton from 'material-ui/IconButton'
import { withS... | PageLayout is a page layout that can be used to render a page layout with a single node. |
import React from 'react'
import { Statistic } from 'semantic-ui-react'
const StatisticExampleTopLabel = () => (
<div>
<Statistic>
<Statistic.Label>Views</Statistic.Label>
<Statistic.Value>40,509</Statistic.Value>
</Statistic>
</div>
)
export default StatisticExampleTopLabel
| This is a utility function to export a top - level label for a object. |
'use strict';
import React from 'react';
import Router from 'react-router';
import Immutable from 'immutable';
import { AppFlux } from '../flux/AppFlux';
import App from './App';
import InterfaceHome from './Interfaces/Home';
import InterfaceRest from './Interfaces/Rest';
try {
require('../../styles/main.scss'... | Package that contains all of the components that are required to handle the application. |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageFlashOff = (props) => (
<SvgIcon {...props}>
<path d="M3.27 3L2 4.27l5 5V13h3v9l3.58-6.14L17.73 20 19 18.73 3.27 3zM17 10h-4l4-8H7v2.18l8.46 8.46L17 10z"/>
</SvgIcon>
);
ImageFlashOff.displayName = 'ImageFlashOff';
ImageFlashOff.muiName... | A component that renders a component that displays a Flash Off image. |
import React, { Component } from 'react';
export default class App extends Component {
render() {
return (
<h1>Hello, world.</h1>
);
}
}
| The default component class for a component that can be rendered by a component. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.