code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
import { connect } from 'dva';
import styles from './ExampleIndexPage.css';
function ExampleIndexPage() {
return (
<div className={styles.normal}>
<h1 className={styles.title}>Yay! Welcome to dva!</h1>
<div className={styles.welcome} />
<ul className={styles.list}>
... | ExampleIndexPage is a page that can be used to render a single node. |
import React from 'react';
import {children, optional, once} from '../Composite';
import Label from '../Label';
import Input from '../Input';
import RangeInputWithLabelComposite from '../Composite/RangeInputWithLabelComposite/RangeInputWithLabelComposite';
const Range = ({...props, children}) => (
<RangeInputWithLab... | The range component of a node that can be used to create a range of nodes. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalLibrary = (props) => (
<SvgIcon {...props}>
<path d="M12 11.55C9.64 9.35 6.48 8 3 8v11c3.48 0 6.64 1.35 9 3.55 2.36-2.19 5.52-3.55 9-3.55V8c-3.48 0-6.64 1.35-9 3.55zM12 8c1.66 0 3-1.34 3-3s-1.34-3-3-3-... | A component that exports a Navitia - MapsLocalLibrary |
// Meteor
import { Mongo } from 'meteor/mongo';
import React from 'react';
import ReactSelect from 'react-select';
import { FormattedMessage } from 'react-intl';
import t from 'tcomb-form';
class AdministrativeAreasCollection extends Mongo.Collection {
// insert(profile, callback) {
// }
// remove(selector, call... | The base class for all administrative areas that are not part of the administrative areas collection. |
import React from 'react';
import ExampleItem from '../ExampleItem';
const code = `const Component = (
<div dir="rtl">
<Tabs direction={'rtl'}>
<TabList>
<Tab>כותרת</Tab>
<Tab disabled>כותרת כבויה</Tab>
<Tab>כותרת שנייה</Tab>
<Tab>כותרת שלישית</Tab>
</TabList>
<T... | This function is a wrapper around the function that handles the case of a left - to - right option. |
/*
*
* @providesModule AppNavigator
*
* */
import React from 'react';
import { observable, action } from 'mobx';
import { observer, Provider } from 'mobx-react';
import { StackNavigator } from 'react-navigation';
import { Root, Content } from 'native-base';
import appStyles from 'appStyles';
import ManageWishItemScre... | Provides a navigation navigation for a single . |
import React from 'react';
import { Platform, View } from 'react-native';
import { connectStyle } from 'native-base-shoutem-theme';
import mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';
import NativeBaseComponent from '../Base/NativeBaseComponent';
import { Text } from './Text';
import computeProps from ... | A component that wraps a NativeBaseComponent in a Title class. |
import React from 'react';
/**
* Creates new trigger class that injects context into overlay.
*/
export default function createContextWrapper(Trigger, propName) {
return function (contextTypes) {
class ContextWrapper extends React.Component {
getChildContext() {
return this.props.context;
}... | Create a new trigger class that injects context into overlay. |
/**
*
* Navbar
*
*/
import React from 'react';
import styles from './styles.global.scss';
import Logo from 'components/navbar/Logo';
import Navigation from 'components/navbar/Navigation';
class Navbar extends React.Component {
//---------------------------------------------------------------------------------------... | A component that is rendered in the navbar. |
// third party imports
import express from 'express'
import compression from 'compression'
import logger from 'morgan'
import favicon from 'serve-favicon'
import serveStatic from 'serve-static'
import React from 'react'
import {renderToString} from 'react-dom/server'
import Helmet from 'react-helmet'
// local imports
i... | The main function for the Helmet - Helmet middleware. |
import React, { Component } from 'react';
import { Route, Router } from 'react-router';
import ReactGA from 'react-ga';
import createHistory from 'history/createBrowserHistory';
import ScrollToTop from 'shared/components/scrollToTop/scrollToTop';
import Home from './scenes/home/home';
const history = createHistory();
... | The main function that creates a component that is not attached to a pageview. |
import React from 'react';
import style from './index.css';
import Top from './top';
import Nav from './nav';
class PrivateView extends React.Component {
render () {
return (
<div className={ style.main }>
<Top/>
<div className={ style.body }>
... | Private view class |
import React from 'react'
import './style/Footer.scss'
class Footer extends React.Component {
render () {
return (
<div className='utility-belt-footer footer hidden-print'>
<p>© TM © DC Comics. WB SHIELD: TM; Warner Bros. Entertainment. Inc. (s17). Copyright © 2017 DC Comics.
All ch... | The Footer class |
import React from 'react';
import ImagesForm from '../../preferences/ImagesForm';
export default () => (
<div>
<h2>Images</h2>
<ImagesForm />
</div>
);
| The default implementation of which renders a hidden hidden element with a hidden images form. |
import React from 'react'
import Header from './containers/Header'
import Body from './containers/Body'
import Footer from './containers/Footer'
class App extends React.Component {
constructor (props) {
super(props)
}
render () {
return <div>
<Header />
<Body />
... | Component that renders a sequence of missing nodes in a DOM. |
/* eslint no-unused-vars:0 */
'use strict'
import React from 'react' // eslint-disable-line
import ReactDOM from 'react-dom'
import classNames from 'classnames'
import styles from './LeadingImage.scss'
import { getImageSrcSet, replaceStorageUrlPrefix } from '../../utils/'
// lodash
import get from 'lodash/get'
const... | A component that wraps a component in a leading image. |
import React from 'react';
import {Icon} from 'antd';
// 定义某个表的dataSchema, 结构跟querySchema很相似, 见下面的例子
// 注意: 所有的key不能重复
// 这个配置不只决定了table的schema, 也包括用于新增/删除的表单的schema
module.exports = [
{
key: 'id', // 传递给后端的key
title: 'ID', // 前端显示的名字
// 其实dataType对前端的意义不大, 更重要的是生成后端接口时要用到, 所以要和DB中的类型一致
// 对java... | JSDAG 扩 有 |
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import CounterApp from './CounterApp';
import configureStore from '../store/configureStore';
const store = configureStore();
export default class Root extends Component {
render() {
return (
<Provider store={store}>
... | The root component of a component that is not a React component. |
import React from 'react'
import PropsTypes from 'prop-types'
import { Provider } from 'react-redux'
import initStore from './initStore'
import { get } from 'lodash'
import ip from 'ip'
export default (Component) => (
class extends React.Component {
static propTypes = {
initialState: PropsTypes.object,
... | The base class for a single node - middleware chain. |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fillOpacity=".3" d="M22 8V2L2 22h16V8h4z" /><path d="M18 22V6L2 22h16zm2-12v8h2v-8h-2zm0 12h2v-2h-2v2z" /></React.Fragment>
, 'SignalCellularConnectedNoInternet3BarSharp');
| Create a series of icons for a window with a signal cellular connected to the user. |
import React from 'react'
import { render } from 'react-dom'
import { Router, browserHistory } from 'react-router'
import withExampleBasename from '../withExampleBasename'
import './stubs/COURSES'
const rootRoute = {
childRoutes: [ {
path: '/',
component: require('./components/App'),
childRoutes: [
... | Imports a single non - empty a and renders it in a browser. |
import React, { Component } from 'react';
import { createStore } from 'redux';
import { Provider, connect } from 'react-redux';
import { Router, Scene, ActionConst } from 'react-native-router-flux';
import { appReducer } from './Reducers/index';
import { navColor, font } from './Shared/Styles';
import Home from './S... | Imports a single component with a navigation bar. |
import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const RevealContentExamples = () => (
<ExampleSection title='Content'>
<ComponentExample
title='Visible Content'
des... | The RevealContentExamples module |
import React from 'react'
import PropTypes from 'prop-types'
import { gql, graphql } from 'react-apollo'
import userProfile from '../userProfile.gql'
const Forget = ({ forget }) => {
const handleSubmit = e => {
e.preventDefault()
let email = e.target.elements.email.value
if (email === '') {
window... | Generate a hidden field with a password for a user. |
import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import App from './app';
render( <AppContainer><App/></AppContainer>, document.querySelector("#app"));
if (module.hot) {
module.hot.accept('./app.js', () => {
const App = require('./app.js').default;
... | Imports the hot - loader and renders the app if it s available. |
import React from 'react'
import ReactDom from 'react-dom'
import {BrowserRouter, Route} from 'react-router-dom'
class App extends React.Component {
// constructor
constructor(props){
super(props)
this.state = {
content: '',
}
this.getApp = this.getApp.bind(this)
}
//hooks
componentDi... | The base class for a sequence of components that can be rendered and rendered by a browser. |
import React from 'react';
import request from 'superagent';
var MIN_LINK_VALUE = 50;
function loadData(path) {
request
.get(path)
.end((err, res) => {
if (err) { console.log(err); }
var links = res.body.links;
var nodes = res.body.nodes.map((node, i) => {
if (!node.node_id) { nod... | Load the nodes and links from the request and return the data object. |
import React from 'react';
const PianoKeyNote = (props) => {
const {
note,
semiNote,
playNoteHandler,
stopNoteHandler,
playingVoices,
octave
} = props;
function getClassName (color, key) {
const voiceLabel = key + '-' + octave;
let resu... | Package for PianoKeyNote |
import React from 'react';
import Github from './Github';
import LinkedIn from './LinkedIn';
class Social extends React.Component {
render() {
return (
<div>
<LinkedIn linkedIn={this.props.linkedIn}/>
<Github github={this.props.github}/>
</div>
);
}
}
export default Social; | A component that renders a tag that contains a link to a user s page. |
/* @flow */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View, StyleSheet } from 'react-native';
import PureContainer from './PureContainer';
type Layout = {
width: number,
height: number,
};
type LayoutEvent = {
nativeEvent: {
layout: Layout,
},
};
type Rendere... | The main function for a modal host. |
/**
* Created by u on 2017/5/20.
*/
import React from 'react';
import ReactDOM from 'react-dom';
import {createStore,applyMiddleware} from 'redux';
import {Provider} from "react-redux";
import thunk from 'redux-thunk';
import Carousel from "./components/Carousel.jsx";
import reducer from "./reducers";
const store =... | The main function for the package. |
import React, { Component } from 'react';
import NavigationSplitIt from '../Navigation/NavigationSplitIt';
import RestaurantSearch from './RestaurantSearch';
import MenuList from './MenuList';
class SplitDashboard extends Component {
constructor() {
super();
this.state = {
menu: [],
cart: 0
... | The base class for the SplitDashboard class. |
import React from 'react';
import ExampleWorkModal from './example-work-modal';
class ExampleWork extends React.Component {
constructor(props) {
super(props);
this.state = {
'modalOpen': false,
'selectedExample': this.props.work[0]
};
this.openModal = this.... | Example work - modal |
// @flow
/**
* @module withControl
*/
import React from 'react'
import hoistNonReactStatics from 'hoist-non-react-statics'
import type { ComponentType } from 'react'
import ContextTypes from './internal/context-types'
import Control from './Control'
import { IS_PRODUCTION } from './internal/constants'
import {
... | Create a new component with a higher - order control. |
import 'babel-polyfill'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import configureStore from '../common/store/configureStore'
import App from '../common/containers/App'
const initialState = window.__INITIAL_STATE__
const store = configureStore(initialState)
con... | Imports a single and renders it into a DOM. |
import React from 'react';
import PropTypes from 'prop-types';
export default class ModalRoot extends React.PureComponent {
static propTypes = {
children: PropTypes.node,
onClose: PropTypes.func.isRequired,
};
state = {
revealed: !!this.props.children,
};
activeElement = this.state.revealed ? ... | A component that is rendered as a modal modal. |
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
import api from 'mastodon/api';
import IconButton from 'mastodon/components/icon_button';
const messages = defin... | A component that embeds a modal window. |
import React from 'react'
import { Breadcrumb } from 'semantic-ui-react'
const BreadcrumbExampleMassiveSize = () => (
<Breadcrumb size='massive'>
<Breadcrumb.Section link>Home</Breadcrumb.Section>
<Breadcrumb.Divider icon='right chevron' />
<Breadcrumb.Section link>Registration</Breadcrumb.Section>
<... | Example of how to display a single node in a hierarchy. |
import React, { Component } from 'react';
import config from 'config/environment';
import troopImage from 'images/Troop.png';
import styles from './idme.css';
class Idme extends Component {
idMe = () => {
window.open(`${config.idmeOAuthUrl}?client_id=${config.idmeClientId}&redirect_uri=${config.host}/profile/ver... | The idme component |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const MapsPinDrop = (props) => (
<SvgIcon {...props}>
<path d="M18 8c0-3.31-2.69-6-6-6S6 4.69 6 8c0 4.5 6 11 6 11s6-6.5 6-11zm-8 0c0-1.1.9-2 2-2s2 .9 2 2-.89 2-2 2c-1.1 0-2-.9-2-2zM5 20v2h14v-2H5z"/>
</SvgIcon>
);
MapsPinDrop.displayName = 'MapsPi... | A component that exports a sequence of icons that are not part of a sequence of icons. |
import _ from 'lodash';
import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
const {addons: { PureRenderMixin }} = addons;
@ReactMixin.decorate(PureRenderMixin)
class UserProfileContactInfo extends React.Component {
static propTypes = {
phones: React.PropTypes.arr... | A component that displays a list of users who have a single contact. |
// https://www.npmjs.org/package/react-interpolate-component
// TODO: Drop this in favor of es6 string interpolation
import React from 'react';
import ValidComponentChildren from './utils/ValidComponentChildren';
const REGEXP = /\%\((.+?)\)s/;
const Interpolate = React.createClass({
displayName: 'Interpolate',
... | Interpolate a component into a string. |
import React from 'react';
import ReactDOM from 'react-dom';
import JqxDataTable from '../../../jqwidgets-react/react_jqxdatatable.js';
class App extends React.Component {
render() {
let source =
{
dataType: 'json',
dataFields: [
{ name: 'Shi... | A component that shows a list of records in the OData service. |
import React from 'react'
import { connect } from 'react-redux'
import Tabs, { Tab } from 'material-ui/Tabs'
import AppBar from 'material-ui/AppBar'
import withStyles from 'material-ui/styles/withStyles'
const styles = theme => ({
indicator: {
backgroundColor: '#ffffff'
}
})
export default connect(mapStateT... | React - redux |
import React from 'react'
import Header from '../../components/Header'
import classes from './CoreLayout.scss'
import '../../styles/core.scss'
export const CoreLayout = ({ children }) => (
<div className='container text-center'>
<Header/>
<div className={classes.mainContainer}>
{children}
</div>
... | React - core - layout |
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 />
</... | Imports a single node from the react module. |
import React from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import styled from 'styled-components'
import { pxToRem } from '../../../../helpers/utils/typography'
import COLORS from '../../../../constants/colors-config'
import { ScreenConfig } from '../../../../constants/screen-confi... | Export a single node in a project. |
import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... | A modal body component that wraps a component in a modal window. |
import React from 'react';
import ReactDOM from 'react-dom';
import {
HashRouter,
Route,
Link
} from 'react-router-dom';
import Navbar from './components/Navbar';
import App from './components/App';
import Home from './components/Home';
import FooterBar from './components/Footer';
import ChatBar from './componen... | Imports a single node in the DOM. |
import React from 'react'
import { browserHistory, Router } from 'react-router'
import { Provider } from 'react-redux'
import PropTypes from 'prop-types'
class App extends React.Component {
static propTypes = {
store: PropTypes.object.isRequired,
routes: PropTypes.array.isRequired
}
shouldComponentUpdat... | The base App class. |
import React from 'react'
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
import DevTools from '@/components/dev-tools'
import '@/styles/main.scss'
import { TechnicalIssues } from '@/components/error/index'
import { ZendeskWidget } from '@/components/external-services'
import { GoogleFontsLoad... | Imports a single non - empty sequence of components. |
import PropTypes from 'prop-types'
import React from 'react'
import Week from './Week'
import TimeGrid from './TimeGrid'
function workWeekRange(date, options) {
return Week.range(date, options).filter(
d => [6, 0].indexOf(d.getDay()) === -1
)
}
class WorkWeek extends React.Component {
render() {
let { ... | A component that renders a time - series series in a week range. |
import React from 'react';
import {render} from 'react-dom';
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import Hello from './components/welcome';
import {Home,About,Topics} from './components/menu';
const root =document.getElementById("root");
render(
<Router>
<... | Imports a single node in the DOM. |
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 from 'react'
import PropTypes from 'prop-types'
import { connect } from 'dva'
import { checkPower } from 'utils'
import { ADD, UPDATE, DELETE } from 'constants/options'
import CategoryList from './List'
import CategorySearch from './Search'
import CategoryModal from './ModalForm'
function Category ({ loca... | The base class for all non - bbs - categories. |
import React from 'react';
import styles from 'css-modules/hr-view/ul.scss';
import {li_types as types} from "appConstants";
import classnames from 'classnames';
//components
import Li from './li';
export default ({points, type, className}) => {
return (
<ul className={classnames(styles.ul, className || ... | Generate a default entry for a n - ary system. |
import React from 'react';
import classnames from 'classnames';
import Headline from 'grommet/components/Headline';
import Box from 'grommet/components/Box';
import InfographicSection from '../components/InfographicSection';
import PlatformAndroid from 'grommet/components/icons/base/PlatformAndroid';
import Anchor f... | The default package for the Header class |
import React from 'react'
import { connect, } from 'react-redux'
import MarkdownRenderer from 'react-markdown-renderer'
import PropTypes from 'prop-types'
import { journalActions, } from '../../redux/actions'
import { journalSelectors, } from '../../redux/selectors'
import { NotifySuccess, } from '../../services/notifi... | The base component for a single missing - node tag. |
import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
export default createDevTools(
<LogMonitor />
);
| import React from react - devtools |
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. |
/**
*
* ResetPasswordForm
*
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Form } from 'react-form';
import { Row, Col } from 'react-flexbox-grid';
import Theme from 'assets/theme';
import Box from 'features/common_ui/components/Box';
import { GreenButton } from 'features/co... | A component that renders a reset password form with a single hidden input. |
import 'babel-core/polyfill';
import React from 'react';
import { Provider } from 'react-redux';
import App from './containers/App';
import configureStore from './store/configureStore';
import 'todomvc-app-css/index.css';
const store = configureStore();
React.render(
<Provider store={store}>
{() => <App />}
... | Imports a single node in the DOM. |
import React from 'react'
import { remote } from 'electron'
import styled from 'styled-components'
const TitleBarArea = styled.div`
position: relative;
height: 22px;
`
// Create a space for MacOS title bar buttons on a frameless Window
const TitleBarShim = () => {
const win = remote.getCurrentWindow()
const t... | Create a space for a window s title bar buttons on a frameless window. |
//@flow
import React from 'react';
import type {Card, UpdateCard} from "../../types/cards";
import type {Action} from "../../types/index";
/**
* Предпросмотр и настройка добавленного пользователем контрола Input
**/
export default function PreviewInput({updateCard, card, id}: {
updateCard: UpdateCard => Action,
c... | Renders a single unknown - node input to the user. |
import React from 'react';
import classNames from 'classnames';
import CustomPropTypes from './utils/CustomPropTypes';
const Grid = React.createClass({
propTypes: {
/**
* Turn any fixed-width grid layout into a full-width layout by this property.
*
* Adds `container-fluid` class.
*/
fluid... | Creates a grid component that can be rendered with a custom element. |
/* 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';
require('./favicon.ico'); // Tell webpack t... | Imports a single node and renders it as a hidden hidden element. |
/**
* Copyright 2017 Goldman Sachs.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | with the fields required to create a new object in the given language. |
import React from 'react';
import ReactDOM from 'react-dom';
// import Routes from './components/Routes';
import ChessGame from './components/ChessGame';
ReactDOM.render(
<ChessGame url="/api/moves" pollInterval={2000} />,
document.getElementById('gsc-chess'));
| Imports a single component and renders it in a ChessGame. |
import React from 'react';
import styled from 'styled-components';
import Carousel from 'react-slick';
import {Grid, Row, Col} from 'react-flexbox-grid';
import RaisedButton from 'material-ui/RaisedButton';
import FloatingActionButton from 'material-ui/FloatingActionButton';
import Menu from 'material-ui/svg-icons/navi... | Component that displays a menu of a file. |
import React, { Component } from 'react';
import { View, Dimensions, Platform, TouchableOpacity } from 'react-native';
import ParallaxScrollView from 'react-native-parallax-scroll-view';
import { Icon } from 'react-native-elements';
import styled from 'styled-components';
import { colors, normalize, fonts } from 'conf... | Component that is used to render a parallax scrollable menu. |
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import { RouterContext } from 'react-router';
import ContextProvider from '../../common/container/ContextProvider';
import Layout from '../Layout';
import fetchComponentData from './fetchComponentData';
import dehydrate from './dehydrate';
expor... | Default render function |
import React from 'react';
import {
StyleSheet,
View,
Dimensions,
} from 'react-native';
import MapView from 'react-native-maps';
import PriceMarker from './PriceMarker';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.78825;
const LONGITUDE = -122.4... | Package that provides a marker for a specific type of object. |
import React, { Component } from 'react';
import {Route, Router, browserHistory} from 'react-router';
import Page from './Page.js';
import Contents from './Contents.js';
export default class App extends Component {
render() {
return (
<Router history={browserHistory}>
<Route name="contents" pat... | The base class for all components that are not part of a component in a component s routing stack. |
import React from 'react';
import Rotate from './rotate';
import calcFill from './fill';
export default ({
fill = null,
light = false,
disabled = false,
direction = 'down',
colors = {},
style = {},
...rest
}) => (
<Rotate direction={direction}>
{({ style: rotateStyle }) => (
<svg
xml... | Default function for linking a single node into a skeleton skeleton. |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const ContentUndo = (props) => (
<SvgIcon {...props}>
<path d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/>
</SvgIcon>
);
ContentUndo.displayName ... | Undoes the missing element in a group of icons. |
/* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
const qualityType = {
0: 'good',
1: 'bad',
2: 'unknown'
};
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) ... | A filter that filters out items that are not in the list of products. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageLinkedCamera = (props) => (
<SvgIcon {...props}>
<circle cx="12" cy="14" r="3.2"/><path d="M16 3.33c2.58 0 4.67 2.09 4.67 4.67H22c0-3.31-2.69-6-6-6v1.33M16 6c1.11 0 2 .89 2 2h1.33c0-1.84-1.49-3.33-3.33-3.3... | A component that exports a sequence of images. |
import React from 'react';
import PropTypes from 'prop-types';
import serialize from 'serialize-javascript';
import config from '../config';
class Html extends React.Component {
static propTypes = {
title: PropTypes.string.isRequired,
description: PropTypes.string.isRequired,
styles: PropTypes.arrayOf(Pr... | Generates a single tag that can be used to render a single node in a browser. |
import React, { Component } from 'react';
import Container from './Container';
export default class SortableSimple extends Component {
render() {
return (
<div>
<p>
<b><a href='https://github.com/gaearon/react-dnd/tree/master/examples/04%20Sortable/Simple'>Browse the Source</a></b>
... | The base class for sorting a component. |
import ReactDOM from 'react-dom'
import React from 'react'
import { createStore } from 'redux'
import { Provider } from 'react-redux'
import Util from 'common/util'
import Agent from 'chaos/agent'
import App from 'chaos/components/app'
import root_reducer from 'chaos/reducers'
import * as actions from 'chaos/actions'... | Private functions - functions - functions |
import React from 'react';
import Header from '../../components/organisms/header';
import GeonodeAnalytics from '../../components/organisms/geonode-analytics';
import GeonodeLayersAnalytics from '../../components/organisms/geonode-layers-analytics';
import WSAnalytics from '../../components/organisms/ws-analytics';
imp... | Extend React. Component with a SWPerf component. |
import React, { Component } from 'react';
import Container from '../../../components/Container';
import { Col, Row } from '../../../components/Grid';
import theme from '../../../theme';
import { compose } from 'glamor';
import { EntypoTools, EntypoCloud, EntypoRocket } from 'react-entypo';
import { rhythm } from 'utils... | The default component that is used to render a single node - based configuration. |
/* eslint-disable */
import App from './App';
import React from 'react';
import './styles/index.css';
import thunk from 'redux-thunk';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import rootReducer from './rootReducer';
import { BrowserRouter } from 'react-router-dom';
import { createStore... | Imports a single node in the browser. |
import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const Label = React.createClass({
mixins: [BootstrapMixin],
getDefaultProps() {
return {
bsClass: 'label',
bsStyle: 'default'
};
},
render() {
let classes = this.getBsClassSe... | create a label with a bootstrap class |
import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import ItemDamageDone from 'interface/others/ItemDamageDone';
import TalentStatisticBox from 'interface/others/TalentStatisticBox';
import AverageTargetsHit from 'interface/others/AverageTargetsHit';
import { e... | A base class for all barrage events. |
import React from 'react';
import { dependencies, devDependencies } from '../../package.json';
import { PageHelmet } from '../components/helmet/';
const getDependencies = () => [
...Object.keys(dependencies),
...Object.keys(devDependencies),
].sort();
const Dev = () => {
return (
<section>
<PageHelme... | Package that contains a list of dependencies and devDependencies. |
import React from 'react';
import classNames from 'classnames';
import TransitionEvents from './utils/TransitionEvents';
const TabPane = React.createClass({
propTypes: {
active: React.PropTypes.bool,
animation: React.PropTypes.bool,
onAnimateOutEnd: React.PropTypes.func,
disabled: ... | Creates a tab pane with the given props. |
import React from 'react'
import { Rating } from 'semantic-ui-react'
const RatingExampleStar = () => (
<Rating icon='star' defaultRating={3} maxRating={4} />
)
export default RatingExampleStar
| Imports a single - element and exports it as RatingExampleStar. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionRoom = (props) => (
<SvgIcon {...props}>
<path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z... | A component that renders a series of action rooms. |
import React, { Component } from 'react';
import QueueAnim from 'rc-queue-anim';
import styles from './styles.css';
class TimeLine extends Component {
render() {
return (
<section className={styles.timeline}>
<QueueAnim type="bottom" className={styles.timeline_con}>
<div className={style... | Generate a time line that shows how to show a single n - hot warning. |
import React from 'react';
import PropTypes from 'prop-types';
import {
Image,
Text,
StyleSheet,
TouchableOpacity,
View,
} from 'react-native';
import { BarContainer, BAR_POSITIONS } from './BarContainer';
const BUTTON_WIDTH = 40;
export default class BottomBar extends React.Component {
static propTypes... | A component that renders a bottom bar with missing properties. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Helmet } from 'react-helmet';
import { Col, Container, Row } from 'react-bootstrap';
import querystring from 'querystring';
import { product } from 'config';
import LoginForm from 'components/siteComponents/UserManagementUI/loginFo... | A component that displays a log in to a specific product. |
import React from 'react'
export class DashboardPage extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>仪表盘</div>
)
}
}
| A component that renders a sequence of hidden nodes in a dashboard page. |
/*
* Copyright (C) 2015 Actor LLC. <https://actor.im>
*/
import React, { Component } from 'react';
import { Container } from 'flux/utils';
import classnames from 'classnames';
import { FormattedMessage, FormattedHTMLMessage } from 'react-intl';
import SearchStore from '../../stores/SearchStore';
import SearchAction... | The search component which is a dropdown of the search results. |
import React from 'react';
import Radium from 'radium';
@Radium
export default class Img extends React.Component {
static propTypes = {
src: React.PropTypes.string.isRequired,
alt: React.PropTypes.string,
width: React.PropTypes.number,
height: React.PropTypes.number
};
static defaultProps = {
... | A component that renders a single missing - node image in a background. |
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { injectIntl } from 'react-intl';
import { setupListEditor, clearListSuggestions, ... | A component that displays a list of items that can be selected by a user. |
import React from 'react';
import PropTypes from 'prop-types';
import styled from '@emotion/styled';
const Loading = styled(({className}) => (
<div className={className}>loading...</div>
))(({style}) => style);
Loading.propTypes = {
style: PropTypes.object
};
export default Loading;
| Imports a missing - node node and exports it as a loading class. |
/**
* ButtonFixedFeedback module.
* @module @massds/mayflower-react/ButtonFixedFeedback
* @requires module:@massds/mayflower-assets/scss/01-atoms/fixed-feedback-button
*/
import React from 'react';
import PropTypes from 'prop-types';
const ButtonFixedFeedback = (props) => (
<div
className="ma__fixed-feedback... | ButtonFixedFeedback button for a single |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const CommunicationContactPhone = (props) => (
<SvgIcon {...props}>
<path d="M22 3H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.... | A component that exports a communication contact phone. |
import React from 'react';
import './PaneTitle.css';
const PaneTitle = (props) => (
<div className="PaneTitle">{props.text}</div>
);
export default PaneTitle;
| export PaneTitle class |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.