code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react'
export default () => (
<div className='header'>
<h1>Friends of Chichester Harbour</h1>
<h3>Registered Charity No: 1051162</h3>
<img src='/images/logo.png' className='letter-logo'></img>
</div>
)
| A component that exports a |
/**
* Client entry point
*/
import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import App from './App';
import { configureStore } from './store';
// Initialize store
const store = configureStore(window.__INITIAL_STATE__);
const mountApp = document.getEleme... | Renders a single node in the DOM that is not part of a react - dom hierarchy. |
import React, { Component } from 'react';
/**
* Button that counts how many times it was pressed and exposes a `@public` method to reset itself.
*/
export default class CounterButton extends Component {
constructor() {
super();
this.state = {
value: 0,
};
}
/**
* Sets the counter to a particular value... | A button that counts how many times it was pressed and exposes a public method to reset itself. |
import React from 'react';
import Router from 'react-router';
import routes from './views/routes';
import { Provider } from 'react-redux';
const getFetchData = (component) => {
return component.fetchData || (component.DecoratedComponent && component.DecoratedComponent.fetchData);
};
export function createTransition... | The default router implementation |
import React from 'react';
import {storiesOf} from '@storybook/react';
import {withKnobs, text} from '@storybook/addon-knobs';
import {StoryWrapper} from './../_lib/storyUtils';
import Badge from '.';
storiesOf('Badge', module)
.addDecorator(withKnobs)
.addWithInfo(
'default',
`The Badge compon... | Add a decorator to the sequence of unknown components. |
import React from 'react';
import Button from 'react-bootstrap/lib/Button';
import Modal from 'react-overlays/Modal';
let rand = ()=> (Math.floor(Math.random() * 20) - 10);
const modalStyle = {
position: 'fixed',
zIndex: 1040,
top: 0, bottom: 0, left: 0, right: 0
};
const backdropStyle = {
...modalStyle,
z... | Define a modal with a single node. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Col, Row } from 'react-bootstrap';
import { calculateStats } from '../../lib/helpers/profileStats';
import i18n from '../../lib/i18n';
import { Copy } from '../../lib/models';
import Spinner from './Spinner';
const styles = {
pr... | Profile stats base class |
import React from 'react';
class Event extends React.Component {
constructor(props) {
super(props);
this.state = {
choosenEvent: ''
};
}
handleEventClick(i){
this.props.changeNumber(this.props.events[i]);
// this.setState({choosenEvent: this.state.events[i]
}
r... | A component that can handle events on a list of events. |
import React, { Component } from 'react';
import { PivotGrid } from '@extjs/reactor/modern';
import SaleModel from '../SaleModel';
import { generateData } from '../generateSaleData'; | Imports a component from React. |
import React, { Component } from 'react';
import '../App.css';
class NewPlayerForm extends Component {
constructor(props) {
super(props);
this.state= {};
this.handlePlayerNameChange = this.handlePlayerNameChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
}
idIndex = 1;
tem... | A component that creates a new player form that can be used to edit a player s name. |
import React from 'react';
import PropTypes from 'prop-types';
import Radio from './Radio';
const Container = ({ children }) => <div>{children}</div>;
Container.propTypes = {
children: PropTypes.node.isRequired
};
const noop = () => {};
export const symbols = {
'Radio/Checked': (
<Container>
<Radio id=... | The default implementation of the missing - node - syntax tree module. |
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
var _excluded = ["className", "label", "inline", "valid", "invalid", "cssModule", "children", "bsSize", "innerRef", "htmlFor"],
_excluded2 = ["type"],
_... | Creates a custom input with no children. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionHttps = (props) => (
<SvgIcon {...props}>
<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-... | A component that exports a sequence of components that can be used to render a sequence of components. |
import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import chipReadmeText from './README';
import ChipExampleSimple from './ExampleS... | The default implementation of that renders a Chip page. |
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter, Route } from 'react-router-dom';
import App from './components/app';
import DataFlowContainer from './components/linkageComponents/dataFlowContainer';
import SampleChart from './components/userComponents/sampleChart';
import SampleTab... | Imports a single node in the DOM. |
import React from 'react';
import { string, bool, oneOf, func } from 'prop-types';
import classNames from 'classnames';
const Button = ({
text,
children,
type,
tooltip,
tooltipPosition,
size,
circle,
className,
full,
loading,
disabled,
onClick,
...rest
}) => {
return (
<button
onC... | The button that is rendered when a user clicks on a button with a non - default value. |
import React from 'react';
import Portal from 'react-portal';
import BootstrapModal from 'components/bootstrapModal';
export default React.createClass({
render() {
let Modal = this.props.modal;
return (
<Portal
openByClickOn={this.props.elementToClick}
... | The default constructor for a modal modal. |
import React from 'react';
import ReactDOM from 'react-dom';
import Paper from 'material-ui/Paper';
import Menu from 'material-ui/Menu';
import MenuItem from 'material-ui/MenuItem';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
var style = {
backgroundColor: "#00BCD4",
color: "#FFF",
b... | The main function for the sequence of functions that are used to render a single single node. |
// This will emulate a full ES6 environment.
import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import Layout from './layout';
render(<Layout />, document.getElementById('root'));
| This is a hack to emulate a full ES6 environment. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationChevronRight = (props) => (
<SvgIcon {...props}>
<path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>
</SvgIcon>
);
NavigationChevronRight = pure(NavigationChevronRight);
NavigationChevronRigh... | A component that exports a navigation chooser right on top of a node. |
import React from 'react';
import MainTemplate from 'components/templates/MainTemplate';
const ContactPage = () => (
<MainTemplate title="Contact">
<div>ContactPage</div>
</MainTemplate>
);
export default ContactPage;
| export a default contact page |
import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import paperReadmeText from './README';
import PaperExampleSimple from './Exampl... | Exports a single non - terminal sequence of non - terminal elements. |
import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const RevealTypesExamples = () => (
<ExampleSection title='Types'>
<ComponentExample
title='Fade'
description='An el... | Generate a RevealTypesExample from a sequence of components. |
import React from 'react'
import ReactEcharts from 'echarts-for-react'
class ChartAPIComponent extends React.Component {
render() {
const option = {
title: {
text: '漏斗图',
subtext: '纯属虚构',
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c}%',
},
... | ChartAPIComponent creates a ChartAPIComponent from a series of components. |
import React from 'react';
import { Container, Button, Table, Jumbotron } from 'reactstrap';
import localizedTexts from '../../text_localization/LocalizedStrings';
import { connect } from 'react-redux';
import { openModal } from '../../actions/openModal';
import api from '../../api';
class AdminCustomersPage extends R... | Component that displays a list of users that can be viewed in a modal window. |
import React from 'react';
import { IndexRoute, Route } from 'react-router';
import Root from './Root';
import Home from './pages/Home';
import Introduction from './pages/Introduction';
import Prerequisites from './pages/Prerequisites';
import Guides from './pages/Guides';
import Faq from './pages/Faq';
import Resour... | This module imports all of the routes that are not part of the system. |
import ajax from './ajax.js';
import style from './style.scss';
import Main from './Main';
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(<Main />, document.getElementById('application'));
| Imports the application and renders it into the main frame. |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Divider from 'material-ui/Divider';
import Drawer from 'material-ui/Drawer';
// components
import { toggleLeftMenu } from '../../../actions/leftMenu';
import MenuItem from '../MenuItem';
import LeftMenuHead fro... | The left menu component |
import React from 'react'
import ConfirmBattle from '../components/ConfirmBattle'
import githubHelpers from '../utils/githubHelpers'
export default React.createClass({
contextTypes: {
router: React.PropTypes.object.isRequired
},
getInitialState() {
return {
isLoading: true,
... | create a single node in the hierarchy of a single node. |
import React from 'react';
import Icon from '../Icon';
export default class SmokingRoomsIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M4 32h30v6H4zm37 0h3v6h-3zm-5 0h3v6h-3zm1.7-16.54c1.23-1.21 2-2.9 2-4.76C39.7 7 36.69 4 33 4v3c2.04 0... | A small small icon that shows the smoking rooms. |
import '../css/reset.css';
import '../css/common.css';
import '../css/main.css';
import '../css/project.css';
import React from 'react';
import { render } from 'react-dom';
import { Router, browserHistory } from 'react-router';
import AsyncProps from 'async-props';
const rootRoute = {
component: 'div',
childR... | Very basic component that can be rendered by a component in a browser. |
import React from 'react';
import { StatusBar } from 'react-native';
import styleToBarStyle from './styleToBarStyle';
import useColorScheme from './useColorScheme';
export default function ExpoStatusBar(props) {
const { style, animated, hidden, hideTransitionAnimation, networkActivityIndicatorVisible } = props;
... | Expo status bar |
import Link from 'next/link';
import React from 'react';
import committees from '../data/committees';
import styles from '../styles/components/Footer.module.scss';
import SocialMedia from './SocialMedia';
const footerACMLinks = [
{ title: 'About', path: '/about' },
{ title: 'Committees', path: '/committees' },
{ ti... | Package that contains all of the necessary JS for the JSFY API. |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class TodoList extends Component {
render() {
return (
<View style={styles.container}... | The base class for a single node in the hierarchy of components that are not related to a React component. |
import React from 'react'
import 'css/markdown-styles.css'
import Helmet from "react-helmet"
import { config } from 'config'
import { prefixLink } from 'gatsby-helpers'
module.exports = React.createClass({
propTypes () {
return {
router: React.PropTypes.object,
}
},
render () {
const post = th... | The main function for the Sequence class. |
import React from 'react';
import BaseIcon from './BaseIcon';
export default class Inactive extends BaseIcon {
render() {
return (
<svg className={`icon icon--inactive ${this.props.className}`} viewBox={this.getViewBox()}>
<path d="M56,52H42l-9.7-12.5l-11,4.8L13,20.7l-7,4l-2-9.9L17.2,8l9.5,24.4l9.... | Inactive component that renders a missing - icon icon. |
import React from 'react';
import { Route, Link } from 'react-router-dom';
const AhtleteMenuLink = ({ id, to, label }) => (
<Route path={`/athlete/${id}`}>
{({ match }) => (
<Link to={to} className={match ? 'active' : ''}>{label}</Link>
)}
</Route>
);
export const AthletesMenu = ({ athletes }) => (
... | Ahtlete menu export |
import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-run... | Creates a notice component that will show a close dialog when the notice is closed. |
/*
* @Author: LIU CHENG
* @Date: 2017-02-22 00:10:31
* @Last Modified by: LIU CHENG
* @Last Modified time: 2017-02-24 15:09:47
*/
import React from 'react';
import Main from '../components/Main';
import DashboardContainer from '../containers/DashboardContainer';
import { connect } from 'react-redux';
import * a... | A component that is rendered when a user enters a hidden state. |
import React from 'react'
export default (page, applicationState, checksums) =>
<html>
<head>
<link rel='stylesheet' href={`/styles.css?checksum=${checksums.cssChecksum}`}/>
<meta name='viewport' content='width=device-width, initial-scale=1.0'/>
<title>{page.pageTitle}</... | Very basic warning - catching function for react - js - bundle |
import findWhere from 'lodash/collection/findWhere';
import React from 'react';
import { connect } from 'react-redux';
function renderNoContact() {
return (
<div>Contact Not Found</div>
);
}
function ContactDetail({ contactProps: { contacts }, params }) {
const contact = findWhere(contacts, {
_id: parse... | Renders a sequence of missing contact elements. |
import 'babel-polyfill'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { createStore } from 'redux'
import todoApp from './reducers'
import App from './components/App'
let store = createStore(todoApp)
render(
<Provider store={store}>
<App />
</Provid... | Imports a single let. |
import PureComponent from '../PureComponent';
import React from 'react';
import XAutosuggest from './XAutosuggest';
import Input from 'react-toolbox/lib/input';
var RETURN = 13;
var returnPressed = ev => ev.keyCode === RETURN;
var renderInputComponent = ({ref, onChange, label, error, ...props}) => (
<Input
spellC... | Displays a single term input component that displays a single term in the input field. |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Layout from '../../co... | Provides a hidden feature that can be used to create a new admin page. |
import React from 'react';
const PageHeader = React.createClass({
render() {
return (
<div className="bs-docs-header" id="content">
<div className="container">
<h1>{this.props.title}</h1>
<p>{this.props.subTitle}</p>
</div>
</div>
);
}
});
export default Pag... | The default page header for a block of pages. |
/*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import autosize from 'autosize';
import React from 'react'... | A file that contains a sequence of textarea elements that can be uncontrolled. |
/**
* Used by the Popout component and the Lightbox component of the fields for
* popouts. Renders a non-react DOM node.
*/
import React from 'react';
import ReactDOM from 'react-dom';
module.exports = React.createClass({
displayName: 'Portal',
portalElement: null, // eslint-disable-line react/sort-comp
compone... | The Popout component and the Lightbox component of the fields for Popout and Lightbox components. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsEditLocation = (props) => (
<SvgIcon {...props}>
<path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm-1.56 10H9v-1.44l3.35-3.34 1.43 1.43L10.44 12zm4.45-4.45l-.7.7-1.44-1.44.7-.... | A component that exports a missing missing component in a group of icons. |
/**
* @description UserSettings SVG Icon.
* @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon.
* @property {string} colorIndex - The color identifier to use for the stroke color.
* If not specified, this component will default to muiTheme.palette.textColor.
... | A component that renders a status icon. |
/**
* Copyright 2017 Yuichiro Tsuchiya
*
* 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 agr... | Exports a single missing - missing record as CSV |
import React from 'react';
import uriParser from '../util/uri-parser';
import Avatar from './avatar';
import TimeAgo from './time-ago';
const Post = ({ post }) => {
const link = (post.url) ? uriParser(post.url).host : null;
const title = (link) ? (
<a href={post.url} target="_new" className="headline-link">
... | The post - tag that is rendered when a new post is found. |
import cx from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import { translate } from 'react-i18next';
import MenuItem from '@material-ui/core/MenuItem';
import CreatePlaylistIcon from '@material-ui/icons/Add';
import PromptDialog from '../../Dialogs/PromptDialog';
const enhance = tran... | A component that opens a new playlist. |
/*
* HomePage
*
* This is the first thing users see of our App, at the '/' 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 necessity for you then you can refactor it and remove
* the l... | This is the first |
import React from 'react';
import ColumnHeader from './column_header';
import PropTypes from 'prop-types';
import { debounce } from 'lodash';
import { scrollTop } from '../../../scroll';
import { isMobile } from '../../../is_mobile';
export default class Column extends React.PureComponent {
static propTypes = {
... | A column that is a component that can be rendered on a column. |
import React from 'react'
import { Well } from 'react-bootstrap'
class About extends React.Component {
render() {
return (
<Well bsSize="large">
<p>This little web app thoughtfully brought to you by... <a href="https://kdcinfo.com/resume" target="kdcNewWin">me</a> :) <s... | Create a new component with unique name. |
import React from 'react';
import cx from 'classnames';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './Pager.css';
import Link from '../Link';
class Pager extends React.Component {
render() {
return (
<ul className={cx('pager', s.pager)}>
<li className={cx('next', s.pagerNe... | The pager class is used to render a pager on a page. |
// This file is part of Indico.
// Copyright (C) 2002 - 2020 CERN
//
// Indico is free software; you can redistribute it and/or
// modify it under the terms of the MIT License; see the
// LICENSE file for more details.
/**
* This module mocks some of React's hooks while providing
* a way to tap into some of the inte... | This module mocks some of the internal methods while providing a specific action. |
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/app';
import PostsIndex from './components/posts_index';
import PostsNew from './components/posts_new';
export default (
<Route path="/" component={App}>
<IndexRoute component={PostsIndex} />
<Route pa... | export default route |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import classNames from 'classnames';
import MenuButton from '../menu/MenuButton';
const propTypes = {
player: PropTypes.object,
actions: PropTypes.object,
rates: PropTypes.array,
className: PropTypes.string
};
const defaultProps = {... | The base component for a menu item that displays a menu item with a playback rate. |
import React from 'react';
import styles from '../../styles/PokemonViewer';
export const PokemonViewer = ({pokemon, isLoading}) => {
return (
<div className="container" style={ styles.container }>
<div className="gbScreen" style={ styles.gbScreen }>
{ isLoading ? (
<div style={ styles.... | Generate a sequence of words in a pokemon. |
import React from 'react';
import { Link } from 'react-router';
export default class AnnouncementsSidebar extends React.Component {
render () {
var announcements = COURSES[this.props.params.courseId].announcements;
return (
<div>
<h3>Sidebar Assignments</h3>
<ul>
{announcemen... | The Sidebar component that renders the missing key sequence and adds it to the Sidebar s list of announcements. |
import React from 'react';
import Avatar from '../Avatar';
function getStyles(props, context) {
const {card} = context.muiTheme;
return {
root: {
padding: 16,
fontWeight: card.fontWeight,
boxSizing: 'border-box',
position: 'relative',
whiteSpace: 'nowrap',
},
text: {
... | The main component for the card header. |
import React from 'react'
import Base from './Base'
import SequenceMapStep from './SequenceMapStep'
import config from './config'
/**
* Sequence map pattern for use in multi-step forms
*/
const SequenceMap = ({
steps,
active,
children,
...props
}, { rebass }) => {
const { fontSizes, bold, colors } = { ..... | Create a sequence map with a single - step sequence. |
import React from 'react';
import * as Progress from 'react-progressbar.js';
import Dropzone from 'react-dropzone';
import style from './style.css';
import { getUnits, convertMinutesDuration } from '../../lib/utils';
import Link from '../link';
import ProgressBar from '../progressBar';
const ProgressBarLine = Progres... | Package that contains |
import React from 'react'
import createStory from '../../storybook/createStory'
import FadeInView from '../../src/FadeInView'
import Text from '../../src/Text'
createStory('FadeInView', module)
.add('default', () =>
<FadeInView>
<Text>Apple</Text>
</FadeInView>
)
.add('delay:3000', () =>
<FadeI... | Imports a single node in the hierarchy. |
import React from 'react';
import Router from 'react-router';
import createRoutes from '../routes';
import {Provider} from 'react-redux';
const getFetchData = (component = {}) => {
return component.WrappedComponent ?
getFetchData(component.WrappedComponent) :
component.fetchData;
};
export function createTr... | The main router function. |
import React from 'react';
import marked from 'marked';
import showdown from 'showdown';
import emoji from 'node-emoji';
import PropTypes from 'prop-types';
import { enforceBlockquote, enforceHorizontalRule, replaceWikiLinks } from '../../utils/formatting/markdown';
const renderAsPreview = (markdown) => (
<div
... | Renders a node - order using React s rendering functionality. |
import React from 'react'
import { Grid, Segment } from 'shengnian-ui-react'
const GridExampleOnly = () => (
<Grid>
<Grid.Row columns={2} only='large screen'>
<Grid.Column>
<Segment>Large Screen</Segment>
</Grid.Column>
<Grid.Column>
<Segment>Large Screen</Segment>
</Grid.... | This module exports a list of all possible components of a system. |
import React from 'react';
import IconBase from 'react-icon-base';
export default class FaBook extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m38.1 10.7q0.9 1.2 0.4 2.9l-6.1 20.2q-0.5 1.4-1.8 2.4t-2.7 0.9h-20.6q-1.7 0-3.3... | A component that shows a sequence of icons that can be used to show a sequence of icons. |
/**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-types';
const TableBody = ({ children, className, ...rest }) => (
<tbody className=... | Adds a table with a single node with no children. |
import React from 'react';
import PropTypes from 'prop-types';
const ResourceGenerated = props => {
const { amount, wasted, approximate, resourceType } = props;
return (
<>
{approximate && '≈'}{amount} {resourceType.name} generated <small>{wasted>0 && <>{approximate && '≈'}{wasted} wasted</>}</sma... | A component that exports a with a resource type and a specific amount. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBatteryStd = (props) => (
<SvgIcon {...props}>
<path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"/>
</SvgIcon>
);
D... | Devuelte un objeto DeviceBatteryStd |
import React from 'react';
import CookComp from 'components/pages/Cook';
export default class Cook extends React.Component {
render() {
return (
<div>
<CookComp id={this.props.params.cook} />
</div>
);
}
}
| The Cook component. |
import React from 'react'
import {connect} from 'react-redux'
import { nextGameProcess, gameFinish, displayGameFinishWindow } from '../actions'
let TextInput = React.createClass({
propTypes: {
playing: React.PropTypes.bool,
nextKey: React.PropTypes.string,
dispatch: React.PropTypes.func,
keyArray: Re... | The TextInput component that displays a text input when the user presses a key. |
import React from 'react';
import { Button } from 'react-bootstrap';
const CustomButton = (props) => {
return (
<Button style={buttonStyle}
{...props}
>
{props.children}
</Button>
);
};
const buttonStyle = {
background: '#091B1B',
color: '#DDDDDD'
};
export default Cust... | A custom button that can be used to show a single child of a button. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import _ from 'lodash';
/** Gets a range from a single value.
* TODO: Could probably make this take a predicate to avoid running through the loop twice */
const getRange = (number) => {
if (!_.isFinite(number)) { return [0] }
return Arra... | Displays a dropdown of the page choices for a single page. |
import React, { Component } from 'react';
import styles from './style.scss';
class Activities extends Component {
render() {
return (
<div>
activities
</div>
);
}
}
export default Activities;
| The Activities class |
import React from 'react';
import { array } from 'prop-types';
import Link from 'gatsby-link';
import styles from './Tag.module.css';
const Tags = ({ tags }) => (
<ul className={styles.tagItems}>
{tags.map(tag => (
<Link key={tag} to={`/tag/${tag}`}>
<li className={styles.tagItem}>
{tag.... | export default tags |
import React from 'react';
import _Story from './components/Story';
import { H1, H2, H3, H4, H5, H6, Code, P, UL, A, LI } from './components/markdown';
export const Story = _Story;
const defaultOptions = {
inline: false,
header: true,
source: true,
propTables: [],
};
const defaultMarksyConf = {
h1: H1,
h... | Adds a story to the list of components. |
import Document, { Head, Html, Main, NextScript } from 'next/document'
import React from 'react'
class WeddingDocument extends Document {
render() {
return (
<Html lang="en-GB">
<Head />
<Main />
<NextScript />
</Html>
)
}
}
export default WeddingDocument
| WeddingDocument is a base class for a sequence of components that can be rendered in a page. |
import React from 'react'
import PropTypes from 'prop-types'
import { List } from 'immutable'
import { connect } from 'react-redux'
import { saveVmsFilters } from '_/actions'
import { msg } from '_/intl'
import { RouterPropTypeShapes } from '_/propTypeShapes'
import { filterVms, mapFilterValues } from '_/utils'
impor... | React - react |
import PropTypes from 'prop-types';
import React from 'react';
import { Link } from 'react-router';
import classNames from 'classnames';
import styles from './table.css';
export default function DataLink(props) {
const Wrapper = (props.to || props.onClick) ? Link : 'div';
const className = classNames({
[styl... | DataLink component that links to a node in a table. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBattery60 = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V11h10V5.33z"/><path d="M7 11v9.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 ... | Devuelte un objeto DeviceBattery60 |
import React, { Component } from 'react';
import { StyleSheet, View, Dimensions } from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 35.679976;
const LONGITUDE = 139.768458;
const LATITUDE_DELTA = 0.0... | Component that is rendered as an image overlay with a URL to the image. |
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... | Provides a module that exports a missing dependency on a missing React API. |
import React from 'react';
import {
View,
Text,
} from 'react-native';
import {
List,
ListItem,
Thumbnail,
} from 'native-base';
import { getImageUri } from '../../helpers/function';
export default ({cast}) => (
<View>
<List
dataArray={cast}
renderRow={(item) =>
<ListItem>
... | export default |
import React from 'react'
import { Image, List } from 'semantic-ui-react'
const ListExampleDivided = () => (
<List divided verticalAlign='middle'>
<List.Item>
<Image avatar src='/images/avatar/small/daniel.jpg' />
<List.Content>
<List.Header as='a'>Daniel Louise</List.Header>
</List.Con... | Imports a sequence of images from the semantic - ui - react module. |
import React from 'react';
export function TwitterIcon() {
return (
<svg viewBox="0 0 512 512" fill="currentColor">
<path d="M419.6 168.6c-11.7 5.2-24.2 8.7-37.4 10.2 13.4-8.1 23.8-20.8 28.6-36-12.6 7.5-26.5 12.9-41.3 15.8C357.6 146 340.7 138 322 138c-42 0-72.9 39.2-63.4 79.9-54.1-2.7-102.1-28.6-134.2-68-17 29.2... | TwitterIcon - Icon for Twitter |
import React from 'react'
import { Dropdown } from 'stardust'
const DropdownDisabledExample = () => (
<Dropdown text='Disabled' disabled />
)
export default DropdownDisabledExample
| Imports a missing - type and exports it as a DropdownDisabledExample. |
import React from 'react'
import { Router } from 'react-router-dom'
import { Provider } from 'react-redux';
import { mount } from 'enzyme'
import { createMemoryHistory } from 'history'
// import { createStore } from 'redux';
// import App from '../src/app/App'
import { applyMiddleware, combineReducers, createStore } f... | Create a new object with basic state and reducers |
import React from 'react';
import Button from '../../components/button';
import Input from '../../components/input';
import FontIcon from '../../components/font_icon';
import Tooltip, { tooltipFactory } from '../../components/tooltip';
import Chip from '../../components/chip';
import Avatar from '../../components/avata... | Imports a single node that can be used to create a single node. |
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Avatar from '@material-ui/core/Avatar';
const useStyles = makeStyles((theme) => ({
root: {
display: 'flex',
'& > *': {
margin: theme.spacing(1),
},
},
}));
export default function ImageAvatars() {
const cl... | ImageAvatars - Image avatars |
import React from 'react';
import {
BlockHeading,
BlockHeadingWireframe,
BlockParagraph,
BlockParagraphWireframe,
BlockParagraphForm,
BlockParagraphCTA,
BlockParagraphCTAWireframe,
BlockParagraphCTAForm,
BlockParagraphCTAs,
BlockParagraphCTAsWireframe,
BlockParagraphCTAsForm,
BlockImage,
Block... | Object that represents a list of all components of a critical block. |
import React from 'react';
import Samples from '../Samples'
import ReactPlayground from '../ReactPlayground'
export default function IconSection() {
return (
<div>
<ReactPlayground id="ratchicons" title='Ratchicons' desc='字符图标' codeText={Samples.Icon} />
</div>
);
}; | The default section of the Sequence |
import React from 'react'
import ReactMixin from 'react-mixin'
import TimerMixin from 'react-timer-mixin'
/**
* A base react component that all widgets and screens should extend from.
* Provides common functionality but most importantly it is a PureComponent and includes the TimerMixin.
*/
class BaseComponent exten... | A base react component that all widgets and screens should extend from. |
import React from 'react';
import PropTypes from 'prop-types';
import Head from 'next-server/head';
import StatusLayout from 'layouts/StatusLayout';
const statusCodes = {
400: 'Bad Request',
401: 'Not Authenticated',
404: 'This page could not be found',
500: 'Internal Server Error',
501: 'Not Implemented'
};... | A component that displays an error page if the request is not authenticated or if the request is not authenticated. |
import React from 'react';
import PropTypes from 'prop-types';
import { ControlLabel, Col } from 'react-bootstrap';
import { actions } from 'react-redux-form';
import { connect } from 'react-redux';
import ReactTags from 'react-tag-autocomplete';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Immut... | Provides a function to create a UIInputAutocompleteElmenet that renders a tag hierarchy. |
import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'dva'
import styles from './index.less'
const Detail = ({ userDetail }) => {
const { data } = userDetail
const content = []
for (let key in data) {
if ({}.hasOwnProperty.call(data, key)) {
content.push(<div key={key} c... | A component that renders a single with a detail object. |
'use strict';
import React from 'react';
class PhotoPost extends React.Component {
constructor(props){
super(props);
}
render(){
return (
<div>
<img
src={this.props.full_picture}
style={this.props.style.image}
... | A component that renders a photo in a sequence of random images. |
import React from 'react';
import ReactMixin from 'react-mixin';
import { IntlMixin } from 'react-intl';
import classnames from 'classnames';
import ActivityActionCreators from 'actions/ActivityActionCreators';
import DialogStore from 'stores/DialogStore';
import ActivityStore from 'stores/ActivityStore';
//import A... | A toolbar showing the state of a single non - activity action. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.