code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
import {
Dimensions,
StyleSheet,
Text,
View,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.733858;
const LONGITUDE = -122.446549;
const MARKERS_LATITUDE_DE... | A component that renders a marker on a map view. |
/**
*
* LinkForm
*
*/
import React from 'react';
import styles from './styles.css';
import TextInput from '../TextInput';
class LinkForm extends React.Component { // eslint-disable-line react/prefer-stateless-function
state = {};
render() {
return (
<div className={styles.overlay}>
<div classN... | LinkForm - Link form for a single sequence of necessities. |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import ReduxPromise from 'redux-promise';
import { Router, browserHistory } from 'react-router';
import reducers from './reducers';
import routes from './routes';
... | Imports a single node in the DOM. |
import React from 'react';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
import RaisedButton from 'material-ui/RaisedButton';
/**
* Alerts are urgent interruptions, requiring acknowledgement, that inform the user about a situation.
*/
export default class DialogExampleAler... | A dialog example alert component |
import React from 'react';
import ReactDom from 'react-dom';
import { Provider } from 'react-redux';
import * as Redux from 'redux';
import thunk from 'redux-thunk';
import createLogger from 'redux-logger';
import reducer from './reducer';
import Layout from './components/Layout';
import { initApp } from './actions';
... | Imports a library containing a React component and a React component that is rendered into a DOM. |
/* @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 IconPowerInput(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconPro... | The default function for the nightght input. |
import React from 'react';
import {storiesOf} from '@storybook/react';
import {withInfo} from '@storybook/addon-info';
// import {action} from '@storybook/addon-actions';
import AutoComplete from 'app/components/autoComplete';
const items = [
{
name: 'Apple',
},
{
name: 'Pineapple',
},
{
name: '... | Imports a single non - terminal keyboard. |
import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import Combatants from 'Parser/Core/Modules/Combatants';
import Analyzer from 'Parser/Core/Analyzer';
import getDamageBonus from 'Parser/Mage/Shared/Modules/GetDamageBonus';... | Damage of Starfall and Starfall and Echoing Stars by 10% |
/**
* The App component is the component that is rendered around all views, and
* contains common things like navigation, footer, etc.
*/
import React from 'react';
import { Container } from './elemental';
import { Link } from 'react-router';
import { css } from 'glamor';
import MobileNavigation from './components... | The App component is the component that is rendered around all views and has common things like navigation footer etc. |
import React from 'react';
import styled from 'styled-components';
import is, { isNot } from 'styled-is';
import remcalc from 'remcalc';
import Widget from './widget';
import P from '../text/p';
import Baseline from '../baseline';
const Container = styled.div`
display: flex;
flex-direction: column;
flex-wrap: n... | Imports a missing - js and returns a Baseline. |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from '../utils/griddleConnect';
import compose from 'recompose/compose';
import mapProps from 'recompose/mapProps';
import getContext from 'recompose/getContext';
import { classNamesForComponentSelector, stylesForComponentSelector } from... | Get settings components array from settings object |
import React from 'react';
import { findDOMNode } from 'react-dom';
import Transition
from 'react-addons-css-transition-group';
import classnames from 'classnames';
import ListFiltersAddForm from './ListFiltersAddForm';
import Popout from '../../../../shared/Popout';
import PopoutList from '../../../../shared/Popout/P... | The default implementation of a non - standard state machine - independent way to render a popout list. |
import React, { Component } from 'react';
class Header extends Component {
constructor() {
super();
this.toggle = this.toggle.bind(this);
this.reset = this.reset.bind(this);
this.state = {
classes: "navbar-collapse collapse"
};
}
reset() {
this.setState({classes: "navbar-collapse co... | A header for a single navigable navbar. |
import React from 'react'
import { Link } from 'react-router';
/**
*
*/
export default class Footer extends React.Component{
/**
* render
* @return {ReactElement} markup
*/
render(){
return (
<div id="footer" style={{margin:'20px'}}>
<a href="http://markqian.com" target="_blank">See more on Ma... | The Footer class |
import React from 'react'
const Icons = () =>
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg">
<defs>
<path d="M17.016,12.984 L14.016,12.984 L14.016,9 L9.985,9 L9.985,12.984 L6.985,12.984 L12.001,18 L17.016,12.984 Z M19.359,10.031 C21.937,10.219 24,12.37... | XML 1. 0 spec Section 9. 2. 1. |
import React from 'react';
import AvatarItem from 'components/common/AvatarItem.react';
class ContactItem extends React.Component {
static propTypes = {
contact: React.PropTypes.object,
onToggle: React.PropTypes.func
}
constructor(props) {
super(props);
this.onToggle = this.onToggle.bind(this)... | The ContactItem component is a component that can be used to show a list of contacts. |
import React from 'react'
import './App.css'
import Note from './Note'
var Board = React.createClass({
propTypes: {
count: function(props, propName) {
if(typeof props[propName] !== "number") {
return new Error("the count must be a number")
... | A component that opens a keyboard in order to show notes on a keyboard. |
import React from 'react'
import { Icon, Label, Menu, Table } from 'semantic-ui-react'
const TableExamplePagination = () => {
return (
<Table celled>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Header</Table.HeaderCell>
<Table.HeaderCell>Header</Table.HeaderCell>
<Tab... | Imports a series of feature - related objects from React. |
import React, { Component } from 'react';
import css from './Time.css';
class Time extends Component {
render() {
return (
<div className={css.punchRow}>
<div className={css.punchIn}>
{this.props.punch.in}
</div>
<div className={css.punchOut}>
... | Demonstration of how to render a time sequence. |
import _extends from 'babel-runtime/helpers/extends';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { customPropTypes, getElementType, getUnhandledProps, META, useKeyOnly } from '../../lib';
/**
* A dimmable sub-component for Dimmer.
*/
function DimmerDimmable(pr... | A dimmable sub - component that can be blurring or displayed. |
/* eslint-disable react/jsx-wrap-multilines */
/* eslint-disable react/forbid-prop-types */
import React from 'react';
import PropTypes from 'prop-types';
import { Text, TextInput } from 'react-native';
import { BACKGROUND_COLOR, APP_FONT_FAMILY, DARKER_GREY } from '../globalStyles';
import { FlexRow } from './FlexRo... | A function to create a text editor for a single node in a group of nodes. |
import React from 'react';
import WildForm from './ExampleForm';
import Example from 're-app-examples/Example';
const codeFiles = [
{
name: 'ExampleForm.js',
content: require('!!raw!./ExampleForm.js'),
description: 'ExampleForm',
},
{
name: './PaperOrientationInput.js',
content: require('!!raw!./PaperOri... | The default implementation of a that exports the form and example objects. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionViewDay = (props) => (
<SvgIcon {...props}>
<path d="M2 21h19v-3H2v3zM20 8H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zM2 3v3h19V3H2z"/>
</SvgIcon>
);
ActionViewDay = pure(A... | A component that exports a series of action - view - day icons. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ToggleRadioButtonUnchecked = (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 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/>
</SvgIco... | A component that renders a hidden component with a link to the radio button. |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class Six extends Component {
render() {
return (
<View style={styles.container}>
... | Create a single missing - node component with a hidden hidden - node style |
import React from 'react';
import ReactPaginate from 'react-paginate';
import { List, ListItem } from 'material-ui/List';
import Checkbox from 'material-ui/Checkbox';
import IconButton from 'material-ui/IconButton';
class MessageDataset extends React.Component {
constructor(props) {
super(props);
this.state... | A component that renders a series of messages that can be selected by a user. |
import PropTypes from 'prop-types';
import React from 'react';
import ReactDOM from 'react-dom';
import window from 'window-or-global';
class FloatingMenu extends React.Component {
static propTypes = {
children: PropTypes.any,
menuPosition: PropTypes.object.isRequired,
menuDirection: PropTypes.oneOf(['le... | A menu component that is used to display a floating menu. |
import React from 'react';
import {
StyleSheet,
View,
Text,
Image,
Platform,
TouchableOpacity,
Alert,
Linking,
ActivityIndicator,
StatusBar,
} from 'react-native';
import { List } from 'antd-mobile';
import codePush from 'react-native-code-push';
import AppInfo from './appInfo.js';
const codePushOp... | Component that displays a single non - hotkey on the page. |
import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import { Panel, PanelHeader, PanelBody, PanelTitle } from './';
import { Technologies } from '../../resources/icons'
const options = {
inline: false,
source: false,
header: true
}
storiesOf('Panel', module)
.addWithInfo('Panel',... | Add a missing non - default |
import React from 'react';
import Icon from '../Icon';
export default class PhoneMissedIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M13 11l11 11L38 8l-2-2-12 12-9-9h7V6H10v12h3v-7zm34.41 22.34C41.32 27.55 33.07 24 24 24S6.68 27.55.59 ... | The default icons for missing components. |
/**
* Line Component
* @author ryan.bian
*/
import React from 'react';
import classnames from 'classnames';
import { defaultProps, propTypes } from './propDefine';
import Icon from '../icon';
import styles from './Progress.css';
const Line = ({ percent, status, size, showInfo }) => {
const lineProps = {
class... | A function to create a line component that displays a single failure or a single error. |
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 dropdown toggle component that shows a dropdown menu. |
import React from 'react'
import SingleSelect from 'containers/SingleSelect'
import { EVENT_NAME } from './constants'
import ModalSelect from '../'
class ModalSingleSelect extends ModalSelect {
selector () {
return `.f-c-add-file[data-file-type="${this.props.fileType}"]`
}
fileModalSelector () {
retur... | Private methods - Selects a single file in a modal window. |
import React from 'react';
import { Link } from 'react-router';
import Todo from '../components/Todo';
import TodoForm from '../components/TodoForm';
import client from '@sketchpixy/rubix/lib/utils/HttpClient';
import {
Row,
Col,
Grid,
Panel,
PanelBody,
PanelContainer,
} from '@sketchpixy/rubix';
expor... | The Home component that displays a list of todos. |
import React from 'react';
import ReactDOM from 'react-dom';
import JqxScheduler from '../../../jqwidgets-react/react_jqxscheduler.js';
class App extends React.Component {
componentDidMount() {
this.refs.myScheduler.ensureAppointmentVisible('id1');
}
render() {
let appointments = new Array... | Demonstration of the app in a sequence of components. |
import React from 'react';
import Ul from './Ul';
import Wrapper from './Wrapper';
function List(props) {
const ComponentToRender = props.component;
let content = (<div></div>);
// If we have items, render them
if (props.items) {
content = props.items.map((item, index) => (
<ComponentToRender key={... | List - List of components that can be rendered by a component |
import React, { Component } from 'react';
import { Jumbotron, Button } from 'react-bootstrap';
class Privacy extends Component{
render() {
return (
<>
<p>
This Privacy Policy describes Game-Share’s practices regarding the collection, use and disclosure of the information we collect from and about you when you us... | The base class for all components that are not part of a private state. |
/**
* Copyright 2017 Yuichiro Tsuchiya
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agr... | Provides a function to export a missing check group component or component from a JSX file. |
import React from 'react';
import Anchor from '../Anchor';
import PropTable from '../PropTable';
import ReactPlayground from '../ReactPlayground';
import Samples from '../Samples';
export default function TransitionSection() {
return (
<div className="bs-docs-section">
<h2 className="page-header">
... | The default transition section |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionHttps = (props) => (
<SvgIcon {...props}>
<path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-... | A component that exports a sequence of components that can be used to render a sequence of components. |
import React from 'react';
const TaskForm = (props) => {
return (
<p className='control has-icon has-icon-right'>
<input autoFocus={true} className='add-task input is-large' type='text' placeholder='Add a task' />
<i className='fa fa-plus'></i>
</p>
);
};
export default TaskForm;
| The default form for a missing task. |
import React from 'react'
import ReactDOM from 'react-dom'
import styles from './search.less'
import { Input, Select, Button, Icon } from 'antd'
class Search extends React.Component {
state = {
clearVisible: false,
selectValue: (this.props.select && this.props.selectProps) ? this.props.selectProps.defaultVal... | A component that can be used to render a search in a dropdown. |
import React from 'react';
const PropTypes = require('prop-types');
class EmbeddedGist extends React.PureComponent {
constructor(props) {
super(props);
this.gist = props.gist;
this.file = props.file;
this.stylesheetAdded = false;
this.state = {
loading: true,
src: ""
... | The EmbeddedGist component is a component that can embed a JSONP data from a Gist. |
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import { Provider } from 'react-redux';
import store from './store';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
const RootCom... | Imports a single component in the DOM. |
import React from 'react';
import { Router, Route, IndexRoute, hashHistory } from 'react-router';
import App from './App';
const AppRouter = () => (
<Router history={ hashHistory }>
<Route path="/" component={App}>
</Route>
</Router>
)
export default AppRouter;
| export default router |
import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import Icon from 'mastodon/components/icon';
const ColumnLink = ({ icon, text, to, href, method, badge }) => {
const badgeElement = typeof badge !== 'undefined' ? <span className='column-link__badge'>{badge}</span... | A column link that links to a node in a table. |
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { noop } from 'lodash';
import screenReaderOnly from '../../patterns/screenReaderOnly/screenReaderOnly';
const TabButton = styled.button`
background-color: ${props =>
props.selected ? props.theme.colors... | A tab with a single tab. |
import React from 'react'
import { render } from 'react-dom'
import { Router, Route,hashHistory, browserHistory, IndexRoute } from 'react-router'
import App from './modules/App'
import About from './modules/About'
import Repos from './modules/Repos'
import Repo from './modules/Repo'
import Home from './modules/Home'
r... | Imports a single non - empty sequence of components. |
import React from 'react';
import {
View,
ListView,
Dimensions,
} from 'react-native';
import { Message } from '../';
const { width } = Dimensions.get('window');
const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 });
const MessageList = ({
items, headerContent, footerContent,
backgro... | The message list is a list view that contains a list of messages with a header and a footer. |
import React from 'react';
import styled from 'styled-components';
import {theme, breakpoints} from '../../theme';
import {Image, Flex, Box} from 'rebass';
import brain from '../../images/brain.gif';
import batteries from '../../images/batteries.gif';
import separator from '../../images/separator.svg';
import {ButtonLi... | Imports a single missing - node warning and a missing - node error message. |
import _ from 'lodash';
import React from 'react';
import { PeerTypes } from 'constants/ActorAppConstants';
import MessagesSection from 'components/dialog/MessagesSection.react';
import TypingSection from 'components/dialog/TypingSection.react';
import ComposeSection from 'components/dialog/ComposeSection.react';
i... | The main dialog section class. |
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import Button from 'components/Button';
import Horizontal from 'layouts/Horizontal';
storiesOf('Button', module)
.add('types', () => (
<React.Fragment>
<h2>Standard</h2>
<Horizo... | Package that contains all the components of a module. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationChevronRight = (props) => (
<SvgIcon {...props}>
<path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>
</SvgIcon>
);
NavigationChevronRight = pure(NavigationChevronRight);
NavigationChevronRigh... | A component that exports a navigation chooser right on top of a node. |
import React from 'react';
import Slider from 'material-ui/Slider';
/**
* The `defaultValue` property sets the initial position of the slider.
* The slider appearance changes when not at the starting position.
*/
const SliderExampleSimple = () => (
<div>
<Slider />
<Slider defaultValue={0.5} />
<Slide... | The default value property sets the initial position of the slider. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsFlight = (props) => (
<SvgIcon {...props}>
<path d="M10.18 9"/><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/>
</SvgIcon>... | A component that exports a Navitia - style sequence of icons. |
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import {
Router,
browserHistory
} from 'react-router';
import App from './components/App';
import configureStore from './configureStore';
import configureRoutes from './routes';
const s... | Imports a single node in the DOM. |
import React, { Component } from 'react';
import {CN, TitleBlock} from './util';
const makeCard = (cn='card') => {
return (
<div className={cn}>
<div className={CN('image')}>
<img src="http://braavos.me/dot-css/dist/img/img.png"/>
</div>
<div className="h... | Package protected for testing purposes. |
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from '../../components/loading_indicator';
import { ScrollContainer } from 'react-router-scroll';
import Column from '../ui/components... | A component that displays a list of mutes that can be used to manage a user s list of mutes. |
// obtained from react native tutorials
import React from 'react';
import { PixelRatio } from 'react-native';
import Dimensions from 'Dimensions';
const Util = {
ratio: PixelRatio.get(),
pixel: 1 / PixelRatio.get(),
size: {
width: Dimensions.get('window').width,
height: Dimensions.get('window').height
... | export default Util |
import React from 'react';
import ROLES from 'game/ROLES';
import Analyzer from 'parser/core/Analyzer';
import TabComponent from './TabComponent';
class RaidHealthTab extends Analyzer {
constructor(...args) {
super(...args);
this.active = this.selectedCombatant.spec.role === ROLES.HEALER;
}
tab() {
... | raid - health tab |
import DateInput from '../../components/DateInput';
import Field from '../Field';
import moment from 'moment';
import React from 'react';
import { Button, InputGroup, FormInput } from 'elemental';
module.exports = Field.create({
displayName: 'DateField',
focusTargetRef: 'dateInput',
// default input format
inpu... | Protected date input |
import cx from 'classnames'
import _ from 'lodash'
import PropTypes from 'prop-types'
import React from 'react'
import {
childrenUtils,
createShorthandFactory,
customPropTypes,
getUnhandledProps,
getElementType,
META,
} from '../../lib'
import Icon from '../../elements/Icon'
/**
* A divider sub-component... | A sub - component for Breadcrumb. |
import React from 'react';
module.exports = React.createClass({
// RENDER
render: function() {
return (
<div className="cv">
CV
</div>
);
}
}); | export a single node |
import React, { Component } from 'react';
import { createChatMessage } from '../actions/index';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { reduxForm, Field } from 'redux-form';
import RaisedButton from 'material-ui/RaisedButton';
import TextField from 'material-ui/TextFi... | Component that creates a chat message. |
/**
* Created by ken on 2017/5/15.
*/
import React from 'react'
import {inject, observer} from 'store/index'
import {Table, Tag, Modal} from 'antd'
import DropOption from 'component/DropOption'
@observer
export default class extends React.Component {
componentWillMount() {
this.props.store.getMembers()
cons... | A component that is rendered when a user has a tag. |
/* global Prism */
import './styles.css'
import React from 'react'
import {connect} from 'cerebral/react'
import connector from 'connector'
import Action from './Action'
export default connect(props => ({
currentPage: 'debugger.currentPage',
useragent: 'useragent.**',
signal: `debugger.signals.${props.currentSi... | The signal component which is rendered when a signal is clicked. |
import React from 'react'
import Head from 'next/head'
import Link from 'next/link'
export default (props) => (
<div id="head-2">
<Head>
<meta name="description" content="Head Two" />
<title>this is head-2</title>
</Head>
<Link href="/nav/head-1">
<a id="to-head-1">to head 1</a>
</L... | default function to render a |
import React from 'react';
import UserDetails from '../UserDetails';
import { getUserDetails } from '../../actions';
import store from '../../store';
const UserDetailsContainer = React.createClass({
propTypes: {
params: React.PropTypes.object
},
getInitialState() {
return {
currentUser: store.getS... | Create a container which contains a UserDetails object. |
import React from 'react';
import Portal from './Portal';
import Position from './Position';
import RootCloseWrapper from './RootCloseWrapper';
import elementType from 'react-prop-types/lib/elementType';
/**
* Built on top of `<Position/>` and `<Portal/>`, the overlay component is great for custom tooltip overlays.
... | The base class for the overlay component. |
import React from 'react';
import Collapsible from 'react-collapsible';
import 'whatwg-fetch';
import CartManager from '../../utilities/cartManager';
import './OneRestaurantPage.scss';
import startupData from '../../../../shared/startupData.json';
export default class OneRestaurantPage extends React.Component {
c... | Component that displays a menu of all the possible products in a single restaurant. |
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import React from 'react';
import PropTypes from 'prop-types';
export const styles = {
/* Styles applied to the root element. */
root: {
zIndex: -1,
positio... | A backdrop that is used to open or hide a hidden node in a popup. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentSort = (props) => (
<SvgIcon {...props}>
<path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"/>
</SvgIcon>
);
ContentSort = pure(ContentSort);
ContentSort.displayName = 'ContentSort';
ContentSort.mui... | A component that exports a single node in a group of nodes. |
import React from 'react';
import PropTypes from 'prop-types';
import embedjs from 'embedjs';
import _ from 'lodash';
import PostFeedEmbed from './PostFeedEmbed';
import BodyShort from './BodyShort';
import { jsonParse } from '../../helpers/formatter';
import { image } from '../../vendor/steemitLinks';
import {
getPo... | React - specific - style style |
import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import popoverReadmeText from './README';
import PopoverExampleSimple from './Ex... | Exports a single non - empty |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAutorenew = (props) => (
<SvgIcon {...props}>
<path d="M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 ... | A component that renders a series of icons that can be used to show a series of components. |
import React from 'react';
import ReactDOM from 'react-dom';
import Demo from './Demo';
const Root = () => (<Demo />);
ReactDOM.render(<Root />, document.getElementById('main'));
| Import all modules that are not in the same order. |
/**
* Created by ls-mac on 2017/4/29.
*/
import React, { Component } from 'react';
import {
View,
StyleSheet,
TouchableOpacity,
Text
} from 'react-native';
import NavigationBar from '../../component/navBarCommon'
import back from './../../source/images/icon_back.png'
import * as Constants from '../..... | Demonstrates how to render a customizable sequence sequence |
/*eslint-disable react/no-set-state */
import React, { Component } from 'react';
import { connect } from 'react-redux';
import style from './style.css';
import { selectIsPending } from '../../../selectors/searchSelectors';
const FINISH_INTERVAL = 250;
class Loader extends Component {
constructor(props) {
super... | A loader that loads a component when it is ready to be loaded. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationPhonelinkSetup = (props) => (
<SvgIcon {...props}>
<path d="M11.8 12.5v-1l1.1-.8c.1-.1.1-.2.1-.3l-1-1.7c-.1-.1-.2-.2-.3-.1l-1.3.4c-.3-.2-.6-.4-.9-.5l-.2-1.3c0-.1-.1-.2-.3-.2H7c-.1 0-.2.1-.3.2l-.2 1... | A component that renders a communication photelink. |
import React, { Component } from 'react';
import Home from '../components/Home';
export default class HomePage extends Component {
render() {
return (
<Home />
);
}
}
| The HomePage class is a base class that extends the Home class. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { selectBook } from '../actions/index';
import { bindActionCreators } from 'redux';
class BookList extends Component {
renderList() {
return this.props.books.map((book) => {
return (
<li
key={book... | The base class for a book list. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationSync = (props) => (
<SvgIcon {...props}>
<path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25... | A component that renders a component that is not attached to any component. |
import React from 'react';
const VideoDetail = (props) => {
if (!props.selectedVideo) {
return <div>Loading...</div>;
}
return (
<div className="video-detail col-md-8">
<div className="embed-responsive embed-responsive-16by9">
<iframe className="embed-responsive-item" src={"http://www.yout... | The video detail component |
import React, { Component } from 'react';
import { render } from 'react-dom';
import { VirtualScroll, AutoSizer } from 'react-virtualized';
export default class Library extends Component {
expandLibrary(library, uri) {
this.props.mopidyAction("expandLibrary", {library: library, uri: uri});
}
expan... | A component that renders a library list. |
import React from 'react';
import ReactDOM from 'react-dom';
import { render } from './api';
import Demo from './components/demo';
const demoElement = document.getElementById('insert-syntactor-demo-here');
if (demoElement) {
ReactDOM.render(<Demo />, demoElement);
} else {
window.Syntactor = { render: render };
}... | Imports a Syntactor and renders it in the context of the demo element. |
import React from 'react';
import FacebookTokenButton from 'components/FacebookTokenButton';
import LocaleFormattedMessage from 'components/LocaleFormattedMessage';
const logo = require('../../../static/images/logo-lg.png');
export default () => (
<div className="row" style={{ paddingTop: '10vh' }}>
<div class... | export default nagios |
import React from 'react';
import PropTypes from 'prop-types';
import { View, ViewPropTypes, Animated } from 'react-native';
import CircularProgress from './CircularProgress';
const AnimatedProgress = Animated.createAnimatedComponent(CircularProgress);
export default class AnimatedCircularProgress extends React.Compon... | Create a class which extends React. Component and adds animation to it. |
import React from 'react';
import PropTypes from 'prop-types';
import { IntlProvider, addLocaleData } from 'react-intl';
import { getLocale } from '../locales';
import Video from '../features/video';
const { localeData, messages } = getLocale();
addLocaleData(localeData);
export default class VideoContainer extends R... | The base class for a sequence of images that can be rendered in a video. |
import React from 'react';
import Page from './page.js';
React.render(
<Page/>,
document.getElementById('content')
);
| Renders a in the content of a page. |
import React, { Component } from 'react';
class Hello extends Component {
render() {
return (
<div className="hello">Hello, World!</div>
);
}
}
export default Hello;
| A component that can be rendered by a component that is not a component of a component type. |
import cx from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import Avatar from '../Avatar';
import UserRoles from '../UserCard/UserRoles';
import ChangeUsernameButton from './ChangeUsernameButton';
const formatJoinDate = date => new Date(date).toLocaleString([], {
year: 'numeric',
m... | Exports a single object to a profile panel. |
import React from 'react';
import PropTypes from 'prop-types';
import styles from './Form.scss';
export const Item = ({ label, value, onUpdate }) => (
<div className={styles.field}>
<label>{label}</label>
<input
type="text"
value={value}
onChange={(event) => onUpdate(event.... | A component that exports a LogEntry |
import PropTypes from 'prop-types';
import React from 'react';
import classNames from 'classnames';
import keycode from 'keycode';
import { withTranslation } from 'react-i18next';
import Action from '../../../Actions/Action';
import theme from './Item.scss';
import ItemPropTypes from './Item.propTypes';
import ItemEdi... | ItemEdit component that displays a dropdown list of items that can be edited by a user. |
import React, { Component } from 'react';
export default class Comment extends Component {
render() {
return (
<div className="comment">
<h2 className="commentAuthor">
{this.props.author}
</h2>
{this.props.children}
... | Package for a single comment class. |
/**
* Function to get the shallow output for a given component
* As we are using phantom.js, we also need to include the fn.proto.bind shim!
*
* @see http://simonsmith.io/unit-testing-react-components-without-a-dom/
* @author somonsmith
*/
import React from 'react';
import TestUtils from 'react-addons-test-utils'... | Get the shallow rendered component |
/**
* Created by home on 21.08.2016.
*/
import React from 'react';
import {connect} from 'react-redux';
import {push} from 'react-router-redux';
import {createStructuredSelector} from 'reselect';
import {Row, Col, Icon, Tooltip} from 'antd';
import {selectMessages} from '../LanguageProvider/selectors';
import BreadCr... | A navbar showing a single critical sequence of states. |
import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox';
c... | Dark Arbiter class |
import React from 'react';
import classNames from 'classnames';
export default class NavButton extends React.Component {
render() {
const className = classNames(
'css-button-' + this.props.direction,
this.props.disabled && 'css-button-disabled'
);
return <button
className={className}
... | The button component for a nav button. |
// Set up your application entry point here...
import React from 'react';
import { render } from 'react-dom';
import css from './styles/style.styl';
import { Provider} from 'react-redux';
import store, { history } from './store/index';
import App from './containers/App';
import Single from './containers/Single';
impor... | This is the main entry point for the application. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSearch = (props) => (
<SvgIcon {...props}>
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 1... | A component that exports a sequence of action icons. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.