code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react'
import { Grid, Menu } from 'stardust'
// TODO: Update <Menu> usage after v1 API
const { Column, Row } = Grid
const GridTextAlignmentCenterExample = () => (
<Grid textAlign='center' columns={3}>
<Row>
<Column>
<Menu className='vertical fluid'>
<Menu.Item classNa... | Imports a single node from React. |
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 new Tab with a matching eventKey and a navigation item. |
import React from 'react';
class Announcement extends React.Component {
render () {
var { courseId, announcementId } = this.props.params;
var { title, body } = COURSES[courseId].announcements[announcementId];
return (
<div>
<h4>{title}</h4>
<p>{body}</p>
</div>
);
}
}
... | A component that renders an announcement if it exists. |
/**
*
* ToggleOption
*
*/
import React from 'react';
import { injectIntl, intlShape } from 'react-intl';
const ToggleOption = ({ value, message, intl }) => (
<option value={value}>
{message ? intl.formatMessage(message) : value}
</option>
);
ToggleOption.propTypes = {
value: React.PropTypes.string.isRequir... | A function to toggle a specific option in a dropdown. |
import React from 'react';
import { canUseDOM, setWindowScrollPosition } from './DOMUtils';
import NavigationTypes from './NavigationTypes';
var { func } = React.PropTypes;
function getCommonAncestors(branch, otherBranch) {
return branch.filter(route => otherBranch.indexOf(route) !== -1);
}
function shouldUpdateSc... | The base implementation of the scroll position update logic. |
import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import Post from '../post';
storiesOf('core.Post', module)
.add('default view', () => {
const post = {
title: 'React storybook is great',
content: `
Lorem ipsum dolor sit amet, consectetur adipisicing elit,
... | Adds a default view and saving functions to the given object. |
import React from 'react';
import {Component} from 'react';
import MiniPhoto from "./MiniPhoto";
import {connect} from 'react-redux';
import Photo from './Photo';
import { selectMarker, } from '../actions';
import {
firebaseConnect,
isLoaded,
isEmpty,
dataToJS
} from 'react-redux-firebase';
class PhotoSlider e... | A component that renders a single marker when the user clicks on a marker key. |
/**
* app.js
*
* This is the entry file for the application,
* only setup and plugin code.
*/
import React from 'react';
import { Provider } from 'react-redux';
import { syncHistoryWithStore } from 'react-router-redux';
import App from 'containers/App'; // eslint-disable-line
import { selectLocationState } from '... | Component which is the main entry point for the middleware. |
import React from 'react';
import { TabNavigator } from 'react-navigation';
import Ongoing from '../screens/ongoing';
import Timeline from '../screens/timeline';
import Profile from '../screens/profile';
import { HEIGHT } from '../global';
import Icon from '../resources/icon';
export const Tabs = TabNavigator(
{
... | Imports a single Navigator from the given modules. |
import './favicon.ico';
/* eslint-disable global-require */
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import store from './store';
import Home from './scenes/Home';
if (process.env.NODE_ENV !== 'production') {
React.Perf = require('react-addons-perf');
}... | Imports a single node in the DOM and renders it as a hidden hidden element. |
import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { addTag } from 'Store/Actions/tagActions';
import createTagsSelector from 'Store/Selectors/createTagsSelector';
import TagInput ... | Creates a component that can be used to handle a tag input. |
import React from 'react'
import DigitalReadout from '../components/DigitalReadout'
function LaserPanel({
laser,
handleZeroLaserClick,
handleTakeMeasurementClick,
}) {
return (
<div>
<DigitalReadout reading={laser.value} />
<button
onClick={handleZeroLaserClick}
>
{'Zero L... | The laser panel is a panel |
import React from 'react';
import PropTypes from 'prop-types';
import SelectBox from '@neos-project/react-ui-components/src/SelectBox/';
import backend from '@neos-project/neos-ui-backend-connector';
import {neos} from '@neos-project/neos-ui-decorators';
import {connect} from 'react-redux';
import {selectors} from '@ne... | A component that displays a list of plugins that can be selected by a node. |
import React from 'react';
import { canUseDOM, setWindowScrollPosition } from './DOMUtils';
import NavigationTypes from './NavigationTypes';
var { func } = React.PropTypes;
function getCommonAncestors(branch, otherBranch) {
return branch.filter(route => otherBranch.indexOf(route) !== -1);
}
function shouldUpdateSc... | The base implementation of the scroll position update logic. |
import React from 'react';
import ReactDOM from 'react-dom';
import Counter from './Counter';
document.addEventListener('DOMContentLoaded', function() {
ReactDOM.render(
React.createElement(Counter),
document.getElementById('mount')
);
});
| Imports the React component and renders it into the DOM. |
import React from 'react';
import PropTypes from 'prop-types';
import Textarea from 'components/Texts/Textarea';
import LongText from 'components/Texts/LongText';
import Button from 'components/Button';
import { renderCharLimit, stringIsEmpty } from 'helpers/stringHelpers';
import { edit } from 'constants/placeholders'... | descriptionExceedsCharLimit onEdit onEditCancel onEditFinish onEditFinish function |
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... | The default implementation of the link - based field that opens a link in a new tab. |
import React from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'
import 'firebase/firestore'
export async function getStaticPaths() {
return {
paths: [
'/blog/post-1',
{ params: { post: 'post-2' } },
'/blog/[post3]',
'/blog/post-4',
'/blog/post.1',
... | Get a static configuration object that can be used to generate a link to a page. |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import 'babel-core/polyfill';
import path from 'path';
import express from 'express';
import bodyParser from 'body-parser';
import React from 'react';
import ReactDOM from 'react-dom/server';
import Router from './routes';
import Html from './com... | Register the API middleware and the server - side rendering |
import React from 'react';
module.exports = (file) => {
if (file.gist) {
let mailLink = `mailto:?body=${file.gist}`;
return <a href={mailLink}><button>Send Gist Link as Email</button></a>;
} else {
return null;
}
};
| JSX plugin to generate a link to the gist if it exists. |
import React, { Component } from 'react';
const PICKUP_COLOR = [114, 19, 108];
const DROPOFF_COLOR = [243, 185, 72];
export function renderLayers(props) {
return [];
}
| A component that can be rendered by a component that is not a component of a component s children. |
import React from 'react';
import PropTypes from 'prop-types';
import { withProps } from 'recompose';
import SkeletonTable from './SkeletonTable';
import Loader from 'components/Loader';
import ScrollShadow from 'behaviors/ScrollShadow';
import RowDetails from './TableRowDetails';
import Header from './TableHeader';
... | A component that renders a table with a series of children. |
import React, { Component } from 'react';
import ReactDom from 'react-dom';
import update from 'react/lib/update';
import { AnimateGroup, configSpring } from 'react-smooth';
class GroupAnimation extends Component {
state = {
list: [{
text: 'first...',
}, {
text: 'second...',
}, {
text: ... | Package for animation of a group. |
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withI18n } from 'react-i18next';
// a pure component using the `t` function
const SayWelcomeComponent = ({ t }) => (
<div>
{t('Welcome to React')}
<div style={{ marginTop: 40, fontSize: 14, color: '#666' }}>
toggle langua... | a pure component using a function that can be used to show a warning in the user |
import React from 'react'
import Title from '../components/Title'
export default React.createClass({
propTypes: {
children: React.PropTypes.array
},
componentDidMount () {
window.google.identitytoolkit.signInButton(
'#gitkit', // accepts any CSS selector
{
widgetUrl: '/auth/login',
... | The default implementation of a single node in a window. |
import React from 'react'
import PropTypes from 'prop-types'
import style from './entry-list.styles'
import classNames from 'classnames'
import isEqual from 'lodash.isequal'
class EntryListItem extends React.Component {
shouldComponentUpdate (nextProps, nextState) {
if (this.props.retired !== nextProps.retired) ... | A component that adds a single non - zero number to a list of entries. |
import React from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
type Props = {
}
export class <%= pascalEntityName %> extends React.Component {
props: Props;
render() {
return (
<div></div>
)
}
}
const mapStateToProps = (state) => {
return {}
}
const ... | React - related |
// (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 node in the hierarchy of components. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalCafe = (props) => (
<SvgIcon {...props}>
<path d="M20 3H4v10c0 2.21 1.79 4 4 4h6c2.21 0 4-1.79 4-4v-3h2c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2zm0 5h-2V5h2v3zM2 21h18v-2H2v2z"/>
</SvgIcon>
);
MapsLocalCa... | A component that exports a sequence of objects that can be used to render a sequence of objects. |
import React from 'react';
import { Link } from 'react-router';
import './Menu.scss';
const Menu = () => (
<nav className="sitemap">
<ul>
<li>
<Link to="/">Default</Link>
</li>
<li>
<Link to="/display">Display</Link>
</li>
<li>
<Link to="/edit">Edit</Link>
... | export default menu |
import React from 'react';
import FormGroup from './FormGroup';
export default class StaticField extends React.Component {
render() {
return (
<FormGroup label={this.props.label + ":"}>
<p className="form-control-static">
{this.props.children}
... | A component that renders a sequence of conditions that can be found in a form. |
import React, { Component } from 'react';
import { Icon, Tooltip } from 'antd';
import { application } from '../../share/config/globalConfig';
import { lang } from '../../share/config/lang';
import './style.less';
export default class Store extends Component{
constructor(props) {
super(props);
}
... | A component that shows a dialog if no key sequence is found. |
import React from 'react';
import { Component } from 'react';
function getIcon(isFavorite){
return (isFavorite) ? "fa-heart" : "fa-heart-o";
}
export default (props) => {
return(
<div className="media__action favorite" onClick={() => props.setFavorite(props.resourceId)} title="Favorito">
<i className={"fa " + ... | The default component that displays a dialog with a Favorite state. |
import style from './app.sass'
import React from 'react'
import ReactDOM from 'react-dom'
import { Output } from './components/output'
{
window.addEventListener('DOMContentLoaded', () => {
ReactDOM.render(
<Output welcome="Boilerplate" />,
document.querySelector('[data-app]')
)
}, false)
}
| Imports a single node in the DOM. |
import React, { Component } from 'react';
import cx from 'classnames';
class TabCtrl extends Component {
render() {
const { active, children, ...props } = this.props;
props.className = cx({
'flat-tabs__ctrl--active': active
}, props.className, 'flat-tabs__ctrl');
return (
<li {...props}>
... | A component that renders a single child |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentRemoveCircle = (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 2zm5 11H7v-2h10v2z"/>
</SvgIcon>
);
ContentRemoveCircle = pure(ContentRemoveCir... | A component that can be used to render a missing - content block in a solid solid. |
// <ConnectedCourier>
// ==================
// Couriers are like timelines only for notifications! I took the
// name "courier" from monsterpit.net since upstream calls this
// component "Notifications", which is confusing when you also have
// singular `<Notification>` components.
// * * * * * * * //
// I... | Component that defines a single non - default non |
import React from 'react'
import {observer} from 'mobx-react'
import {Container,Row,Col} from 'react-grid-system'
import SocialShare from './socialshare'
import FlagMail from './mailFlag'
import FloatingActionButton from 'material-ui/FloatingActionButton'
import FontIcon from 'material-ui/FontIcon'
import FlatBu... | Create a component that has a unique name and display name. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationCallReceived = (props) => (
<SvgIcon {...props}>
<path d="M20 5.41L18.59 4 7 15.59V9H5v10h10v-2H8.41z"/>
</SvgIcon>
);
CommunicationCallReceived = pure(CommunicationCallReceived);
CommunicationCa... | A function to export a communication call received object from a node in a hierarchy. |
import React from 'react';
const AnchorIcon = <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="link" className="svg-inline--fa fa-link" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.... | A component that shows a link to the current color of a sequence of components. |
import React from 'react'
import { Button } from 'shengnian-ui-react'
const ButtonExampleCircularSocial = () => (
<div>
<Button circular color='facebook' icon='facebook' />
<Button circular color='twitter' icon='twitter' />
<Button circular color='linkedin' icon='linkedin' />
<Button circular color='... | The buttonExampleCircularSocial export class |
import 'babel-core/polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createHistory, useBasename } from 'history';
import { Router, Route, Link } from 'react-router';
import storeManager from '../../src/client/store/storeManager.js';
import PageFor... | Initialize a page desk. |
import React from 'react';
import EntypoIcon from '../EntypoIcon';
const iconClass = 'entypo-svgicon entypo--MousePointer';
let EntypoMousePointer = (props) => (
<EntypoIcon propClass={iconClass} {...props}>
<path d="M10.8601685,11.9953299l2.5251465,6.0802317L11.1703491,19l-2.5252075-6.050354L5,16.6248779... | The default EntypoMousePointer implementation. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Map } from 'immutable';
import tooltipFactory from 'react-toolbox/lib/tooltip';
import MaterialLink from 'react-toolbox/lib/link';
import styled from 'styled-components';
const ButtonWrapper = styled.div`
display: flex;
align-it... | A component that can be used to display a list of items in a group of components. |
import React, { Component } from 'react';
import ArticleStore from '../Stores/Article';
import { Link } from 'react-router'
import dateFormat from 'dateformat';
const articleCount = 5;
let getState = (props) => {
return {
articles: ArticleStore.getArticles(articleCount)
};
};
class LatestArticles extends Com... | Component that displays a list of articles that can be found in a series of articles. |
import React from 'react';
/**
* Maps children that are typically specified as `props.children`,
* but only iterates over children that are "valid components".
*
* The mapFunction provided index will be normalised to the components mapped,
* so an invalid component would not increase the index.
*
* @param {?*} ... | Determines if the Child container has one or more valid components. |
/**
* React Component for the warnings.
*/
import React from 'react'
import Immutable from 'immutable'
class SegmentWarnings extends React.Component {
constructor(props) {
super(props)
this.state = {}
}
componentDidMount() {}
componentWillUnmount() {}
shouldComponentUpdate(nextProps) {
retu... | A component that shows a warning or error in the warning tree. |
import React, { Component } from 'react';
import sinon from 'sinon';
import Autosuggest from '../../src/Autosuggest';
import languages from '../plain-list/languages';
import { escapeRegexCharacters } from '../../demo/src/components/utils/utils.js';
const getMatchingLanguages = value => {
const escapedValue = escapeR... | The base class for all autocompletion of a single node. |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M20 6.83V20H6.83L20 6.83M22 2L2 22h20V2z" /></g>
, 'SignalCellularNull');
| Create a signal cellular null icon in the tree. |
import _ from 'lodash';
import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
import DialogActionCreators from 'actions/DialogActionCreators';
import LoginStore from 'stores/LoginStore';
import AvatarItem from 'components/common/AvatarItem.react';
const {addons: { Pure... | A component that renders a group - profile - members list. |
import React from 'react';
import Icon from './icon.js';
import ObjectProperties from './object-properties.js';
import ObjectSearch from './object-search.js';
import ObjectStack from './object-stack.js';
export default class TabView extends React.Component {
constructor() {
super();
this.state = {
... | A tab view that displays a list of objects that can be filtered by a user. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationPhone = (props) => (
<SvgIcon {...props}>
<path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61... | A component that exports a communication phone. |
import React from 'react'
import { Table } from 'shengnian-ui-react'
const TableExampleLarge = () => (
<Table size='large'>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Name</Table.HeaderCell>
<Table.HeaderCell>Status</Table.HeaderCell>
<Table.HeaderCell>Notes</Table.HeaderCell>
... | This function imports a sequence of objects from the React module. |
import React, { Component } from 'react';
class Table extends Component {
constructor(props) {
super(props);
this.state = {
login: null,
user: null
}
this.createTable = this.createTable.bind(this);
this.detailView = this.props.detailView.bind(this);
}
createTable(){
let branch... | A component that is rendered as a table in a table container. |
import React from 'react';
const Nav = ({ children }) => (
<ul className="nav flex-column">
{children}
</ul>
);
export default Nav;
| Navigate to a in a nav - column. |
import React from 'react';
const Repos = React.createClass({
render() {
return (
<div>
User Profile <br />
Username: {this.props.username}<br />
Repos: {this.props.repos}
</div>
);
}
});
export default Repos;
| Create a new object with the default repos and the user profile |
import React from 'react'
import Helmet from 'react-helmet'
import styled from 'styled-components'
import { media } from '../utils/style'
import Profile from './Profile'
const Content = styled.div`
padding: 120px 50px;
transition: all 0.3s ease;
${media.mobile`padding: 100px 20px;`}
background-color: var(--bg-... | A component that renders a single in a Helmet layout. |
import React from 'react';
import classNames from 'classnames';
class FormGroup extends React.Component {
render() {
let classes = {
'form-group': !this.props.standalone,
'form-group-lg': !this.props.standalone && this.props.bsSize === 'large',
'form-group-sm': !this.props.standalone && this.pr... | A component that renders a form group with a series of children. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePortrait = (props) => (
<SvgIcon {...props}>
<path d="M12 12.25c1.24 0 2.25-1.01 2.25-2.25S13.24 7.75 12 7.75 9.75 8.76 9.75 10s1.01 2.25 2.25 2.25zm4.5 4c0-1.5-3-2.25-4.5-2.25s-4.5.75-4.5 2.25V17h9v-.75zM... | A component that exports a sequence of images. |
import React from 'react'
import { Message } from 'semantic-ui-react'
const MessageExampleWarningProps = () => (
<Message
warning
header='You must register before you can do that!'
content='Visit our registration page, then try again.'
/>
)
export default MessageExampleWarningProps
| Warning warning on missing message |
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* 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';
import { red, redTransparent } from '../styles';
const navigationBarStyle = {
marginBottom: '0... | Renders a single missing - node node in the tree that is a child of a navigation bar. |
import React from 'react';
import Icon from './Icon';
const Smile = props => (
<Icon viewBox="0 0 512 512" {...props}>
<path d="M256 56c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m0-48C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.03... | A component that displays a smile of a sequence of components. |
import React from 'react';
import PropTypes from 'prop-types';
import { Box } from 'axs';
const styles = {
progressContainer: {
height: 3,
position: 'relative',
},
progressBar: {
height: '100%',
transformOrigin: 'left center',
position: 'absolute',
},
};
const ProgressBar = ({ progress }) ... | Imports a single by default. |
import _ from 'lodash'
import React from 'react'
import PropTypes from 'prop-types'
const StudentListItem = ({ studentID, fullName, handleClick, children }) => {
return (
<li>
{studentID} -
{fullName} -
{React.Children.map(children, (child) => React.cloneElement(child, { studentID }))}
</... | A function to create a sequence of nested nodes that can be used to create a sequence of nested nodes. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesSmokingRooms = (props) => (
<SvgIcon {...props}>
<path d="M2 16h15v3H2zm18.5 0H22v3h-1.5zM18 16h1.5v3H18zm.85-8.27c.62-.61 1-1.45 1-2.38C19.85 3.5 18.35 2 16.5 2v1.5c1.02 0 1.85.83 1.85 1.85S17.52 7.2 16.... | A component that exports a series of icons that can be used to visualize the state of |
import React from 'react'
import PropTypes from 'prop-types'
import { Router } from 'dva/router'
import App from './routes/app'
const registerModel = (app, model) => {
if (!(app._models.filter(m => m.namespace === model.namespace).length === 1)) {
app.model(model)
}
}
const Routers = function ({ history, app ... | Define router for all non - terminal components |
/**
*
* Menu
*
*/
import React from 'react';
import AppBar from 'material-ui/AppBar';
import IconButton from 'material-ui/IconButton';
import Drawer from 'material-ui/Drawer';
import MenuItem from 'material-ui/MenuItem';
import NavigationClose from 'material-ui/svg-icons/navigation/close';
import ArrowDropRight from ... | Menu - menu for menu items |
/**
* React Native App
* https://github.com/ztplz/CNode-react-native
* email: mysticzt@gmail.com
*/
import React, { Component } from 'react';
import {
View,
Text,
TouchableHighlight,
StyleSheet
} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import { pixel } from '../utils/dev... | React Native App |
import React from 'react';
import PropTypes from 'prop-types';
import compose from 'recompose/compose';
import mapProps from 'recompose/mapProps';
import getContext from 'recompose/getContext';
import { combineHandlers } from '../utils/compositionUtils';
const enhance = OriginalComponent => compose(
getContext({
... | A component that wraps a and returns a new object with the same properties as the original object. |
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. |
/**
*
* TreeNode
*
*/
import React from 'react';
import styles from './styles.css';
import shortid from 'shortid';
import _ from 'lodash';
import 'aws-sdk/dist/aws-sdk';
const AWS = window.AWS;
import api from '../../api';
const returnJSONSubTree = function returnJSONSubTree(data, prefix) {
const leafData = [];
c... | A component that will render a node in the tree. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageRemoveRedEye = (props) => (
<SvgIcon {...props}>
<path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5... | A component that can be used to remove a red eye from a series of icons. |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const AvLibraryAdd = (props) => (
<SvgIcon {...props}>
<path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/>
</SvgIcon>
);
AvLibraryAdd.displayNa... | Add a component to the top of a sequence of icons. |
import React from 'react';
import ImageScore from './image_score';
const ImageDetail = (props) => {
return (
<li className="media list-group-item">
<div className="media-left">
<img src={props.image.link} />
</div>
<div className="media-body">
<h4 className="media-heading">
... | export default image detail |
import React from 'react'
export default class ResponsiveImage extends React.Component {
render () {
const blurredStyle = {
position: 'fixed',
left: 0,
right: 0,
zIndex: -1,
display: 'block',
backgroundImage: `url('${this.props.image.src}')`,
width: '1200px',
hei... | The ResponsiveImage component is a component that renders a responsive image. |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const EditorFormatItalic = (props) => (
<SvgIcon {...props}>
<path d="M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"/>
</SvgIcon>
);
EditorFormatItalic.displayName = 'EditorFormatItalic';
EditorFormatItalic.muiName = 'SvgIcon';
export default ... | A component that renders a block of icons that are not displayed in the IANA editor. |
// @flow
/**
* Defines something that exists in the world
*/
export type Entity = {
id: string,
name: string,
description: string,
locationId?: string,
type: string
};
// import React from 'react';
// import Thing from './Thing';
//
// export default class Entity extends Thing {
// construct... | This class exports a single object that represents a single non - empty sequence of items in the world. |
//import lib we need
import ReactNative from 'react-native';
import React from 'react'
var Text = ReactNative.Text;
var StyleSheet = ReactNative.StyleSheet;
var Component = React.Component;
//class
class dayItem extends Component {
render(){
return <Text style={styles.day}>
{this.props.day}
</Text>
... | export a component |
import React from 'react';
import {
FlatList,
StyleSheet,
View,
} from 'react-native';
import { List, ListItem } from 'react-native-elements'
import Screen from './Screen';
import Settings from '../Settings'
export default class SettingsScreen extends Screen {
constructor(props) {
super(props)
this.... | export a single node with a single key sequence |
import React from 'react';
import { Flex, Box } from 'reflexbox';
import DialogDataContainer from './DataDialogContainer';
import Chart from './Chart';
import TopBar from './TopBar';
import ExerciseParams from './ExerciseParams';
import Users from './Users';
import Exercises from './Exercises';
import Loader from './... | export default app |
import React from 'react';
export default class Footer extends React.Component {
render() {
return(
<footer>
<a href='https://ruptureit.com/'>RuptureIt</a>
</footer>
);
}
}
| Generate a Footer class. |
import React from 'react'
import PropTypes from 'prop-types'
import SVGDeviconInline from '../../_base/SVGDeviconInline'
import iconSVG from './SwiftOriginalWordmark.svg'
/** SwiftOriginalWordmark */
function SwiftOriginalWordmark({ width, height, className }) {
return (
<SVGDeviconInline
className={'Swif... | SwiftOriginalWordmark exports a single node with a width height and a class name. |
import React from 'react';
import PropTypes from 'prop-types';
import { FlexibleWidthXYPlot as XYPlot, DiscreteColorLegend, XAxis, YAxis, VerticalGridLines, HorizontalGridLines, AreaSeries, LineSeries } from 'react-vis/es';
import { formatDuration } from 'common/format';
import './FocusChart.scss';
const COLORS = {
F... | The base component for the focus bar chart. |
import 'core-js/fn/object/assign';
import React from 'react';
import ReactDOM from 'react-dom';
import AppComponent from './components/Application.react';
import AppUtils from './utils/AppUtils';
AppUtils.initializeImgArrangeArr(); // 初始化图片资源内容
// Render the main component into the dom
ReactDOM.render(<AppComponent /... | Renders the main component into the dom DOM |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalWifi3Bar = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/><path d="M3.53 10.95l8.46 10.54.0... | A component that exports a device - signal - wifi3 - bar. |
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 Column from '../ui/components/column';
import ColumnBackButtonSlim from '../../compo... | The default implementation of a sequence of components that can be rendered as a list of lists. |
import React from 'react';
import FitItemsPopover from 'react-fit-items-popover';
import '../../node_modules/bootstrap/dist/css/bootstrap.css'
import '../../node_modules/react-fit-items-popover/lib/react-fit-items-popover.css'
export default class App extends React.Component {
constructor(props) {
super(props);... | The base class for all of the components that are not part of a specific language. |
import React from 'react';
import ListItem from 'material-ui/lib/lists/list-item';
import Divider from 'material-ui/lib/divider';
import Avatar from 'material-ui/lib/avatar';
import Colors from 'material-ui/lib/styles/colors';
import IconButton from 'material-ui/lib/icon-button';
import MoreVertIcon from 'material-ui/l... | A component that renders a single block of a user. |
import React, { Component } from 'react';
import {
AppRegistry,
} from 'react-native';
import Gigs from './src/gigs';
AppRegistry.registerComponent('Gigs', () => Gigs);
| Imports a component from React and a component - native registry. |
import React from 'react';
import { Text, View, Modal } from 'react-native';
import { CardSection } from './CardSection';
import { Button } from './Button';
const Confirm = ({ children, visible, onAccept, onDecline }) => {
const { containerStyle, textStyle, cardSectionStyle } = styles;
return (
<Modal
v... | export Confirm function |
/* NOTE: this is compatible with react-measure up to 1.4.7 only */
import React from 'react'
import Measure from 'react-measure'
const withMeasure = (
dimensionsToInject = ['width', 'height', 'top', 'right', 'bottom', 'left'],
props = {}
) => WrappedComponent => wrappedComponentProps => (
<Measure {...props}>
... | This is a compatible with react - measure up to 1. 4. 7 only |
import React from 'react'
import { Grid, Image } from 'semantic-ui-react'
const GridExampleResponsiveWidth = () => (
<div>
<Grid>
<Grid.Column mobile={16} tablet={8} computer={4}>
<Image src='http://semantic-ui.com/images/wireframe/paragraph.png' />
</Grid.Column>
<Grid.Column mobile={1... | This function imports a series of missing - width - related components from the semantic - ui - react library. |
import React from 'react';
import IconBase from 'react-icon-base';
export default class FaCaretUp extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m31.4 27.1q0 0.6-0.5 1t-1 0.5h-20q-0.6 0-1-0.5t-0.4-1 0.4-1l10-10q0.4-0.4 1-... | Vaadin - CaretUp |
import React from 'react'
import './textArea.css'
class TextArea extends React.Component {
render () {
const { words, onWordClick, activatedReTexts } = this.props;
return (<div className='textareaContainer'>
{words.map((item, i)=>{
if( activatedReTexts.length>0 ){
... | A component that renders a single word input with a list of words. |
import React from 'react';
import ReactDOM from 'react-dom';
import fetch from 'isomorphic-fetch';
import TextAreaAutocompleter from 'app/TextAreaAutocompleter.js';
import UserSuggester from 'app/UserSuggester.js';
fetch('data.json')
.then(response => response.json())
.then(users => {
let container = document.... | Imports a single user s data and renders it as a text area. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionExplore = (props) => (
<SvgIcon {...props}>
<path d="M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49 1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2... | A component that renders a series of action icons. |
import { graphql } from 'gatsby'
import React from 'react'
import Layout from '../components/layout'
export default ({ data }) => {
const post = data.markdownRemark
return (
<Layout title={post.frontmatter.title} description={post.frontmatter.title}>
<div>
<h1>{post.frontmatter.title}</h1>
... | Generate a filter for a single node. |
import React from 'react';
import _ from 'lodash';
import classNames from 'classnames';
import history from 'lib-app/history';
import i18n from 'lib-app/i18n';
import API from 'lib-app/api-call';
import Icon from 'core-components/icon';
import Button from 'core-components/button';
import Header from 'core-components/... | Package requires for install - step - 2 |
import React from 'react';
class Title extends React.Component{
_getTitleClassName (){
return "title " +
(this.props.className ? this.props.className : "")
}
render(){
return(
<div className={this._getTitleClassName()}>
{this.props.children}
... | Title class for a sequence of children. |
import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... | create a component that wraps a component with a Bootstrap - styled media |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.