code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
declare module 'react-addons-test-utils' {
declare var Simulate: {
[eventName: string]: (element: Element, eventData?: Object) => void;
};
declare function renderIntoDocument(instance: React.Element<any>): React.Component;
declare function mockComponent(componentClass: React.Elem... | The actual React implementation of the component that is not in the DOM. |
import React from 'react';
import PropTypes from 'prop-types';
import { fetchFollowRequests } from 'mastodon/actions/accounts';
import { connect } from 'react-redux';
import { NavLink, withRouter } from 'react-router-dom';
import IconWithBadge from 'mastodon/components/icon_with_badge';
import { List as ImmutableList }... | A component that links to follow requests in a navigation bar. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import DayNames from './DayNames';
import Week from './Week';
import './BookingCalendar.scss';
export default class BookingCalendar extends Component {
constructor(props) {
super(props);
this.state = ... | The base component for the booking calendar. |
import React from 'react';
const IMAGE_SIZE = 18;
const linkStyle = {
marginRight: 8,
};
const boxStyle = {
borderRadius: 3,
display: 'inline-block',
height: IMAGE_SIZE,
overflow: 'hidden',
verticalAlign: 'middle',
width: IMAGE_SIZE,
};
const imageStyle = {
display: 'block',
height: IMAGE_SIZE,
left: '50%',... | A component that renders a cloudinary image summary. |
import React from 'react';
import ReactDOM from 'react-dom';
import Root from './containers/Root';
import { createHistory } from 'history';
const history = createHistory();
ReactDOM.render(
<Root history={history} />,
document.getElementById('root')
);
| Imports a single node in the DOM. |
import React from 'react';
import PropTypes from 'prop-types';
import { Card, NgIf, Icon, EventEmitter, EventReceiver } from '../../components/';
import { pathBuilder } from '../../helpers/';
import "./thing.scss";
@EventEmitter
@EventReceiver
export class NewThing extends React.Component {
constructor(props){
... | A component that creates a new file or directory. |
import React from 'react';
import deepEqual from 'deep-equal';
import Breadcrumb from 'components/Breadcrumb';
import InstanceHistory from 'components/InstanceHistory';
import Loading from 'components/Loading';
import TaskStatus from 'components/TaskStatus';
import { isNully } from 'utils/Common';
import { isActive }... | The base class for all instances of a task schedule. |
import React from 'react';
import { extractDataForm } from '@utils/forms';
export const Modal = ({
createCredential,
internalSetModalDisplay,
displayModal = false,
user
}) => {
if (displayModal) {
return (
<div className="global-modal-container">
<div className="global-modal-overlay"></div... | Exports a modal dialog with a single user - defined credential. |
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 form - control with a specific ID. |
import React from 'react';
import { List, ListItem } from 'material-ui/List';
import Subheader from 'material-ui/Subheader';
import Divider from 'material-ui/Divider';
import Checkbox from 'material-ui/Checkbox';
import Toggle from 'material-ui/Toggle';
class TodoList extends React.Component {
constructor(props) {... | 가를 예예는 예는 예는 |
import React from 'react'
import { Link, graphql } from 'gatsby'
import styled from 'styled-components'
import PostPreview from '../components/post-preview'
const Container = styled.div`
margin: 3rem auto;
max-width: 800px;
`
const PageTitle = styled.h2`
color: black;
font-family: 'Fira Code';
text-decorat... | A component that renders a single node in a hierarchy. |
'use strict';
import React from 'react';
import { render } from 'react-dom';
import { Router, Switch, Route } from 'react-router-dom';
import browserHistory from './helpers/history';
import App from './components/App';
import Landing from './pages/Landing';
import User from './pages/User';
import NotFound from './page... | Imports a single node in the DOM. |
import React from 'react'
import GridContainer from './GridContainer'
import ProjectDisplay from './ProjectDisplay'
import imgThisWebsite from '../../style/img/small-this-website.png'
import imgGitHyped from '../../style/img/small-GitHyped.png'
import imgResistanceCalendar from '../../style/img/small-resistance-calend... | export a single node |
import React from 'react'
import {route} from 'src/router';
import Assortment from './submenus/Assortment';
import Cart from './submenus/Cart';
class Example1 extends React.Component {
constructor(props) {
super(props);
this.state = {
submenu: 'assortment'
}
}
render() {
let content;
switch (this.st... | A component that can be used to render a menu in a sub - menu. |
import React from 'react';
import Module from 'Parser/Core/Module';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import { formatPercentage } from 'common/format';
import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox';
import Combatants from 'Parser/Core/Modules/Combatants';... | The Ossuary Uptime class |
import React from 'react';
import PropTypes from 'prop-types';
import GeoJSONLayer from './GeoJSONLayer';
export default function Highlight({ data }) {
return (
<GeoJSONLayer
data={data}
fillPaint={{
'fill-color': '#0ff',
'fill-opacity': [
... | Highlight a geoJSON layer. |
// @flow
import React from 'react'
import { ScrollView, Text, Image, View } from 'react-native'
import { Images } from '../Themes'
import RoundedButton from '../Components/RoundedButton'
import { Actions as NavigationActions } from 'react-native-router-flux'
// Styles
import styles from './Styles/PresentationScreenSt... | Generate a presentation screen for a single failure - critical sequence. |
'use strict';
import React from 'react';
import {Route} from 'react-router';
import Login from './Login';
import Signup from './Signup';
export default function () {
return (
<Route>
<Route path='login' component={Login}/>
<Route path='signup' component={Signup}/>
</Route>
)
} | The default implementation of . |
import React, { Component } from 'react';
import Overlay from './overlay';
import Items from './items';
import {
Dimensions,
StyleSheet,
View
} from 'react-native';
const window = Dimensions.get('window');
class OptionList extends Component {
constructor(props) {
super(props);
this.state = {
s... | Create a list of options that can be used to show a dropdown box in a browser. |
import React from 'react'
import ReactDOM from 'react-dom'
import createStore from './store/createStore'
import AppContainer from './containers/AppContainer'
// ========================================================
// Store Instantiation
// ========================================================
const initialState... | Initialize a single node with a store |
/**
* Module dependencies
*/
import React from 'react';
import globalize from 'random-global';
import randomize from 'random-string';
import createPlayer from './lib/createPlayer';
/**
* Create a new `YouTube` component.
*/
class YouTube extends React.Component {
static propTypes = {
// changing the url wi... | The component which is a component that will be rendered when a YT component is rendered. |
import React from 'react';
import createAll from './components/createAll';
export const { Provider, connect } = createAll(React);
| Imports and exports a . |
import React from 'react'
import { WebView } from 'react-native'
const EShop = () => (
<WebView
source={{
uri: 'http://shop.ricoh.co.th/',
}}
startInLoadingState
scalesPageToFit
javaScriptEnabled
style={{ flex: 1 }}
/>
)
export default EShop
| export EShop |
import React from 'react';
import PropTypes from 'prop-types';
import { Slider, Switch, Text, View } from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import styles from './style';
/*
* Dimmer component, presenting both a switch and a dimmer
*/
const DimmerComponent = (props) => {
// Ad... | Dimmer component that displays a dimmer component with a switch and dimmer component. |
import React from 'react';
import Template from '../base/Template';
// 报表页主要呈现数据分析结果用
export default class extends Template {
}
| Template class. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsBeenhere = (props) => (
<SvgIcon {...props}>
<path d="M19 1H5c-1.1 0-1.99.9-1.99 2L3 15.93c0 .69.35 1.3.88 1.66L12 23l8.11-5.41c.53-.36.88-.97.88-1.66L21 3c0-1.1-.9-2-2-2zm-9 15l-5-5 1.41-1.41L10 13.17l7.59... | A component that exports a sequence of maps. |
import React, { Component } from 'react';
import { Card, Icon } from 'semantic-ui-react';
import { connect } from 'react-redux';
import { fetchFlashcardSetsByUser } from '../../actions/index';
import { Link } from 'react-router';
import TagList from './view_components/tag_list';
class FlashcardSetList extends Componen... | The FlashCardSetList component is a component that renders flashcards. |
import React from 'react'
import PropTypes from 'prop-types'
import './ListTitle.scss'
const ListTitle = ({ number, type, count }) => {
return (
<div className='list-title'>
<span className='list-title__number'>{number}</span>
<div className='list-title__name'>
<span>{type} </span>
<s... | ListTitle for |
import _Object$values from 'babel-runtime/core-js/object/values';
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-... | A component that wraps a Bootstrap alert with a Bootstrap alert - like component. |
/* eslint max-len: 0 */
import React from 'react';
import HtmlColumnFormatTable from './html-column-format-table';
import ReactColumnFormatTable from './react-column-format-table';
import ExtraDataColumnFormatTable from './extra-data-column-format-table';
class Demo extends React.Component {
render() {
return (
... | Demo component that displays a single unknown node in the panel panel. |
import React from 'react';
import {shouldComponentUpdate} from 'react/lib/ReactComponentWithPureRenderMixin';
import {connect} from 'react-redux';
import {ReactBulkhead} from 'react-bulkhead';
import {onCreate} from './lib/three';
const GlobeContent = React.createClass({
propTypes: {
attacks: React.PropTypes.ob... | The main function for the globe. |
import React from 'react';
import Icon from '../Icon';
export default class RateReviewIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M40 4H8C5.79 4 4.02 5.79 4.02 8L4 44l8-8h28c2.21 0 4-1.79 4-4V8c0-2.21-1.79-4-4-4zM12 28v-4.95L25.76 9.... | Generate a sample sample icon for a single node. |
/**
* @description StandardsOfflineStorage SVG Icon.
* @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon.
* @property {string} colorIndex - The color identifier to use for the stroke color.
* If not specified, this component will default to muiTheme.palette.t... | Generalized version of the standards offline storage icons. |
import React from 'react'
import {Link} from 'react-router'
export default class extends React.Component {
render() {
return (
<ul>
<li><Link to="intro">Introduction</Link></li>
<li><Link to="placeholder">Placeholder</Link></li>
</ul>
)
}
}
| The base class for a sequence of components. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { ActivityIndicator } from 'react-native';
import { connectStyle, Button, Text, View } from 'native-base';
import componentStyles from './styles';
class SimpleMessage extends Component {
render() {
const { Icon, loader, text, bu... | A component that can be rendered by a component in a component s DOM tree. |
import React from 'react'
import { combineReducers, applyMiddleware, createStore as createReduxStore } from 'redux'
import thunk from 'redux-thunk'
import configureStore from 'redux-mock-store'
import { ConnectionState } from '../../ducks/connection'
import TFlow from './_tflow'
const mockStore = configureStore([thunk... | Imports a single node in a network network. |
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(
React.createElement('h1', null, 'Hello World!'),
document.getElementById('container')
);
| Renders a single node in the DOM. |
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage } from 'react-intl';
import SettingToggle from '../../notifications/components/setting_toggle';
export default @injectIntl
class ColumnSettings extends React.... | A component that renders a column with the given settings. |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { mapToCssModules, tagPropType } from './utils';
const propTypes = {
tag: tagPropType,
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
wrapTag: tagPropType,
toggle: PropTypes.func,
classN... | Generate a toast header with a series of tags. |
import React from 'react';
| Imports React. |
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import DsmJsBar from '.';
suite('dsmJS bar', () => {
test('that dsmJS is shown', () => {
const wrapper = shallow(<DsmJsBar />);
assert.equal(wrapper.text(), 'dsmJS');
});
});
| Imports React and enzyme and asserts that dsmJS is shown. |
import React from 'react';
import Button from './Button';
storiesOf('Some.Button', module)
.add('with story params and decorators', () => <Button label="The Button" />, {
bar: 1,
decorators: [withKnobs, storyFn => <div className="foo">{storyFn}</div>],
})
.add('with story decorators', () => <Button label... | A module that imports a bunch of components that can be used to generate a sequence of components. |
import React, { Component } from 'react';
import {getCurrentUser, toHome} from './commons/commonFunctions';
import SideMenu from './menu/javaScript/menu';
export default class App extends Component {
componentWillMount() {
const currentUser = getCurrentUser();
if (!currentUser) {
retur... | Component class which extends a component that is not a menu. |
/**
* @flow
*/
'use strict';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View, Text, FlatList, StyleSheet } from 'react-native';
// import { getPosts, clearPosts } from '../actions/actions-posts';
//import { PostMenuBar } from './post-menu-bar';
//import { ItemPostCard } f... | A component that lists posts on a page. |
// @flow
import App from '../../browser/app/App.react';
import Helmet from 'react-helmet';
import Html from './Html';
import React from 'react';
import ServerFetchProvider from './ServerFetchProvider';
import config from '../config';
// import configureFela from '../../common/configureFela';
import configureStore from ... | Renders a single node - browser middleware block. |
import PropTypes from 'prop-types';
import React from 'react';
import styled, { css } from 'styled-components';
import Box from 'grommet/components/Box';
import Label from 'grommet/components/Label';
import PlayIcon from 'grommet/components/icons/base/CirclePlay';
import Markdown from 'grommet/components/Markdown';
imp... | A component that creates a single block of content with no content. |
import cx from 'clsx';
import React from 'react';
import PropTypes from 'prop-types';
import OverlayContent from '../Overlay/Content';
import PlaylistMenu from '../../containers/PlaylistManagerMenu';
import PlaylistPanel from '../../containers/PlaylistManagerPanel';
import PlaylistImport from '../../containers/Playlist... | Displays a menu with a single key that can be used to show a list of playlists. |
import React from 'react';
import { InputBox } from '../components/commonParts/inputBoxes';
import GlobalStorage from '../scripts/globalStorage';
class HeView extends React.Component {
render() {
return (
<Turbine />
)
}
}
// Turbine component renders boxes for changing turbine pa... | Very basic turbine component that renders a turbine - based sequence of states. |
import React from 'react'
import { FormattedMessage } from 'react-intl'
export const WhatsappDetails = ({ measurement }) => {
return (
<div>
{measurement.test_keys.registration_server_status === 'ok' &&
measurement.test_keys.whatsapp_web_status === 'ok' &&
measurement.test_keys.registration_ser... | This function returns a function that exports a list of all possible components of a WhatsApp object. |
import React from 'react'
import { findDOMNode } from 'react-dom'
import PropTypes from '../utils/proptypes'
import { objectAssign } from '../utils/objects'
import PureRender from '../mixins/PureRender'
import * as Tip from './tip'
import * as Popover from './popover'
class Tooltip extends React.Component {
construc... | Component that displays a popup or a tip. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPolymer = (props) => (
<SvgIcon {...props}>
<path d="M19 4h-4L7.11 16.63 4.5 12 9 4H5L.5 12 5 20h4l7.89-12.63L19.5 12 15 20h4l4.5-8z"/>
</SvgIcon>
);
ActionPolymer = pure(ActionPolymer);
ActionPolymer.d... | A component that exports a series of action polymer actions. |
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, { Component } from 'react';
import Results from '../components/Results';
import { battle } from '../utils/githubHelpers';
// Don't need to save playersInfo since it is being saved in our state from ConfirmBattleC
class ResultsContainer extends Component {
constructor() {
super();
this.state = {... | The base class for the results container. |
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import styled from 'styled-components';
import messages from './messages';
class Spinner extends React.PureComponent {
static defaultProps = {
loadingText: <FormattedMessage {...messages.loading} />,
... | A component that displays a single keyboard error with a single key sequence. |
import React from 'react'
import { Message } from 'semantic-ui-react'
const MessageExampleSuccess = () => (
<Message
success
header='Your user registration was successful'
content='You may now log-in with the username you have chosen'
/>
)
export default MessageExampleSuccess
| This module imports a bunch of messages from a sequence of messages. |
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import Container from '../Layout/Container';
import Theme from '../Theme';
import $ from '../../helpers/mQuery';
import mediaQuery from '../../config/mediaQuery';
const Backdrop = st... | A component that is rendered as modal modal. |
import React, { Component } from 'react';
import './index.scss';
class PersonPanel extends Component {
render() {
return (
<div className="person-panel">
<div className="user-avatar">
<img src="https://avatars0.githubusercontent.com/u/18289264?v=4&u=61082b05c36af8782b9d3abe227b7f429de7b8... | Package for testing purposes |
import React, { Component } from 'react';
import loading from '../logo.svg';
class AuthCallback extends Component {
render() {
return (
<div>
<img src={loading} alt="loading" />
</div>
);
}
}
export default AuthCallback; | Imports and exports a single auth callback. |
import React from 'react';
import classNames from 'classnames';
const Jumbotron = React.createClass({
render() {
return (
<div {...this.props} className={classNames(this.props.className, 'jumbotron')}>
{this.props.children}
</div>
);
}
});
export default Jumbotron;
| The Jumbotron component that is rendered when a node is missing a children property. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPhone = (props) => (
<SvgIcon {...props}>
<path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-... | A component that exports a sequence of maps. |
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import Chart, { Base, MarkerLabel } from 'grommet/components/chart/Chart';
import Value from 'grommet/components/Value';
import Anchor from 'grommet/components/Anchor';
import DocsArticle from '../../../compo... | Package that implements a single marker label error message. |
import PropTypes from 'prop-types';
import React from 'react';
import { truncateMiddle } from '../../lib/textHelper';
import { Loader } from '../UI';
import AssetProxy, { createAssetProxy } from '../../valueObjects/AssetProxy';
import styles from './FileControl.css';
const MAX_DISPLAY_LENGTH = 50;
export default clas... | A component that can be used to upload an image to a file. |
import React from 'react'
import { render } from 'react-dom'
import App from './components/App'
render(<App />, document.getElementById('app'))
| Import React and React - dom |
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. |
import React from 'react'
import PropTypes from 'prop-types'
import urlParser from 'js-video-url-parser'
// function resolveTwitchEmbedUrl(media) {
// if (media.mediaType === 'stream') {
// return `https://player.twitch.tv/?channel=${media.channel}`
// }
// if (media.mediaType === 'video') {
// return `h... | The media embed preview component. |
import React, { Component } from 'react';
import { FormattedMessage } from 'react-intl';
import { Pager } from 'react-bootstrap';
import axios from 'axios';
import Helpers from '../../helpers';
import NProgress from 'nprogress';
import ReactDisqusComments from 'react-disqus-comments';
import { withLastLocation } from '... | Component which is rendered when a user clicks on a link in a navigation bar. |
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 DisabledUpsellOptions = React.createClass({
displayName: 'DisabledUpsellOptions',
propTypes: {
label: React.PropType... | The disabled upsell option is a dropdown that can be used to select a specific support level. |
import React from 'react';
import App from './containers/App';
import 'todomvc-app-css/index.css';
React.render(
<App />,
document.getElementById('root')
);
| Renders a in the top - level DOM. |
import React from 'react';
import NotFoundPage from './NotFoundPage';
export default {
title: 'views/notFound/NotFoundPage',
component: NotFoundPage,
};
export const Default = () => <NotFoundPage />;
| export a default 404 page |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M16 1H8C6.34 1 5 2.34 5 4v16c0 1.66 1.34 3 3 3h8c1.66 0 3-1.34 3-3V4c0-1.66-1.34-3-3-3zm-2 20h-4v-1h4v1zm3.25-3H6.75V4h10.5v14z" /></g>
, 'PhoneAndroid');
| Create a series of icons for a single . |
// @flow
import React from 'react';
import PlayerInfo from '..';
export default (
<PlayerInfo
player={null}
wins={null}
isPlayer1={false}
showReadyState={false}
onSelect={() => console.log('Select P2')}
/>
);
| Default dependency injection |
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import AppBar from 'material-ui/AppBar';
import IconButton from 'material-ui/IconButton';
export default function LeftHeader(props) {
return (
<AppBar
className='left-header'
showMenuIconButton={false}
title={
... | The left header of a menu. |
import React from 'react';
import classNames from 'classnames';
class ModalFooter extends React.Component {
render() {
return (
<div
{...this.props}
className={classNames(this.props.className, this.props.modalClassName)}>
{this.props.children}
</div>
);
}
}
ModalFooter.... | A modal footer component that renders a modal modal menu. |
/**
* @flow
*/
import path from 'path'
import fs from 'mz/fs'
import React from 'react'
import ReactDOMServer from 'react-dom/server'
import yamlFrontMatter from 'yaml-front-matter'
import Loader from './Loader'
import * as project from './project'
import * as render from './render'
import * as utils from './utils'
... | Package private API |
/**
* @flow
*/
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import PropTypes from 'prop-types';
import Box from './Box';
class NewEntry extends React.Component {
render() {
return (
<Box
style={styles.box}
numberOfLines={1}... | A component that renders a single critical sequence. |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const CommunicationCallReceived = (props) => (
<SvgIcon {...props}>
<path d="M20 5.41L18.59 4 7 15.59V9H5v10h10v-2H8.41z"/>
</SvgIcon>
);
CommunicationCallReceived.displayName = 'CommunicationCallReceived';
CommunicationCallReceived.muiName = 'Svg... | A function to export a communication call received element from a node. |
import React from 'react';
//
import DialogActions from '@material-ui/core/DialogActions';
/**
* Wrapped material-ui dialog actions.
*
* @author Radek Tomiška
* @since 12.0.0
*/
export default function BasicModalFooter(props) {
const { children } = props;
//
return (
<DialogActions>
{ children }
... | A modal footer that shows a single missing node in the dialog. |
import React from 'react';
export default class MediaContextProvider extends React.Component {
getChildContext() {
return {
mediaContext: this.props.mediaContext,
};
}
render() {
return this.props.children;
}
}
MediaContextProvider.childContextTypes = {
mediaContext: React.PropTypes.objec... | The base class for the media context provider. |
import React from 'react';
import { Link } from 'react-router';
class Dashboard extends React.Component {
render () {
let { courses } = this.props;
return (
<div>
<h2>Super Scalable Apps</h2>
<p>
Open the network tab as you navigate. Notice that only the amount of
... | A dashboard that displays a single missing key sequence in a modal window. |
import React from 'react';
import ReactDOM, { render } from 'react-dom';
import { Provider } from 'react-redux';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import store from './store/store';
import App from './containers/App';
render(
<Provider store={store}>
<MuiThemeProvider>
<A... | Imports a single - element element |
import React from 'react'
import { Router, hashHistory, IndexRoute, Route } from 'react-router'
import {
MainContainer, HomeContainer, AuthenticateContainer,
FeedContainer, LogoutContainer } from 'containers'
// -- onEnter callback --
// each route can have an onEnter callback
// before it transitions to a route
... | getRoutes - get all routes that have a |
import React from 'react';
import PropTypes from 'prop-types';
import { sprintf, translate as __ } from 'foremanReact/common/I18n';
import { MessageDialog } from 'patternfly-react';
import { buildPools } from '../../SubscriptionsTableHelpers';
import { renderTaskStartedToast } from '../../../../../Tasks/helpers';
impor... | The main React component for updating a single sequence of items in a sequence. |
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. |
/**
* 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 './assets/scss-styles.scss';
export default () => <p id="feature-scss-inclusion">We love useless text... | Deprecated. Use with caution! |
/**
* Created by zhengHu on 16-10-8.
*/
import React from 'react';
class SettlementFooter extends React.Component {
constructor(props) {
super(props);
this.state =this.props.btnState?this.props.btnState:{btnState:0};
//this.handleClick = this.handleClick.bind(this);
}
componentWillReceiveProps(nextP... | Demonstrates how to render a single missing - key sequence. |
import React from 'react';
import { Surface, Radar, RadarChart, PolarGrid, Legend, Tooltip,
PolarAngleAxis, PolarRadiusAxis, ResponsiveContainer } from 'recharts';
import DemoRadarItem from './DemoRadarItem';
import { changeNumberOfData } from './utils';
const data = [
{ subject: 'Math', A: 120, B: 110 },
... | JSX plugin for adding a single node in the tree. |
import React from 'react';
import { Link } from 'react-router-dom';
class App extends React.PureComponent {
render() {
return (
<div>
<h1>React Router Tutorial</h1>
<ul role="nav">
<li><Link to="/about">关于</Link></li>
<li><Link to="/topics">主题</Link></li>
</ul>
... | The base class for a sequence of components that can be rendered by a component. |
import React from 'react';
import { Link } from 'react-router';
/**
* Displays information about a list and lets you create a new one.
*/
var ListTile = React.createClass({
propTypes: {
count: React.PropTypes.string,
hideCreateButton: React.PropTypes.bool,
href: React.PropTypes.string,
label: React.PropType... | A component that displays information about a list and lets you create a new list. |
import React, { Component } from 'react';
export default class NotFound extends Component {
render() {
return (
<div className="container">
<h1>Doh! 404!</h1>
<p>These are <em>not</em> the droids you are looking for!</p>
</div>
);
}
}
| The default implementation of a 404 class. |
/**
* Copyright (c) 2013-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.
*
* The examp... | Displays a single optional - type component with a single - type component. |
import React from 'react'
var AUTH_HOST = require('../../../../DEV_CONFIG.json').host
export class SignupForm extends React.Component<void, Props, void> {
render(){
return(
<div id={this.props.nav ? "navLogin" : ""} className={this.props.nav ? "" : "card-block"}>
{this.props.nav ? "" : <h4 classNa... | A component that can be used to sign up a user s account. |
import React from 'react';
import { storiesOf } from '@storybook/react';
import { linkTo } from '@storybook/addon-links';
import { Welcome } from '@storybook/react/demo';
storiesOf('Welcome', module).add('to Storybook', () => <Welcome showApp={linkTo('Button')} />);
| Imports a bunch of modules that are not part of a React application. |
import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
import { Message } from 'src'
const RadioTypesExamples = () => (
<ExampleSection title='Types'>
<ComponentExample
title='R... | export default RadioTypesExamples |
import StatusIndicator from '../../ux/StatusIndicator';
import React from 'react';
import PropTypes from 'prop-types';
function AuthenticatorStatus({statusMessage}) {
if (!statusMessage) {
return null;
}
return (
<StatusIndicator type={statusMessage.type}>
{statusMessage.descri... | The AuthenticatorStatus module |
import React, { Component } from 'react';
import {
Card,
CardBlock,
CardFooter,
Row,
Col,
Input,
Label,
Button
} from 'reactstrap';
import { connect } from 'react-redux';
import { updateCart } from '../../actions/cart';
import { PACKAGE_CATEGORY_PATH } from '../../util/util';
import { AP... | A component that is rendered when a user clicks on a menu item. |
import React from 'react';
import { Field } from 'react-final-form';
import FormGroup from '@mui/material/FormGroup';
import FormControlLabel from '@mui/material/FormControlLabel';
import MuiSwitch from '@mui/material/Switch';
const renderSwitch = ({
label,
input,
meta: { touched, invalid, error, submitError },
... | export a single |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionLightbulbOutline = (props) => (
<SvgIcon {...props}>
<path d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1... | A light light that shows a single action on a light. |
import React, { Component } from 'react';
class AbstractFlash extends Component {
constructor(props, context) {
super(props, context);
this.state = { message: props.message };
}
render () {
if (!this.state.message) {
return null;
}
return (
<div className="flex center">
... | The base class for all flash messages. |
import React from 'react';
import { Page, Section } from '../../components';
import IntroSection from './IntroSection';
import FormSection from './FormSection';
import AOS from 'aos/dist/aos';
const Contact = () => {
return (
<Page className="icg-contact content">
<div className="fullview-container... | The contact function |
import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleGroupSize = () => (
<Button.Group size='large'>
<Button>One</Button>
<Button>Two</Button>
<Button>Three</Button>
</Button.Group>
)
export default ButtonExampleGroupSize
| This module imports a bunch of components from a semantic - ui - react module. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.