code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
import {IndexRoute, Route} from 'react-router';
import { isLoaded as isAuthLoaded, load as loadAuth } from 'redux/modules/auth';
import {
App,
Blog,
Chat,
Home,
Widgets,
About,
Login,
LoginSuccess,
Survey,
NotFound,
Posts,
Post,
} from 'contai... | The default middleware for all routes that require a login. |
import React from 'react';
const spanStyle = {
padding: 5
},
messageStyle = {
border: '3px solid',
fontSize: 35,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
borderRadius: 4,
margin: 5,
cursor: 'default'
},
successStyle = {
...messageStyle,
color: 'blue',
borderColor... | export default function |
import React from 'react'
// import PropTypes from 'prop-types'
import { connect } from 'dva'
import { Carousel } from 'antd-mobile'
import TopBanner from '../components/TopBanner'
import BottomBar from '../components/BottomBar'
import './GuidePage.scss'
const GuidePage = () => {
console.log('guide:')
return (
... | Demonstration of the module |
import React from 'react';
export default class TweetMedia extends React.Component {
renderMedia(){
const media = this.props.media.map((medium) =>{
// you should probably put a switch statement here when you need to handle other media types
// just sayin'
if(medium.type === 'photo')... | The TweetMedia class |
// @flow
import React, { Component } from 'react';
export default class App extends Component {
props: {
children: HTMLElement
};
render() {
return (
<div>
{this.props.children}
</div>
);
}
}
| The base class for a sequence of children. |
import React from 'react';
import IconBase from './IconBase.js';
export const ShieldCrossedIcon = (props) => (
<IconBase {...props} viewBox="0 0 20 20">
<path d="M1.9 1.3c.2-.2.5-.2.7 0l15.5 15.5c.2.2.2.5 0 .7-.2.2-.5.2-.7 0L1.8 1.9c-.3-.2.1-.6.1-.6zM14.7 17.3c-1.1 1-2.6 1.8-4.5 2.7h-.4c-8.3-3.5-8.1-8.2-7.7-15.2v-.... | A component that displays a shield crossed icon. |
import React from 'react';
import { connect } from 'react-redux';
import {
gql,
graphql,
} from 'react-apollo';
import { withRouter } from 'react-router';
import { NavDropdown, Nav, MenuItem, NavItem } from 'react-bootstrap';
import Logout from './Logout';
const profileQuery = gql`
query ProfileQuery {
profil... | The base implementation of the base class. |
import React from 'react';
import {connect} from 'react-redux';
import PostList from '../components/PostList';
import {bindActionCreators} from 'redux';
import * as Actions from '../actions/actions';
import Header from '../components/Header';
import Sidebar from '../components/Sidebar';
import Footer from '../component... | A component that wraps a React component to serve a series of posts. |
import React from 'react';
function IssueIcon(props) {
return (
<svg
height="1em"
width="0.875em"
className={props.className}
>
<path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7S10.14 13.7 7 13.7 1.3 11.14 1.3 8s2.56-5.7 5.7-5.7m0-1.3C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7S10.86 1 7 1z m1 3H6v... | Issue icon for missing node. |
// @flow
import React from 'react';
const express = require('express');
import { renderToNodeStream } from 'react-dom/server';
import App from '../src/App';
const app = express();
app.get('/', (req, res) => {
// res.send('hello world');
//open tags
res.write(`<!doctype html>
<html>
<head>
<met... | Example of how to render a single node tag with a css example. |
//import App from './App';
import React from 'react';
import ReactDOM from 'react-dom';
import Split from './SplitApp';
ReactDOM.render(
<Split />,
document.getElementById('react-app')
);
/**
* Render the app to dom node
*
*
*/
| Renders a single node from the app to the dom |
/**
* 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 export a new user - defined object into a Kit. |
import React from 'react';
// From the GitHub branding website.
const Icon = ({ ...other }) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1000" className="icon" {...other}>
<path d="M512 0C229.25 0 0 229.25 0 512c0 226.25 146.688 418.125 350.156 485.812 25.594 4.688 34.938-11.125 34.938-24.625 0... | A component that displays a sequence of components in a sequence of components. |
import { contactData} from '../Data/ContactData';
import { PureList} from "./Shared/Shared";
import React from 'react';
const FooterContactDetail = (props) => (
<li className="">
<i className={props.iconClass} /> | {
(props.link)?( <a href={props.link}> <PureList da... | Package that exports a footer with a link to the footer. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsBluetooth = (props) => (
<SvgIcon {...props}>
<path d="M11 24h2v-2h-2v2zm-4 0h2v-2H7v2zm8 0h2v-2h-2v2zm2.71-18.29L12 0h-1v7.59L6.41 3 5 4.41 10.59 10 5 15.59 6.41 17 11 12.41V20h1l5.71-5.71-4.3-4.... | A component that exports action settings for a series of actions. |
import React from 'react';
import PropTypes from 'prop-types';
import css from './FilterPaneSearch.css';
import Icon from '../Icon';
import FocusLink from '../FocusLink';
import IconButton from '../IconButton';
const propTypes = {
clearSearchId: PropTypes.string,
onChange: PropTypes.func,
onChangeIndex: PropType... | Define a filter pane search. |
// @flow
import type { State } from '../../common/types';
import HttpError from 'found/lib/HttpError';
import React from 'react';
import queryFirebase from './queryFirebase';
import { makeRouteConfig, Route } from 'found/lib/jsx';
import { onUsersPresence } from '../../common/users/actions';
import { onLoadPosts, onLoa... | Generate a route that can be used to render a single page. |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdKeyboardArrowDown(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<polygon points="14.83 17 24 26.17 33.17 17 36 19.83 24 31.83 12 19.83" />
</IconBase>
);
}
export default MdKeyboardArrowDown;
| Default Keyboard Arrow Down |
import React from 'react'
import {findDOMNode} from 'react-dom'
import 'script-loader!smartadmin-plugins/bower_components/jquery-nestable/jquery.nestable.js'
export default class SmartNestable extends React.Component {
componentDidMount() {
let element = $(findDOMNode(this))
let options = {};
if (th... | Extend React. Component with Nestable. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSpeakerNotesOff = (props) => (
<SvgIcon {...props}>
<path d="M10.54 11l-.54-.54L7.54 8 6 6.46 2.38 2.84 1.27 1.73 0 3l2.01 2.01L2 22l4-4h9l5.73 5.73L22 22.46 17.54 18l-7-7zM8 14H6v-2h2v2zm-2-3V9l2 2H6zm14... | A component that renders a series of action speaker notes on. |
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
import * as firebase from 'firebase';
import * as todoListService from '../../todolist.service';
import Checkbox from '../checkbox';
export default class Todo extends Component {
constructor(props, context) {
... | The Todo component is a base |
import React, { Component } from 'react';
export default class extends Component {
render() {
return(<div className="isoLayoutContentWrapper" style={{height: "100vh"}}>
<div className="isoLayoutContent">
<h1>Blank Page</h1>
</div>
</div>);
}
};
| A component that renders a blank page in a layout. |
import React from 'react';
export default class NavLabel extends React.Component {
render() {
return (
<li {...this.props} className="navLabel">{this.props.children}</li>
);
}
}
| The default navigation label class |
import React from 'react'
import ReactDOM from 'react-dom'
import jQuery from 'jquery'
import classnames from 'classnames'
let $ = jQuery;
import {Envs} from '../envs'
import {NComponent, NAddonComponent} from './n-component'
class NText extends NAddonComponent {
// lifecycle
postDidUpdate() {
let value = this.get... | The default implementation of a component that can be rendered in a text field. |
/* eslint-disable import/no-extraneous-dependencies */
import React, { Component } from 'react';
import { storiesOf } from '@storybook/react';
import Breadcrumbs from './index';
class Wrapper extends Component<*, *> {
state = {
path: '/blog/2018/123456',
};
routes = [
{ path: '/:root', title: ({ root })... | A component that wraps a single node in a tree of nodes. |
import React from 'react'
import ReactDOM from 'react-dom'
import App from './components/App'
ReactDOM.render(<App />, document.getElementById('root'))
| Import ReactDOM and App |
import React from 'react';
import PropTypes from 'prop-types';
import Modal from 'react-bulma-companion/lib/Modal';
import ConfirmDeleteTodo from '_organisms/ConfirmDeleteTodo';
export default function ConfirmModal({ confirm, closeModal, deleteTodo }) {
return (
<Modal className="confirm-modal" active={confirm... | The default function for the modal modal. |
import React from 'react'
import HeaderContainer from '../organisms/HeaderContainer'
import CountContainer from '../organisms/CountContainer'
import CalcContainer from '../organisms/CalcContainer'
import Link from '../atoms/Link'
const PageBar = ({ state: { misc: { locked }, routing: { pathname } }, actions }) => {
... | export PageBar - > js |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAndroid = (props) => (
<SvgIcon {...props}>
<path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8... | A component that exports a series of components that can be used to render a series of components. |
import React from 'react';
import {GenericScrollBox} from './GenericScrollBox';
export class ScrollBox extends React.Component {
render() {
return (
<GenericScrollBox {...this.props}>
<div className="scroll-box__viewport">
{this.props.children}
</div>
</GenericScrollBox>
... | The scroll box class |
import 'babel-polyfill'
import React from 'react'
import { render } from 'react-dom'
import { browserHistory } from 'react-router'
import { syncHistoryWithStore } from 'react-router-redux'
import Root from './containers/Root'
import configureStore from './store/configureStore'
const store = configureStore()
const hist... | Imports a single node in the browser history. |
import React from 'react'
import { observer, inject } from 'mobx-react'
import { Modal, FormControl, FormGroup, Button, Form, ListGroup, ListGroupItem } from 'react-bootstrap'
import { SimpleInput } from '../others/form'
import { SimpleList } from '../others/lists'
@inject('testStore', 'textbookPublicStore', 'textbo... | Vybalikacja komponente nazwych komponente |
import React from 'react';
const Adventures = () => (
<div>
<h2>Adventures</h2>
<p>Getting this continuously deployed was a mini adventure :-D</p>
</div>
);
export default Adventures;
| A function to export a single non - mini adventure in a module. |
'use strict';
import React from 'react'; // eslint-disable-line no-unused-vars
import DemoRow from './demo-row'; // eslint-disable-line no-unused-vars
export default (props) => <table className='table table-striped'>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Link</th>
</tr>
</thead>
<tbody>
... | Default function for returning a hidden section of the unknown - node list. |
/**
* @license
* Copyright 2018 Google LLC. All Rights Reserved.
* 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 a... | The base class for all the non - redux - related components. |
import React from 'react';
import { store } from '../redux/store';
import { Counter } from '../components/Counter';
import { addNewCounter, removeCounter, incrementCounter, decrementCounter } from '../redux/actions/counterActions';
import { connectWithStore } from '../redux/connectWithStore';
import Layout from '../com... | A component that renders a Counter and wraps it in a container that can be used to create a counter. |
import React from 'react'
import Responsive from 'react-responsive'
import LargeFooter from './LargeFooter'
import SmallFooter from './SmallFooter'
export default () =>
<div>
<Responsive
minWidth={961}
>
<LargeFooter />
</Responsive>
<Responsive
maxWidth={960}
minWidth={601}
... | Imports a sequence of non - terminal nodes from React and react - responsive. |
import _extends from 'babel-runtime/helpers/extends';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { childrenUtils, customPropTypes, getElementType, getUnhandledProps, META } from '../../lib';
/**
* A step can contain a title.
*/
function StepTitle(props) {
va... | A step title can be a child of a step or a child of a step. |
import React from 'react';
import {connect} from 'react-redux';
import Navbar from './CommonComponent/Navbar/navbar';
import Footer from './CommonComponent/Footer/footer';
class Main extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="container"... | The main component for a sequence of nodes. |
import React from 'react'
import { createStore, applyMiddleware } from 'redux'
import thunk from 'redux-thunk'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import reducer from './station/reducer'
import Station from './station'
require('./index.css')
let createStoreWithThunks ... | import React from React - dom |
import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { fetchAccount } from '../../actions/accounts';
import { expandAccountFeaturedTimeline, expandAccountTimeline } from '../../actions/timelines';
import ... | The account timeline component is a special component that can be used to render a timeline of the account timeline. |
import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import SnackbarReadmeText from './README';
import SnackbarExampleSimple from './... | Exports a Snackbar page with a single - language code. |
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import previewStyle from './defaultPreviewStyle';
export default function UnknownPreview({ field }) {
return <div style={previewStyle}>No preview for widget “{field.get('widget')}”.</div>;
}
UnknownPreview.propTypes = {
field: ... | Renders a UnknownPreview for a given field. |
import React from 'react'
import { StyleSheet, Text, View } from 'react-native'
import { NativeRouter, Route, Link } from 'react-router-native'
const Home = () => (
<Text style={styles.header}>
Home
</Text>
)
const About = () => (
<Text style={styles.header}>
About
</Text>
)
const Topic = ({ match })... | Private functions Returns a function that exports a single object. |
/**
* LoadingIndicator.react.js
*
* A loading indicator, copied from https://github.com/tobiasahlin/SpinKit
*
*/
import React from 'react';
// Since this component doesn't need any state, make it a stateless component
function LoadingIndicator() {
return (
<div>Loading
<div className="sk-fading-circl... | A loading indicator for a missing node in the hierarchy. |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
TouchableHighlight,
Animated,
View,
Dimensions,
} from 'react-native';
let { screenWidth, screenHeight } = Dimensions.get('window')
va... | JSX function to render a single missing - node node in a browser. |
import React from 'react';
import Transition from 'react-overlays/lib/Transition';
import CustomPropTypes from './utils/CustomPropTypes';
import deprecationWarning from './utils/deprecationWarning';
class Fade extends React.Component {
render() {
let timeout = this.props.timeout || this.props.duration;
retu... | A fade animation that fades out a component when it is shown or unmounted. |
require('../../css/drawer.less')
import React from 'react';
const ReactPropTypes = React.PropTypes;
class Drawer extends React.Component {
constructor(props) {
super(props);
this.state = {
open: props.open
};
this.props.width = 600;
}
state: {
}
componentWillUpdate() {}
compo... | The base Drawer class |
import esp from 'esp-js'
import espDevTools from 'esp-js-devtools';
import React from 'react';
import ReactDOM from 'react-dom';
import model from './model';
import components from './components';
import services from './services';
// export for http://fb.me/react-devtools
window.React = React;
espDevTools.registerDe... | Imports a single window of a single - model application. |
import React from 'react';
import PropTypes from 'prop-types';
import VoidformGraph from './VoidformGraph';
const VoidformsTab = ({ voidforms = [], insanityEvents, ...modules }) => {
if (voidforms.length === 0) {
return null;
}
return (
<div className="voidforms">
{voidforms.map((voidform, i) => ... | export default voidforms |
/* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconLocalDrink(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconPro... | A default function for selecting a node in a hierarchy. |
/* eslint-disable no-param-reassign */
// ----------------------
// IMPORTS
import React from 'react';
import PropTypes from 'prop-types';
import { Route, Redirect as ReactRouterRedirect } from 'react-router-dom';
// ----------------------
// <Status code="xxx"> component. Updates the context router's context, wh... | A component which can be rendered on the server. |
import React from 'react';
import PropTypes from 'prop-types';
import ServiceCardBase from './ServiceCardBase.js';
import {connect} from 'react-redux';
import './ThermostatCard.css';
export class ThermostatCard extends React.Component {
constructor (props) {
super(props);
const temp = this.props.service.state.ge... | The ThermostatCard class is a class that exports the state of a thermostat card. |
import React from 'react';
import Card from 'antd/lib/card';
import Icon from 'antd/lib/icon';
import '../style.css';
import Tooltip from 'antd/lib/tooltip';
const downloadList = [
{
title: '爱听播放器',
url: 'https://renhongl.github.io/other/AiTing.zip',
desc: '一个简洁、好看、功能丰富的播放器,相当于音乐播放器和听书软件的... | NotFound export export |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionHttp = (props) => (
<SvgIcon {...props}>
<path d="M4.5 11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5v2zm2.5-.5h1.5V15H10v-4.5h1.5V9H7v1.5zm5.5 0H14V15h1.5v-4.5H17V9h-4.5v1.5zm9-1.5H18v6h1.5v-2h2c.8 0 1.5-.7 1.5-1.5v-... | A component that exports a single action in a sequence of icons. |
import React from 'react';
import { connect } from 'react-redux';
import definitions from '../../models/';
import ac from '../../state/actionCreators';
import { capitalize } from '../../utils/text';
class DataCreator extends React.Component {
constructor() {
super();
const inputs = {};
const modelLis... | The base class for all components that can be created by a component |
import React from 'react';
import { PrismCode } from 'react-prism';
import { dedent } from 'dentist';
const DocumentProptypes = (props) => {
const {
name,
proptypes
} = props.component;
return (
<div className="docs-component-props mt-5">
<h3>{name} - PropTypes</h3>
<pre>
<PrismCo... | Generate a sequence of JSX code for a single node. |
import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class AndroidArrowDown extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g id="Icon_8_">
<g>
<path d="M277.375,85v259.704l119.702-119.702L427,256L256,427L85,256l29.924-29.922l119.701,118.626... | AndroidArrowDown class for a single node in the tree. |
/**
* 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.
*/
import Rea... | This module exports a missing dependency on the top of the source tree. |
import React from 'react';
const First = React.createNotClass({
displayName: 'First'
});
class Second extends React.NotComponent {}
| The first component of a sequence |
import React from 'react'
import ReactDOM from 'react-dom'
import 'react-vis/dist/style.css'
const render = (component, selector) =>
ReactDOM.render(component, document.querySelector(selector))
import A from './A'
render(<A />, '#hi')
| Imports a component if it is not present in the DOM. |
// src/components/contact-card.js
import React from 'react'
import { Link } from 'react-router-dom'
import PropTypes from 'prop-types' // React v15+ 挪到额外模块中了
import { Card, Button, Icon } from 'semantic-ui-react'
import { deleteContact } from '../actions/contact-actions'
class ContactCard extends React.Component {
... | Component that displays a single sequence of non - contact - related messages. |
/* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
products.push({
id: id,
... | Imports a BootstrapTable that displays a list of products in a single table. |
import React from 'react';
import Slider from 'material-ui/Slider';
/**
* By default, the slider is continuous.
* The `step` property causes the slider to move in discrete increments.
*/
const SliderExampleStep = () => (
<Slider step={0.10} value={0.5} />
);
export default SliderExampleStep;
| Example of how to handle continuous. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationConfirmationNumber = (props) => (
<SvgIcon {...props}>
<path d="M22 10V6c0-1.11-.9-2-2-2H4c-1.1 0-1.99.89-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2... | NotificationConfirmationNumber is a component that can be used to confirm a user that a user has selected a notification. |
import React from 'react';
import { Filter as CrudFilter, TextInput } from 'rest-ui/lib/mui';
import { translate } from 'rest-ui';
import Chip from 'material-ui/Chip';
const QuickFilter = translate(({ label, translate }) => <Chip style={{ marginBottom: 8 }}>{translate(label)}</Chip>);
const Filter = ({ ...props }) =>... | A filter that can be used to filter a post. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationImportContacts = (props) => (
<SvgIcon {...props}>
<path d="M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 2... | A component that |
import React from 'react';
import { Route, IndexRoute, Redirect } from 'react-router';
// NOTE: here we're making use of the `resolve.root` configuration
// option in webpack, which allows us to specify import paths as if
// they were from the root of the ~/src directory. This makes it
// very easy to navigate to file... | This function exports a configuration of a single nested . |
import React from 'react';
import Icon from '../Icon';
import styles from './styles.css';
export default function Info() {
const list = [
'MERN stack dev',
'3rd party API integrations',
'Custom JS/CSS/HTML for tools like Tumblr, Shopify, Square etc.',
];
const list1 = [
'Full service music produc... | Generate a single warning message |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { startActivity } from './actions';
import * as activity from './activity';
export class ActivitySwitcher extends React.Component {
static propTypes = {
onActivityStart: PropTypes.func.isRequired,
lo... | The activity switcher class |
/**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import React, { Component } from 'react';
export default class extends Component {
render() {
return (
<div>
<h1>Test Article 1</h1>
<p>Co... | The base class for a missing component that is not a component of a component type. |
import React from 'react'
import PropTypes from 'prop-types'
import querystring from 'querystring'
import ItemStore from '../store/itemStore'
import Item from './Item'
import Spinner from '../Spinner/Spinner'
import Pager from '../pager/pager'
import './ItemList.css'
export default class ItemList extends React.Compon... | The base class for a list of items that can be rendered in a page. |
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import styles from './assets/sass-styles.module.sass';
import indexStyles from './assets/index.module.sass';
... | Exports a missing - JS module into a JS module. |
/**
* External dependecies.
*/
import React from 'react'
/**
* Internal dependecies.
*/
import ReferenceEndpoint from './ReferenceEndpoint'
const EndpointsList = ( { endpoints } ) => {
return (
<div className="endpoints-list">
<h3 className="endpoints-list__title">Endpoints:</h3>
<ul>
{ endpoints.map... | This function exports a list of all the endpoints that are not part of a managed service. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationClose = (props) => (
<SvgIcon {...props}>
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
</SvgIcon>
);
NavigationClose = pure(Navig... | NavigationClose is a function that exports a navigation close element in a navigation close element. |
// @flow
import React from 'react';
import { Link, Route } from 'react-router-dom/';
import './Navigation.css';
const NavigationLink = ({ to, icon }) => (
<Route
path={to}
exact={false}
children={({ match }) => (
<div className={`item ${match ? 'active' : ''}`}>
<Link to={to}>
{i... | A static function to export a single type. |
import React from 'react';
import { HeaderColumn } from './header-column';
import {COLUMN_CODE, COLUMN_NAME} from "../constants";
import {formatNumber} from "../../common/utils";
export const Header = ({ column, order, changeOrder, numCourses }) => (
<div className="course-row course-row__header">
<HeaderColumn... | export header for |
import React from 'react';
export default function Header() {
return (
<React.Fragment>
<h2 className="header center orange-text">My Library</h2>
<div className="row center">
<h5 className="header col s12 light">Bookmark your favourite books</h5>
</div>
<div className="row center"... | The header for the missing node. |
import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... | A component that lists all media in a language that are not bootstrapped by a Bootstrap plugin. |
import React from 'react'
import { Message } from 'semantic-ui-react'
const MessageExampleInfo = () => (
<Message info>
<Message.Header>Was this what you wanted?</Message.Header>
<p>Did you know it's been a while?</p>
</Message>
)
export default MessageExampleInfo
| The default implementation of the missing - message - examples module. |
// It is important to import the Editor which accepts plugins.
import Editor from 'draft-js-plugins-editor'; // eslint-disable-line import/no-unresolved
import createStickerPlugin from 'draft-js-sticker-plugin'; // eslint-disable-line import/no-unresolved
import React from 'react';
import { fromJS } from 'immutable';
... | Imports the Editor which accepts an array of objects. |
import React from 'react';
import { Helmet } from 'react-helmet';
import { graphql, Link } from 'gatsby';
import Header from 'components/header';
import Footer from 'components/footer';
const Blog = ({ data }) => (
<React.Fragment>
<Helmet>
<title>Blog</title>
</Helmet>
<Header/>
<h1>Blog</h... | Demonstrates how to query a single node in a hierarchy. |
import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... | Creates a component that aligns the media to the top middle or bottom of the media object. |
import React from 'react'
import Link from 'next/link'
const href = {
pathname: '/about',
query: { name: 'next' }
}
const as = {
pathname: '/about/next',
hash: 'title-1'
}
export default () => (
<div>
<h1>Home page</h1>
<Link href={href} as={as}>
<a>Go to /about/next</a>
</Link>
</div>
... | A function to render a in a browser. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationTapAndPlay = (props) => (
<SvgIcon {...props}>
<path d="M2 16v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0 4v3h3c0-1.66-1.34-3-3-3zm0-8v2c4.97 0 9 4.03 9 9h2c0-6.08-4.92-11-11-11zM17 1.01L7 1c-1.1 0-2... | NotificationTapAndPlay is a component that can be played on a button. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Loader } from 'semantic-ui-react';
import { stockActions } from 'core/stock';
import { Dashboard } from 'views/components/Dashboard';
import { NotFound } from 'views/components/notFound';
class StockPage extends Component {
co... | The base component for the stock page. |
import React from 'react';
import AuthenticatedComponent from './AuthenticatedComponent'
export default AuthenticatedComponent(class Dash extends React.Component {
render() {
return (<h1>Hello user!!</h1>);
}
});
| The default component that is not a component in the system. |
import React from 'react';
class TextInput extends React.Component {
render() {
const {onChange, placeholder} = this.props;
const style = this.getStyle();
return (<input style={style}
type="text"
placeholder={placeholder}
onChange={onChange}/>);
}
... | TextInput class for selecting a tag in a sequence of words. |
'use strict'
import Helmet from 'react-helmet'
import { ListOfPosts } from '../../components/blog/list-of-posts'
import Path from 'path-browserify'
import { ProfilePhoto } from '../../components/profile-photo'
import React from 'react'
import { getPosts } from '../../utilities'
export const HomePage = props => {
ret... | The main function for the module |
/*
* 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 base class for a hot |
import React from 'react';
import cssmodules from 'react-css-modules';
import styles from '<%= style.webpackPath %>';
const <%= component.className %> = () => (
<div className="<%= style.className %>" styleName="<%= style.className %>">
Please edit <%= component.path %><%= component.fileName %> to update this co... | export default component |
/**
* Copyright 2017 dialog LLC <info@dlg.im>
* @flow
*/
import React, { Component } from 'react';
import classNames from 'classnames';
import { parse, parseInline, decorators } from '@dlghq/markdown';
import { renderBlocks, renderText } from './render';
import styles from './Markdown.css';
export type Props = {
... | A component that renders a single tag with a block of text. |
import React from 'react';
import EntypoIcon from '../EntypoIcon';
const iconClass = 'entypo-svgicon entypo--ChevronSmallRight';
let EntypoChevronSmallRight = (props) => (
<EntypoIcon propClass={iconClass} {...props}>
<path d="M11,10L7.859,6.58c-0.268-0.27-0.268-0.707,0-0.978c0.268-0.27,0.701-0.27,0.969,0... | The default component for the ChevronSmallRight component. |
import React from 'react';
import Showcase from '../reusables/templates/Showcase';
import { connect } from 'react-redux';
const Kohdekortti = (props) => (
<div className="kohdekortti">
<h2>Kohdekortti:</h2>
{props.kohdekortit.map((card) =>
<Showcase src={card.url}/>
)}
</div... | A component that creates a component that will render a sequence of kohdekortti cards. |
import React from 'react';
import createAll from './components/createAll';
export const { Provider, connect } = createAll(React);
| Imports and exports a . |
import React from 'react';
import Link from './Link';
import Footer from './Footer';
import {
addNavigationHelpers,
} from 'react-navigation';
const NavigationLinks = ({navigation, className, reverse}) => {
let links = [
...navigation.state.routes.map((route, i) => {
if (route.routeName === 'Home' || ro... | The main app frame component. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationPhonePaused = (props) => (
<SvgIcon {...props}>
<path d="M17 3h-2v7h2V3zm3 12.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C... | A component that can be used to create a sequence of components that can be rendered by a component. |
import React from 'react'
import PropTypes from 'prop-types'
import {
Button,
Dialog,
DialogTitle,
DialogActions,
Table,
TableBody,
TableCell,
TableHead,
TableRow,
} from '@mui/material'
import L from 'utils/Labels'
import Dates from 'utils/Dates'
const NewRecordParametersDialog = (props) => {
con... | A component that displays a dialog with a single single missing - record sequence. |
import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';
import Analyzer from 'parser/core/Analyzer';
import Enemies from 'parser/shared/modules/Enemies';
import StatisticBox, { ... | The base class for all of the components that are defined by the user. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionBackup = (props) => (
<SvgIcon {...props}>
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z... | A component that renders a series of action buttons. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.