code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsRestaurantMenu = (props) => (
<SvgIcon {...props}>
<path d="M8.1 13.34l2.83-2.83L3.91 3.5c-1.56 1.56-1.56 4.09 0 5.66l4.19 4.18zm6.78-1.81c1.53.71 3.68.21 5.27-1.38 1.91-1.91 2.28-4.65.81-6.12-1.46-1.46-4.2... | A menu that displays a menu with a map of the component. |
import React from 'react';
import CSS from './utils/css';
import View from './View';
import ListItem from './ListItem';
CSS.register({
'.gridtile': {
margin: '0',
flexDirection: 'column',
display: 'flex',
flexGrow: '0',
position: 'relative',
},
'.gridtile.header': {
flexDirection: 'colum... | A component that renders a grid tile with a hidden style. |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Translation from '../../../behaviours/translation';
import Material from '../../../behaviours/material';
import filterProps from '../../../utils/filter-html-attributes';
const propTypes = {
label:... | A component that can be used to check if a checkbox is checked. |
import React from 'react';
const Rebase = require('re-base');
const base = Rebase.createClass({
apiKey: 'AIzaSyBrgyl-UXdpEFISSGnf1isc_TkrVB2S0Hs',
authDomain: 'mpsohhh.firebaseapp.com',
databaseURL: 'https://mpsohhh.firebaseio.com',
storageBucket: ''
});
class AdminContainer extends Re... | Create a new AdminContainer with the given properties. |
import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'react-redux';
import {Router, match, browserHistory} from 'react-router';
import reaction from 'reaction';
import createStore from 'redux-create-store';
import routes from 'routes';
console.log('%c [%s] %s ', `background: ${process.en... | Imports a single unhandled exception. |
// Component that demonstrates using a part of the Redux store
// outside of Apollo. We can use config.addReducer(key, reducer) in `src/app.js`
// to add custom Redux reducers
// ----------------------
// IMPORTS
/* NPM */
import React from 'react';
import PropTypes from 'prop-types';
// HOC/decorator to listen to ... | Component that demonstrates using a part of the Redux store. |
/**
* Created by townmi on 17/1/14.
*/
import React from 'react';
class Http {
constructor () {
this.XHR = new XMLHttpRequest();
this.options = {
"method": null,
"url": null,
"aysnc": true,
"timeout": 5000,
"success": null,
... | Class to handle a single neccesary action in a browser. |
import React from 'react';
import {IndexLink} from 'react-router';
import _ from 'lodash';
import {navBarStyle} from '../../styles';
export default class NavBar extends React.Component {
constructor() {
super();
this.generateNavItem = this.generateNavItem.bind(this);
this.handleNavItemActive = this.han... | A component that is rendered in a navbar. |
/**
* 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.
*
* @format
*/
import React from 'react';
import Layout from '@theme/Layout';
import {Code} from '../../js/components/Code';
import... | The main function of the package. |
import React, { Component } from 'react';
import ProgressBar from 'ProgressBarAndroid';
export default class SpinnerNB extends Component {
prepareRootProps() {
const type = {
height: 40,
};
const defaultProps = {
style: type,
};
return computeProps(this.props, defaultProps);
}
... | A wrapper for a React component that renders a progress bar with a color and a progress indicator. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionTouchApp = (props) => (
<SvgIcon {...props}>
<path d="M9 11.24V7.5C9 6.12 10.12 5 11.5 5S14 6.12 14 7.5v3.74c1.21-.81 2-2.18 2-3.74C16 5.01 13.99 3 11.5 3S7 5.01 7 7.5c0 1.56.79 2.93 2 3.74zm9.84 4.63l-4.... | A component that displays a series of action touch icons. |
import React from 'react';
import Root from './Root';
import HomePage from './HomePage';
import IntroductionPage from './IntroductionPage';
import GettingStartedPage from './GettingStartedPage';
import ComponentsPage from './ComponentsPage';
import SupportPage from './SupportPage';
import NotFoundPage from './NotFound... | Imports a single from the module. |
import React from 'react'
import { Table } from 'semantic-ui-react'
const TableExampleVeryCompact = () => {
return (
<Table compact='very'>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Name</Table.HeaderCell>
<Table.HeaderCell>Status</Table.HeaderCell>
<Table.HeaderCel... | This module provides a function to add missing cookies to a language file. |
import React from 'react';
import Title from 'react-title-component';
import MarkdownElement from '../../MarkdownElement';
import communityText from './community.md';
const Community = () => (
<div>
<Title render={(previousTitle) => `Community - ${previousTitle}`} />
<MarkdownElement text={communityText} />
... | Package that exports a Community component. |
import React, { Component } from 'react';
class PrintPage extends Component {
render() {
return (
<div className="print-page">
<div className="print-title-container">
<div className="print-header">温州医科大学附属第一医院图书馆</div>
<div className="prin... | print page - print page |
import React from 'react';
function ArrowLeftIcon(props) {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<path fill="context-fill" d="M6.414 8l4.293-4.293a1 1 0 0 0-1.414-1.414l-5 5a1 1 0 0 0 0 1.414l5 5a1 1 0 0 0 1.414-1.414z"></path>
</svg>
);
}
expor... | ArrowLeftIcon - Arrow left icon |
import React from 'react'
import PropTypes from 'prop-types'
import { Flexbox2 as Flexbox, Title, Spacing } from 'bonde-styleguide'
const GadgetTitle = ({ children }) => (
<Title.H5 uppercase fontWeight='bold'>
{children}
</Title.H5>
)
const Gadget = ({ children, title, renderFilter, WrapperComponent }) => (
... | A component that can be rendered as a child of a component. |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import App from './components/app';
import reducers from './reducers';
const createStoreWithMiddleware = applyMiddleware()(createStore);
ReactDOM.render... | Imports a specific element from the DOM. |
import React from 'react'
import { Button, Header, Image, Modal } from 'semantic-ui-react'
const ModalModalExample = () => (
<Modal trigger={<Button>Show Modal</Button>}>
<Modal.Header>Select a Photo</Modal.Header>
<Modal.Content image>
<Image wrapped size='medium' src='/assets/images/avatar/large/rach... | The main function for the modal modal dialog. |
import React from 'react'
import { Grid, Image } from 'semantic-ui-react'
const GridExampleCelled = () => (
<Grid celled>
<Grid.Row>
<Grid.Column width={3}>
<Image src='http://semantic-ui.com/images/wireframe/image.png' />
</Grid.Column>
<Grid.Column width={13}>
<Image src='http... | This function imports a bunch of missing - missing |
import React from 'react'
import { Icon } from 'semantic-ui-react'
const IconExampleFitted = () => (
<div>
<p>Tight spacing</p>
<Icon fitted name='help' />
<p>Tight spacing</p>
</div>
)
export default IconExampleFitted
| Example of missing - block - wise resistance. |
import React from 'react'
import { TagCloud } from 'react-tagcloud'
const data = [
{ value: 'jQuery', count: 25 },
{ value: 'MongoDB', count: 18 },
{ value: 'JavaScript', count: 38 },
{ value: 'React', count: 30 },
{ value: 'Nodejs', count: 28 },
{ value: 'Express.js', count: 25 },
{ value: 'HTML5', coun... | imports React and react - tagcloud |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionQueryBuilder = (props) => (
<SvgIcon {...props}>
<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5... | A component that renders a series of action queries that can be used to perform a series of actions. |
// <ConnectedComposerInputEmojiTable>
// ==================================
// This simply renders a list of emoji in a table.
// * * * * * * * //
// Imports
// -------
// Package imports.
import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
// DOM imports.
i... | Renders a list of emoji in a table. |
'use strict';
import React from 'react';
import HeaderComponent from '../common/HeaderComponent.js';
import CartCheckOutListItemComponent from './cartCheckOut/CartCheckOutListItemComponent.js';
import CartCheckOutCtrlComponent from './cartCheckOut/CartCheckOutCtrlComponent.js';
import CartStore from '../CartStore.js';... | The base component for the cart - check - out component. |
import React from 'react';
/** SVG Eye Icon */
function EyeIcon() {
// Attribution: Fabián Alexis at https://commons.wikimedia.org/wiki/File:Antu_view-preview.svg
return (
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22">
<g transform="matrix(.02146 0 0 .02146 1 1)" fill... | EyeIcon - Eye icon for a given node. |
import React from 'react';
import domUtils from './utils/domUtils';
import EventListener from './utils/EventListener';
const AffixMixin = {
propTypes: {
offset: React.PropTypes.number,
offsetTop: React.PropTypes.number,
offsetBottom: React.PropTypes.number
},
getInitialState() {
return {
a... | A mixin for a DOM node that is affix - able and has a top and bottom offset. |
import React from 'react';
import { useTheme } from '@turntwo/react-ui';
export const GameSectionHeader = ({ children, ...rest }) => {
const theme = useTheme();
return (
<div className="game-section__header" {...rest}>
{children}
<style jsx>{`
.game-section__header {
display: flex... | export default GameSection |
import React, { Component } from 'react';
import { Link } from 'react-router';
import style from './style.css';
import SubMenu from './subMenu';
import { MENU, WP_PAGES ,WP_PATH ,WP_POST_PATH } from '../../constants';
class SiteMap extends Component {
render() {
let container=[];
for(var index in MENU){
... | SiteMap is a class that renders a site map with a nav bar. |
import React from 'react';
import { Sharrq } from 'CONTRIBUTORS';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
export default [
{
date: new Date('2018-11-17'),
changes: <>Updated the <SpellLink id={SPELLS.HEATING_UP.id} /> module to fix some incorrect values and to properly ... | The default module that exports all of the missing - missing |
'use strict';
import React from 'react';
export default React.createClass({
displayName: 'app/pages/components/loader.js',
render() {
return (
<div className="loader"></div>
)
}
}); | Create a single missing - node class. |
import React from 'react';
import styled from 'styled-components';
const Wrapper = styled.div`
background-color: #838383;
border-bottom: 5px solid #838383;
border-top: 5px solid #838383;
color: white;
font-size: 12px;
font-weight: bold;
padding: 5px 0;
text-align: center;
width: 100%;
`;
const Borde... | Imports React and styled - components and exports a |
import cx from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import Tooltip from '@material-ui/core/Tooltip';
/* eslint-disable */
const Button = ({
onClick,
disabled,
count,
children,
tooltip,
}) => (
// Wrapped in a <div> so the tooltip can listen for mouse events.
<Toolt... | Exports a button that displays a single missing node in a tree. |
/**
* Created by littlestone on 2017/3/24.
*/
import React from 'react';
import {NavLink} from 'react-router-dom';
import './Nav.css';
const Nav = () => {
return (
<nav className="nav">
<ul className="nav-list" data-flex="dir:left main:center box: mean">
<li className="nav-item"
data-f... | export default navigating function |
/**
* 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 function to handle missing missing node. |
import Field from '../Field';
import React from 'react';
import { FormField, FormInput, FormRow } from 'elemental';
module.exports = Field.create({
displayName: 'NameField',
focusTargetRef: 'first',
valueChanged: function(which, event) {
this.props.value[which] = event.target.value;
this.props.onChange({
... | Private function to create a hidden hidden field with a value that can be set on the hidden field. |
import React, { Component } from 'react';
import shallowEqual from 'react-pure-render/shallowEqual';
/**
* Exports a higher-order component that connects the component to stores.
* This higher-order component is most easily used as an ES7 decorator.
* Decorators are just a syntax sugar over wrapping class in a func... | Creates a function that connects a component to a list of stores. |
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-Q">
<LogMonitor /... | createDevTools creates a new devtools object from a single node. |
import React from 'react';
import './Footer.css';
const Footer = () => (
<footer className="footer">
Released under the <a href="https://github.com/unsplash/react-trend/blob/master/LICENSE.md">MIT</a> license. <a href="https://github.com/unsplash/react-trend">View source</a>.
</footer>
);
export default Foot... | Exports a footer to a single node. |
import React from 'react';
import NavMain from './NavMain';
import PageHeader from './PageHeader';
import PageFooter from './PageFooter';
export default class Page extends React.Component {
render() {
return (
<div>
<NavMain activePage="support" />
<PageHeader
title="Nee... | The default implementation of a single page that can be used to render a single page. |
import React from 'react'
import {storiesOf} from '@storybook/react'
import FormRow from '.'
const column = () => (
<div
style={{
backgroundColor: '#fff'
}}
>
column
</div>
)
storiesOf('FormRow', module)
.add('default', () => <FormRow>{column()}</FormRow>)
.add('layout: half-half', () => ... | Imports a series of components from a module. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let Filter1 = props =>
<SvgIcon {...props}>
<path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z" />
</... | A component that renders a series of icons that can be used to render a series of icons. |
import React from 'react'
import Blog from './Blog'
import Layout from '../../components/Layout'
const title = 'Blog'
function action({ path }) {
return {
chunks: ['blog'],
title,
path,
description: 'A blog with my humble thoughts and diabolical schemes',
component: (
<Layout path={path}... | action for missing missing - node - js |
import React from 'react';
import { Link } from 'react-router';
class Footer extends React.Component {
render() {
return (
<footer>
<div className='container'>
<div className='row'>
<div className='col-sm-12'>
... | Package that extends React. Component with a footer. |
import React from 'react';
declare module 'react-body-classname' {
declare type Props = {
children?: React.ChildrenArray<any>,
className: string,
};
declare class BodyClassName extends React$Component<Props> {
static rewind(): string;
}
declare var exports: typeof BodyClassName;
}
| Imports a React component with a body class. |
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { autoPlayGif } from '../initial_state';
export default class AvatarOverlay extends React.PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,
friend:... | The base component for the avatar overlay. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionHighlightOff = (props) => (
<SvgIcon {...props}>
<path d="M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 1... | A component that renders a series of action highlights on a series of nodes. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareKeyboardCapslock = (props) => (
<SvgIcon {...props}>
<path d="M12 8.41L16.59 13 18 11.59l-6-6-6 6L7.41 13 12 8.41zM6 18h12v-2H6v2z"/>
</SvgIcon>
);
HardwareKeyboardCapslock = pure(HardwareKeyboardCaps... | Hardware keyboard capslock |
/* eslint-disable react/prop-types */
import classnames from 'classnames';
import React from 'react';
import View from './View';
import styles from './box-styles.css';
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) => (
<View
{...other}
className={classnames(styles[`color$... | export a default box - based |
import React from 'react'
import PropTypes from 'prop-types'
import { AboutPageTemplate } from '../../templates/about-page'
const AboutPagePreview = ({ entry, widgetFor }) => (
<AboutPageTemplate
title={entry.getIn(['data', 'title'])}
content={widgetFor('body')}
/>
)
AboutPagePreview.propTypes = {
entry... | Provides a preview of a |
import React from 'react';
import { StyleSheet, View, Modal, ActivityIndicator } from 'react-native';
const styles = StyleSheet.create({
container: {
flex: 1,
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
backgroundColor: 'rgba(0, 0, 0, 0.8)',
justifyContent: 'center',
... | export a single node in a modal window |
import React from 'react';
import PropTypes from 'prop-types';
import Typography from '../Typography';
import classNames from 'classnames';
import styles from './styles.css';
import Wrapper from '../Wrapper';
import PersonItem1 from '../PersonItem1';
function PersonItem2(props) {
let opt = '';
opt = ( <T... | Generate a sequence of items that can be used to create a single node. |
/* eslint react/jsx-filename-extension: 0 */
import React from 'react';
import cookie from 'react-cookie';
import { IndexRoute, Route } from 'react-router';
import { App, Homepage, NotFound, Login, SignUp, Dashboard, EnsureAuthentication } from './containers';
import { checkAuth as _checkAuth } from './actions/auth-act... | The default middleware that checks if a user is authenticated. |
import React from 'react';
import filesize from 'filesize';
import PropTypes from 'prop-types';
import Dialog from 'material-ui/Dialog/Dialog';
import { cyan500 } from 'material-ui/styles/colors';
import FontIcon from 'material-ui/FontIcon/FontIcon';
import FlatButton from 'material-ui/FlatButton/FlatButton';
export d... | A component that displays a file in a modal window. |
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Avatar from '../../../components/avatar';
import DisplayName from '../../../components/display_name';
import StatusContent from '../../../components/status_content';
import MediaGallery from... | Detailed status component |
import React from 'react';
// import _ from 'lodash';
import CalculatorButton from './CalculatorButton';
// class CalculatorActions{
// constructor(elem){
// _.assign(this, elem);
// this.elem = elem;
// }
// addEventListener(){
// this.elem.addEventListener('click', this.handleClick.bind(this));
// ... | JSX function to generate a single action on a node that has a data - calculator - target attribute. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentFlag = (props) => (
<SvgIcon {...props}>
<path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"/>
</SvgIcon>
);
ContentFlag = pure(ContentFlag);
ContentFlag.displayName = 'ContentFlag';
ContentFlag.muiName = '... | A component that exports a single |
/**
* 校友录基本信息
* @Date: 2017-01-27 15:58:37
* @Last Modified by: Administrator
* @Last Modified time: 2017-03-21 05:43:30
*/
'use strict';
import React from 'react';
import { form, observer } from 'decorators';
import { $alumni } from 'stores';
import { Button } from 'antd-mobile';
import { Spin, ButtonWrap, App... | A component that displays a single unique unique sequence sequence in the alumni administration panel. |
/* eslint-disable camelcase */
import React from 'react';
import { View, StyleSheet, Text } from 'react-native';
import BookmarkIllustButton from './BookmarkIllustButton';
const styles = StyleSheet.create({
container: {
backgroundColor: 'rgba(0,0,0,0.6)',
bottom: 0,
right: 0,
position: 'absolute',
... | A component that renders a bookmark - illust - button if the count of items is not 0. |
import React from 'react';
var { object } = React.PropTypes;
/**
* A mixin for components that need to know the path, routes, URL
* params and query that are currently active.
*
* Example:
*
* import { State } from 'react-router';
*
* var AboutLink = React.createClass({
* mixins: [ State ],
* re... | A mixin for components that need to know the path routes URL params and query that are currently active. |
import React, { Component } from 'react';
import Radium, { Style } from 'radium';
import {StyleRoot} from 'radium';
import { ipcRenderer } from "electron";
import Search from '../components/Search';
class Nav extends Component {
constructor(props) {
super(props);
this.state = {};
}
getStyles(... | Create a new component with the given name and state. |
import React, { Component } from 'react';
import Button from './uielements/button';
import Popover from './uielements/popover';
import '../style/colorChooser.less';
export default class ColorChoser extends Component {
constructor(props) {
super(props);
this.handleVisibleChange = this.handleVisibleChange.bind... | A component that allows to select a color from a list of colors. |
import React from 'react';
import { Modal, Button } from 'react-bootstrap';
class ProfilePic extends React.Component {
constructor(){
super();
this.handleSubmit = this.handleSubmit.bind(this);
}
handleSubmit(){ //start here
// const { resetPoll, fetchYelpData } = this.props.pollActions;
// const... | A component that displays a modal window that can be used to poll a profile for confirmation. |
import React, { Component } from 'react';
import cookie from 'react-cookie';
import { connect } from 'react-redux';
import { fetchUser } from '../../../actions/index';
import UserInfo from './user-info';
class ViewProfile extends Component {
componentWillMount() {
// Fetch user data prior to component mounting
... | A component that can be used to render a user profile. |
import {remote} from 'electron';
import 'babel-polyfill'; // generators
import React from 'react';
import { render as renderReact } from 'react-dom';
import { Provider } from 'react-redux';
import configureStore from './redux/store';
import Settings from './components/settings';
const store = configureStore(remote.app... | Imports a bunch of modules that are required to render a React component. |
import React from 'react';
import { Link } from 'react-router';
import '../../css/brand-name.scss';
const BrandName = () => (
<Link to='/'>
<span id='brand-name'>Midgar</span>
</Link>
);
export default BrandName;
| export default BrandName |
import React from 'react';
class Calendar extends React.Component {
render () {
var events = [{
id: 0, title: 'essay due'
}];
return (
<div>
<h2>Calendar</h2>
<ul>
{events.map(event => (
<li key={event.id}>{event.title}</li>
))}
</ul>
... | A calendar is a component that can be rendered by a user. |
import React from 'react'
import classNames from 'classnames'
import { connect } from 'react-redux'
import { FloatingActionButton } from 'material-ui'
import { ContentAdd } from 'material-ui/svg-icons'
import { storeSkipass } from '../core/actions/stored-skipasses.actions'
const AddSkipassButton = ({ canBeAdded, stor... | The default action button is a button that adds a skipass button to the menu. |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import { AppRegistry, View } from 'react-native';
import GridView from './ios_component/GridView/GridView';
const Config = GridView.Config;
const Layout = GridView.Layout;
const rowConfi... | An app has a sequence of components that are not registered with a component in a gridview. |
import React from 'react';
class Component extends React.Component {
render() {
return (
<div />
);
}
}
export default Component;
| A component that can be rendered by a component. |
import React from 'react';
import { connect } from 'react-redux';
import timeago from 'lib/timeago';
import { fetchEvents } from 'lib/actions/admin.js';
import classNames from 'classnames';
import debugFactory from 'debug';
const debug = debugFactory( 'voyageur:admin-dashboard' );
class AdminDashboard extends React.C... | The admin dashboard component which is a component that can be used to view a specific event. |
import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'gatsby';
export function NavLinks({ onLinkClick }) {
const links = [
{
path: '/',
name: 'Home',
},
{
path: '/about',
name: 'About',
},
{
path: '/what-we-do',
name: 'What we do',
},
{
path: '/how-we-... | A function that exports a navigation object to a list of links. |
import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'dva'
import { Button, Row, Form, Input } from 'antd'
import { config } from '../../utils'
import styles from './index.less'
const FormItem = Form.Item
const Login = ({
login,
dispatch,
form: {
getFieldDecorator,
valida... | Imports a single nagios. |
import React from 'react';
import autobind from 'core-decorators/es/autobind';
import { withRouter } from 'react-router-dom';
import { Position, Spinner, Menu, MenuItem, MenuDivider, Intent } from '@blueprintjs/core';
import { connect } from 'react-redux';
import { logout } from '../../../../actions/authActions';
impor... | A component that displays a menu with a menu of the user s tokens. |
import blacklist from 'blacklist';
import classnames from 'classnames';
import React from 'react';
import { Container } from 'elemental';
const Transition = React.addons.CSSTransitionGroup;
var MobileListItem = React.createClass({
displayName: 'MobileListItem',
propTypes: {
className: React.PropTypes.string,
chi... | The MobileNavigation component is a component that can be used to render a navigation navigation. |
import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import Field from './Field';
import useIdentifier from '../../hooks/useIdentifier';
import useFormField from './useFormField';
import FieldPropTypes from './FieldPropTypes';
const propTypes = {
...FieldPropTypes,
label: Pro... | Generates a form checkbox with a single node with a single hidden input. |
import React from 'react';
import {renderToString} from 'react-dom/server';
import App from '../src/components/App';
let assets;
if (process.env.NODE_ENV === 'development') {
// Use the bundle from create-react-app's server in development mode.
assets = {
'main.js': '/static/js/bundle.js',
'main.css': '',... | Renders a with a doctype |
import React from 'react';
import PropTypes from 'prop-types';
import { baseFonts } from '../theme';
const defaultProps = { children: null };
const propTypes = { children: PropTypes.node };
export function P(props) {
const style = {
...baseFonts,
fontSize: '15px',
};
return <p style={style}>{props.child... | Provides a default component for a node with no children. |
import PropTypes from 'prop-types';
import React from 'react';
import Badge from '@talend/react-components/lib/Badge';
import { TextMode as FieldTemplate } from '../../FieldTemplate';
import theme from './TextMode.scss';
function getLabel(titleMap, value) {
const itemConf = titleMap.find(item => item.value === value... | MultiSelectTagTextMode is a text - mode which can be used to display a label on a multi - select field. |
import React from 'react';
import ReactDOM from 'react-dom';
// class Hello extends React.Component {
// render(){
// return React.createElement('h1', null, 'Hello')
// }
// }
class Clock extends React.Component {
constructor() {
super();
this.state = {
now: new Date().toLocaleTimeSt... | A component that can be used to render a negative number of negative numbers. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionCardTravel = (props) => (
<SvgIcon {...props}>
<path d="M20 6h-3V4c0-1.11-.89-2-2-2H9c-1.11 0-2 .89-2 2v2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zM9 4h6v2H9V4zm11 15H... | A component that renders a series of action card icons. |
/**
* 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 withStyles from 'isom... | Public function for generating a single missing - node node in the hierarchy of React s components. |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const HardwareKeyboardArrowRight = (props) => (
<SvgIcon {...props}>
<path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/>
</SvgIcon>
);
HardwareKeyboardArrowRight.displayName = 'HardwareKeyboardArrowRight';
HardwareKeyboardArrowRight.muiNa... | Hardware keyboard arrow right |
import React from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { addCount } from '../store/count/action'
const AddCount = ({ count, addCount }) => {
return (
<div>
<style jsx>{`
div {
padding: 0 0 20px 0;
}
`}</style>
... | React - related - action - creators |
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Link from 'react-router-dom/Link';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
const messages = defineMessages({
favourite_tags: { id: 'compose_form.favourite_tags', defaultM... | The FavouriteTags component is a component that displays a list of tags that can be favourite. |
import React from 'react';
import NavMain from './NavMain';
import PageHeader from './PageHeader';
import PageFooter from './PageFooter';
const NotFoundPage = React.createClass({
render() {
return (
<div>
<NavMain activePage='' />
<PageHeader
title='404'
subT... | Imports a single missing - page from the Hmmm. |
/* eslint-disable import/default */
import React from 'react';
import {render} from 'react-dom';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import routes from './routes';
import configureStore from './store/configureStore';
import { loadCars } from './actions... | Create an enhanced history that renders navigation events with a specific store. |
import React from 'react'
const style = {
horizontal: {
display: 'flex',
flexDirection: 'row',
height: '100%',
flexGrow: 1
},
vertical: {
display: 'flex',
flexDirection: 'column',
height: '100%',
flexGrow: 1
}
}
/**
* A <Layout> component is a container for a variable number ... | A component which is a container for a variable number of . |
import React from 'react'
import { Progress } from 'semantic-ui-react'
const ProgressExampleProgressPercent = () => (
<Progress value='4' total='5' progress='percent' />
)
export default ProgressExampleProgressPercent
| Import a single and export it as a ProgressExample |
import React from 'react';
import range from 'lodash/range';
import t from 'tcomb';
import { props } from 'tcomb-react';
import View from 'react-flexview';
import { pure, skinnable } from '../utils';
import { Value, Mode, MomentDate } from '../utils/model';
import InvalidDate from '../InvalidDate';
import Picker from '... | The day picker component is a component that can be used to pick a day in a month. |
import React from 'react';
import { Button, Form, Input } from 'antd';
const FormItem = Form.Item;
const TagForm = Form.create()((props) => {
const {
onSubmit,
form: {
getFieldDecorator,
getFieldsValue,
validateFields,
resetFields
}
} = p... | Package that exports a tag form. |
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import OrderWithData from '../apps/expenses/components/OrderWithData';
import Header from '../components/Header';
import Body from '../components/Body';
import Footer from '../components/Footer';
import Colle... | Component that displays a page with a series of non - standard |
import React from 'react';
import PropTypes from 'prop-types';
import BaseInput from 'dfv/src/fields/base-input';
import { toBool } from 'dfv/src/helpers/booleans';
import { FIELD_COMPONENT_BASE_PROPS } from 'dfv/src/config/prop-types';
const Website = ( props ) => {
const { fieldConfig = {} } = props;
const {
... | The default component that creates a website that can be used to display a field in a browser. |
import moment from 'moment';
import React from 'react';
export function RelativeTime({ ts }) {
return <span>{moment(ts).fromNow()}</span>;
}
| RelativeTime - Returns relative time in a sequence of milliseconds. |
import React from 'react';
import { TextField } from 'office-ui-fabric-react/lib/TextField';
import BaseStringType from '../../Type/StringType';
import AbstractRenderer from './AbstractRenderer';
export default class StringType extends BaseStringType {
static defaultProps = {
doRenderOperatorList: Abstract... | The default implementation of a sequence of strings. |
/**
*
* 在入口文件中,我们需要把App和redux建立起联系。Provider是react-redux提供的组件,
* 它的作用是把store和视图绑定在了一起,这里的Store就是那个唯一的State树。
* 当Store发生改变的时候,整个App就可以作出对应的变化。
* 这里的会传进Provider的props.children里。
*
* */
import '../scss/pure.scss'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import App... | DevTools 中 中 |
import React from 'react';
import App from './components/App';
window.React = React;
React.render(
<App />,
document.getElementById('root')
);
| Imports the missing React component and renders it to the window. |
/*
* React.js Starter Kit
* Copyright (c) 2014 Konstantin Tarkus (@koistya), KriaSoft LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
'use strict';
import React from 'react';
import ExecutionEnvironment from 'react/lib/Exe... | The main function of the component that is used to manage the navigation of the app. |
// @flow
import React from 'react';
class Foo extends React.Component<{}, void> {}
class Bar extends React.Component<{}, void> {}
{
const stringValue: {current: string} = React.useRef("abc"); // Ok
const numberValue: {current: number} = React.useRef(123); // Ok
const booleanValue: {current: boolean} = React.us... | Missing components in a component that are not yet in the system are not included in the component. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSdStorage = (props) => (
<SvgIcon {...props}>
<path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6 6h-2V4h2v4zm3 0h-2V4h2v4zm3 0h-2V4h2v4z"/>
</SvgIcon>
);
DeviceSdStorage ... | Devuelte un objeto DeviceSdStorage |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.