code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
export default function TotalResults(props) {
const number = props.number;
function format(num) {
let n = num.toString(), p = n.indexOf('.');
return n.replace(/\d(?=(?:\d{3})+(?:\.|$))/g, function ($0, i) {
return p < 0 || i < p ? ($0 + ',') : $0;
});
}
return (... | TotalResults - Total results of missing missing components |
import React from 'react'
export default class Wizard extends React.Component {
componentDidMount() {
let self = this;
let element = $(this.refs.wizard);
var stepsCount = $('[data-smart-wizard-tab]').length;
var currentStep = 1;
var validSteps = [];
var $form = element.closest('form');
... | A component that displays a smart wizard. |
import Application from './components/application';
import logger from 'debug';
import React from 'react';
import { Provider } from 'react-redux';
import startRouter from './router';
import { configureStore } from './store.js';
import en from './locales/en';
import fr from './locales/fr';
const debug = logger('app:bo... | Create a new application with a given locale. |
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Challenge from './Challenge';
const sortChallenges = (left, right) => (
left.name.toLowerCase() < right.name.toLowerCase() ? 0 : 1
);
class ChallengeList extends React.Component {
constructor() {
... | A component that will display a list |
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import ImmutablePureComponent from 'react-immutable-pure-component';
const filename = url => url.split('/').pop().split('#')[0].split('?')[0];
export default class AttachmentList extends Immutabl... | Package that exports AttachmentList |
/**
* 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 { defineMessages, For... | Basic header for a single node in the hierarchy of React components. |
import React from 'react'
import PropTypes from 'prop-types'
import PhoneInput_ from './PhoneInput'
import InputSmart from './InputSmart'
import InputBasic from './InputBasic'
export function createInput(defaultMetadata) {
function PhoneInput({
smartCaret,
...rest
}, ref) {
return (
<PhoneInput_
{...re... | Create a single input that can be used to enter a phone number. |
import _ from 'underscore'
import React from 'react'
import ControlsWidget from './Controls'
import DevicePickerWidget from './DevicePicker'
import AlertOverviewWidget from './AlertOverview'
import FilterGraphWidget from './FilterGraph'
import DownloadWidget from './Download'
import NotFoundWidget from './NotFound'
co... | A component that can be rendered by a user. |
import React from 'react';
import BaseIcon from './BaseIcon';
export default class FeedIcon extends BaseIcon {
render() {
return (
<svg className={`icon icon--feed ${this.props.className}`} viewBox={this.getViewBox()}>
<path d="M18.47,47.88A6.49,6.49,0,1,0,12,54.38,6.5,6.5,0,0,0,18.47,47.88Zm18,3.... | The FeedIcon class is a base class that implements the IANA feed icon. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Series from '../Series';
class FunnelSeries extends Component {
static propTypes = {
id: PropTypes.string.isRequired
};
render () {
return (
<Series {...this.props} type="funnel" />
);
}
}
export default Fu... | A series component that can be rendered as a funnel of a series of props. |
import React from 'react';
import classnames from 'classnames';
import styles from './User.css';
import {GeneSequence, SequenceKey} from './Genetics.js';
import {Card, CardHeader, Avatar, CardMedia, CardTitle} from 'material-ui';
import {Paper} from 'material-ui';
import Colors from 'material-ui/src/styles/colors';
imp... | The default navigation between the sequence and the list of users. |
import React from 'react'
export default
class Test extends React.Component {
render() {
return (
<div>Winning?</div>
)
}
}
| The default base class for a series of tests. |
import React from 'react';
import { Checkbox } from 'romagny13-react-form-validation';
const Example1 = () => {
let values = ['a','c'];
return (
<div>
<h4>Direct check</h4>
<Checkbox checked name="g1" />
<h4>Grouped by name (all checked are checked)</h4>
... | export a function to export a single warning in the system |
/*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License... | The base component for a that is rendered when a component is missing a node in the hierarchy. |
/**
* Created by wangyefeng on 2017-03-31 11:26
*/
import React from 'react'
import { hashHistory } from 'react-router'
import './header.css'
import NormalButton from '../../compontent/normal_button'
import Logo from '../../resource/svg/diamond.svg'
class Header extends React.Component {
constructor(props) {
s... | Header component for a single header |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageHdrStrong = (props) => (
<SvgIcon {...props}>
<path d="M17 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zM5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/>
</SvgIcon>
);
... | A component that renders a sequence of icons that can be used to render a sequence of images. |
import React from 'react';
import { withRouter } from 'react-router';
import { resolve } from '../styles';
import SiteStyles from '../styles/Site.less';
import RadialNav from '../components/RadialNav';
import RadialStyles from '../components/RadialNav.less';
class Home extends React.Component {
static displayName =... | A component that is rendered in a menu with a menu of items. |
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h1 className="App-title">Welco... | The base class for all components that are not in React. |
import React from 'react';
import {StyleSheet, View, Text, Dimensions, Button} from 'react-native';
class Lightbox extends React.Component {
render() {
return (
<View style={styles.container}>
<View style={{flex: 8}}>
<Text style={styles.title}>{this.props.title}</Text>
<Text s... | The lightbox component which is a component that is rendered when a user clicks on a button. |
/**
*
* LocaleToggle
*
*/
import React from 'react';
import Select from './Select';
import ToggleOption from '../ToggleOption';
function Toggle(props) {
let content = (<option>--</option>);
// If we have items, render them
if (props.values) {
content = props.values.map((value) => (
<ToggleOption key... | A component that can toggle a locale s critical items. |
// Meteor
import { TAPi18n } from 'meteor/tap:i18n';
// Utilities
import React from 'react';
import ReactSelect from 'react-select';
import { FormattedMessage } from 'react-intl';
import t from 'tcomb-form';
import Checkboxes from '../../ui/components/Checkboxes.jsx';
class InterestsCollection extends TAPi18n.Collect... | Private functions Handles the creation of a single node - type related object. |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import clsx from 'clsx';
import LastUpdated from '@theme/LastUpdated';
import EditThisPage from '@theme/... | Generate a single tag list from a list of tags. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAirlineSeatLegroomExtra = (props) => (
<SvgIcon {...props}>
<path d="M4 12V3H2v9c0 2.76 2.24 5 5 5h6v-2H7c-1.66 0-3-1.34-3-3zm18.83 5.24c-.38-.72-1.29-.97-2.03-.63l-1.09.5-3.41-6.98c-.34-.68-1.03-1.... | A component that exports a sequence of all of the individual components of a sequence of notifications. |
/*
* SonarQube
* Copyright (C) 2009-2017 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, o... | Displays a single single node that represents a single unique object in the system. |
import React from 'react';
import styles from './TextPlaceholder.module.css';
export function TextPlaceholder({text, visible}) {
if (!text || !visible) {
return null;
}
return (
<div className={styles.placeholder}>
<div>{text}</div>
</div>
);
}
| TextPlaceholder - Text placeholder |
import React from 'react'
import Toolbar from './Toolbar'
export default class ButtonGroups extends React.Component {
render() {
return (
<Toolbar className={this.props.className}>
{['left', 'middle', 'right'].map( position =>
<div key={position} className='toolbar-group'>
{ t... | Component that renders ButtonGroups with buttons |
import React from 'react';
import { Grid, Row, Col } from 'react-bootstrap';
import { connect } from 'react-redux';
import Immutable from 'immutable';
class Profile extends React.Component {
render() {
const user = this.props.users.get(this.props.user.get('id'));
return (
<Grid>
... | A component that displays a sequence of tokens that can be found in a user s sequence. |
import React from 'react'
import { Route, IndexRoute, Redirect } from 'react-router'
// NOTE: here we're making use of the `resolve.root` configuration
// option in webpack, which allows us to specify import paths as if
// they were from the root of the ~/src directory. This makes it
// very easy to navigate to files ... | Imports a single nested from the root directory. |
import React from 'react';
import SPELLS from 'common/SPELLS';
import ITEMS from 'common/ITEMS';
import { formatPercentage } from 'common/format';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
const PASSIVE_HASTE = 0.02;
const ACTIVE_HASTE = 0.25;
/*
* Sephuz... | SephuzsSecret class |
import React from 'react';
import PropTypes from 'prop-types';
import { getClassName } from '../helpers/components';
export default class Bullets extends React.Component {
static propTypes = {
cssModule: PropTypes.object,
rootElement: PropTypes.string.isRequired,
media: PropTypes.array,
onClick: Prop... | A component that renders a list of bullets. |
import React from 'react';
import { Trans } from 'react-i18next';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faTwitter, faFacebook, faGithub } from '@fortawesome/free-brands-svg-icons';
import './Footer.css';
function Footer() {
return (
<footer>
<div className="container ... | Imports a single - language - dependent sequence of errors. |
import React from 'react';
import { FeatureToggles } from './feature-toggles';
export const withFeatureToggles = ({ features } = {}) => Component => props => (
<FeatureToggles features={features}>
<Component {...props} />
</FeatureToggles>
);
| export with feature toggles |
/**
* https://github.com/facebook/react-native/blob/master/Libraries/StyleSheet/PointPropType.js
*/
import React from 'react';
const { PropTypes } = React;
const PointPropType = PropTypes.shape({
x: PropTypes.number,
y: PropTypes.number,
});
module.exports = PointPropType;
| Missing property type |
/* @flow */
import React from 'react'
import { Text, View } from 'react-native'
import { getPeriodColor, getPeriodName } from '@helpers/periods'
import Icon from '@components/Icon'
import styles from './styles'
type Props = {
value: 'preHistory' | 'antiquity' | 'middleAge' | 'modernTimes' | 'contemporaryTimes',
p... | A component that exports a sequence of non - negative negative negative numbers. |
import React from 'react'
import Footer from './Footer'
import AddTodo from '../containers/AddTodo'
import VisibleTodolist from '../containers/VisibleTodoList'
const App = () => (
<div>
<AddTodo />
<VisibleTodolist />
<Footer />
</div>
)
export default App
| export a function to create a new app object |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let PermDataSetting = props =>
<SvgIcon {...props}>
<path d="M18.99 11.5c.34 0 .67.03 1 .07L20 0 0 20h11.56c-.04-.33-.07-.66-.07-1 0-4.14 3.36-7.5 7.5-7.5zm3.71 7.99c.02-.16.04-.32.04-.49 0-.17-.01-.33-.04-.4... | A component that renders a sequence of icons that can be used to view a single component. |
import React from 'react'
import makeStore from '../universal/redux/makeStore'
import {match as _match} from 'react-router'
import Html from './Html'
import {push} from 'react-router-redux'
import {renderToStaticMarkup} from 'react-dom-stream/server'
import fs from 'fs'
import path from 'path'
import {join} from 'path'... | The main function that creates a middleware for the middleware. |
import React from 'react'
import styles from './PlayerControls.css'
const PlayerControls = (props) => {
const {seekValue, handleSeekChange, prepareTestVideo, togglePause, duration, showTimer} = props
return (
<div className={styles.component}>
<input type="range" min="0" max={duration} value={seekValue} ... | React - specific API for handling a sequence of buttons. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { requestAllMessageThreads, changeCurrentMessageThread } from '../../actions/messages/';
import { getUserProfile } from '../../actions/user/';
import MessageThreadListComponent from '../..... | All message threads component. |
import 'styles/Modal.scss';
import React from 'react';
import ReactDOM from 'react-dom';
class Modal extends React.Component {
constructor(props) {
super(props);
this.setOkButtonRef = (element) => {
this.okButton = element;
};
}
componentDidMount() {
// .focus() has browser restrictions ... | A modal component that displays a modal dialog with a modal popup. |
import React from 'react'
import Link from 'gatsby-link'
import styled from 'styled-components'
import { rhythm } from '../utils/typography'
import { media } from '../utils/media'
const Header = styled.header`
width: ${rhythm(2)};
margin: ${rhythm(1 / 2)} ${rhythm(1)};
position: initial;
${media.desktop`
p... | A component that can be used to render a sequence of components. |
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
... | The base class for all components that are not in React. |
/**
* Layout for the whole page
*/
import React from 'react';
import EntryService from './services/EntryService';
import Header from './Header';
import TodosApp from './components/TodosApp';
export default class Layout extends React.Component {
constructor(props) {
super(props);
}
render() {
return (... | Layout for the whole page |
import React from 'react'
import {Link} from '../'
class CategoryCard extends React.Component {
constructor(props) {
super(props);
}
render() {
const {
header = "",
title = "",
image = "",
blurb = "",
cta = "",
ctaLink = ""
} = this.props;
return (
<d... | A component that renders a single pathname that is rendered by a series of children. |
import React from 'react';
import test from 'ava';
import { shallow } from 'enzyme';
import PostList from '../../components/PostList';
const posts = [
{ name: 'Prashant', title: 'Hello Mern', slug: 'hello-mern', cuid: 'f34gb2bh24b24b2', content: "All cats meow 'mern!'" },
{ name: 'Mayank', title: 'Hi Mern', slug: ... | Check if a specific exists in the system |
/**
* Created by yangyang on 2017/9/11.
*/
import React from 'react'
import {connect} from 'react-redux'
import {withRouter} from 'react-router-dom'
import { Button } from 'antd'
import {configAction, configSelector} from '../util/config'
class Dashboard extends React.Component {
constructor(props) {
super(pro... | A dashboard component that displays a single unknown node in a network network. |
/**
* Button module.
* @module @massds/mayflower-react/Button
*/
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
const Button = (button) => {
const buttonClasses = classNames({
ma__button: true,
[`ma__button--${button.usage}`]: button.usage,
[`ma__bu... | Button component for a button |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationNoEncryption = (props) => (
<SvgIcon {...props}>
<path d="M21 21.78L4.22 5 3 6.22l2.04 2.04C4.42 8.6 4 9.25 4 10v10c0 1.1.9 2 2 2h12c.23 0 .45-.05.66-.12L19.78 23 21 21.78zM8.9 6c0-1.71 1.39-3.1 3.1... | A component that exports a sequence of components that can be encrypted with a notification. |
import React from 'react'
import { Route, Switch } from 'react-router'
import 'styles/core.scss'
import Header from 'components/Header'
import Home from 'routes/Home'
import Counter from 'routes/Counter'
import Async from 'routes/Async'
import classes from './CoreLayout.scss'
export const CoreLayout = () => (
<div... | export a default CoreLayout |
import React from 'react'
import PropTypes from 'prop-types'
import { useIntl } from 'react-intl'
import { SwitchButton } from 'components/UI'
import LayoutCards from 'components/Icon/LayoutCards'
import LayoutList from 'components/Icon/LayoutList'
import { CHANNEL_LIST_VIEW_MODE_SUMMARY, CHANNEL_LIST_VIEW_MODE_CARD } ... | Create a component that renders a switch button with a specific layout. |
import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const ImageStatesExamples = () => (
<ExampleSection title='States'>
<ComponentExample
title='Hidden'
description='An ... | export a function to export a sequence of components that can be hidden disabled and images. |
import React, { Component } from 'react';
import { Link } from 'react-router';
import { connect } from 'react-redux';
import Popover, { PopoverAnimationVertical } from 'material-ui/Popover';
import Menu from 'material-ui/Menu';
import MenuItem from 'material-ui/MenuItem';
import AddActivityForm from '../forms/add-activ... | Component that is rendered when a single activity is clicked. |
import './index.css';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById('root'));
| Imports the index. css and react - dom. |
import React, { Component } from 'react';
import { Router, Route, IndexRoute, browserHistory } from 'react-router'
import App from '../App'
import NotFound from '../NotFound'
import Home from '../Home'
import About from '../About'
import Testing from '../Testing'
class Routes extends Component {
render() {
retu... | The routes module. |
/*
* Copyright (C) 2014 - 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... | JSX - specific API for adding a new app in the system. |
import React from 'react';
import {render} from 'react-dom';
import App from './js/containers/App';
import './css/reset.css'
import './css/index.less';
render(
<App />,
document.getElementById('root')
); | Imports a single application. |
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 PropTypes from 'prop-types';
import Styled from 'react-styleguidist/lib/rsg-components/Styled';
import cx from 'classnames';
export const styles = ({
space,
color,
fontFamily,
fontSize,
buttonTextTransform
}) => ({
button: {
padding: [[space[1], 0]],
fontFamily: fo... | TabButtonRenderer - A tab renderer for a single node of a group of buttons. |
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 { colors, fonts, normalize } from 'config';
import { t } from 'utils';
import styled from 'styled-components';
const ViewWrapper = styled.View`
align-items: center;
align-content: center;
height: 100%;
justify-content: center;
`;
const TextStyled = styled.Text`... | Component that displays an error screen in a browser. |
import React, { Component } from 'react';
import '../containers/App.css';
export default class Template extends Component{
render(){
return(
<div className="container">
<div className="row">
<div className="col-md-12 twelveDiv">
<h2>12 </h2>
... | Sequence with the name of the unique element in the system. |
import styles from './Bottom.css';
import React from 'react';
import image from '../../images/slot-bottom.png'
const Bottom = () => {
return (
<img
className={styles.root}
width="120" height="3.5"
src={image}
/>
)
};
export default Bottom; | Demonstration of the Top module. |
import React from 'react';
import ReactDom from 'react-dom';
import App from 'app';
ReactDom.render(
<App />,
document.getElementById('content')
);
| Imports a single node in the DOM. |
import React from 'react';
import { Router, Route, IndexRoute, Link } from 'react-router';
var App = React.createClass({
render() {
return (
<div>
{this.props.children}
</div>
);
}
});
var Index = React.createClass({
render () {
return (
<div>
<h1>You should not se... | The main function that creates the hierarchy of child components. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPermPhoneMsg = (props) => (
<SvgIcon {...props}>
<path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.2... | A component that exports a sequence of action - perm - phone messages. |
import React from 'react';
import BaseIcon from './BaseIcon';
export default class Ratio extends BaseIcon {
render() {
return (
<svg className={`icon icon--ratio ${this.props.className}`} viewBox={this.getViewBox()}>
<path d="M54.57,15.76a28.56,28.56,0,1,0-10.45,39A28.56,28.56,0,0,0,54.57,15.76ZM9... | The Ratio component of the object. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatPaint = (props) => (
<SvgIcon {...props}>
<path d="M18 4V3c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6h1v4H9v11c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-9h8V4h-3z"/>
</SvgIco... | A component that renders a single node in a sequence of icons. |
/* */
"format cjs";
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 p... | This module is used to declare a route configuration and a redirect to when a client requests a given URL. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let FileCloudOff = (props) => (
<SvgIcon {...props}>
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-... | A component that displays a series of icons that are not part of a component. |
import _extends from 'babel-runtime/helpers/extends';
import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possib... | InputNumber component that renders a number input when it s required. |
import React from 'react';
import TextField from 'material-ui/TextField';
const TextFieldExampleSimple = () => (
<div>
<TextField
hintText="Hint Text"
/><br />
<br />
<TextField
hintText="The hint text can be as long as you want, it will wrap."
/><br />
<TextField
id="text-f... | The default TextFieldExample for a sequence of text - fields. |
import React, { Component } from 'react';
import { List } from 'immutable';
import './CitySearchPanel.css';
const classnames = require('classnames');
class CitySearchPanel extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<div c... | Component that is a component that can be used to show a city search panel. |
import React from 'react';
import classnames from 'classnames';
const DevIcon = ({ language, colored, wikiLink }) => {
if (!language) {
throw new Error('`language` option is required for `DevIcon` component');
}
const devIconClasses = getDevIcon(language, colored);
let iTag = (<i className={devIconClass... | Get the DevIcon for a given language |
import React from 'react'
module.exports = React.createClass({
propTypes () {
return {
router: React.PropTypes.object,
}
},
render () {
const post = this.props.route.page.data
return (
<div className="markdown">
<h1 dangerouslySetInnerHTML={{ __html: post.title }} />
<... | The base class for the missing - missing |
/* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconInvertColorsOff(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...ic... | A component that renders a colorized component in order to turn it into a colorized component. |
/* eslint-disable react/prop-types */
import React from 'react'
import { storiesOf } from '@storybook/react'
import { Card } from './card'
storiesOf('ui/atoms', module)
.addWithJSX('Card', () => (
<Card>Simple content of card</Card>
))
| Imports a bunch of components from a JSX file. |
import React from 'react';
import { Route } from 'react-router';
import LandingContainer from './containers/LandingContainer';
import RoomContainer from './containers/RoomContainer';
import CreateRoom from './components/CreateRoom';
const routes = (
<Route>
<Route path="/" component={LandingContainer}/>
<Rou... | export routes from react - router |
import React from 'react';
import { prune } from 'underscore.string';
import { fixLinks } from 'utils';
const style = {
summary: {
display: 'block',
position: 'relative',
margin: '0 auto',
color: '#555'
}
};
class Summary extends React.Component {
summary(body) {
const split = body.split('<hr>')... | A component that shows a summary of a single node. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvAddToQueue = (props) => (
<SvgIcon {...props}>
<path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12zm-5-7v2h-3v3h-2v-3H8v-2h3V7h2v3h3z"/>
... | A component that exports a sequence of icons that can be added to the queue. |
import React from 'react';
import withRoot from 'docs/src/modules/components/withRoot';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import markdown from './toolbar.md';
function Page() {
return <MarkdownDocs markdown={markdown} />;
}
export default withRoot(Page);
| The default implementation of a that imports the MarkdownDocs and the toolbar. |
import React from 'react';
import './Current.css';
const Current = (props) => {
return (
<div className={`mobileCard ${props.colors}`}>
<div className="topCard">
<h1 className="city">{props.weather.location}</h1>
<h2 className="currentTemp">
{props.weather.current... | Define a single critical sequence sequence. |
import React from 'react';
/**
* Video by pexels.com:
* https://videos.pexels.com/videos/birds-flying-over-industrial-area-569
*/
const Video = () => (
<div>
<video src={require('url-loader?limit=100000000!./video.mp4')} autoPlay loop />
</div>
);
export default Video;
| The default implementation of a that exports a video. |
import React from 'react';
import { Switch, Route } from 'react-router';
import App from './containers/App';
import HomePage from './containers/HomePage';
import CorePage from './containers/CorePage';
export default () => (
<App>
<Switch>
<Route path="/core" component={CorePage} />
<Route path="/" co... | export default functions |
/*! Gulp Render React | MIT License */
import gutil from 'gulp-util';
import through from 'through2';
import React from 'react';
import ReactDOMServer from 'react-dom/server';
/**
* Requires a file containing a React component and create an instance of it
* @param {String} filePath file path to the React component... | Create a new component with a given props and render it to a string |
"use strict";
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
// Display a popover that shows descriptive text content until the user dismisses it.
// The typical format looks like:
//
// <PopOverComponent {...this.props}>
// // Render JSX...
// </PopOverComponent>... | A component that shows a popover that shows descriptive text content until the user dismisses it. |
import React, { Component } from 'react';
import initialState from './data';
import TodoList from './TodoList';
import TodoDetails from './TodoDetails';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import reducer from './reducer';
import createHistory from 'history/createBrowserHistory';... | Imports a single component from React. |
/**
*
* @flow
*/
import React, { Component } from 'react';
import { APP_ID, SERVER_URL } from 's5-env';
import { FacebookSDK } from 's5-util';
import Parse from 'parse/react-native';
import Relay from 'react-relay';
import { Provider } from 'react-redux';
import configureStore from './store/configureStore';
/* Ap... | 가를 실제를 제를 제를 제를 제를 제를 제를 제를 |
/**
* Copyright 2016-present Telldus Technologies AB.
*
* This file is part of the Telldus Live! app.
*
* Telldus Live! app is free : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
*... | A function to export a single protected protected object that can be used to create a single protected object. |
import 'react-toolbox/lib/commons.scss';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App.js';
ReactDOM.render(<App />, document.getElementById('app'));
| Imports a React application and renders it into the DOM. |
// @flow
import React from 'react';
import LinearFlag from './LinearFlag';
import gradient from '../utils/gradient';
const green = '#008850';
const white = '#FFFFFF';
export default function Nigeria() {
return (
<LinearFlag
gradient={`to right, ${gradient([green, white, green])}`}
/>
);
}
| Nigeria - Expose a sequence of colors that are used to fill a linear flag with green and white colors. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import svg from 'lib/svg';
@svg({
width: 8,
height: 14
})
export default class Arrow extends Component {
static propTypes = {
color: PropTypes.string.isRequired
};
render() {
const { color } = this.props;... | Arrow component for missing missing nodes. |
import React from 'react';
const WidgetList = React.createClass({
render: function() {
return (
<ul className="widget-list">
<li>Сообщение от пользователя 1</li>
<li>Сообщение от пользователя 2</li>
<li>Сообщение от пользователя 3</li>
</ul>
);
}
});
export default Widg... | WidgetList - Creates a WidgetList with a single element. |
import React from 'react'
import IconicButton from '../iconic_button/IconicButton'
export default class SideMenuButton extends React.Component {
// this name required by the AppBar component for a correct styles processing
static muiName = 'IconButton'
static propTypes = {
iconStyle: React.PropTypes.object,
... | The SideMenuButton component is a component that can be used to show a menu item in the AppBar. |
import React from 'react';
import { intersects } from 'semver';
export default function ifReact(range, yes, no) {
if (typeof yes !== 'function') { throw new TypeError('"yes" must be a function'); }
if (typeof no !== 'function') { throw new TypeError('"no" must be a function'); }
return intersects(range, React.ve... | Checks if a given range is in the sequence of React versions. |
import "./bin/index";
// /**
// * Sample React Native App
// * https://github.com/facebook/react-native
// * @flow
// */
//
// import React, { Component } from 'react';
// import {
// AppRegistry,
// StyleSheet,
// Text,
// View
// } from 'react-native';
//
// export default class maelstorm extends Compone... | The main app of the application |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsInputComponent = (props) => (
<SvgIcon {...props}>
<path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2.... | A component that can be used to enter a action settings input. |
import React from 'react';
import {StyleSheet, Platform, View, Text, TouchableOpacity} from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
import {COLOR} from '../../config';
export default ({icon, text, children, onPress, containerStyle, iconStyle, textStyle}) => {
if (children) {
re... | Default configuration for a single node |
import React from 'react';
import { createChapter } from 'components/chapter';
import Equation from 'components/equation';
const title = 'Funkcija gostote';
function Title(props) {
return (
<span>
{ props.title }{' '}
<Equation math="f(x)" />
</span>
);
}
function Cha... | Dodaje dane konfiguracji konfiguracji. |
import React from 'react';
import {Popup} from '../../../src';
import OptionsTable from '../../helper/OptionsTable';
export default () => {
let propDescription = {
attachment: {
values: `Mandatory, One Of:
top left,
top center,
top rig... | Demonstrates how to render a popup. |
import React from 'react';
import StatisticsListBox from 'Main/StatisticsListBox';
import CoreNLCTraits from "Parser/Core/Modules//NetherlightCrucibleTraits/NLCTraits";
import LightSpeed from "./LightSpeed";
import MasterOfShadows from "./MasterOfShadows";
class NLCTraits extends CoreNLCTraits {
static dependencies... | The Netherlight Crucible trait. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.