code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React, { Component } from 'react';
import Input from 'react-toolbox/lib/input';
import { Col, Row } from 'react-flexbox-grid';
import FontIcon from 'react-toolbox/lib/font_icon';
import * as Colors from '../../Colors';
class ContactsSearch extends Component {
render() {
return (
<Row style={styles... | A component that can be rendered as a modal dialog with a hidden input and a modal modal icon. |
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 clearfix component that can be used to hide or hide a block of content. |
import React from 'react'
import { bindActionCreators } from 'redux'
import { initStore, startClock, addCount, serverRenderClock } from '../store'
import withRedux from 'next-redux-wrapper'
import Page from '../components/Page'
class Counter extends React.Component {
static getInitialProps ({ store, isServer }) {
... | A component that wraps a counter in a redux component. |
/* @flow */
import React from 'react';
import { Platform } from 'react-native';
import createNavigator from './createNavigator';
import createNavigationContainer from '../createNavigationContainer';
import TabRouter from '../routers/TabRouter';
import TabView from '../views/TabView/TabView';
import TabBarTop from '..... | Imports a bunch of packages that can be used to create a navigation container. |
import _ from 'lodash';
import React, { Component } from 'react';
import { reduxForm, Field } from 'redux-form';
import { withRouter } from 'react-router-dom';
import { connect } from 'react-redux';
import ReCAPTCHA from 'react-google-recaptcha';
import AuthField from './AuthField';
import authFields from './authField... | A component that can be used to sign up a password. |
import React, { Component } from 'react';
import StoryItem from './StoryItem';
const StoryList = ({ stories, path }) => (
<ul>
{stories.map(story => (
<StoryItem
key={story._id}
data={story}
path={path}
/>
))}
</ul>
);
export default StoryList;
| The default implementation of which returns a list of missing missing nodes. |
import React from 'react';
import PropTypes from 'prop-types';
const defaultProps = {
children: null,
id: null,
};
const propTypes = {
children: PropTypes.node,
id: PropTypes.string,
};
export function H1({ id, children }) {
const styles = {
borderBottom: '1px solid #eee',
fontWeight: 600,
margi... | Generates a single node with no children. |
import React from 'react'
import { Message } from 'stardust'
const MessageColorExample = () => (
<div>
<Message size='mini'>This is a mini message.</Message>
<Message size='tiny'>This is a tiny message.</Message>
<Message size='small'>This is a small message.</Message>
<Message size='large'>This is l... | Create a color example that can be used to print a color error message. |
//
// Deprecated
//
import _ from 'lodash';
import React from 'react';
import { PureRenderMixin } from 'react/addons';
import ContactActionCreators from 'actions/ContactActionCreators';
import DialogActionCreators from 'actions/DialogActionCreators';
import ContactStore from 'stores/ContactStore';
import Modal from... | Component which renders a single contact list. |
import 'babel-core/polyfill';
import React from 'react';
import Root from './containers/Root';
React.render(
<Root />,
document.getElementById('root')
);
| Imports a from React |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentGesture = (props) => (
<SvgIcon {...props}>
<path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.... | A component that renders a series of icons that can be used to render a series of icons. |
import React from 'react'
import { Button } from 'react-bootstrap'
import { FormattedMessage } from 'react-intl'
import { LinkContainerWithQuery } from '../form/connected-links'
import { ACCOUNT_SETTINGS_PATH, TRIPS_PATH } from '../../util/constants'
import { SubNavContainer, SubNavLinks } from './styled'
/**
* Thi... | Sub - navigation component |
import React from 'react'
import { Header, Table, Rating } from 'semantic-ui-react'
const TableExamplePadded = () => {
return (
<Table celled padded>
<Table.Header>
<Table.Row>
<Table.HeaderCell singleLine>Evidence Rating</Table.HeaderCell>
<Table.HeaderCell>Effect</Table.Header... | Imports a single - line sequence of feature - related objects from React. |
import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import toggleReadmeText from './README';
import ToggleExampleSimple from './Exam... | Exports a single - example hidden component to a Bootstrap toggle page. |
import React from 'react';
import PropTypes from 'prop-types';
import { Link, Route } from 'react-router-dom';
import _ from 'lodash';
import styles from './breadcrumbs.css';
const BreadcrumbItem = ({ match, nameResolvers = {}, lastPath }) => {
const { path } = match.params;
const nameResolver = nameResolvers[last... | BreadcrumbItem is a breadcrumb item that shows a single missing node in the breadcrumb. |
// @flow
import React from 'react';
import _ from 'lodash';
import { type SpotForUsers as SpotForUsersType, type User as UserType } from '../../modules/spotUsers';
import { ListGroupItem, ListGroup, Media } from 'react-bootstrap';
import { List, AutoSizer, InfiniteLoader } from 'react-virtualized';
import { getSpotUser... | The users list component that is used to display a list of users. |
import React from 'react';
import ItemLink from 'common/ItemLink';
import ITEMS from 'common/ITEMS/bfa/enchants';
import Analyzer from 'parser/core/Analyzer';
import SUGGESTION_IMPORTANCE from 'parser/core/ISSUE_IMPORTANCE';
// Example logs with missing enchants:
// https://www.warcraftlogs.com/reports/ydxavfGq1mBrM... | Private methods - base class for missing enchants |
import React from 'react';
import {SortableContainer, SortableElement, SortableHandle, arrayMove} from 'react-sortable-hoc';
import ToolbarAccordionButton from './ToolbarAccordionButton';
import ToolbarAccordionContent from './ToolbarAccordionContent';
import ButtonDeleteItem from './ButtonDeleteItem';
const DragHandl... | A component that can be used to create a toolbar with a single item and a list of items. |
import React from 'react'
class Render extends React.Component {
componentDidMount () {
const { actions } = this.props.feature
const afterRender = (component) => actions && actions(component)
afterRender(this.component)
}
render () {
const { Component, props } = this.props.feature
const de... | A component that renders a component when it is mounted. |
import React from 'react'
import PropTypes from 'prop-types'
import { bindActionCreators } from 'redux'
import { Link } from 'react-router-dom'
import { connect } from 'react-redux'
import Button from '@material-ui/core/Button'
import moment from 'moment'
import AppBaseComponent from '../components/AppBaseComponent'
i... | The base component for a sequence of time - card and time - card - related components. |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
} from 'react-native';
import App from './App';
AppRegistry.registerComponent('rnrf_relay_example', () => App);
| Package a missing component in the AppRegistry if it is not there. |
import React from 'react';
import { Component, PropTypes } from 'react';
const propTypes = {
someValues: PropTypes.array,
};
export default class ExampleChild extends Component {
constructor(props) {
super(props);
this.state = {value: ''};
this.handleSubmit = this.handleSubmit.bind(this);
this.ha... | ExampleChild is a child component that can be used to add some values to a dropdown list of values. |
import React from 'react'
import PropTypes from 'prop-types'
const Footer = ({ copyrights }) => (
<footer>
{copyrights ? (
<div
dangerouslySetInnerHTML={{
__html: copyrights,
}}
/>
) : (
<>
<span className="footerCopyrights">
© 2019 Built with <a ... | The footer for a node that has no children. |
import React, { Component } from 'react';
import { createRoot } from 'react-dom/client';
import { Stage, Layer, Rect } from 'react-konva';
class MyRect extends React.Component {
changeSize = () => {
// to() is a method of `Konva.Node` instances
this.rect.to({
scaleX: Math.random() + 0.8,
scaleY: ... | The base class for Konva. |
import { storiesOf } from '@storybook/react'
import React from 'react'
import About from './About'
storiesOf('app/components/views/About', module)
.add('About', () =>
<About />
)
| Imports a bunch of components from a component that is not part of a component in a storybook. |
import React from 'react'
import { connect } from 'react-redux'
import PropTypes from 'prop-types'
import typy from 'typy'
import Presenter from './presenter'
import Config from 'shared/Configuration'
import { renewAleph } from 'actions/personal/alephRenewal'
import * as statuses from 'constants/APIStatuses'
const i... | Create a component that will render a single |
import {Button, Stack, Text} from '@chakra-ui/react'
import React from 'react'
import {useDispatch} from 'react-redux'
import fetch from 'lib/actions/fetch'
import withRedux from 'lib/with-redux'
function SubComponent() {
return <Button.DoesNotExist>Will not render</Button.DoesNotExist>
}
const addListener = proce... | Renders a single node in the DOM. |
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
class Square extends React.Component {
render() {
return (
<button className="square" onClick={() => this.props.onClick()}>
{this.props.value}
</button>
);
}
}
class Board extends React.Component {
con... | The base logic for the winners and squares. |
import React from 'react'
import Link from 'next/link'
import Router from 'next/router'
const href = {
pathname: '/about',
query: { name: 'zeit' }
}
const as = {
pathname: '/about/zeit',
hash: 'title-1'
}
const handleClick = () => Router.push(href, as)
export default (props) => (
<div>
<h1>About {prop... | Default link - based middleware |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderBottom = (props) => (
<SvgIcon {...props}>
<path d="M9 11H7v2h2v-2zm4 4h-2v2h2v-2zM9 3H7v2h2V3zm4 8h-2v2h2v-2zM5 3H3v2h2V3zm8 4h-2v2h2V7zm4 4h-2v2h2v-2zm-4-8h-2v2h2V3zm4 0h-2v2h2V3zm2 10h2v-2h-2v2zm... | A small function to create a component that renders a border around the bottom of a group of icons. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Rheostat from 'rheostat';
import { storiesOf } from '@storybook/react';
import { connectRange } from 'react-instantsearch-dom';
import { WrapWithHits } from './util';
const stories = storiesOf('Integration With Other Libraries', modul... | The base class for a range component that is used to handle the initial state of a range. |
import React from 'react'
import Autocomplete from '../../lib/index'
import { getStates, matchStateToTerm, sortStates, styles, fakeRequest } from '../../lib/utils'
let App = React.createClass({
getInitialState () {
return {
value: '',
unitedStates: getStates(),
loading: false
}
},
ren... | The main function for the sequence of states that can be selected from the US state. |
import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debou... | The base component for blocked domains. |
import React from 'react'
import Link from 'next/link'
class MyLink extends React.Component {
render () {
return <a {...this.props}>Click me</a>
}
}
export default () => (
<Link href='/' passHref>
<MyLink />
</Link>
)
| A component that renders a single with a link to the next link in the chain. |
/**
* 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... | A component that renders a single missing - node node in the hierarchy of the current component hierarchy. |
import React from 'react';
import { Router, Route, Link } from 'react-router';
var App = React.createClass({
render() {
return (
<div>
<p>
This illustrates how routes can share UI w/o sharing the URL.
When routes have no path, they never match themselves but their
chil... | The main function that creates all of the components that are not part of the application. |
import { formatPercentage } from 'common/format';
import { Panel } from 'interface';
import { Icon } from 'interface';
import Analyzer from 'parser/core/Analyzer';
import ResourceBreakdown from 'parser/shared/modules/resources/resourcetracker/ResourceBreakdown';
import StatisticBox, { STATISTIC_ORDER } from 'parser/ui/... | Displays a Bootstrap - styled combo point usage box. |
'use strict';
import React from 'react';
import DocumentLink from 'fw/DocumentLink';
import LessonTitle from 'fw/LessonTitle';
import LessonHelper from 'fw/LessonHelper';
import Preview from 'fw/Preview';
import TextList from '../lesson3/TextList';
class Lesson1 extends React.Component {
constructor(props) {
... | A component that displays a single user in the rest API. |
import React from 'react';
import Webiny from 'webiny';
class Pluralize extends Webiny.Ui.Component {
}
Pluralize.defaultProps = {
plural: null,
count: null,
noun: null,
pattern: '{count} {noun}',
renderer() {
let noun = this.props.noun;
// If 'plural' is set, it will be used as p... | A component that is used to pluralize a given noun. |
import React from 'react'
import {Text, View, Dimensions} from 'react-native'
import SlidingUpPanel from 'rn-sliding-up-panel'
const {height} = Dimensions.get('window')
const styles = {
container: {
flex: 1,
backgroundColor: '#f8f9fa',
alignItems: 'center',
justifyContent: 'center'
},
panel: {
... | A component that can be rendered in a BottomSheet. |
import React from 'react';
import {Route} form 'react-router';
import App from './components/App';
import Home from './components/Home';
import AddCharacter from './components/AddCharacter';
import Character from './components/Character';
import CharacterList from './components/CharacterList';
import Stats from './comp... | This module exports a single middleware that can be used to handle a single middleware. |
import React, { Component } from 'react';
import SettingsModalOption from './SettingsModalOption';
class SettingsModalOptionsList extends Component {
getOptions = () => {
return this.props.optionsList.map((option) => {
return <SettingsModalOption key={option} option={option} active={this.props.... | A component that shows a list of options that can be used to show a modal dialog. |
import React from 'react';
import Section from '../../../shared/components/section/section';
import LinkButton from '../../../shared/components/linkButton/linkButton';
const SignUpSection = () => (
<Section title="New user?" theme="white">
<p>
Are you ready to deploy your future? Join Operation Code today ... | The default sign - up section. |
import React from 'react';
import Helmet from 'react-helmet';
import { withRouter } from 'react-router';
import Welcome from '../../components/Welcome';
const HomePage = () => {
return (
<div>
<Helmet title="Home"
meta={[
{ name: "description", content: "Home" }
... | Imports a single non - empty |
import React from 'react'
import { inject, observer } from 'mobx-react'
import { FormGroup, FormLabel, FormControl, ControlLabel, HelpBlock } from 'react-bootstrap'
@inject('userStore')
@observer
export default class UsernameInput extends React.Component {
constructor(props) {
super(props)
this.state = {
... | Diese les username input des necesitons |
import React from 'react';
import {
Tab, Tabs, TabList, TabPanel,
} from 'react-tabs';
import { inject, observer } from 'mobx-react';
import WS from 'store/websocket';
import ScenarioCollectionMonitor from 'components/DataCollectionMonitor/ScenarioCollectionMonitor';
import { MonitorItem } from '../Tasks/Console';
i... | Component that handles a series of data - collection events. |
import React from 'react';
/**
* Creates new trigger class that injects context into overlay.
*/
export default function createContextWrapper(Trigger, propName) {
return function (contextTypes) {
class ContextWrapper extends React.Component {
getChildContext() {
return this.props.context;
}... | Create a new trigger class that injects context into overlay. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import getAlerts from '../actions/getAlerts'
// Components
import AlertDay from './alertday';
export class Alerts extends Component {
componentDidMount(){
this.props.dispatch(getAlerts('F'))
}
handleChange(unit){
this.props.disp... | A component that will show the alert list for all alert - day alert - units and alert - actions |
import React from 'react';
import {CardElement} from 'react-stripe-elements';
class CardSection extends React.Component {
render() {
return (
<label>
Card details
<CardElement />
</label>
);
}
};
export default CardSection; | A component that renders a card section. |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import App from './App';
export default class example extends Component {
render() {
return (
<App/>... | Create a non - default dependency on a component that is not a child of a React component. |
/**
* This file provided by Facebook is for non-commercial testing and evaluation
* purposes only. Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNES... | This file is exported to Facebook for non - commercial testing purposes only. |
/**
* 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 { settings } from 'carbon-components';
const { prefix } = settings;
c... | Displays a dropdown with a label and a select field for a single node. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCropSquare = (props) => (
<SvgIcon {...props}>
<path d="M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H6V6h12v12z"/>
</SvgIcon>
);
ImageCropSquare = pure(ImageCropSquar... | A component that exports a series of images with a random size that is a square of the image. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBattery80 = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V9h10V5.33z"/><path d="M7 9v11.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1... | Devuelte un objeto DeviceBattery80 |
import React from 'react';
import Layout from '../../components/Layout';
import Page from '../../components/Page';
import request from '../../core/request';
import {sortMetatags} from '../../core/sortMetatags';
export default {
path: '/about',
async action() {
const
responseGlobal = await request('getBlogObj... | The main function for all the functions that are defined in the module. |
import React from 'react'
import './UsersList.css'
class UsersList extends React.Component {
render () {
return (
<div className='users'>
<h3>Online Users</h3>
<ul>
{
this.props.users.map(function (user, i) {
return (
<li key={i}>
{user}
</li>
)
})... | A component that can be used to render a users list. |
/* @flow */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
toggleCustomInlineStyle,
getSelectionCustomInlineStyle,
} from 'draftjs-utils';
import LayoutComponent from './Component';
export default class FontSize extends Component {
static propTypes = {
onChange: Prop... | A component that can be rendered to a FontSize. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { selectMode } from '../actions/index';
import { bindActionCreators } from 'redux';
class Modes extends Component {
render() {
return (
<div className="buttons">
<button type="button" className="btn btn-primary"... | A component that can be used to render a menu with buttons. |
/**
* Tap Change component.
* User can change the Keg on a Tap.
*/
import React from 'react';
import reactPropTypes from 'prop-types';
import { Container } from 'flux/utils';
import tapChangeStore from '../../stores/tap-change';
import { fetchTapWithKegs, changeTap } from '../../actions/taps';
import Loader from ... | Private function to create a TapChange component that can be used to change a Keg on a Tap. |
import React from 'react'
import { connect } from 'react-redux'
import { omitBy, isUndefined, mapValues } from 'lodash'
import { FormattedMessage as T } from 'react-intl'
import CreateServerFormStep from './CreateServerFormStep'
import { HYPHE_SETTINGS_KEY } from './HypheConfigurationStep'
import Ellipsis from '../../... | Component that creates a new server form step that deploys a new server on a new server. |
import React from 'react';
import Text from 'atoms/text';
import Panel from 'molecules/panel';
import Divider from 'atoms/divider';
const Demo = () => (
<fb className="marginTop marginBottom">
<Panel title="Divider without inset" className="marginBottom">
<Text>Random text here</Text>
... | Demo function to generate a single missing missing error message. |
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
TouchableOpacity
} from 'react-native';
import DailyNews from './daily_news/daily_news';
import Header from '../component/common/header';
import Icon from 'react-native-vector-icons';
import ScrollableTabView, { DefaultTabBar... | Extend Home with a different layout. |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import {
Route,
Redirect,
withRouter
} from 'react-router-dom';
import { getIsConnected } from '../selectors/index';
const PrivateRoute = ({ component: Component, ...rest }) => (
<Route
{...rest}
rende... | Private route for a single node |
import React from 'react';
export default ({ number }) => {
const width = number || .5;
const style = {
width: width + '0%'
};
return (
<div className="progress">
<div className="determinate" style={style}>
</div>
</div>
);
};
| Default function for returning a nagios menu |
'use strict';
/**
* This is an example React Native app demonstrates ListViews, text input and
* navigation between a few screens.
* https://github.com/facebook/react-native
*/
import React, { Component } from 'react';
import { StackNavigator } from 'react-navigation';
import HomeScreenTabNavigator from './HomeS... | Top - level navigator. Renders the application UI. |
import React from 'react';
import PropTypes from 'prop-types';
import autobind from 'core-decorators/es/autobind';
import { Link } from 'react-router-dom';
import { graphql } from 'react-apollo';
import { getTeam } from '../../../../graphql/team';
const QueryGetTeamOptions = {
name: 'QueryGetTeam',
options: (props... | A component that displays a response if the user has a non - empty response. |
import React from 'react';
import {
Step,
Stepper,
StepLabel,
} from 'material-ui/Stepper';
import RaisedButton from 'material-ui/RaisedButton';
import FlatButton from 'material-ui/FlatButton';
/**
* Horizontal steppers are ideal when the contents of one step depend on an earlier step.
* Avoid using long step ... | Horizontal stepper which can handle long steppers. |
import React from 'react';
import ReactDOM from 'react-dom';
import './index.scss';
export default class Container extends React.Component {
constructor(props) {
super();
}
render() {
const children = this.props.children;
return (
<section>{children}</section>
);
}
}
| The base class for a sequence of children. |
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import InjectDrawer from '../drawer/Drawer';
import { LAYOUT } from '../identifiers';
const factory = (Drawer) => {
const Sidebar = ({
active,
className,
clipped,
... | Create a Sidebar with a default props |
import React from 'react';
import PropTypes from 'prop-types';
import { List } from 'immutable';
import Boat from '../Boat';
import { getResults } from 'selectors/ResultSelectors';
import { connect } from 'react-redux';
import styles from './styles.css';
const Results = ({ results }) =>
<div className={styles.res... | Imports a single from a list of state objects. |
import React from 'react';
import PropTypes from 'prop-types';
import enchantIdMap from 'common/enchantIdMap';
class Enchants extends React.PureComponent {
static propTypes = {
gear: PropTypes.array.isRequired,
};
render() {
const { gear } = this.props;
return (
<>
{
gear.f... | A component that renders a list of items in a single sequence of items. |
import React from 'react';
import Analyzer from 'Parser/Core/Analyzer';
import StatTracker from 'Parser/Core/Modules/StatTracker';
import Tab from 'Main/Tab';
import FocusChart from './Focus';
import FocusTracker from './FocusTracker';
class FocusTab extends Analyzer {
static dependencies = {
focusTracker: Foc... | export FocusTab class |
import React from 'react'
import MultiSelect from 'react-ions/lib/components/MultiSelect/MultiSelect'
import Typeahead from 'react-ions/lib/components/Typeahead/Typeahead'
import Button from 'react-ions/lib/components/Button'
import style from './style.scss'
class ExampleMultiTypeahead extends React.Component {
cons... | Example component for selecting one or more items in a multi - select dropdown. |
import React, { Component } from 'react';
import { getTitle } from './utils';
import './tabbable.css';
import titleHoc from './../title-hoc';
import { classNames } from './../utils';
function tabcontainer(...sections) {
class Tabbable extends Component {
constructor(props) {
super(props);
... | Tabbable - Tabbable |
import React from 'react';
import { Text } from 'grommet';
export const Color = () => <Text color="accent-1">Colored Text</Text>;
export default {
title: 'Type/Text/Color',
};
| export default type |
import React, { Component } from 'react';
import hoistStatics from 'hoist-non-react-statics';
/*
Note:
When this decorator is used, it MUST be the first (outermost) decorator.
Otherwise, we cannot find and call the fetchData and fetchDataDeffered methods.
*/
export default function connectData(fetchData, fe... | A decorator that wraps a component with a connectData method. |
import React from 'react';
import GeneralInput from '../components/GeneralInput';
import {verticalContainer} from '../DynamicStyles/common';
const editContainer = {
...verticalContainer,
fontSize: '14px',
};
const editSelectStyle = {
marginLeft: '10px',
};
export default class EditProps extends React.Componen... | A component that displays a single single - field aged or speaks aged. |
import React from 'react';
import { MessageContentTypes } from '../../../constants/ActorAppConstants';
class State extends React.Component {
static propTypes = {
message: React.PropTypes.object.isRequired
};
render() {
const { message } = this.props;
if (message.content.content === MessageContentTy... | The state class which is used to render a single missing node in a message. |
'use strict';
import React from 'react';
const propTypes = {
// required
name: React.PropTypes.string.isRequired,
// optional with defaults
debug: React.PropTypes.bool
};
const defaultProps = {
debug: false
};
class GenericComponent extends React.Component {
static get propTypes() {
return propTypes;
}
... | A generic component that can be used to create |
import React from 'react';
import {
header,
tabs,
tab,
description,
importExample,
title,
example,
divider,
playground,
api,
testkit,
} from 'wix-storybook-utils/Sections';
import { storySettings } from '../test/storySettings';
import AnnouncementModalLayout from '..';
import SimpleExample from... | Imports a single non - standard |
import React from 'react'
/**
* Placeholder used in Transactions screen while the wallet has 0 transactions.
* @function Placeholder
* @prop {object} t - i18next intance.
* @prop {string} icon - Material icon name.
* @prop {string} string - i18next namespace string.
* @prop {object} style - Custom component styl... | Protected Placeholder for transactions screen while the wallet has 0 transactions. |
import React from 'react';
import MobileTearSheet from '../../../MobileTearSheet';
import {List, ListItem} from 'material-ui/List';
import Divider from 'material-ui/Divider';
import CommunicationCall from 'material-ui/svg-icons/communication/call';
import CommunicationChatBubble from 'material-ui/svg-icons/communicatio... | The default implementation of the sequence of items that are not part of a sequence of items. |
import React from 'react'; // jshint ignore:line
import ReactDOM from 'react-dom'; // jshint ignore:line
import misago from 'misago/index';
import Button from 'misago/components/button'; // jshint ignore:line
import Form from 'misago/components/form';
import SignInModal from 'misago/components/sign-in.js';
import ajax ... | Private function to render a password reset form. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageBrightness7 = (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-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69... | A component that renders a sequence of icons that are not part of a component. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionBookmarkBorder = (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-2zm0 15l-5-2.18L7 18V5h10v13z"/>
</SvgIcon>
);
ActionBookmarkBorder = pure(ActionBook... | ActionBookmarkBorder exports action - bookmark - border for a node |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageControlPoint = (props) => (
<SvgIcon {...props}>
<path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-... | A component that renders a series of icons in a series of icons. |
import React from 'react';
import { render } from 'react-dom';
import CommentBox from './js/components/commentBox';
import './styles/main.scss';
render(
<CommentBox
url={"/api/comments"}
pollInterval={2000}
/>,
document.getElementById('content')
);
| Imports a single node in the DOM. |
'use strict';
import React from 'react';
import ReactDom from 'react-dom';
import AnchorifyText from '../lib';
//allow react dev tools work
window.React = React;
const t1 = 'Hello Google(http://google.com).category_open .pm_icon{ background:url(https://tryweb2.motex.co.jp/okwave/images/cate_on.png) no-repeat 0px 0p... | A component that can be rendered with a custom anchor that shows a link to the category open page. |
import React from 'react';
import { Button, AutoComplete ,DatePicker } from 'antd';
import './user-list-container.css';
import UserListTable from '../views/user-details-post-card-table';
import { connect } from 'react-redux';
import SearchInput from '../views/SearchInput';
import store from '../../store';
import { upda... | Component that handles the post - card - specific state of a node in a ChuanShangPostCard. |
import React from 'react';
import * as index from '../src/index';
let components = [];
Object.keys(index).forEach(function (item) {
if (index[item] instanceof React.Component.constructor) {
components.push(item);
}
});
export default components;
| Imports React components from index. |
import React from 'react';
import Playlist from './Playlist';
export default React.createClass({
render() {
return (
<Playlist />
);
}
});
| Create a new class with a default render method |
/**
* Copyright 2017 Goldman Sachs.
* 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/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | Creates an object with attributes named in the n - th element whose name matches the given name. |
import React from 'react';
import classNames from 'classnames';
import tbsUtils from './utils/bootstrapUtils';
import isRequiredForA11y from 'react-prop-types/lib/isRequiredForA11y';
const Tooltip = React.createClass({
propTypes: {
/**
* An html id attribute, necessary for accessibility
* @type {strin... | Generates a Tooltip with the given props. |
import React from 'react'
import Overlay from './Overlay'
import Push from './Push'
import ScaleDown from './ScaleDown'
import SlideAlong from './SlideAlong'
import SlideOut from './SlideOut'
import Uncover from './Uncover'
const SidebarExamples = () => (
<div>
<Overlay />
<Push />
<ScaleDown />
<Sl... | Imports a bunch of non - standard JSX objects from the module. |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import * as searchActions from '../../actions/searchActions';
const Search = ({ updateSearch = f => f }) => (
<label className="search-label">
<input
type="search"
className="search-input"
pla... | The default module that exports a single object. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilterNone = (props) => (
<SvgIcon {...props}>
<path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"/>
</SvgIcon>
);
Ima... | A component that returns a sequence of icons that can be rendered by a component. |
import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
const Spinner = ({ color, only }) => {
let spinnerClasses = {
'spinner-layer': true
};
if (only) {
spinnerClasses['spinner-' + color + '-only'] = true;
} else {
spinnerClasses['spinner-' + color] = true;
}... | Spinner for missing node - js |
import React, { Component } from 'react';
import { ActionHome, HardwareKeyboardArrowRight } from 'material-ui/svg-icons';
import { Subheader, IconButton } from 'material-ui';
import { Link } from 'react-router-dom';
import { graphql, compose } from 'react-apollo';
import { queries } from '../../helpers';
import PaperIn... | A component that renders a single user - by - ID index. |
import 'array.prototype.find'
import React from 'react';
import ReactDOM from 'react-dom';
import MainPage from './components/MainPage';
ReactDOM.render(
<MainPage firebaseUrl='https://reclist.firebaseio.com/' /> ,
document.getElementById('content')
)
| Imports a single element in the DOM. |
import React from 'react';
const icon = props => (
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="16 16 32 32" {...props}>
<g>
<path d="M49.771,31.52H47.57v-6.691c0-0.821-0.672-1.492-1.492-1.492c-0.821,0-1.492,0.672-1.492,1.492 c0-0.821-0.672-1.492-1.492-1.492S41.6,24.008,41.6,24.828c0-0.... | A component that displays a sequence of components that are not part of a component. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.