code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react'
import { Input } from 'reactstrap'
import { LINKS_URL } from 'constants/urls'
class UrlInput extends React.PureComponent {
state = { hinted: false }
constructor (props) {
super(props)
this.selectRef = React.createRef()
this.inputRef = React.createRef()
this.timeout = nul... | A component that handles the input of a dropdown box. |
import React from 'react';
import { render } from 'react-dom';
import { Router } from 'react-router';
// Since we're rendering static files don't forget to use browser history.
// Server's don't get the URL hash during a request.
import createBrowserHistory from 'history/lib/createBrowserHistory';
// Import your rout... | Imports the components and routes in the browser |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationPhoneInTalk = (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.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5... | NotificationPhoneInTalk is a component that can be used to display a notification phone in a menu. |
import React from 'react'
import { DocLinkBox } from './index'
import { DocsPage } from 'storybook/docs-page'
export default {
title: 'Information/Boxes/DocLinkBox',
component: DocLinkBox,
parameters: {
docs: {
page: () => <DocsPage filepath={__filename} importString="DocLinkBox" />,
},
},
deco... | Dice une linkBox pour un nouvel onglet pour le fichier dans un kisskissbankbank. |
import React from 'react';
import { cloneElement } from 'react';
export function shouldWarn(about) {
console.warn.called.should.be.true;
console.warn.calledWithMatch(about).should.be.true;
console.warn.reset();
}
/**
* Helper for rendering and updating props for plain class Components
* since `setProps` is de... | Renders an element with a new props object. |
import React from 'react';
import DayPicker, { DateUtils } from 'react-day-picker';
import LocaleUtils from 'react-day-picker/moment';
import moment from 'moment';
import './style.css';
const DatePicker = ({ locale, input }) => {
const { value } = input;
const handleDayClick = (day, { disabled, selected }) => {
... | The DatePicker component that creates a date picker which allows to select a specific month. |
/**
* 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
*... | This file is part of the Telldus Technologies AB. |
import React, { Component } from 'react';
import {
View,
Platform
} from 'react-native';
import I18n from 'react-native-i18n';
import { connect } from 'react-redux';
import { Actions } from 'react-native-router-flux';
import SettingsList from 'react-native-settings-list';
import { mapRotationChanged, statsChang... | A component that can be used to show a list of koins and a list of koins. |
import React from 'react'
import { render } from 'react-dom'
import './stylesheets/ui.scss'
import { App } from './components/App'
import { Whoops404 } from './components/Whoops404'
import { Router, Route, hashHistory } from 'react-router'
window.React = React
render(
<Router history={hashHistory}>
<Route path="/"... | Imports a window of React. |
/*
*
* ThisSite
*
*/
import React from 'react';
import Helmet from 'react-helmet';
import Header from 'components/Header';
import Footer from 'components/Footer';
import Paper from 'material-ui/Paper';
import glamorous from 'glamorous';
export default class ThisSite extends React.PureComponent {
render() {
cons... | The main function of the sequence of nodes that are related to a specific node. |
import React from 'react';
import { snap, story, visualize } from 'storybook-snapper';
import AnalyticsLayout from '../AnalyticsLayout';
import { range } from 'lodash';
const items = [1, 2, 3, 4, 5, 6, 7, 8];
const tests = [
{
describe: 'sanity', // prop name (e.g. size)
its: [
{
it: 'default',... | Exports a function that runs the tests for a single n - node node. |
import Dialog from 'material-ui/Dialog';
import React, { Component } from 'react';
import Login from '../../Auth/Login/Login.react';
import SignUp from '../../Auth/SignUp/SignUp.react';
import ForgotPassword from '../../Auth/ForgotPassword/ForgotPassword.react';
import PropTypes from 'prop-types';
import Close from 'ma... | A dialog section that displays a dialog with a single dialog section. |
import React from 'react'
import { FormText } from 'reactstrap'
export default function EmptyFormText ({ hasErrors, structure }) {
if (hasErrors) return null
if (structure.hint) return null
if (!structure.character_counter && structure.type !== 'richtext') return null
return <FormText> </FormText>
}
| React - > EmptyFormText |
import React from 'react';
import PropTypes from 'prop-types';
import ImageWithTextTeaser from '../components/ImageWithTextTeaser';
class TopPage extends React.Component {
constructor(props, context) {
super(props, context);
}
render() {
return (
<section className="pt0 pb0">
<ImageWithTe... | Top - level component that renders a single node in a tree. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalCellular3Bar = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M2 22h20V2z"/><path d="M17 7L2 22h15z"/>
</SvgIcon>
);
DeviceSignalCellular3Bar = pure(DeviceSignalCellular3Bar);
DeviceS... | Devuelte un objeto DeviceSignalCellular3Bar |
import React from 'react';
import { render } from 'react-dom';
import { App } from './App';
render(<App />, document.getElementById('root'));
| Imports React and ReactDOM. |
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import Main from './main';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(<Main />, document.getElementById('root'));
// If you want your app to work offline and load faster, you can change
// unregister() to registe... | Imports a single node in the application. |
import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
import classnames from 'classnames';
import AvatarItem from 'components/common/AvatarItem.react';
const {addons: { PureRenderMixin }} = addons;
@ReactMixin.decorate(PureRenderMixin)
class ContactItem extends React.Com... | A component that renders a single missing - contact contact. |
/**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import {
ContentSwitcher,
ContentTabs,
ContentTab,
ContentPanels,
ContentPanel,
} from './';
export def... | Provides a function to export a missing missing node exception if the node is not found. |
import React from 'react';
export default class Fav extends React.Component {
static propTypes = {
path: React.PropTypes.string
}
constructor(props) {
super(props);
//// Create link element and it's attributes
//let favicon = document.createElement('link');
//let rel = document.createAttrib... | Create a component that renders a favicon on the page. |
import React from 'react';
import { View } from 'react-native';
import Link from './Link';
import Text from './Text';
import Request from './Request';
import { getId } from './ListView';
export const LazyLink = ({ association, url }) => (
<Request key={url} url={url}>
{(object) => (
<Link to={`/${association}/${... | Imports a lazy link view. |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry
} from 'react-native';
import TimerScene from './TimerScene'
export default class PlankGrid extends Component {
render() {
return (
<TimerScene />
)... | The base class for a sequence of components that are not in the system. |
//
// Migration History Buttons component
//
import React from 'react';
import { ButtonToolbar } from 'react-bootstrap';
import LinkContainerButton from 'components/Button';
import styles from './styles.css';
/* eslint-disable react/prefer-stateless-function */
export default class Buttons extends React.Component {
... | Component that displays a dropdown menu with a link to create a migration button. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionOpenWith = (props) => (
<SvgIcon {...props}>
<path d="M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z"/>
</SvgIcon>
);
ActionOpenWith = pure(Act... | ActionOpenWith - ActionOpenWith |
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { changeListEditorTitle, submitListEditor } from 'flavours/glitch/actions/lists';
import IconButton from 'flavours/glitch/components/icon_button';
import { defineMessages, injectIntl } from 'react-intl';
const ... | A component that renders a single missing key - value list. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../SvgIcon';
let NavigationArrowDropRight = (props) => (
<SvgIcon {...props}>
<path d="M9.5,7l5,5l-5,5V7z" />
</SvgIcon>
);
NavigationArrowDropRight = pure(NavigationArrowDropRight);
NavigationArrowDropRight.displayName = 'Navi... | A component that exports a navigation arrow drop right to the right of a node. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { intlShape } from 'react-intl';
import { Field, reduxForm } from 'redux-form';
import { TextField } from 'redux-form-material-ui';
import ReactList from 'react-list';
import {List} from 'material-ui/List';
import Subheader from 'mater... | A component that renders a single missing - value sequence of tokens with a hidden hidden |
import React from 'react';
import { PropTypes as Types } from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Redirect } from 'react-router-dom';
import { FormattedMessage } from 'react-intl';
import { SuccessNotice } from '../../common/SuccessNotice/SuccessNoti... | A component that exports a single sequence of states |
import React from 'react';
import { findDOMNode } from 'react-dom';
import { DragSource, DropTarget } from 'react-dnd';
import Target, { itemTarget } from './Target';
import Item from './../Item';
import ItemActions from './../../data/ItemActions';
import Types from './Types';
const itemSource = {
beginDrag(props,... | The base class for the drag and drop logic. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Button, Form, Message, Icon, Divider } from 'semantic-ui-react';
import { AUTHORIZE_URL } from '../constants/api';
import {
CLIENT_ID,
SITE_URL,
} from '../constants/config';
import { params } from '../utils';
import comment... | Component that handles comments and other components. |
import React, { Component } from 'react';
import SearchBar from '../containers/search_bar';
import WeatherList from '../containers/weather_list';
export default class App extends Component {
render() {
return (
<div>
<SearchBar />
<WeatherList />
</div>
);
}
}
| The default app class |
import express from 'express';
import { Actions as FarceActions, ServerProtocol } from 'farce';
import { RedirectException, getStoreRenderArgs, resolver } from 'found';
import { RouterProvider } from 'found/server';
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import { Provider } from 'reac... | Express - based application that renders a single universal page. |
import React from 'react';
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';
import { RaisedButton } from 'material-ui';
import config from './config';
export default createReactClass({
displayName: 'Hook',
propTypes: {
model: PropTypes.object.isRequired
},
render: fu... | Create a component that will show a dialog if a condition is not present. |
import React from 'react';
import App from './containers/App';
import ReactDom from 'react-dom';
const validations = {
pwLength: {
test: function (value) {
return value.length >= 8;
},
message: "Your Password must be 8 chars or more"
},
noSpaces: {
test: function (value) {
ret... | Imports a single node in the app container. |
import React from 'react';
import Avatar from '../../../components/avatar';
import DisplayName from '../../../components/display_name';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
export default class AutosuggestAccount extends Immuta... | A component that displays a link to the account of a node. |
import React from 'react';
import Button from '@material-ui/core/Button';
import {
Pause as StopReadIcon,
PlayCircleFilled as ReadIcon,
RadioButtonChecked as RecordIcon,
Stop as StopIcon,
} from '@material-ui/icons';
import { withStyles } from '@material-ui/core/styles';
import { ActionButtonContainer } from '.... | The action buttons are rendered as action buttons. |
import React from 'react';
import Input from 'antd/lib/input';
class MoneyTitle extends React.Component {
render() {
return (
<div>
<div>{this.props.text}</div>
<div className="money-unit">
<span>亿</span>
<span>千</span>
<span>百</span>... | A component that has a unique name and value that is unique within the current state. |
// Copyright (c) 2016 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify... | Example component that renders a single non - zero negative negative |
import React from 'react'
import { Button, Card, Image } from 'semantic-ui-react'
const CardExampleGroups = () => (
<Card.Group>
<Card>
<Card.Content>
<Image floated='right' size='mini' src='http://semantic-ui.com/images/avatar/large/steve.jpg' />
<Card.Header>
Steve Sanders
... | Imports a sequence of components from the UI. |
import React from 'react'
import { connect } from 'react-redux'
import { createSelector } from 'reselect'
import {
selectLoading,
selectOAuth,
selectSubmissions
} from 'containers/App/selectors'
import {
logOut
} from 'containers/App/actions'
import Dropdown from 'containers/Dropdown'
import AuthMenuButton f... | A component that is rendered as a menu with a single menu item. |
require("babel/polyfill");
import React from 'react';
import ReactDOM from 'react-dom';
var injectTapEventPlugin = require("react-tap-event-plugin");
injectTapEventPlugin();
ReactDOM.render('<div>dsfsdf</div>', document.getElementById('root'));
| Imports and renders a DSFDF element. |
/*
* Copyright (C) 2016 - 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... | Displays a single missing - node node in the calendar system if it is present in a calendar system. |
import React from 'react';
import Field from '../Field';
import { Button, FormInput } from 'elemental';
module.exports = Field.create({
displayName: 'URLField',
openValue () {
var href = this.props.value;
if (!href) return;
if (!/^(mailto\:)|(\w+\:\/\/)/.test(href)) {
href = 'http://' + href;
}
window.o... | The default component for the link - based field. |
import React, { Component } from 'react';
import './App.css';
import _ from 'lodash';
const IconFamilies = {
Entypo: require('react-native-vector-icons/glyphmaps/Entypo.json'),
EvilIcons: require('react-native-vector-icons/glyphmaps/EvilIcons.json'),
FontAwesome: require('react-native-vector-icons/glyphmaps/Font... | The base component for all of the icons that can be found in a vector icon. |
import React from 'react';
import { Footer } from './footer';
import styles from '../stylesheets/contact.css';
export const Contact = (props) => {
return (
<div id="contact" className={styles.contact}>
<div className={styles.wrapper}>
Subscribe for News & Updates
<div className={styles.copy}>
* We p... | export a component that can be used to render a non - |
import React from 'react';
const ColorCodeMapping = {
GREEN: 'rgba(79, 198, 105, 0.8)',
YELLOW: 'rgba(239, 255, 0, 0.8)',
RED: 'rgba(180, 49, 49, 0.8)',
BLACK: 'rgba(30, 30, 30, 0.8)',
UNKNOWN: 'rgba(30, 30, 30, 0.8)',
'': null,
};
export default class TrafficLightIndicator extends React.PureComponent {
... | Example of how to render a single critical sequence. |
import React from 'react';
import { DefaultRoute, Route } from 'react-router-transition-context';
import BoomBoobsAppContainer from './app/routes/BoomBoobsAppContainer';
import BoomBoobsAppAuthContainer from './app/routes/BoomBoobsAppAuthContainer';
import BoobsPostCreate from './app/routes/BoobsPostCreate/BoobsPostCre... | The default route handler for all routes. |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
export default class Icon extends React.PureComponent {
static propTypes = {
id: PropTypes.string.isRequired,
className: PropTypes.string,
fixedWidth: PropTypes.bool,
};
render () {
const { id, c... | The default icon class which renders a single icon in a hidden hidden state. |
import React from 'react';
import PropTypes from 'prop-types'
import AppStore from './../store/AppStore';
import Motors from "../blocks/Motors";
export default class GamePad extends React.Component {
constructor(props, context) {
super(props, context);
this.button = null;
}
generateEventsF... | Component that shows a single action on the button. |
import React from 'react';
import ReactDOM from 'react-dom';
import App from'./components/App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('app')
); | Imports a single application. |
import React from 'react';
class HomePage extends React.Component {
render() {
return (
<div className="container-fluid">
<section className="row">
<div className="fill-screen"
style={{ backgroundImage: 'url(../../resources/images/bac... | A base class for linking a single node to a page in a hidden hidden state. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionHistory = (props) => (
<SvgIcon {...props}>
<path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 ... | A component that exports action history for a node in a hierarchy. |
import styles from './ClearField.less';
import React from 'react';
import ClearIcon from '../ClearIcon/ClearIcon';
export default function ClearField() {
return (
<div className={styles.root}>
<ClearIcon className={styles.clearRoot} />
</div>
);
}
| The ClearField class |
import React from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import PortalListDialects from 'components/PortalListDialects'
/**
* @summary ExploreLanguagesPresentation
* @component
*
* @param {object} props
*
* @returns {node} jsx markup
*/
function ExploreLanguagesPresentati... | Generate markup for a single node in the hierarchy of nodes. |
import React from 'react'
import { initGA, logPageView } from '../utils/analytics'
export default class Layout extends React.Component {
componentDidMount () {
if (!window.GA_INITIALIZED) {
initGA()
window.GA_INITIALIZED = true
}
logPageView()
}
render () {
return (
<div>
... | A layout class that can be used to render a component with a DOM element. |
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action, decorateAction } from '../src';
const pickFirst = decorateAction([
args => args.slice(0, 1)
]);
storiesOf('Button', module)
.add('Hello World', () => (
<button onClick={action('hello-world')}>Hello World</button>
))
... | A component that renders a single action on a button. |
import React from 'react';
import { compose, mapProps, pure } from 'recompose';
import { ScrollView } from 'react-native';
import { startCase, toLower } from 'lodash';
import BackgroundView from '@ui/BackgroundView';
import Header from '@ui/Header';
import ContentView, { Title, SubHeading, HTMLView } from '@ui/Content... | Imports a single node with a series view. |
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call &... | A component that will be displayed when a user navigates away from a screen. |
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 { TABLE_EDIT, TABLE_EDIT_MODE } from './fluid.info';
import FluidFunc from 'fluid-func';
import PropTypes from 'prop-types';
import React from 'react';
export const TableColumn = ({ column, value, columnClass, tableName, index }) => {
let colElem = <td />;
const className = `${column.className || ''} ${col... | TableColumn - Table column with no component |
import React from 'react'
import DecisionDestroyerAfterPayment from './decisionDestroyerAfterPayment'
function action({ path }) {
return {
chunks: ['decisionDestroyerAfterPayment'],
title: 'Decision Destroyer - Success',
path,
description: 'Success page',
component: <DecisionDestroyerAfterPaymen... | action - action for a sequence of nodes |
import React from 'react'
import PropTypes from 'prop-types'
const MenuItem = ({ children }) => (
<li>{children}</li>
)
MenuItem.propTypes = {
children: PropTypes.node
}
export default MenuItem
| Create a menu item that displays a on a list of children. |
import React from 'react';
import { SegmentedControl } from '../../../admin/client/App/elemental';
const EXISTS_OPTIONS = [
{ label: 'Is Set', value: true },
{ label: 'Is NOT Set', value: false },
];
function getDefaultValue () {
return {
exists: true,
};
}
var PasswordFilter = React.createClass({
propTypes:... | The PasswordFilter class is a wrapper around the regular React component that will filter out non - existent values. |
import React from 'react';
import PropTypes from 'prop-types';
import unicodeMapping from '../features/emoji/emoji_unicode_mapping_light';
import { assetHost } from 'mastodon/utils/config';
export default class AutosuggestEmoji extends React.PureComponent {
static propTypes = {
emoji: PropTypes.object.isRequire... | The AutosuggestEmoji class |
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import _extends from... | A component that wraps a dropdown dropdown and a button to split on a dropdown menu. |
/**
* Created by n7best
*/
import React from 'react';
import classNames from 'classnames';
export default class MediaBoxHeader extends React.Component {
render() {
const {children, className, ...others} = this.props;
const clz = classNames({
weui_media_hd: true
}, className... | A component that shows a header that can be used to show a single missing child. |
/**
* Course 16
* React Native控件之PickerIOS选择器详解-适配iOS开发
*/
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
PickerIOS,
} from 'react-native';
import Util from '../utils';
var PickerItemIOS = PickerIOS.Item;
var COURSE_ITEMS = ['C++','Java','Android','iOS','React Native','Swift','.... | Demonstrate how to render a single object in the CoursePickerIOS panel. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationPriorityHigh = (props) => (
<SvgIcon {...props}>
<circle cx="12" cy="19" r="2"/><path d="M10 3h4v12h-4z"/>
</SvgIcon>
);
NotificationPriorityHigh = pure(NotificationPriorityHigh);
NotificationPrio... | NotificationPriorityHigh - NotificationPriorityHigh |
import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debounce } from 'lodash';
import PropType... | A component that renders a block of blocks. |
import {storiesOf} from '@storybook/react'
import React from 'react'
import Badge from '../src/bootstrap/components/Badge'
import BadgePill from '../src/bootstrap/components/BadgePill'
storiesOf('bootstrap/components/Badge', module)
.addDecorator((story) =>
<div className="container">
{story()}
</div>... | Add a function to render a sequence of components that are not a badge. |
import 'colors';
import React from 'react';
import express from 'express';
import path from 'path';
import Router from 'react-router';
import routes from './src/Routes';
import httpProxy from 'http-proxy';
import ip from 'ip';
const development = process.env.NODE_ENV !== 'production';
const port = process.env.PORT || ... | The main function that runs the application. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialPages = (props) => (
<SvgIcon {...props}>
<path d="M3 5v6h5L7 7l4 1V3H5c-1.1 0-2 .9-2 2zm5 8H3v6c0 1.1.9 2 2 2h6v-5l-4 1 1-4zm9 4l-4-1v5h6c1.1 0 2-.9 2-2v-6h-5l1 4zm2-14h-6v5l4-1-1 4h5V5c0-1.1-.9-2-2-2z"/... | A component that renders a component |
//@flow
import React from 'react';
import { Divider } from './styledComponents';
type coordinates = {
'x': number,
'y': number
}
export default ({
dividerOrigins,
dividerWidth,
textDimensions
}: {
dividerOrigins: coordinates[],
dividerWidth: number,
textDimensions: {
x: number,
y: number
}
... | The default implementation of . |
import Component from '../components/component.react';
import React from 'react';
import exposeRouter from '../components/exposerouter';
import {createValidate} from '../validate';
import * as authActions from '../auth/actions';
import * as firebaseActions from '../firebase/actions';
import * as songsActions from '../... | Create a component that will create actions on the next component. |
import React from 'react';
import SPELLS from 'common/SPELLS/index';
import Analyzer from 'parser/core/Analyzer';
import SpellUsable from 'parser/shared/modules/SpellUsable';
import { formatNumber } from 'common/format';
import SPECS from 'game/SPECS';
import TalentStatisticBox from 'interface/others/TalentStatisticBo... | The natural mending class |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvPlayCircleFilled = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"/>
</SvgIcon>
);
AvPlayCircleFilled = pure(AvPlayCirc... | A component that exports a single node in a group of nodes that can be played by a circle. |
import React from 'react';
import ReactDOM from 'react-dom';
import { Form } from 'formsy-react';
import MyInput from './../components/Input';
import MySelect from './../components/Select';
import MyRadioGroup from './../components/RadioGroup';
import MyMultiCheckboxSet from './../components/MultiCheckboxSet';
const ... | The default logic for the missing - node - js - react module. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalLaundryService = (props) => (
<SvgIcon {...props}>
<path d="M9.17 16.83c1.56 1.56 4.1 1.56 5.66 0 1.56-1.56 1.56-4.1 0-5.66l-5.66 5.66zM18 2.01L6 2c-1.11 0-2 .89-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 ... | A component that exports a sequence of icons that can be used to render a sequence of maps. |
import React from 'react'
import { Radio } from 'semantic-ui-react'
const RadioExampleReadOnly = () => (
<Radio label='This radio is read-only' readOnly />
)
export default RadioExampleReadOnly
| This module imports a single node from a React module. |
import React from 'react';
import {render} from 'react-dom';
import App from './components/App';
import './styles/body.css';
import './images/logo-icon-128.png';
import './images/logo-icon-16.png';
import './manifest.json';
render(<App />, document.getElementById('app'));
| Imports a single application. |
import React from 'react';
import {icon_filters} from '../../../../../globals/filters';
import Tooltip from 'antd/lib/tooltip';
import _ from 'lodash';
import Icon from "../../../../../components/icon";
const Topbar = ({adventuresToggled, handleFiltersClick, activeAdventure, activeMode, activeClass}) => {
const adv... | Exports a Topbar with a list of icons that can be used to show a menu of adventures. |
import React, { Component } from 'react';
import { connect } from 'react-redux'
import './App.css';
import ThemeEditor from './containers/ThemeEditor'
import CutSheetContainer from './containers/CutSheetContainer'
import CutSheetSelectorContainer from './containers/CutSheetSelectorContainer'
class App extends Componen... | The base class for all components that are not part of a theme. |
import React from 'react';
import Icon from '../Icon';
export default class FiberPinIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M11 21h4v2h-4zM40 8H8c-2.22 0-3.98 1.78-3.98 4L4 36c0 2.22 1.78 4 4 4h32c2.22 0 4-1.78 4-4V12c0-2.22-1.78... | A fiber pin icon that can be used to render a single block of a fiber. |
import React, { Component } from 'react';
import { NICE, SUPER_NICE } from './colors';
import Header from './components/Header';
import Section1 from './components/Section1';
export class App extends Component {
render() {
return (
<div>
<Header/>
<Section1/>
</div>
);
}
}
| The base class for all components that are not in React. |
import React from 'react';
const FixedNumber = React.createClass({
propTypes: {
id: React.PropTypes.string.isRequired,
legend: React.PropTypes.string.isRequired,
precision: React.PropTypes.string,
num: React.PropTypes.number,
},
getDefaultProps: function() {
return ... | A component that shows a fixed number in the browser when a component is missing a fixed number. |
import React from 'react';
import PropTypes from 'prop-types';
export default class ColumnHeader extends React.PureComponent {
static propTypes = {
icon: PropTypes.string,
type: PropTypes.string,
active: PropTypes.bool,
onClick: PropTypes.func,
columnHeaderId: PropTypes.string,
};
handleCli... | A component that renders a column header when a button is clicked on a column. |
import React from 'react';
import requireAuth from 'utils/require-auth';
import VisibilityActionCreators from 'actions/VisibilityActionCreators';
import ActivitySection from 'components/ActivitySection.react';
import SidebarSection from 'components/SidebarSection.react';
import ToolbarSection from 'components/Toolba... | The main component of the application. |
import React from 'react';
import Select from 'react-select';
/* eslint-disable react/prop-types, jsx-a11y/label-has-for */
const renderField = ({ input, label, placeholder, disabled, type, meta: { touched, error } }) => (
<div className="form-group flex-item--grow-1">
<div className="block-label">
{label}... | Renders a single object. |
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 from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from '../../components/loading_indicator';
import { ScrollContainer } from 'react-router-scroll-4';
import Column from '../ui/componen... | A component that displays a list of mutes that can be used to manage a user s list of mutes. |
// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... | A component that renders a link to a specific color index in a menu. |
/**
* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
* Container - Layout
* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*/
import React from 'react';
import { Link, IndexLink } from 'react-router';
import Logout from 'components/Logout';
/**
* --------------------------------------------... | Build main menu nav |
import React from 'react';
import PropTypes from 'prop-types';
import Icon from 'mastodon/components/icon';
const formatNumber = num => num > 40 ? '40+' : num;
const IconWithBadge = ({ id, count, issueBadge, className }) => (
<i className='icon-with-badge'>
<Icon id={id} fixedWidth className={className} />
... | A function to export a with a badge. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsDirectionsRun = (props) => (
<SvgIcon {...props}>
<path d="M13.49 5.48c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-3.6 13.9l1-4.4 2.1 2v6h2v-7.5l-2.1-2 .6-3c1.3 1.5 3.3 2.5 5.5 2.5v-2c-1.9 0-3.5-1-4.3-2.4l... | A component that renders a series of icons that can be used to render a series of maps. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorMoneyOff = (props) => (
<SvgIcon {...props}>
<path d="M12.5 6.9c1.78 0 2.44.85 2.5 2.1h2.21c-.07-1.72-1.12-3.3-3.21-3.81V3h-3v2.16c-.53.12-1.03.3-1.48.54l1.47 1.47c.41-.17.91-.27 1.51-.27zM5.33 4.06L4.06 ... | A component that exports a single |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App.js';
ReactDOM.render(<App />, document.getElementById('root'));
| Imports a React application and renders it into the DOM. |
import styles from './ScreenReaderOnly.less';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
export default class ScreenReaderOnly extends Component {
static propTypes = {
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),... | Create a screen reader only component that can be rendered by a component. |
import React from 'react';
const h4 = (props) => {
const { children } = props;
return (
<h4>{ children }</h4>
);
};
export default h4;
| export default h4 |
import React from 'react';
import {
Card,
CardBlock,
CardTitle,
CardText
} from 'reactstrap';
const CaseCard = ({id, lastName, firstName, dateOfBirth, isSelected, handleSelect}) => {
if(isSelected) {
return (
<Card body outline color="danger" className="m-3">
<Ca... | Private function for generating CaseCard |
import React, { Component } from 'react';
import styled from 'styled-components';
import CardList from './CardList';
import PersonalCardList from './PersonalCardList';
const PlaygroundWrapper = styled.div`
`;
class Playground extends Component {
componentWillMount() {
const {
handleIsOpeningL... | Component class for Playground |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.