code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
import EntypoIcon from '../EntypoIcon';
const iconClass = 'entypo-svgicon entypo--Foursquare';
let EntypoFoursquare = (props) => (
<EntypoIcon propClass={iconClass} {...props}>
<path d="M4.92,1C4.412,1,4,1.412,4,1.92v16.516c0,0.625,0.765,0.926,1.192,0.47l4.471-4.79C9.731,14.042,... | The default entypo icon is a special icon that shows a few different icons. |
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Treeful from '../../src/treeful';
import './index.scss';
import TodoController from './components/todo-controller';
import Todo from './components/todo';
class App extends Component {
constructor () {
super();
Treeful.dev();
Tre... | The base class for all components that are not part of a React component. |
import React, { Component } from 'react';
import SearchBar from '../containers/search_bar';
export default class App extends Component {
render() {
return (
<div>
<SearchBar />
</div>
);
}
}
| The base class for all components that are not part of a component s hierarchy. |
import React from 'react';
import {isHereNow} from '../services/status';
class Status extends React.Component {
constructor(props) {
super(props);
this.state = this.getRobStatusObject();
}
componentDidMount() {
this.updateInterval = setInterval(() => this.updateStatusText(), 1000);
}
componen... | A component that can be used to show a robStatus on the page. |
import { AppContainer } from 'react-hot-loader';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
const rootEl = document.getElementById('root');
ReactDOM.render(
<AppContainer>
<App />
</AppContainer>,
rootEl
);
if (module.hot) {
module.hot.accept('./App', () => {
... | Imports a single hot - loader application. |
/* ==========================================================================
* ./src/server/devtools.js
*
* DevTools Container
* ========================================================================== */
import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-d... | DevTools Container |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Tabs, Tab } from 'material-ui/Tabs';
import HoverPaper from '../../atoms/hover-paper';
import styles from './styles';
import actions from './actions';
const mapStateToProps = (state) => ({
errorDetails: st... | A component which displays an error in the calendar when a component is missing or missing. |
// @flow
import React from 'react';
type Props = {
value: String,
onInputChange: () => void
}
const AmountInput = ({ onInputChange, value } : Props) => {
let input;
return (
<div>
<label>Amount</label>
<input
type="text"
ref={(e) => { input ... | A component that exports a sequence of nagios. |
/*
* Copyright 2019 dialog LLC <info@dlg.im>
* @flow
*/
import React from 'react';
import classNames from 'classnames';
import Icon from '../Icon/Icon';
import styles from './ToolbarCallButton.css';
export type Props = {
className?: string,
disabled: boolean,
onClick: (event: SyntheticMouseEvent<>) => mixed,... | Demonstrates how to display a toolbar call button when a user clicks on a hidden element. |
import React, { Component } from 'react';
import data from './data';
import Hero from './hero/Hero';
import Introduction from './intro/Introduction';
import Footer from './footer/Footer';
import Highlights from './intro/Highlights';
import ExperienceList from './experience/ExperienceList';
import GalleryModal from './... | Component that renders a single node in the hierarchy. |
import React from 'react'
import PostApp from '../../components/PostApp/PostApp'
class HomeContainer extends React.Component {
static displayName = 'HomeContainer'
render() {
return (
<div className="Home">
<PostApp {...this.props}/>
</div>
)
}
}
export default HomeContainer
| A component that can be rendered by a component in a container. |
import React from 'react';
import {render} from 'react-dom';
import App from './src/app';
const element = document.getElementById('root');
render(<App />, element);
if (module.hot) {
module.hot.accept('./src/app', () => {
const Next = require('./src/app').default;
render(<Next />, element);
});
}
| Imports the next element in the hierarchy if it is not already rendered. |
import React from 'react';
class FormFieldContainer extends React.Component {
onChange(event) {
if (typeof event.target.selectedOptions !== 'undefined') {
let value = [];
for (let i = 0; i < event.target.selectedOptions.length; i++) {
value.push(event.target.selected... | A component that can be used to create a form field with a nested form field. |
import React from 'react';
import { Route, Link } from 'react-router-dom';
import RoomLobby from './rooms/room-lobby.component';
import UserService from '../services/user.service';
import UserEntry from './user/user-entry.component';
import Room from './rooms/room.component';
import '../main.css';
const User$ = new... | Demonstrates how to render a single user in a system. |
import React from 'react';
import cx from 'classnames';
import { Button } from 'react-bootstrap';
import PopInput from '../PopInput/PopInput';
import './motor.css';
export default class MotorInput extends React.Component {
constructor(props) {
super(props);
this.handleKey = this.handleKey.bind(this);
th... | A component that can be used to enter a key in a motor. |
import React from 'react';
import { render } from 'react-dom';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
render(<HelloWorld />, document.getElementById('react-root'));
| Imports a component from a file that has no react - dom. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationMoreVert = (props) => (
<SvgIcon {...props}>
<path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"... | A component that renders a navigation more vertex in a tree. |
import $ from 'jquery'
import React from 'react';
import gql from 'graphql-tag';
import {graphql} from 'react-apollo';
import moment from 'moment';
import {Link} from 'react-router';
import scrollToElement from 'scroll-to-element';
let Blog = React.createClass({
componentDidMount(){
require('../assets/css/main.c... | Private function for generating a single warning in the JSF - 8 language. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let PinDrop = props =>
<SvgIcon {...props}>
<path d="M18 8c0-3.31-2.69-6-6-6S6 4.69 6 8c0 4.5 6 11 6 11s6-6.5 6-11zm-8 0c0-1.1.9-2 2-2s2 .9 2 2-.89 2-2 2c-1.1 0-2-.9-2-2zM5 20v2h14v-2H5z" />
</SvgIcon>;
Pi... | A component that can be used to render a sequence of missing nodes. |
import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { Label, Input, Block } from 'components'
const Error = styled(Block)`
margin: 0.5rem 0 0;
`
const Wrapper = styled.div`
margin-bottom: 1rem;
input[type="checkbox"],
input[type="radio"] {
margin-rig... | Create a hidden field with a series of components |
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import Headline from 'grommet/components/Headline';
import InteractiveExample from '../../../components/InteractiveExample';
const PROPS_SCHEMA = {
strong: { value: true },
size: { options: ['small', 'me... | The Headline example class |
import React from 'react'
import { Text } from 'react-native'
import { Button } from 'react-native-elements'
import Screen from './Screen'
import Settings from '../Settings'
export default class AddComponent extends Screen {
constructor(props) {
super(props)
this.setNavigationButtons([], [{
'title': "... | AddComponent - Add a component to a window. |
import React from 'react';
import Select from 'react-select';
var CreatableDemo = React.createClass({
displayName: 'CreatableDemo',
propTypes: {
hint: React.PropTypes.string,
label: React.PropTypes.string
},
getInitialState () {
return {
multi: true,
multiValue: [],
options: [
{ value: 'R', labe... | The base implementation of the neccesary logic for the neccesary logic. |
import React from 'react';
import Dropdown from './Dropdown';
import omit from 'lodash-compat/object/omit';
import pick from 'lodash-compat/object/pick';
import Button from './Button';
class DropdownButton extends React.Component {
render() {
let { bsStyle, bsSize, disabled } = this.props;
let { title, chil... | A component that can be used to toggle a dropdown menu or a dropdown menu item. |
import React, { Component } from 'react';
import FacetContainer from './Components/FacetContainer/FacetContainer';
import AnimalContainer from './Components/AnimalContainer/AnimalContainer';
import axios from 'axios';
import config from './config';
import './App.css';
import _ from 'lodash';
class App extends Componen... | Component that is a component that is not part of a component s sub - components. |
import React from 'react';
import {EventEmitter} from 'events';
import assign from 'object-assign';
import httpClient from '../core/HttpClient';
import dispatcher from '../core/Dispatcher';
import Constants from '../constants/Constants';
import BaseStore from './BaseStore'
import _ from 'lodash';
import topojsonWorld... | The main function that creates the base store and emits the change event for the given ISO - 2. |
/**
* Function to get the shallow output for a given component
* As we are using phantom.js, we also need to include the fn.proto.bind shim!
*
* @see http://simonsmith.io/unit-testing-react-components-without-a-dom/
* @author somonsmith
*/
import React from 'react';
import TestUtils from 'react-addons-test-utils'... | Get the shallow rendered component |
import FontAwesome from 'react-fontawesome';
import { LABEL_REMOVE } from '../../labels/';
import { Link } from 'react-router';
import PropTypes from 'prop-types';
import React from 'react';
import { toReadableSubject } from '../../utils/';
export const BookSubjectItem = ({ subject, removeSubject, index }) => {
re... | BookSubjectItem provides a subject item that lists all of a single in a book. |
import React from 'react';
import SvgIcon from 'material-ui/SvgIcon';
/* eslint-disable max-len*/
// SVG d Path | eslint disa
const icon = `M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-... | A component that renders a missing missing |
import React from 'react';
import { storiesOf } from '@storybook/react-native';
import MatchImage from './MatchImage';
storiesOf('exercises/MatchImage', module).add('Apfel', () => (
<MatchImage
images={[
require('../../assets/images/affe.jpg'),
require('../../assets/images/esel.jpg'),
require(... | Add a dependency to the MatchImage |
import React, { Component } from 'react';
export default class NotFound extends Component {
render() {
return <h1>404 <small>Not Found :(</small></h1>;
}
}
| The default implementation of 404. |
import React from 'react';
import Footer from '../components/Footer';
export default class PageFooter {
getElements(next) {
return next().concat(<Footer />);
}
}
| The default page footer class |
import React from 'react'
import PropTypes from 'prop-types'
import Uranium from 'uranium'
import Color from 'color'
import {
TouchableRipple,
Body2,
Breakpoints,
Colors,
Elevation,
connectTheme,
} from '../../index'
/**
* Raised buttons behave like a piece of material resting on another sheet –
* the... | The main function of the raised buttons. |
import React from 'react';
import {Row,Col} from 'antd';
import {Router, Route, Link, browserHistory} from 'react-router'
export default class MobileList extends React.Component {
constructor() {
super();
this.state = {
news: ''
};
}
componentWillMount() {
var myFetchOptions = {
method: 'GET'
};
fe... | The MobileList component is a list of all the items in the list that are unique with a given type. |
// @flow
import React from 'react';
import { GameContainerMock } from '../../../mocks/GameContainerMock';
export default ({ children }: { children: React$Node }) => (
<GameContainerMock cols={4} rows={2}>
{children}
</GameContainerMock>
);
| The default implementation of which mocks the neccessary children of a node. |
import React from 'react'
import { Dropdown } from 'semantic-ui-react'
const friendOptions = [
{
key: 'Jenny Hess',
text: 'Jenny Hess',
value: 'Jenny Hess',
image: { avatar: true, src: '/images/avatar/small/jenny.jpg' },
},
{
key: 'Elliot Fu',
text: 'Elliot Fu',
value: 'Elliot Fu',
... | Example of how to show a single node in a sequence of nodes. |
import React from 'react';
import { connect } from 'react-redux';
import {
getCurrentUser,
togglePageContainer,
clearPageScroll
} from 'actions';
import Navbar from './Navbar.js';
import Flash from './Flash';
import styles from './index.css';
class Chrome extends React.Component {
constructor(props)... | A component that opens a page container and hides it. |
import React from 'react';
const OpenInNewIcon = props => (
<svg {...props.size || { width: '24px', height: '24px' }} {...props} viewBox="0 0 24 24">
{props.title && <title>{props.title}</title>}
<path d="M0 0h24v24H0z" fill="none" />
<path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 ... | Open in new icon |
import 'babel-polyfill'; // generators
require('antd/dist/antd.css')
import {render} from 'react-dom';
import React from 'react';
import {Provider} from 'react-redux'
import MainLayout from './components/MainLayout'
import configureStore from './store/store';
render(
<Provider store={configureStore()}>
<MainLay... | Imports a bunch of modules that are required to render a single node. |
import React from 'react';
import Dashboard from './Dashboard';
import Nav from './Nav';
var styles = {};
styles.sidebar = {
float: 'left',
width: 200,
padding: 20,
borderRight: '1px solid #aaa',
marginRight: 20
};
class Course extends React.Component {
render () {
let { children, params } = this.pro... | A component that can be rendered by a component in a group of child components. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { Alert, Button, Col, Form, FormGroup, FormControl, Row } from 'react-bootstrap';
import { guestSessionTimeout, product, userRegex } from 'config';
import { login } from 'helpers/userMessaging'... | A component that can be used to create a login form with a single user. |
// eslint-disable-next-line no-unused-vars
import React from 'react';
import PropTypes from 'prop-types';
import {Grid, FlexCol} from '../flex-grids';
import {Icon} from '../iconography';
export class TextFilter extends React.Component {
static propTypes = {
data: PropTypes.array.isRequired,
emptyState: Prop... | A text - filter component that can be used to filter a text field. |
"use strict";
import React from 'react';
class LoginPage extends React.Component {
componentDidMount(){
var lock = new Auth0Lock('Ak0xmdNNIZNUbwtOYUVt1Y7wKPgPGra5', 'msaleh.auth0.com');
lock.show({
container: 'LoginBox'
});
}
showLock() {
// We receive lock from th... | The login page 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... | A component that renders a single failure in the todo list. |
/**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a neccessity for you then you can refactor i... | NotFoundPage - The page we show when the user visits a url that doesn t have a route . |
import React from 'react';
import { findDOMNode } from 'react-dom';
import {
FormField,
FormInput,
Grid,
SegmentedControl,
} from '../../../admin/client/App/elemental';
const INVERTED_OPTIONS = [
{ label: 'Matches', value: false },
{ label: 'Does NOT Match', value: true },
];
function getDefaultValue () {
ret... | The default filter for a single node in a group of components that can be selected by a user. |
import React from 'react'
import Stat from './Stat'
import { connect } from 'react-redux'
import { PropTypes } from 'prop-types'
import Col from 'react-bootstrap/lib/Col'
import Row from 'react-bootstrap/lib/Row'
import Grid from 'react-bootstrap/lib/Grid'
import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger'... | Component that renders a list of components that can be rendered by a Bootstrap component. |
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/App';
import HomePage from './components/HomePage';
import FuelSavingsPage from './containers/FuelSavingsPage'; // eslint-disable-line import/no-named-as-default
import AboutPage from './components/AboutPage.js';... | The default implementation of which imports all components. |
import React from 'react';
import ItemsTableCell from '../../../admin/client/components/ItemsTable/ItemsTableCell';
import ItemsTableValue from '../../../admin/client/components/ItemsTable/ItemsTableValue';
var UrlColumn = React.createClass({
displayName: 'UrlColumn',
propTypes: {
col: React.PropTypes.object,
da... | The UrlColumn component is a column that links to a link to a prototcol. |
import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import Header from '../Header';
import Container from './Container';
import Footer from '../Footer';
import './style.css';
const Docs = ({ sections, selectedItem, selectedSectionId, selectedItemId }) =>
<div className=... | export default Docs |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorInsertInvitation = (props) => (
<SvgIcon {...props}>
<path d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"/>
... | A component that renders a block of icons that can be inserted into a block of icons. |
// @flow strict-local
import React from 'react';
import PropTypes from 'prop-types';
import getNotDeclaredProps from 'react-get-not-declared-props';
import CheckboxBlankOutlineIcon from 'mdi-react/CheckboxBlankOutlineIcon';
import CheckboxMarkedIcon from 'mdi-react/CheckboxMarkedIcon';
import Ripple from '../Ripple';... | A component that displays a checkbox |
import React from 'react';
import Notification from 'rc-notification';
import Icon from '../icon';
var defaultDuration = 1.5;
var defaultTop = void 0;
var messageInstance = void 0;
var key = 1;
var prefixCls = 'ant-message';
var getContainer = void 0;
function getMessageInstance() {
messageInstance = messageInstanc... | Warning notice - export function |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorInsertChart = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/>
</SvgIcon>
);
Editor... | A component that renders a series of icons that can be inserted into a chart. |
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 ... | Creates a checkbox with a label and a label for the checkbox. |
import React, { Component } from 'react';
import {
Text,
View,
TextInput,
BackAndroid,
StatusBar
} from 'react-native';
import { connect } from 'react-redux';
import { NavigationActions } from 'react-navigation';
import Toolbar from '../lib/Toolbar';
import TitleText from '../lib/TitleText';
import TickBtn f... | Component that is a component that can be used to show a single note in a modal dialog. |
import React from 'react';
import { parse } from 'react-docgen';
import CodeExample from '../../../components/CodeExample';
import ComponentHeader from '../../../components/ComponentHeader';
import PropTypeDescription from '../../../components/PropTypeDescription';
import Demo from './Demo';
// eslint-disable-next-lin... | export default page |
'use strict';
import React from 'react';
export class LI extends React.Component {
render() {
return <li>{ this.props.children }</li>;
}
}
export default LI;
| A component that renders a series of children if it has one. |
import React from 'react'
import Article from '../../app/article'
export const pagePath = 'rant/hate_software'
export const pageTitle = 'Ryan Dahl: I hate almost all software'
export default class extends React.Component {
render() {
return (
<Article path={pagePath} title={pageTitle}>
... | A component that is a subclass of React. Component that is hate almost all software. |
import React from 'react';
// components
import Nav from './nav';
import Seo from './seo';
import Header from './header';
import Footer from './footer';
import Yes from './yes';
import No from './no';
// utils
import apiUtils from '../../utils/api-utils';
import dateUtils from '../../utils/date-utils';
import time... | The base class for a single node in the system. |
import React from 'react';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import Events from 'parser/core/Events';
import SpellUsable from 'parser/shared/modules/SpellUsable';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { STATISTIC_ORDER } from 'interface/o... | Demonstrates how to call a dreadstalker on a specific combatant. |
import React from 'react'
import { Dropdown } from 'semantic-ui-react'
const DropdownExampleDisabled = () => (
<Dropdown text='Dropdown' disabled>
<Dropdown.Menu>
<Dropdown.Item>Choice 1</Dropdown.Item>
<Dropdown.Item>Choice 2</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
)
export default Dropd... | Example of how to display a single missing - node node in a dropdown. |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Helmet from 'react-helmet';
import { showHello, showHelloAsync, showMoviesAsync } from './actions';
import logoImg from '../../assets/images/logo.jpg';
import config from '../../config';
import { selectInfo, sel... | Component that renders a Hahoo App! |
import React from 'react';
import ReactDOM from 'react-dom';
import singleSpaReact from 'single-spa-react';
import rootComponent from './root.component.js';
const reactLifecyles = singleSpaReact({
React,
ReactDOM,
domElementGetter,
rootComponent,
});
export const bootstrap = [
reactLifecyles.bootstrap,
];
... | export a single - spa |
import React, { Component } from 'react';
class Page404 extends Component {
render() {
return (
<div className="container">
<div className="row justify-content-center">
<div className="col-md-6">
<div className="clearfix">
<h1 className="float-left display-3 mr-4... | A page404 class that displays a 404 page. |
import React from 'react';
import cx from 'classnames';
class Collection extends React.Component {
constructor(props) {
super(props);
this.renderHeader = this.renderHeader.bind(this);
}
render() {
let classes = {
collection: true,
'with-header': !!this.props.header
};
let C = 'ul... | A collection component that renders a list of children with a header. |
'use strict';
import React, { Component } from 'react';
import Communications from 'react-native-communications';
import TabBar from '../Components/TabBar';
import ContactCard from './ContactCard';
import MyNavigationBar from './MyNavigationBar';
import {bindActionCreators} from 'redux';
import { connect } from 'react... | A component that displays a list of contacts with a single user - defined number of contacts. |
import React, { Component } from 'react';
import Layout from '../Layout';
import DynamicReactRouter from 'dynamic-react-router';
// Configuración del Enrutador
import { ROUTES_CONFIG } from '../../route';
class App extends Component {
constructor(props) {
super(props);
}
// Funcioón booleana pa... | Dice un componente de la liste de la ruta de la layout de la router |
import React from 'react'
import { sparqlConnect } from '../sparql//configure-sparql'
import { LOADING, LOADED, FAILED } from 'sparql-connect'
import { toggleCorrespondenceDefinitions } from '../actions/app-state'
import { connect } from 'react-redux'
//a sparql component can be passed additional props (either by its ... | a component that can be passed additional props |
import React from 'react';
import {
Table,
TableBody,
TableHeader,
TableHeaderColumn,
TableRow,
TableRowColumn,
} from 'material-ui/Table';
/**
* A simple table demonstrating the hierarchy of the `Table` component and its sub-components.
*/
const TableExampleSimple = () => (
<Table>
<TableHeader>
... | A simple table demonstrating the hierarchy of the Table component and its sub - components. |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.... | Create a series of icons for a single node. |
/**
* Created by Daniel on 18/06/2017.
*/
import React from 'react';
import {Link} from 'react-router-dom';
import {Meteor} from 'meteor/meteor';
export default class Login extends React.Component {
constructor(props) {
super(props);
this.state = { //Component state
error: ''
... | A component that logs in with a password. |
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';
export default class Story extends React.Component {
constructor(props) {
super(props);
this.state = {
}
}
render(){
const { row, col, messages} = this.props;
return(
<div className='noSelect'>
{messages[row] ? messages[row][col] : "No Messages"}
... | The base class for the missing - messages component. |
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
// If you want your app to work offline and load faster, you can change
// unregister() to register()... | Imports a single application. |
import React from 'react';
import Label from 'ps-react/Label';
/** Required label */
export default function ExampleRequired() {
return <Label htmlFor="test" label="test" required />
}
| ExampleRequired returns a label with a required element if a missing element is found |
/*
*
* LanguageToggle
*
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import Toggle from 'components/Toggle';
import Wrapper from './Wrapper';
import messages from './messages';
import { appLocales } from '../../i18n';
import { changeLocale } from ... | A component which will toggle the locale of a specific language in a dropdown list. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageImageAspectRatio = (props) => (
<SvgIcon {...props}>
<path d="M16 10h-2v2h2v-2zm0 4h-2v2h2v-2zm-8-4H6v2h2v-2zm4 0h-2v2h2v-2zm8-6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H... | A component that exports a component with a default image image aspect ratio. |
import React from 'react'
import classNames from 'classnames'
import PropTypes from 'prop-types'
export const Cell = ({ name, className, style, ...props }) => {
return (
<div
{...props}
className={classNames(
'k-SummaryCard__cell',
className,
`k-SummaryCard__cell__${name}`,
... | Create a cell with a series of non - empty children. |
import * as BooksAPI from'./BooksAPI'
import React, { Component } from 'react';
import {Link } from 'react-router-dom';
import Shelf from './shelf'
class Search extends Component{
state = {
books:''
}
searchBooks=(e)=>{
e.preventDefault();
let searchTerm=e.target.value
BooksAPI.search(searchTerm,... | The base implementation of a search that searches for a single book. |
/**
*
* 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. |
import React from 'react';
import SPELLS from 'common/SPELLS';
import { formatPercentage } from 'common/format';
import { calculateAzeriteEffects } from 'common/stats';
import UptimeIcon from 'interface/icons/Uptime';
import HasteIcon from 'interface/icons/Haste';
import AzeritePowerStatistic from 'interface/statistic... | A class that represents a sequence of events that have a Overwhelming Power state. |
/**
* @module Pagination
* Pagination component, only appeared if paging is more than one
*
**/
import styles from './style.css';
import React from 'react';
import PropTypes from 'prop-types';
import PureComponent from 'react-pure-render/component';
import classNames from 'classnames';
import Button from '../Butto... | A base class for pagination pagination components. |
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 React from 'react';
import { PureRenderMixin } from 'react/addons';
import ContactActionCreators from 'actions/ContactActionCreators';
import DialogActionCreators from 'actions/DialogActionCreators';
import PeerStore from 'stores/PeerStore';
import DialogStore from 'stores/DialogStore';
import AvatarItem from... | The default action that creates a user profile that can be used to show a dialog or a contact. |
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import illustration from 'mastodon/../images/elephant_ui_disappointed.svg';
import classNames from 'classnames';
const MissingIndicator = ({ fullPage }) => (
<div className={classNames('regeneration-indicato... | Provides a function to generate a missing - indicator for a single node. |
import React from 'react';
import PropTypes from 'prop-types';
import ReactModal from 'react-modal';
import Section from 'shared/components/section/section';
import styles from './modal.css';
const Modal = ({
isOpen, title, onRequestClose, children
}) => (
<ReactModal
isOpen={isOpen}
contentLabel={title}
... | A function to create a modal component with a single node. |
import { Box, Table } from '@rocket.chat/fuselage';
import React from 'react';
const style = { wordBreak: 'break-word' };
export const DescriptionList = ({ children, title, ...props }) => <>
{title && <Box display='flex' justifyContent='flex-end' width='30%' paddingInline='x8'>
{title}
</Box>}
<Table striped mar... | Exports a description list of a node that can be used to display a sequence of nodes. |
import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... | A component that wraps a bootstrap - based component with a row that wraps a bootstrap - based component. |
import React from 'react';
import PropTypes from 'prop-types';
import Request from '../../components/Request';
import AssetsTable from '../../components/AssetsTable';
import RequestRow from './RequestRow';
const RequestsView = ({
showRequest,
updates,
request,
onAllowRequest,
onDenyRequest,
onCancel,
onR... | Generates a view of the sequence of assets that can be selected by a user. |
import { Route, IndexRoute } from 'react-router';
import React from 'react';
import Container from './app/utils/Container';
import HomePage from './app/home/HomePage';
export default (
<Route component={Container}>
<Route path="/(search/:keyword)" component={HomePage} />
</Route>
)
| export default route |
import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
import { injectIntl, FormattedMessage } from 'react-intl';
import { Grid, Row, Col } from 'react-flexbox-grid/lib';
import Permissioned from '../../common/Permissioned';
import { PERMISSION_TOPIC_WRITE } from '../../..... | Provides a function to inject a warning into a warning - bar when a platform is incomplete. |
import React from 'react'
import SortableListItem from './SortableItem'
export default class SortableList extends React.Component {
state = {
items: this.props.items
};
onSortItems = (items) => {
this.setState({
items: items
});
}
render() {
const { items } = this.state;
var list... | The default sort order list component |
import React from 'react';
import { FormattedMessage, FormattedDate } from 'react-intl';
import { convertNumbers2English } from '../../helpers';
const DateDisplay = ({ isoDate }) => (
<time dateTime={isoDate}>
<FormattedDate value={new Date(isoDate)} day="numeric" month="long" year="numeric" />
</time>
);
fun... | The default task response format is to display a single missing - field header and a date. |
import React from 'react';
import { Switch, Route } from 'react-router-dom';
import RacePageLayout from './Races/PageLayout';
import FilterableRaceResults from './FilterableRaceResults';
import RacerContainer from './RacerContainer';
const containerStyle = {
maxWidth: '1200px',
margin: '0px auto',
};
const Main ... | Imports a single non - terminal middleware into a container. |
import React from 'react';
import styled from 'styled-components';
import { Github, MediumM } from '@styled-icons/fa-brands';
import rem from '../../utils/rem';
import { navbarHeight } from '../../utils/sizes';
import Link from '../Link';
const Wrapper = styled.nav`
display: flex;
align-items: center;
flex: 1 1 ... | A component that can be used to render a single missing - child node. |
import React from 'react';
import { View, ActivityIndicator } from 'react-native';
const Spinner = ({ size }) => {
return (
<View style={ styles.spinnerStyle }>
<ActivityIndicator size={ size || 'large' } />
</View>
);
};
const styles = {
spinnerStyle: {
flex: 1,
justifyContent: 'center',
alignItems: ... | Imports a React component and returns a Spinner that displays a menu item with a specific size. |
import React from 'react';
import Routes from '../../../services/Routes';
import Link from '../../base/Link';
import RemoveIcon from '../../base/icons/RemoveIcon';
const Meal = ({ meal, onRemoveMeal }) => (
<div className="pes-meal">
<div className="pes-meal__divider"></div>
<Link
unde... | Meals Meals - Meals |
/**
* 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, { Component } from 'react';
import withStyle... | A component that renders a single missing - node node in the hierarchy of components. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationLocationOn = (props) => (
<SvgIcon {...props}>
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12... | A component that displays a communication location on on a node. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.