code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialPerson = (props) => (
<SvgIcon {...props}>
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>
</SvgIcon>
);
SocialPerson = pure(Soc... | A component that exports a sequence of components that can be used to render a sequence of components. |
/*
*
* LinkFormContainer
*
*/
import React from 'react';
import { connect } from 'react-redux';
import selectLinkFormContainer from './selectors';
import LinkForm from '../../components/LinkForm';
import { addLink , addLinkCancelled } from './actions';
export class LinkFormContainer extends React.Component { // e... | A component that wraps a LinkForm |
/**
*
* NotiModal
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import {
Modal,
ModalBackground,
ModalContent,
Notification,
ModalClose,
} from 'bloomer';
import { FormattedMessage } from 'react-intl';
import messages from './messages';
function NotiModal({
active,
close,
type,... | Private function to export a single missing - node modal. |
import React from 'react';
import {useActionState} from './helper';
import FieldEnum from '../src/components/FieldEnum';
import {Wrapper} from './ui';
import {withA11y} from '@storybook/addon-a11y';
export default {
title: 'FieldEnum',
component: FieldEnum,
decorators: [withA11y],
};
export const BasicFew = ()... | The default decorator for the NestedFieldEnum class |
// (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 series of icons. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import '../../styles/search-form.css';
class SearchForm extends Component {
constructor(props, context) {
super(props, context);
this.handleSubmit = this.handleSubmit.bind(this);
this.handleChange = this.handleChange.bind(this... | The base component for the search form. |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.querySelector('.container-fluid'),
);
| Imports a single node in the DOM. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionTrendingFlat = (props) => (
<SvgIcon {...props}>
<path d="M22 12l-4-4v3H3v2h15v3z"/>
</SvgIcon>
);
ActionTrendingFlat = pure(ActionTrendingFlat);
ActionTrendingFlat.displayName = 'ActionTrendingFlat';
A... | ActionTrendingFlat - action trending for a node |
import React from 'react'
let Valid = prop => {
return (
<span
role='img'
aria-label='valid'
style={{
display: prop.display ? 'none' : '',
marginLeft: '-23px'
}}
>
❌
</span>
)
}
export default Valid
| Valid let export |
import React from 'react';
const ProjectSettings = () => <div>settings for project</div>;
export default ProjectSettings;
| export default settings for missing react - availables projects |
import { calculateAzeriteEffects } from 'common/stats';
import SPELLS from 'common/SPELLS';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import TraitStatisticBox, { STATISTIC_ORDER } from 'interface/others/TraitStatisticBox';
import React from 'react';
import Events from 'parser/core/Events';
impor... | The LordOfWar class |
import React from 'react';
import _ from 'lodash';
import $ from 'jquery';
import classnames from 'classnames';
import Colors from 'material-ui/lib/styles/colors';
import Actions from '../../actions/actions';
import Store from '../../stores/store';
import {Mode} from '../../constants/constants';
const Drag = React.... | Creates a unique key drag component that will drag the target element when dragging the target element. |
import React from 'react';
import { Router, Route, IndexRoute, Link } from 'react-router';
var PICTURES = [
{ id: 0, src: 'http://placekitten.com/601/601' },
{ id: 1, src: 'http://placekitten.com/610/610' },
{ id: 2, src: 'http://placekitten.com/620/620' }
];
var Modal = React.createClass({
styles: {
posi... | The main function for the high - level hierarchy. |
import React from 'react';
import { withRouter, Route, Link } from 'react-router-dom';
import { Login, Logout, RecoverPassword, Register } from '../components/User';
import SVGLogo from '../components/SVGLogo';
const HistoryLink = withRouter(({history, ...props}) => {
var domain = `${window.location.protocol}//${win... | The login component is a component that can be used to log in with a Strava user. |
/* */
"format cjs";
import React from 'react';
import warning from './routerWarning';
import invariant from 'invariant';
import Redirect from './Redirect';
import { falsy } from './InternalPropTypes';
var _React$PropTypes = React.PropTypes;
var string = _React$PropTypes.string;
var object = _React$PropTypes.object;
... | The default indexRedirect component is a component that can be used to redirect to an indexRoute. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import FlipMove from 'react-flip-move';
import Card from 'material-ui/lib/card/card';
import CardHeader from 'material-ui/lib/card/card-header';
import Avatar from 'material-ui/lib/avatar';
import CardTitle from 'material-ui/lib/card/card-... | Component class which renders a single node in a discussion. |
import React from 'react';
import test from 'ava';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import { FormattedMessage } from 'react-intl';
import { Header } from '../../components/Header/Header';
import { intl } from '../../../../util/react-intl-test-helper';
const intlProp = { ...intl, enabledLang... | Tests if a header is properly rendered and has a link to the first page in the page. |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import CheckInput from 'Components/Form/CheckInput';
import TableRowCell from './TableRowCell';
import styles from './TableSelectCell.css';
class TableSelectCell extends Component {
//
// Lifecycle
componentDidMount() {
const {
... | A base class for a single missing node in a table - select cell. |
import React from 'react';
import {
StyleSheet,
View,
Text,
Dimensions,
TouchableOpacity,
} from 'react-native';
import MapView from 'react-native-maps';
import flagPinkImg from './assets/flag-pink.png';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE... | A custom marker that can be used to show a marker of random color. |
import {FormControl, FormLabel, FormHelperText, Select} from '@chakra-ui/react'
import startCase from 'lodash/startCase'
import React from 'react'
import {ALL_TRANSIT_MODES} from '../constants'
const toStartCase = (o) => startCase(o.toLowerCase())
const r5Warning =
'Note: routing engine versions prior to v4.6.0 wi... | transitMode - Selectable component |
import React from 'react';
import PropTypes from 'prop-types';
import TextField from 'material-ui/TextField';
import get from 'lodash.get';
import FieldTitle from '../../util/FieldTitle';
const DisabledInput = ({ label, record, resource, source }) => <TextField
value={get(record, source)}
floatingLabelText={<F... | A disabled input that is used to disable a sequence of tokens. |
import React from 'react'
export default () => (
<svg width='10' height='10' viewBox='0 0 10 10'>
<path d='M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12' fill='#fff' fillRule='evenodd' />
</svg>
)
| 9. 9. |
/* eslint-disable no-undef */
import React from 'react';
import { StatisticsWidget } from 'wix-style-react';
render(
<div style={{ background: '#fff' }}>
<StatisticsWidget
items={[
{
value: '500',
description: 'Customers',
percentage: 21,
},
{
... | Adds a hidden hidden element with a summary of the missing node in the hierarchy. |
// @flow
import React from 'react'
export default () => (
<div
css={`
width: 35em;
`}
/>
)
| The default implementation of which renders a hidden hidden element with a width of 35em. |
import React from 'react';
import PropTypes from 'prop-types';
import List from 'components/List';
import ListItem from 'components/ListItem';
import LoadingIndicator from 'components/LoadingIndicator';
import RepoListItem from 'containers/RepoListItem';
function ReposList({ loading, error, repos }) {
if (loading) ... | The list of components that can be rendered by a component. |
import React from 'react'
import { IndexLink, Link } from 'react-router'
import PropTypes from 'prop-types'
import './PageLayout.scss'
export const PageLayout = ({ children }) => (
<div className='container text-center'>
<h1>GitHub API Assignment</h1>
<IndexLink to='/' activeClassName='page-layout__nav-item-... | PageLayout is a page layout that renders a single node in a tree. |
import React from 'react';
import Gravatar from 'react-gravatar';
var Option = React.createClass({
propTypes: {
addLabelText: React.PropTypes.string,
className: React.PropTypes.string,
mouseDown: React.PropTypes.func,
mouseEnter: React.PropTypes.func,
mouseLeave: React.PropTypes.func,
option: React.PropTy... | The option component that is rendered when a user clicks on a node in a dropdown list. |
/*
Copyright 2015, 2016 OpenMarket Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | JSF2 - 4 specific functions |
import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
const style = {
margin: 12,
};
const RaisedButtonExampleSimple = () => (
<div>
<RaisedButton label="Default" style={style} />
<RaisedButton label="Primary" primary={true} style={style} />
<RaisedButton label="Secondary" se... | A component that renders a bunch of missing buttons. |
'use strict';
/**
* This is an example React Native app demonstrates ListViews, text input and
* navigation between a few screens.
* https://github.com/facebook/react-native
*/
import React, { Component } from 'react';
import { StackNavigator } from 'react-navigation';
import HomeScreenTabNavigator from './HomeS... | Top - level navigator. Renders the application UI. |
import React from 'react';
import { Link } from 'react-router';
const Todo = () => (
<div>
<Link to="/">Back to home</Link>
<p>At some point in this tutorial i'll render the todos!</p>
</div>
);
export default Todo; | The default Todo class |
import React from 'react'
import PropTypes from 'prop-types'
import Radium from 'radium'
import theme from 'theme'
const styles = {
root: {
display: 'flex',
},
indicator: {
height: 12,
width: 12,
margin: '0 0 0 15px',
borderRadius: '50%',
backgroundColor: theme.color.grey.cleanSock,
},... | export default component |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvClosedCaption = (props) => (
<SvgIcon {...props}>
<path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-4c0-.5... | A component that renders a single caption in a group of icons. |
import React from 'react'
class Profile extends React.Component {
render() {
return (
<div>
<h2>Profile</h2>
</div>
)
}
}
module.exports = Profile
| Profile a component in a tree |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvHd = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-... | A simple simple tool to display a missing - missing element in a group of icons. |
import React from 'react';
import ReactDOM from 'react-dom';
import Modal from 'react-modal';
import MdHelpOutline from 'react-icons/lib/md/help-outline';
import Wrapper from './Wrapper'
const modalStyles = {
overlay : {
position : 'fixed',
top : 0,
left : 0,
right... | A component that displays a modal modal with a modal modal. |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import withStyles from 'isomorp... | The main function of the main module. |
/* eslint-disable no-await-in-loop */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { inject, observer } from 'mobx-react';
import { sleep } from '../../helpers/async-helpers';
import SetupAssistant from '../../components/auth/SetupAssistant';
import ServicesStore from '../../sto... | The base class for the setupAssistantScreen. |
import React from 'react'
import {storiesOf} from '@storybook/react'
import Image from '.'
storiesOf('Image', module)
.add('default', () => <Image src="http://placehold.it/200x200" alt="placeholder image" />)
.add('inline', () => <Image src="http://placehold.it/200x200" inline alt="placeholder image" />)
.add('... | Devuelve un objeto Image |
import React from 'react';
import './SearchUrl.css';
function SearchUrl(props) {
const searchUrl = decodeURI(props.searchUrl.substring(59));
return (
<div className="SearchUrl">
<code>{searchUrl}</code>
</div>
);
}
export default SearchUrl;
| The SearchUrl component |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import Chart from '../components/chart';
import GoogleMap from '../components/google_map';
class WeatherList extends Component {
renderWeather(cityData) {
const name = cityData.city.name;
const temps = _.map(cityData.list.map( ... | The component that is used to display a list of all possible weather in a single table. |
import React from 'react'
const Footer = (props) => {
return (
<footer>
<p>
AnhHT © 2015
</p>
</footer>
)
}
export default Footer
| React - specific module that exports a Footer |
import App from 'next/app'
import React from 'react'
import { ThemeProvider } from 'styled-components'
const theme = {
colors: {
primary: '#0070f3'
}
}
export default class MyApp extends App {
render () {
const { Component, pageProps } = this.props
return (
<ThemeProvider theme={theme}>
... | Extend the base App class with a theme provider. |
import React from 'react'
import { connect } from '@cerebral/react'
import { state, signal } from 'cerebral/tags'
import counts from '../../computed/counts'
import classnames from 'classnames'
const filters = ['All', 'Active', 'Completed']
export default connect(
{
filter: state`filter`,
counts,
filterC... | Generate a footer of a single missing - node node. |
import React from 'react'
import PropTypes from 'prop-types'
import Circle from './internal/components/Circle'
import Example from './internal/components/Example'
import { COLOR_A, COLOR_B, COLOR_C } from './internal/styles'
import { withAnimatronics, withControl } from '../../../src'
const START_SCALE = 'scale(0.8)'... | export default protected missing - node - type props from React |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import MenuItem from 'Components/Menu/MenuItem';
class AddImportListPresetMenuItem extends Component {
//
// Listeners
onPress = () => {
const {
name,
implementation
} = this.props;
this.props.onPress({
... | Add a menu item that adds a menu item to a menu list preset. |
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import StatusListContainer from '../../ui/containers/status_list_container';
import { expandPublicTimeline } from '../../../actions/timelines';
import Column from '../../../components/column';
import ColumnHeader from ... | The public timeline component |
import React from 'react'
import store from 'store'
import compose from 'recompose/compose'
import withState from 'recompose/withState'
import withHandlers from 'recompose/withHandlers'
import '../styles/switch.css'
const enhance = compose(
withState('checked', 'switchToggle', props => store.get(props.identifier)),
... | Devuelve un objeto React |
import React, { Component } from 'react';
import Board from './Board';
import { observe } from './Game';
/**
* Unlike the tutorial, export a component so it can be used on the website.
*/
export default class ChessboardTutorialApp extends Component {
constructor(props) {
super(props);
this.unobserve = obse... | The ChessboardTutorialApp class |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { login } from '../../actions';
import { connect } from 'react-redux';
class Login extends Component {
back = (e) => {
e.preventDefault();
const { history } = this.props;
history.goBack();
}
submit = (e) => {
e.prevent... | Login component that displays a modal dialog with a login form. |
import React from 'react';
import Item from './Item';
import Wrapper from './Wrapper';
function ListItem(props) {
return (
<Wrapper>
<Item>
{props.item}
</Item>
</Wrapper>
);
}
ListItem.propTypes = {
item: React.PropTypes.any,
};
export default ListItem;
| ListItem exports a single item in a sequence of items that can be found in a sequence of items. |
import React, { Component } from 'react';
import Lightbox from 'react-image-lightbox';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
class Gallery extends Component {
constructor(props) {
super(props);
this.state = {
photoIndex: 0,
isOp... | A component that renders a list of images that can be painted with a link to a picture. |
import React from 'react'
import { Route, IndexRoute } from 'react-router'
import redirect from './utils/redirect'
import { getBasePath } from './utils/router'
import App from './components/App/App'
import Setup from './components/Setup/Setup'
import Token from './components/Setup/Token/Token'
import SinceDate from ... | Imports a single from a given path. |
import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React from 'react';
import PanelGroup from '... | A component that is a component that can be rendered by a panel group. |
import React from 'react';
const First = React.createNotClass({
displayName: 'First'
});
class Second extends React.NotComponent {}
| The first component of a sequence is a |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationArrowUpward = (props) => (
<SvgIcon {...props}>
<path d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"/>
</SvgIcon>
);
NavigationArrowUpward = pure(NavigationArrowUpward);
NavigationA... | A component that exports a navigation arrow upward to the top of a group of icons. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionTurnedIn = (props) => (
<SvgIcon {...props}>
<path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"/>
</SvgIcon>
);
ActionTurnedIn = pure(ActionTurnedIn);
ActionTurnedIn.displayName = 'Ac... | A component that renders a series of icons in a group of icons. |
import React from 'react';
/* components */
import { Home } from '../../components/Home';
export const HomeContainer = () =>
<section>
<Home />
</section>;
| export a sequence of tokens |
import React from 'react';
import PropTypes from 'prop-types';
import Paneset from '../Paneset';
import LoadingPane from './LoadingPane';
const LoadingView = ({ panesetProps, ...props }) => (
<Paneset {...panesetProps}>
<LoadingPane {...props} />
</Paneset>
);
LoadingView.propTypes = {
panesetProps: PropTyp... | export default LoadingView |
import React from 'react';
import { Navbar, Nav, NavItem } from 'react-bootstrap';
import { LinkContainer } from 'react-router-bootstrap';
module.exports = React.createClass({
render: function() {
return (
<div className="cabecalho">
<Navbar collapseOnSelect fixedTop>
<Navbar... | Private function to create a single node |
/**
* Created by syrel on 23.05.17.
*/
import React from 'react';
import PresentationComponent from './PresentationComponent';
import Presentation from './Presentation';
class IFrameComponent extends PresentationComponent {
defaultDisplayedValue() {
return 'about:blank';
}
iframe() {
re... | Generates a component that can be used to render a single element in a UI. |
import PropTypes from 'prop-types';
import React from 'react';
import MenuContent from 'Components/Menu/MenuContent';
import SortMenu from 'Components/Menu/SortMenu';
import SortMenuItem from 'Components/Menu/SortMenuItem';
import { align, sortDirections } from 'Helpers/Props';
import translate from 'Utilities/String/t... | Create a menu with a single menu item for a specific sort key. |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import IconAvaWrapper from '../IconAvaWrapper';
import Spacer from '../Spacer';
import LabelNumberDisplay from '../LabelNumberDisplay';
import styles from './styles.css';
function FootprintCategoryEdit(props) {
return... | Displays a FootprintCategoryEdit with a single node. |
import 'babel-polyfill'
import React from 'react'
import ReactDOM from 'react-dom'
import { applyMiddleware, compose, createStore, combineReducers } from 'redux'
import { Provider } from 'react-redux'
import { Router, Route, IndexRoute } from 'react-router'
import createHistory from 'history/lib/createHashHistory'
impo... | Imports a single node and renders it as a hidden hidden component. |
import React from 'react';
import InlineSVG from 'react-inlinesvg';
class SVG extends React.PureComponent {
render() {
const { hasError, updateProps, idyll, ...props } = this.props;
if (!this.props.src) {
return <svg {...props} />;
}
return <InlineSVG {...props} />;
}
}
SVG.defaultProps = {
... | A component that renders a single node in a group of nodes. |
import React from 'react'
import { connect } from 'react-redux'
import ListSubheader from 'material-ui/List/ListSubheader'
import List, { ListItem, ListItemText } from 'material-ui/List'
export default connect(mapStateToProps)(({
breakRoom,
motionsById
}) =>
<List>
<ListSubheader
disableSticky
>
... | React - Redux - compatible function to create a sequence of missing items. |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M20 18v-1c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2v1H0v2h24v-2h-4zM4 5h16v10H4V5z" /></g>
, 'LaptopWindows');
| Create a series of icons for a single element in a window. |
import React from 'react';
import { Link } from 'react-router';
const Product = () => {
return(
<div className="product section">
<img src="dist/images/pr_1.jpg" />
<Link to="/order">
<img src="dist/images/pr_2.jpg" />
</Link>
<img src="dist/imag... | Demonstration of the product system. |
'use strict';
/*
* Module Definition
*
*/
import React from 'react';
import { getClassNames } from '../utils/index';
import DefinitionList from './presentational/DefinitionList';
/*
* Class Definition
*
*/
class Hours extends React.Component {
constructor(props) {
super(props);
this.state = {
... | The base class for all of the possible store hours. |
import React from 'react';
import Transition from './Transition';
class Fade extends React.Component {
render() {
return (
<Transition
{...this.props}
className='fade'
enteredClassName='in'
enteringClassName='in'
>
{this.props.children}
</Transition>
... | A fade animation class that can be used to fade out or show a component. |
import React from 'react';
import PropTypes from 'prop-types';
const Soon = () => (
<div>
<article className="glitch">
<span>ALWAYS Ɐ WIP</span>
</article>
</div>
);
export default Soon;
| export default Soon |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
| Imports a single node in the DOM. |
import React from 'react';
import { Loader } from '../widgets';
const Contact = () => {
return (
<div className="text-center">
<Loader />
</div>
);
};
export default Contact;
| export Contact function |
import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import Column from './column';
import ColumnHeader from './column_header';
import ColumnBackButtonSlim from '../../../components/column_back_button_slim';
import IconButton from '../../../components/... | A component that displays a bundle column error. |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const ContentBlock = (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 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 ... | ContentBlock is a component that can be used to render a series of content blocks. |
import React from 'react';
import { validate, TITLE_REX, URL_REX } from '../validator';
import fetch from 'isomorphic-fetch';
import ContentEditable from './content-editable';
export default class ShareForm extends React.Component {
state = {
title: '',
link: '',
body: '',
titleError: false,
titl... | The main component of the form that is rendered when a user clicks on a post. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageTimer3 = (props) => (
<SvgIcon {...props}>
<path d="M11.61 12.97c-.16-.24-.36-.46-.62-.65-.25-.19-.56-.35-.93-.48.3-.14.57-.3.8-.5.23-.2.42-.41.57-.64.15-.23.27-.46.34-.71.08-.24.11-.49.11-.73 0-.55-.09-1.... | A component that creates a sequence |
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 displays a group of buttons with a vertical state. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageMovieCreation = (props) => (
<SvgIcon {...props}>
<path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/>
</SvgIcon>
);
ImageMovieCreati... | A component that creates a single image movie in a sequence of icons. |
import React from 'react';
import createReactClass from 'create-react-class';
import Wizard from './Wizard';
export default createReactClass({
render: function() {
const { modelName } = this.props;
const {
schema,
fieldMap,
actionMap,
steps,
data,
validators,
fields,... | Create a single missing - field class with no children. |
import React from 'react'
import ReactDOM from 'react-dom'
import $ from 'jquery'
const PropTypes = React.PropTypes;
export function noop() {
}
export function isEmpty(thing) {
return thing == null || thing === '';
}
export function isObject(thing) {
return typeof thing === "object" && !!thing;
}
export fu... | This module is exported to provide a function that can be used to create a widget with a specific name. |
import React from 'react'
import NavBar, { NavBarLink as Link } from 'components/navbar'
import './styles.scss'
const MasterLayoutComponent = ({ children }) => {
return (
<div>
<NavBar>
<Link label='Home' to='/'/>
<Link label='Profile' to='/account/profile'/>
<Link label='Logout' ... | The master layout component |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentContentCut = (props) => (
<SvgIcon {...props}>
<path d="M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-... | A component that can be used to render a series of icons. |
import React from 'react';
class tooltipData extends React.Component {
constructor(props) {
super(props);
this.change = this.change.bind(this);
}
change(e) {
if (this.props.data.type === 'checkbox') {
this.props.changeField(this.props.id, e.target.checked);
} else {
this.props.changeF... | A component that can be used to show a tooltip when a field is selected. |
import React from 'react'
import PropTypes from 'prop-types'
import Link from 'gatsby-link'
import Helmet from 'react-helmet'
import './index.css'
import logo from './logo.svg'
const ListLink = props =>
<li style={{ display: `inline-block`, marginRight: `1rem` }}>
<Link to={props.to} style={{ textDecoration: 'n... | The main function for the Index. |
import React from 'react'
export const scrollToTop = e => {
let position = window.pageYOffset
let time = 0
let percentage
if (e) {
e.preventDefault()
}
// The easing function is an easeInOutQuad function.
const easing = function (time) {
return time < 0.5 ? 2 * time * time : -1 + (4 - 2 * time... | The function that displays a single nagios element in the page. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionBookmarkBorder = (props) => (
<SvgIcon {...props}>
<path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"/>
</SvgIcon>
);
ActionBookmarkBorder = pure(ActionBook... | ActionBookmarkBorder exports action - bookmark - border for a node |
// @flow
import React from 'react';
import classNames from 'classnames';
import { createWrappedComponent } from '../util/boldrui';
export type Props = {
tag?: string,
className?: string,
isTransparent?: boolean,
};
export function HeroVideo({ tag = 'div', ...props }: Props) {
const className = classNames(
... | Hero video wrapper |
import React from 'react';
export default class BookCreator extends React.Component{
constructor(props)
{
super(props);
this.state = { titel: "emptystring", autor: "emptystring" };
this.handleTitelChange = this.handleTitelChange.bind(this);
this.handleAutorChange = this.ha... | The BookCreator component creates a book from the input field of type Titel and Autor. |
import React from 'react';
import warning from 'warning';
let hasWarned;
const warn = () => {
warning(hasWarned, 'The \'material-ui/lib/mixins/style-propable.js\' mixin has been deprecated.' +
' Please do not use this mixin as it will be removed in an upcoming release.');
hasWarned = true;
};
export const mer... | A mixin for style - propable. js. |
import React from 'react';
import {BaseMixin, ElementaryMixin, SectionMixin} from './../common/common.js';
import {Button} from './../bricks/bricks.js';
import FormMixin from './mixins/form-mixin.js';
import './basic-form.less';
export const BasicForm = React.createClass({
mixins: [
BaseMixin,
ElementaryMi... | The basic form has a series of child components that are rendered by a Bootstrap Bootstrap |
import Link from 'found/Link';
import PropTypes from 'prop-types';
import React from 'react';
import { createFragmentContainer, graphql } from 'react-relay';
import RemoveCompletedTodosMutation from '../mutations/RemoveCompletedTodosMutation';
const propTypes = {
viewer: PropTypes.object.isRequired,
relay: PropTy... | A component that shows a footer showing the number of todo entries that have been completed. |
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../ui/components/column';
import {
refreshTimeline,
updateTimeline,
deleteFromTimelines
} from '../../actions/timeline... | The hashtag timeline component which is used to display a timeline of hashtags. |
/**
* 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.
*
* @flow
*/
import React from 'react';
class Custom {
_number = 42;
get number() {
return this._number;
}
}
export def... | A component that can be used to create a custom object that can be used to create a child component. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let ControlPoint = props =>
<SvgIcon {...props}>
<path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.5... | A component that can be used to render a series of missing components. |
import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import SafeAnchor from './SafeAnchor';
const NavItem = React.createClass({
mixins: [BootstrapMixin],
propTypes: {
linkId: React.PropTypes.string,
onSelect: React.PropTypes.func,
active: React... | Create a Bootstrap - styled navigation item that can be used to link to a Bootstrap - styled button. |
import React from 'react';
import {BaseMixin, ElementaryMixin} from './../common/common.js';
import TextInputMixin from './text-input-mixin.js';
import {Glyphicon} from './../bricks/bricks.js';
import './file.less';
export default React.createClass({
mixins: [
BaseMixin,
ElementaryMixin,
TextInputMixi... | The default component that creates a file input that can be used to enter a file. |
import { Box, Flex, Margins } from '@rocket.chat/fuselage';
import React from 'react';
import { Histogram } from './Histogram';
export default {
title: 'admin/enterprise/engagement/data/Histogram',
component: Histogram,
decorators: [(fn) => <Margins all='x16'>
<Flex.Container>
<Box children={fn()} style={{ he... | export default configuration for missing missing components |
import React, { Component } from 'react';
class Button extends Component {
handleClick(){
alert('戳我干嘛!');
}
render(){
const style = require('./Button.less');
return (
<button className="my-button" onClick={this.handleClick.bind(this)}>
快戳我
</button>
);
}
}
export default B... | Button class. |
import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
export default createDevTools(
<DockMonitor
toggleVisibilityKey="ctrl-h"
changePositionKey="ctrl-w"
>
<LogMonitor />
... | createDevTools creates a new devtools object with a single node with a single hierarchy of React elements. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.