code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React, { Component } from 'react';
import { CardDeck } from 'reactstrap';
import Loading from '../images/Loading';
import Product from './Product';
import { connect } from 'react-redux';
import { productsApi } from '../../actions/products';
import { isNull } from '../../util/util';
class ProductList extends Com... | A component that lists all products of a given category. |
import React from 'react';
import Let from 'components/Let';
import Parameter from 'components/Parameter';
import './module.scss';
class Module extends React.Component {
constructor (props) {
super(props);
this.onMouseUp = this.onMouseUp.bind(this);
this.onMouseDown = this.onMouseDown.bind(this);
... | The module component which is rendered when a module is selected. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Container, Header, Title, Content, Button, Icon, Badge, Text, Left, Right, Body } from 'native-base';
import { openDrawer } from '../../actions/drawer';
import styles from './styles';
class NHBadge extends Component { //eslint-... | NHBadge component that displays a single unknown node in a menu with badges. |
import React from 'react'
import PropTypes from 'prop-types'
import deprecated from 'prop-types-extra/lib/deprecated'
import styled from 'styled-components'
import { pxToRem } from '../../../helpers/utils/typography'
import { ButtonItem } from './components/button-item'
import classNames from 'classnames'
const Styled... | Imports a single missing - node - list with optional padding and bottom - border - radius. |
import React from 'react';
import { Card, Label, Icon, Grid, Header, Progress } from 'semantic-ui-react';
import PropTypes from 'prop-types';
class ProfilePlantCard extends React.Component {
static propTypes = {
plant: PropTypes.shape({
rarity: PropTypes.string.isRequired,
level: PropTypes.number.isR... | ProfilePlantCard exports a single |
import React from 'react'
export default class UiAjaxAutocomplete extends React.Component {
componentDidMount() {
let self = this;
function split(val) {
return val.split(/,\s*/);
}
function extractLast(term) {
return split(term).pop();
}
function extractFirst(term) {
re... | A component that uses autocomplete to display a text field in a form that is automatically typed in a form. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import timeService from '../../../../../../services/times/timeService';
import { Card } from 'semantic-ui-react';
import './DayCardVersion.css';
// import AddEventIcon from '.././AddEventIcon/AddEventIcon';
import HoverableIcon from '../../..... | Component that is a component that can be used to render a single day - by - day calendar. |
import React from 'react';
import { Route, IndexRoute, Router, BrowserRouter } from 'react-router';
import App from './modules/App/App';
import LoginPage from './modules/Post/pages/LoginPage/LoginPage.js';
// import SignUpPage from './modules/Post/pages/SignupPage/SignupPage.js';
const routes = (
<BrowserRouter}>
... | Imports all components of a specific type. |
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import radium from 'radium';
import areEqual from 'fbjs/lib/areEqual';
import moment from 'moment';
import * as style from './style/calendar';
export const calendarStyle = style;
@radium
export default class Calendar extends React.Componen... | A component that is rendered when a date is selected. |
import Banner from './Banner';
import MainView from './MainView';
import React from 'react';
import Tags from './Tags';
import { inject, observer } from 'mobx-react';
import { withRouter } from 'react-router-dom';
@inject('commonStore')
@withRouter
@observer
export default class Home extends React.Component {
compon... | The Home component which displays a list of tags that can be found in a specific language. |
/**
* Copyright 2016-present Telldus Technologies AB.
*
* This file is part of the Telldus Live! app.
*
* Telldus Live! app is free : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
*... | A component that can be used to render a single object in a view. |
import {injectIntl} from 'react-intl';
import React from 'react';
import {Button, Form, FormError, FormRow, Panel, PanelContent, PanelHeader, PanelFooter, Textbox} from 'flood-ui-kit';
import AuthActions from '../../actions/AuthActions';
import AuthStore from '../../stores/AuthStore';
import connectStores from '../../... | Private function to render a single auth form. |
import React from 'react';
import _ from 'lodash';
import Rx from 'rx';
import {TerminalLayout} from './compiled/src/views/TerminalLayout.js';
var keys = {
goUp: event => (event.ctrlKey && event.keyCode === 80) || event.keyCode === 38,
goDown: event => (event.ctrlKey && event.keyCode === 78) || event.keyCode ... | The keyboard event handler which creates a keyboard event that fires when a key is pressed on the terminal. |
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 can be used to show a carousel caption. |
import React from 'react';
import {ipcRenderer, shell} from 'electron';
import { ThemeProvider } from '@material-ui/core/styles';
import {About, Theme} from '@emeraldwallet/ui';
class AboutContainer extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
componentDidMount() {
... | Component that renders a single AboutContainer. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalActivity = (props) => (
<SvgIcon {...props}>
<path d="M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-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-2z... | A component that exports a sequence of maps that can be used to render a sequence of maps. |
import React from 'react';
export default function ({w, h, t, type}) {
return (
<symbol id="right" data-name="right" viewBox="0 0 85.17 86.62">
<g id="svg_8" data-name="svg 8">
<path id="svg_1" data-name="svg 1"
d="M25.37,28.42c-2.23-5.23.16-15.9-1.57-22.26... | Series of errors in a sequence of missing missing errors. |
import React from 'react';
import moment from 'moment';
// @TODO Use native functions wheneven possible
import keys from 'lodash/keys';
import mapValues from 'lodash/mapValues';
import zipObject from 'lodash/zipObject';
import reduce from 'lodash/reduce';
import forEach from 'lodash/forEach';
import map from 'lodash/m... | The actual behavior of the calendar - based chart. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilterBAndW = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16l-7-8v8H5l7-8V5h7v14z"/>
</SvgIcon>
);
ImageFilterBAndW = pure(Im... | A filter that creates a component |
import React from 'react';
import { Link } from 'react-router-dom';
import { Button } from '../../../build/packages';
import Page from '../../component/page';
const MsgDemo = () => (
<Page className="msg" title="Msg" subTitle="提示页" spacing>
<Button component={Link} to="/msg/success">Success Message</Button... | The default demo for a sequence of components. |
import React from 'react'
import { World } from 'components/world'
export default function HelloPage() {
return (
<div>
<World />
</div>
)
}
| export default functions |
import React from 'react';
import PubSub from 'pubsub-js';
class ListWLoader extends React.Component {
constructor(props) {
super(props);
this.state = {
data: ["什sdfsfg么","什么sdfgs啊","sdfgsdfg sfg 鬼","什sdfsfg么","什么sdfgs啊","sdfgsdfg sfg 鬼","什sdfsfg么","什么sdfgs啊","sdfgsdfg sfg 鬼"]
};
this.onChange = ... | ListWLoader component that can be used to load a list of items from a dropdown list. |
import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { Button } from 'patternfly-react'
import * as Actions from '_/actions'
import { CREATE_PAGE_TYPE } from '_/constants'
import { withMsg } from '_/intl'
import CreateVmWizard from './CreateVmWizard'
class AddVmBut... | Component which is rendered when a cluster is not enabled. |
import React from 'react'
import context from './context'
import createPage from './page'
import createRoutes from './routes'
import createRender from './render'
function createRoot (config) {
const { App,
history,
Route,
Router
} = config
const setup = Object.assign({}, context,
typeof window... | create a root node |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvNote = (props) => (
<SvgIcon {...props}>
<path d="M22 10l-6-6H4c-1.1 0-2 .9-2 2v12.01c0 1.1.9 1.99 2 1.99l16-.01c1.1 0 2-.89 2-1.99v-8zm-7-4.5l5.5 5.5H15V5.5z"/>
</SvgIcon>
);
AvNote = pure(AvNote);
AvNote.... | A component that exports a missing - |
import React from 'react';
import {IndexRoute, Route} from 'react-router';
// import { Route } from 'react-router';
import { isLoaded as isAuthLoaded, load as loadAuth } from 'redux/modules/auth';
import {
App,
Home,
Welcome,
Warning,
Question,
Subresults,
ProductName,
Results,
Admin... | export default routes |
import React from 'react';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
React.render(<HelloWorld />, document.getElementById('react-root'));
| Imports a component with a specific ID and renders it in the DOM. |
import React from 'react'
import { Loader } from 'semantic-ui-react'
import NoSSR from 'docs/src/components/NoSSR'
const CodeEditor = React.lazy(() => import('./CodeEditor'))
const CodeEditorSafe = (props) => (
<NoSSR>
<React.Suspense fallback={<Loader active inline='centered' />}>
<CodeEditor {...props}... | React - > React |
import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleGroupIconSize = () => (
<Button.Group basic size='small'>
<Button icon='file' />
<Button icon='save' />
<Button icon='upload' />
<Button icon='download' />
</Button.Group>
)
export default ButtonExampleGroupIco... | This module imports the buttons that are not part of a sequence of buttons. |
import classNames from 'classnames';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import KeyValueListInputItem from './KeyValueListInputItem';
import styles from './KeyValueListInput.css';
class KeyValueListInput extends Component {
//
// Lifecycle
constructor(props, context) {... | Creates a new KeyValueListInput that can be used to render a single key - value list. |
import React from 'react';
import { Form, Label } from '../semantic_ui_react_wrappers';
export function ReadOnlyInput({ error, label, placeholder, prefix, required, value, type, unit }) {
return (
<Form.Input
error={error || (required && value === "")}
fluid
label={label... | export ReadOnlyInput from React |
//import styles
import 'grommet/scss/hpe/index';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import App from 'grommet/components/App';
import Box from 'grommet/components/Box';
//import Header from 'grommet/components/Header';
import Footer from 'grommet/components/Footer';
//import Met... | Initialize a new component with a single element. |
import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import... | A component that can be rendered by a component that is not yet rendered by a component. |
/**
* Created by uzysjung on 2016. 10. 20..
* Presentational Footer Component
*/
import React from 'react'
import Pkg from '../../../../package.json'
import Radium from 'radium'
const style = {
background: '#fff',
padding: '15px',
color: '#444',
borderTop: '1px solid #d2d6de'
};
const Footer = func... | Demonstration of a single node in a hierarchy. |
import React from 'react'
import UserStore from '../stores/UserStore.js'
import userAuth from '../userAuth'
import Avatar from '../User/Avatar'
class UserListItem extends React.Component {
constructor(props) {
super(props)
this.state = {
loggedInUser: null
}
}
componentDidMount() {
user... | A component that is used to display a list of users. |
import React from 'react'
import classNames from 'classnames/bind'
import styles from './ErrorPointer.scss'
const cx = classNames.bind(styles)
export default function ErrorPointer ({ message, width }) {
const errorWidth = width ? `col-sm-offset${12 - width} col-sm-${width}` : undefined
return (
<div className... | Create a component that displays an error in a hidden column. |
/**
* 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.
*
* @flow
*/
import React from 'react';
const ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
const {
... | This is a private function that exports a single node in the source tree. |
import React from 'react';
import {Link} from 'react-router';
import FooterStore from '../stores/FooterStore'
import FooterActions from '../actions/FooterActions';
class Footer extends React.Component {
constructor(props) {
super(props);
this.state = FooterStore.getState();
this.onChange = this.onChange.... | The Footer component is a component that can be used to show a bunch of characters in the FooterStore. |
/* 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;
if (i < 3) {
products.push... | The main function of the series of components that are used to generate a sequence of keys. |
import { connect } from 'react-redux';
import {damage} from '../actions/damageCalculatorActions';
import {ap} from '../actions/damageCalculatorActions';
import {DamageCalculator} from '../components/damageCalculator';
import React from 'react';
export function mapStateToProps(state) {
console.log('map to prop... | Create a new component with a unique name that is unique among all states and dispatch to the props. |
import React from 'react';
import PropTypes from 'prop-types';
export default function Legend({ children }) {
return <>{children}</>;
}
Legend.propTypes = {
children: PropTypes.node
};
| Legend for missing node - type objects |
import React from 'react';
import Combatants from 'Parser/Core/Modules/Combatants';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import SpellIcon from 'common/SpellIcon';
import Module from 'Parser/Core/Module';
import { formatPercentage, formatDuration } from 'common/format';
import... | A module that implements a single base on a combatants and a single base on a bonus basis. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCrop = (props) => (
<SvgIcon {...props}>
<path d="M17 15h2V7c0-1.1-.9-2-2-2H9v2h8v8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2H7z"/>
</SvgIcon>
);
ImageCrop = pure(ImageCrop);
ImageCrop.displayNam... | A component that exports a series of icons that can be used to crop a series of images. |
import React from 'react';
import ReactDOM from 'react-dom';
import VisibleApp from './App';
import About from './components/about';
import Header from './components/header';
import { BrowserRouter as Router, Route } from 'react-router-dom'
import { Provider } from 'react-redux';
import { createStore } from 'redux';
im... | Imports a single node in the DOM. |
/**
* app.js
*
* This is the entry file for the application, only setup and boilerplate
* code.
*/
// Needed for redux-saga es6 generator support
import 'babel-polyfill';
// Import all the third party stuff
import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'react-redux';
import ... | JS code generation for a single non - default key |
import React from 'react';
const DrawerLoading = () => (
<div className='drawer'>
<div className='drawer__pager'>
<div className='drawer__inner' />
</div>
</div>
);
export default DrawerLoading;
| export default DrawerLoading |
import React from 'react';
import ItemsTableCell from '../../../admin/src/components/ItemsTableCell';
import ItemsTableValue from '../../../admin/src/components/ItemsTableValue';
var ColorColumn = React.createClass({
displayName: 'ColorColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.obje... | A component that displays a color box when a column is missing. |
import React from 'react'
import { Table } from 'semantic-ui-react'
const TableExampleBasic = () => {
return (
<Table basic>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Name</Table.HeaderCell>
<Table.HeaderCell>Status</Table.HeaderCell>
<Table.HeaderCell>Notes</Table.... | Imports a single - language - dependent object from React. |
import React from 'react';
export default class AddQuestion extends React.Component{
constructor(props){
super(props);
this.state={
isVisible:false
}
}
render(){
return(
<div>
<div className="text-center">
<h4>Add Questions <span className="glyphicon glyphicon-exclamation-sign"></sp... | The AddQuestion class |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
} from 'react-native';
import setup from './setup'
AppRegistry.registerComponent('react_lifecycle_sample', () => setup);
| Sample React Native App |
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import '../styles/main.scss';
import '../images/favicon.ico';
import configureStore from './stores/configureStore.dev';
const store = configureStore();
function renderApp() {
const App = re... | Imports a bunch of components into the app |
import React from 'react';
import _ from 'lodash';
import VisibilityStore from 'stores/VisibilityStore';
import MessageActionCreators from 'actions/MessageActionCreators';
import MessageItem from 'components/common/MessageItem.react';
let _delayed = [];
let flushDelayed = () => {
_.forEach(_delayed, (p) => {
... | The MessagesSection component is a component that can be used to show a message in a single month. |
import React from 'react';
import { View } from 'react-native';
const Card = (props) => {
return (
<View style={styles.containerStyle}>
{props.children}
</View>
);
};
const styles = {
containerStyle: {
borderWidth: 1,
borderRadius: 2,
borderColor: 'transparent',
borderBottomWidth: ... | export a component that renders a card with a specific style |
import React from 'react';
import Table from 'material-ui/lib/table/table';
import TableRow from 'material-ui/lib/table/table-row';
import TableRowColumn from 'material-ui/lib/table/table-row-column';
import TableBody from 'material-ui/lib/table/table-body';
const FoodItemNutritionTable = ({foodItem,}) => {
con... | Private function to generate a nutrition table that can be used to display a food item. |
import React from 'react';
import ReactDom from 'react-dom';
import MainPage from 'components/mainPage';
ReactDom.render(<MainPage />, document.getElementById('container'));
| Imports a React component and renders it into the main page. |
import React from 'react'
import PropTypes from 'prop-types'
import {Card, Text, Heading, Stack, Flex} from '@sanity/ui'
import {LaunchIcon} from '@sanity/icons'
import {resolveUrl} from './utils'
function HintCard(props) {
const {card, repoId} = props
return (
<Card
tone="inherit"
border
ra... | The HintCard class |
import React, { Component } from 'react';
import SignUpStore from 'stores/SignUpStore';
import AuthStore from 'stores/AuthStore';
import ConfirmAccountStore from 'stores/ConfirmAccountStore';
import ConfirmEmail from 'modules/premiumSignup/components/ConfirmEmail';
import AffiliatesStore from 'stores/AffiliatesStore';
... | The ConfirmEmailContainer class is a base class that renders a ConfirmEmailContainer. |
import React from 'react';
import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';
import { RaisedButton } from 'material-ui';
import config from './config';
export default createReactClass({
displayName: 'Hook',
propTypes: {
model: PropTypes.object.isRequired
},
render: fu... | Create a component that will destroy a managed object when it is destroyed. |
import React from 'react';
import { Text, View, StyleSheet } from 'react-native';
import { colors, fonts, normalize } from 'config';
type Props = {
issue: Object,
isMerged: boolean,
text: string,
type: string,
style: Object,
};
const styles = StyleSheet.create({
badge: {
padding: 12,
paddingTop: ... | Generates a single node of a type. |
'use strict';
import React from 'react'
import CartContainer from './CartContainer'
import ProductsContainer from './ProductsContainer'
export default React.createClass({
render() {
return (
<div>
<ProductsContainer />
<CartContainer />
</div>
);
}
});
| Create a default class with a series of components. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvPauseCircleFilled = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"/>
</SvgIcon>
);
AvPauseCircleFilled = pure(AvP... | A component that exports a single |
import React from 'react'
import PropTypes from 'proptypes'
import _every from 'lodash/every'
const AllNoneToggle = ({ colors, toggleAll, toggleNone }) => {
const allChecked = _every(colors, c => c)
const noneChecked = _every(colors, c => !c)
return (
<div className="all-none-checkboxes">
<label>
... | The default AllNoneToggle function |
"use strict";
import React from 'react';
import ReactDOM from 'react-dom';
import uuidV4 from 'uuid/v4';
import preventWindowDragAndDrop from './utils/handle-window-drag-and-drop';
import {saveCollectedBlobs} from './utils/image-store';
class Popup extends React.Component {
constructor(props) {
super(props);
... | The popup component which displays a list of collected images. |
import { makeStyles } from '@material-ui/core'
import Chip from '@material-ui/core/Chip'
import * as R from 'ramda'
import React from 'react'
import {
secondaryColorLighter,
secondaryColorDarker,
offErrorColor,
errorColor,
offColor,
inputFontWeight,
smallestFontSize,
inputFontFamily,
spacer
} from 's... | Generate a single node - tag with a single uplink - process label |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFace = (props) => (
<SvgIcon {...props}>
<path d="M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-... | A component that exports a series of action - related icons. |
import React from 'react';
import Snackbar from 'material-ui/Snackbar';
import RaisedButton from 'material-ui/RaisedButton';
export default class SnackbarExampleTwice extends React.Component {
constructor(props) {
super(props);
this.state = {
message: 'Event 1 added to your calendar',
open: fals... | Example of how to show a Snackbar in the calendar. |
import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, FormattedMessage } from 'react-intl';
import CheckBox from '../CheckBox';
import FormField from '../FormField';
import Select from '../Select';
const messages = defineMessages({
type: {
id: 'poll.type',
defaultMessage: 'P... | Exports a single with a PollSettings object. |
import React from 'react';
import ProductRow from './ProductRow';
import ProductCategoryRow from './ProductCategoryRow';
class ProductTable extends React.Component {
render() {
const filterText = this.props.filterText;
const inStockOnly = this.props.inStockOnly;
let lastCategory = null;
... | Demonstration of the product table which renders a table of products that have no related data. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import NumberField from '../components/NumberField';
import Button from '../components/Button';
import RoutineFormIntervals from './RoutineFormIntervals';
import { Form, Segment, List } from 'semantic-ui-react';
export default class Routi... | The RoutineFormGroups component is a base class that renders a RoutineFormGroups component. |
'use strict';
import React, { Component } from 'react';
import {
ActivityIndicator,
Image,
ListView,
Platform,
StyleSheet,
View,
} from 'react-native';
import ListItem from '../../components/ListItem';
import Backend from '../../lib/Backend';
export default class ChatListScreen extends Component {
stat... | The base class for the list - screen component. |
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import LinkWithTooltip from './tooltip';
import { Modal, ModalManager } from './index'
class PageListModal extends Component {
constructor(props) {
super(props);
this.state = {
status: false,
data: ''
};
}
compo... | Component that will show a modal modal page list. |
import React from 'react'
import { View, TextInput, StyleSheet } from 'react-native'
import Button from '../components/Button'
import { DropDownHolder } from '../utils/DropDownHolder'
// redux
import { bindActionCreatorsExt } from '../utils/bindActionCreatorsExt'
import { connect } from 'react-redux'
import { ActionCr... | A component that displays a private |
import './<%= componentName %>.<%= stylesheetExtension %>';
import React from 'react';
class <%= componentName %> extends React.Component {
render() {
return (
<div className="<%= componentName.toLowerCase() %>">
<h1> <%= componentName %> </h1>
</div>
);
}
}
export default <%= compone... | class. |
import React from 'react'
import styled from 'styled-components'
import PropTypes from 'prop-types'
const List = ({ className, children }) => {
return <div className={className}>{children}</div>
}
List.propTypes = {
className: PropTypes.string.isRequired,
children: PropTypes.node
}
export default styled(List)`... | A component that renders a single node in a hierarchy. |
import React from 'react'
import PropTypes from 'prop-types'
import cssModules from 'react-css-modules'
import TweenOne from 'rc-tween-one'
import styles from './Week.module.scss'
import Day from './Day'
import { weeks } from '@/utils'
function Week({ week, x = 0, duration = 450 }) {
return (
<div styleName="hea... | export calendar - related functions |
/**
* Created by zuozhuo on 2017/5/10.
*/
// app.scss import
import './app.scss';
import React from 'react';
import {moduleAConstName, getModuleBName} from './components'
import cssModuleClassNames from './app.module.scss';
window.LOGIN_USER = {firstName: 'foo', lastName: 'bar', age: 21, role: 'client'};
window.ADM... | JSX - specific functions |
import React from 'react'
import { Message } from 'semantic-ui-react'
const MessageExampleHidden = () => (
<Message hidden>
You can't see me
</Message>
)
export default MessageExampleHidden
| Imports a React component from a sequence of messages. |
import React from 'react';
import Wrapper from 'common/Wrapper';
import SPELLS from 'common/SPELLS';
import ITEMS from 'common/ITEMS';
import ItemLink from 'common/ItemLink';
import { formatNumber, formatPercentage } from 'common/format';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Cor... | The base class for all of the methods that are defined in the base class. |
import React from 'react';
import PropTypes from 'prop-types';
import Header from '../../components/organisms/header';
import ErrorDetails from '../../components/organisms/error-detail';
import styles from './styles';
class Error extends React.Component {
static propTypes = {
params: PropTypes.object.isRequired... | The base error class for missing missing properties. |
import React from 'react';
const VideoDetail = ({video}) => {
if (!video) {
return <div>Loading...</div>;
}
const videoId = video.id.videoId;
const url = `https://www.youtube.com/embed/${videoId}`;
return (
<div className="video-detail col-md-8">
<div className="embed-responsive embed-resp... | The default function for the embed - related - video - detail - panel |
import React from 'react';
import { render } from 'react-dom';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
// Components
import App from './containers/app';
import Home from './containers/home';
import PageNotFound from './containers/page-not-found';
// Styles
import './styles/index.css'... | Imports a single and renders it in the DOM. |
import React from 'react';
import VideoListItem from './video_list_item';
const VideoList = (props) => {
const videoItems = props.videos.map((video) => {
return (
<VideoListItem
onVideoSelect={props.onVideoSelect}
key={video.etag}
video={video} />
)
});
return (
<ul cla... | React Component that renders a list of video items if the video has no items. |
import React from 'react';
import TouchableWithoutFeedback from './TouchableWithoutFeedback';
const TouchableNativeFeedback = React.createClass({
propTypes: {
...TouchableWithoutFeedback.propTypes,
background: React.PropTypes.object
},
statics: {
SelectableBackground() {},
SelectableBackground... | A module that exports a single object containing a non - |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBrightnessLow = (props) => (
<SvgIcon {...props}>
<path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 ... | Devuelte un componente nuevo brightness - low |
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 Combatants from 'Parser/Core/Modules/Combatants';
import StatisticBo... | The TotemMastery class is a class that exports the state of a talent in the system. |
import React from 'react';
import Select from 'react-select';
function logChange() {
console.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments)));
}
var CustomRenderField = React.createClass({
displayName: 'CustomRenderField',
propTypes: {
delimiter: React.PropTypes.st... | Private function to render a single unknown key in a custom component. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalCellularConnectedNoInternet4Bar = (props) => (
<SvgIcon {...props}>
<path d="M20 18h2v-8h-2v8zm0 4h2v-2h-2v2zM2 22h16V8h4V2L2 22z"/>
</SvgIcon>
);
DeviceSignalCellularConnectedNoInternet4Bar = pur... | Devuelte un objeto DeviceSignalCellularConnectedNoInternet4Bar |
import React, { Component } from 'react';
const style = {
background: 'green',
padding: '20px',
height: '200px'
};
class Target extends Component {
render() {
return (
<div style={style}>
Tether Target
</div>
);
}
}
export default Target;
| A component that is rendered as a hidden component in a hidden component. |
import React from 'react'
import Button from '@material-ui/core/Button'
import DialogContentText from '@material-ui/core/DialogContentText'
import { defineMessages, FormattedMessage } from 'react-intl'
import { Template } from './Template'
const msgs = defineMessages({
close: 'Close',
noData: "You don't yet have ... | export a single node |
/* @flow */
import convert from 'koa-convert';
import Koa from 'koa';
import React from 'react';
import staticCache from 'koa-static-cache';
import App from '../shared/App';
import renderHtml from './renderHtml';
import { ASSETS_DIR, PUBLIC_DIR, SERVER_PORT } from './config';
const app = new Koa();
// serve static f... | Imports the given package and starts listening for requests. |
import React from 'react';
import {
api,
description,
divider,
example,
header,
importExample,
playground,
tab,
tabs,
testkit,
title,
} from 'wix-storybook-utils/Sections';
import { storySettings } from '../test/storySettings';
import StyledNestableList from '..';
import { getCollapsedExampleSou... | Imports a single non - standard |
import React from 'react'
import { Typography } from '@material-ui/core'
import styled from 'styled-components'
import { Link } from 'react-router-dom'
const LogoWrapper = styled.header`
text-transform: uppercase;
&& {
color: black;
}
&&,
p {
font-size: 2rem !important;
display: inline-block;
... | The default implementation of the missing - tag tag. |
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="H"
changePositionKey="W"
defaultIsVisible={false}
>
<L... | import react - devtools |
import React, { Component } from 'react';
import './App.css';
import Barchart from './BarPlot/BarPlot.js';
class App extends Component {
constructor(){
super();
this.handleDataUrl = this.handleDataUrl.bind(this);
this.handleDataUrlInSearch = this.handleDataUrlInSearch.bind(this);
}
componentDidMount()... | The base class for all components that are not part of the app. |
import React from 'react';
import auth0 from 'auth0-js';
const CLIENT_ID = 'sUts4RKy04JcyZ2IVFgMAC0rhPARCQYg';
const permissionsKey = 'https://toiletmap.org.uk/permissions';
export const AuthContext = React.createContext();
export const useAuth = () => React.useContext(AuthContext);
export const isAuthenticated = ()... | Create a new auth provider that uses localStorage to store the access token and ID Token. |
import React from 'react'
import ReactModal from 'react-modal'
import { css } from 'glamor'
import { pxToEm, opacity } from '../../../style/utils'
const BaseModal = (
{
width,
height,
maxWidth,
maxHeight = '100%',
minWidth,
minHeight,
overlayBackgroundColor = 'rgba(255, 255, 255, .75)',
... | export default base modal sequence |
import React from 'react'
import { connect } from 'react-redux'
import { getMemory, setValue } from 'redux/os'
import component from './DetailItem'
const mapStateToProps = (state, { actions, id }) => {
let values = {}
actions.forEach(action => {
values[action.id] = getMemory(state, `${action.id}.${id}`)
}... | React - redux |
import React from 'react'; // jshint ignore:line
import Button from 'misago/components/button'; // jshint ignore:line
import Form from 'misago/components/form';
import FormGroup from 'misago/components/form-group'; // jshint ignore:line
import ajax from 'misago/services/ajax';
import snackbar from 'misago/services/snac... | The base class for all of the components that are defined in the form - group. |
import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import avatarReadmeText from './README';
import AvatarExampleSimple from './Exam... | export default AvatarsPage |
/* @flow */
import { ToggleStateless } from '@atlaskit/toggle';
import React, { Component } from 'react';
type Props = {
/**
* CSS class name.
*/
className: string,
/**
* Indicates whether the switch is disabled or not.
*/
disabled: boolean,
/**
* Handler called when th... | A class that exports a single CSS class name and a boolean value. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.