code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react'
import PropTypes from 'prop-types'
import { graphql } from 'gatsby'
import SEO from '../components/seo'
import Layout from '../components/layout'
import Post from '../components/post'
const BlogPostTemplate = ({ data, pageContext }) => {
const {
frontmatter: { title, date, path, author... | export default JSX template |
import React from 'react';
import { compose, pure, setPropTypes } from 'recompose';
import PropTypes from 'prop-types';
import { View } from 'react-native';
import styled from '@ui/styled';
import { BodyText } from '@ui/typography';
const enhance = compose(
pure,
setPropTypes({
children: PropTypes.oneOfType([... | The default type check function |
import React, { Component } from 'react';
import { Link } from 'react-router';
import { Row, Col, Nav } from 'react-bootstrap';
import { connect } from 'react-redux';
const packageInfo = require('../../../package.json');
class Header extends Component {
isLinkActive(pathname) {
return this.context.history.isActive(... | React - Duplication - based implementation of a single object. |
import 'core-js/fn/object/assign';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/Main';
// Render the main component into the dom
ReactDOM.render(<App />, document.getElementById('app'));
| Renders the main component into the main DOM. |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Layout from '../../compo... | Provides a function to create a new object with the data from a React component. |
import React from 'react';
const th = (props) => {
const { children } = props;
return (
<th>{ children }</th>
);
};
export default th;
| export default th |
import React from 'react'
import Redirect from '../../layouts/redirect'
import { BASE_URL } from '../../globals'
export default React.createClass({
render() {
return <Redirect to={BASE_URL} />
}
})
| The default function for the module. |
import React, { Component } from 'react';
import Container from '../../../../components/Container';
import { compose } from 'glamor';
import Link from 'gatsby-link';
import theme from '../../../../theme';
export default class ValueProps extends Component {
render () {
return (
<div className={compose(styles.back... | Component class that exports a single value in a hierarchy. |
import React, { Component } from 'react';
import TodoApp from './TodoApp';
import { createRedux } from 'redux';
import { Provider } from 'redux/react';
import * as stores from '../stores';
const redux = createRedux(stores);
export default class App extends Component {
render() {
return (
<Provider redux={... | The base class for all components that are not part of a React application. |
import Component from '../../components/component.react';
import React from 'react';
export default function devTools(BaseComponent) {
return class DevTools extends Component {
static propTypes = {
flux: React.PropTypes.object.isRequired
}
constructor(props) {
super(props);
this.hist... | The DevTools component is a base component that is used to handle keyboard input and keyboard output. |
import React from 'react';
import PropTypes from 'prop-types';
const SubscriptionDetailProducts = ({ subscriptionDetails }) => (
<div>
<h2>{__('Provided Products')}</h2>
<ul>
{subscriptionDetails.provided_products &&
subscriptionDetails.provided_products.map(prod => (
<li key={prod.id... | Exports a default subscription detail products. |
import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import { formatDuration, formatPercentage } from 'common/format';
import STATISTIC_ORDER from 'parser/ui/STATISTIC_ORDER';
import { t } from '@lingui/macro';
import StatTracker from 'parser/shared/modules/StatTra... | Package that inherits from React. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentAddCircleOutline = (props) => (
<SvgIcon {...props}>
<path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.5... | A component that renders a single missing circle inside a group of icons. |
import CSSModules from 'react-css-modules';
import React from 'react';
import CSS from './input-icon.styl';
import Icon from '../Icon';
type Props = {
name: string,
styles?: Object
}
function InputIcon({ name, styles, ...other }: Props) {
return (
<Icon name={name} styleName='input-icon' size='medium' />
... | export default input - icon |
/**
* Label module.
* @module @massds/mayflower-react/Label
* @requires module:@massds/mayflower-assets/scss/01-atoms/helper-text
*/
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
const Label = ({
children, inputId, hidden, disabled, conditionText, className, ... | A label for a single node in a tree. |
import React from 'react';
import { render } from 'react-dom';
// 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';
render(<HelloWorld />, document.getElementById('react-root'));
| Imports a component from a file that has no react - dom. |
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-alef'
import App from './app'
import createRenderer from './renderer'
const renderer = createRenderer()
render(
<Provider renderer={renderer}>
<App />
</Provider>,
document.getElementById('app')
)
| Imports a single from the DOM. |
// React
import React, { Component } from 'react';
// Redux actions
import { connect } from 'react-redux';
// Main application class
import ApplicationScreen from './../application/ApplicationScreen';
import { Link } from 'react-router-dom';
// Bootstrap Classes
import { Row, Col, Button, FormGroup, ControlLabel, ... | Component that creates a new action that creates a new job screen. |
import ReactDOM from 'react-dom';
import React from 'react';
import view from './views/login';
import api from '../utils/api';
import Authentication from '../utils/authentication';
import { browserHistory } from 'react-router';
class Home extends React.Component {
constructor(props) {
super(props);
this.sta... | The Home component which is a component that can be used to login a user. |
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { useSelector } from 'react-redux';
//
import { makeStyles } from '@material-ui/core/styles';
//
import * as Utils from '../../../utils';
import AbstractComponent from '../AbstractComponent/AbstractComponent';
imp... | Panel component which is a panel with a single child of a panel. |
import React from 'react'
import { connect } from 'react-redux'
import BlockHTML from '../../atoms/BlockHTML';
var TextI18n = function (props) {
var lang = props.lang;
var value = props.value;
var output = value;
if(value && lang && typeof value === 'object'){
output = value[lang]
}
... | React module that exports a text node with a language specific language. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { submit, SubmissionError } from 'redux-form';
import ControlledModal from '../../../common/modals/controlledModal';
import { updateReviewSummary } from '../../../../reducers/cfeiReviewSummary';
i... | Component that displays a modal with a summary of the selected Cfei. |
import React from 'react';
import PropTypes from 'prop-types';
function Button({ label, onClick }) {
// eslint-disable-next-line react/button-has-type
return <button onClick={onClick}>{label}</button>;
}
Button.propTypes = {
label: PropTypes.string.isRequired,
onClick: PropTypes.func.isRequired,
};
const Mem... | Button with no label and on click callback |
/*
* Copyright 2017 Alexander Pustovalov
*
* 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 a... | The base class for a single critical sequence. |
import React from 'react';
import { View } from 'react-native';
// This class is intended for styling only. Because there's not shared CSS styles
// in react-native. So a style that is to be shared, must be by using a class.
const Card = (props) => {
return (
<View style={styles.containerStyle}>
{ props.c... | Exports a component that can be used to render a card with a non - shared style. |
import React, { Component } from 'react';
import { configureStore } from 'react-component-store';
export default class Component10 extends Component {
render() {
return (
<div style={{padding: 30, border: '1px solid gray'}}>
<p>CHILD OF CHILD COMPONENT-1 (Dumb component)</p>
<div>This is cu... | A component that is a child of a component that has a data attribute. |
/*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import assign from 'object-assign';
import React from 'rea... | A file that contains a list of nodes that are not part of the current project. |
import 'isomorphic-fetch';
import Express from 'express';
import React from 'react';
import ReactDOM from 'react-dom/server';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import { ApolloProvider, renderToStringWithData } from 'react-apollo';
import { match, RouterContext } from 'react-router';
i... | Express middleware that serves the app. |
import PropTypes from 'prop-types';
import React from 'react';
const TimelineItemImage = ({ source, description, wide }) => (
<figure style={wide ? { maxWidth: 800 } : undefined}>
<a href={source} target="_blank" rel="noopener noreferrer">
<img src={source} alt={description} />
</a>
<figcaption>{de... | A timeline item image for a node in a series. |
import React from 'react'
import PropTypes from 'prop-types'
import MxHexTileMap from '../components/MxHexTileMap'
export const withTooltipPropTypes = {
tooltipOpen: PropTypes.bool,
tooltipLeft: PropTypes.number,
tooltipTop: PropTypes.number,
tooltipData: PropTypes.object,
updateTooltip: PropTypes.func,
sh... | A component that displays a series of keys that are not part of a sequence of tiles. |
import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-router'
const LoginForm = ({ setRef, errorList, handleSubmit, isSubmitting }) => (
<div className='container'>
<div className='row'>
<div className='span6 offset3'>
<div className='well login clearfix'>
... | A function that returns a function that can be used to render a single single node in a login form. |
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import StatusListContainer from 'flavours/glitch/features/ui/containers/status_list_container';
import Column from 'flavours/glitch/components/column';
import ColumnHeader from 'flavours/glitch/components/column_header... | Component that displays a hashtag timeline. |
'use strict';
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
} from 'react-native';
export default class WelcomeText extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</... | A component that is rendered by a component that is not a component of a list view. |
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "React" }] */
import React from 'react';
import ReactDOM from 'react-dom';
import Faq from './components/faq.js';
import NsfNav from './components/nsf-nav.js';
import Challenges from './components/challenges.js';
if (document.getElementById(`sticky-nav`)) {
... | Imports a bunch of modules that are not required by the user. |
import React, { Component } from 'react';
import Input from 'react-toolbox/lib/input/Input'
import Checkbox from 'react-toolbox/lib/checkbox/Checkbox'
import Button from 'react-toolbox/lib/button/Button'
import { connect } from 'react-redux'
import { authenticate } from 'reducers/auth.reducer'
import './Login.css'
exp... | A component that displays a login screen when a user clicks on a login screen. |
import React from 'react';
import Async from 'react-code-splitting'
import ReactDOM from 'react-dom';
const App = () => <Async load={import('containers/app')} />;
ReactDOM.render(
<App />,
document.getElementById('app')
);
| Imports a single application. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSubject = (props) => (
<SvgIcon {...props}>
<path d="M14 17H4v2h10v-2zm6-8H4v2h16V9zM4 15h16v-2H4v2zM4 5v2h16V5H4z"/>
</SvgIcon>
);
ActionSubject = pure(ActionSubject);
ActionSubject.displayName = 'Acti... | A action subject for a missing node in a hierarchy. |
import React from 'react'
import { AppContainer } from 'react-hot-loader'
import { hydrate, render } from 'react-dom'
// Compatibility Polyfills
import 'react-fastclick'
import 'utils/polyfills'
import ClientRoot from 'components/root/ClientRoot'
const isProd = process.env.NODE_ENV === 'production'
const rootElement... | Imports a single node of a React component. |
import _extends from 'babel-runtime/helpers/extends';
import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possib... | A component that shows a timeline of items. |
// (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... | A component that renders a standards - 3d - effects icon. |
import React from 'react';
import { Link } from 'react-router';
import { prefixLink } from 'gatsby-helpers';
import TextSection from '../components/TextSection';
import Helmet from 'react-helmet';
import { config } from 'config';
import "./index.css";
import { styles } from '../components/IndexSections/styles';
import ... | The main function of the index class. |
import React from 'react';
import {connect} from 'react-redux';
import {Field, FieldArray, reduxForm} from 'redux-form';
const mapStateToProps = state => {
return {
// mandatory key name
initialValues: state.submitted.fieldArray, // pull initial values from submitted reducer
};
};
let FieldArr... | Private function for generating a missing - key |
/* @flow */
import React from 'react';
import ContextMenuItem from '../../../base/components/context-menu/ContextMenuItem';
import { translate } from '../../../base/i18n';
import { IconCrown } from '../../../base/icons';
import { connect } from '../../../base/redux';
import AbstractGrantModeratorButton, {
_mapSta... | A component which displays a button which allows to grant a moderator to a participant. |
import React from 'react';
import Circle from './Circle';
import Wrapper from './Wrapper';
const LoadingIndicator = () => (
<Wrapper>
<Circle />
<Circle rotate={30} delay={-1.1} />
<Circle rotate={60} delay={-1} />
<Circle rotate={90} delay={-0.9} />
<Circle rotate={120} delay={-0.8} />
<Cir... | The LoadingIndicator function |
import React, { Component } from 'react';
import { Button, message, Modal } from 'antd'
import { download } from 'services/qrcode'
import style from './index.css'
class QRCodeResult extends Component {
clickHandler = () => {
const { list } = this.props
download({
rcmd_code_list: list
... | Component that can be used to generate a QR - Code. |
/**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import PropTypes from 'prop-types';
import React from 'react';
import classNames from 'classnames';
import { settings } from 'carbon-componen... | A function that creates a reserved for a control |
import React from 'react'
import {Link} from 'react-router-dom'
const ArticleCard = ({channel, article, setArticleUrl}) => {
return (
<Link to={`/newsfeed/${channel.source_id}/${setArticleUrl(article.title)}`} className="article-link">
<div className="card">
<h3>{article.title}</h3>
<img ... | React - related module |
import React from 'react';
import Router from 'react-router';
import routes from './routes';
const app = document.getElementById('app');
const initialState = window._initialState;
Router.run(routes, Router.HistoryLocation, (Handler) => {
React.render(<Handler initialState={initialState} />, app);
});
| Imports a component with a specific initial state. |
import React from 'react';
const First = React.createNotClass({
displayName: 'First'
});
class Second extends React.NotComponent {}
| The first component of a sequence |
'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import AppRoutes from './components/AppRoutes';
window.onload = () => {
ReactDOM.render(<AppRoutes/>, document.getElementById('main'));
};
| Imports the application routes and renders them into the main DOM. |
import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
module.exports = createDevTools(
<DockMonitor
toggleVisibilityKey="ctrl-h"
changePositionKey="ctrl-w"
defaultIsVisible={f... | createDevTools creates a new empty devtools object with a single node containing a sequence of React elements. |
import 'babel-polyfill'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import Node from './containers/Node'
import configureStore from './store/configureStore'
import generateTree from './generateTree'
const tree = generateTree()
const store = configureStore(tree)
... | Imports a single node in the hierarchy. |
import React from 'react';
import StaticContainer from 'react-static-container';
import getParamsForRoute from './getParamsForRoute';
import RootComponent from './RootComponent';
import RouteAggregator from './RouteAggregator';
export default class Container extends React.Component {
static displayName = 'ReactRout... | The base class for the router relay. |
/**
* @flow
*/
import React from 'react';
import {
StyleSheet,
Text,
View,
} from 'react-native';
type Props = {
textStyle: Object,
onLayout: () => void,
};
type State = {
computedSize: ?{
width: number,
height: number,
},
};
export default class Badge extends React.Component {
static prop... | High - level component that displays a badge if no component is found. |
import React from 'react';
import PropTypes from 'prop-types';
const DashboxDash = (props) => {
const color = props.color == 'inherit' ? undefined : props.color;
const aria = props.title ? 'svg-dashbox-dash-title' : '' +
props.title && props.description ? ' ' : '' +
props.description ? 'svg-dashbox-dash-de... | DashboxDash export function |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSpellcheck = (props) => (
<SvgIcon {...props}>
<path d="M12.45 16h2.09L9.43 3H7.57L2.46 16h2.09l1.12-3h5.64l1.14 3zm-6.02-5L8.5 5.48 10.57 11H6.43zm15.16.59l-8.09 8.09L9.83 16l-1.41 1.41 5.09 5.09L23 13l-... | A component that exports a single action spellcheck. |
/**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*/
import React from 'react';
import { FormattedMessage } from 'react-intl';
import H1 from 'components/H1';
import messages from './messages';
export default function NotFound() {
return (
<article>
... | NotFoundPage - the page that displays when the user visits a url that doesn t have a route |
/**
* Created by tim on 16/03/17.
*/
/**
* Created by tim on 13/03/17.
*/
import React from 'react';
import {connect} from 'react-redux';
import {ScrollView, TextInput, Text, View, KeyboardAvoidingView, Button} from 'react-native';
import I18n from '../../assets/translations';
import theme from '../../assets/them... | Component that displays a photo when a user clicks on a link on a link on a button. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareMouse = (props) => (
<SvgIcon {...props}>
<path d="M13 1.07V9h7c0-4.08-3.05-7.44-7-7.93zM4 15c0 4.42 3.58 8 8 8s8-3.58 8-8v-4H4v4zm7-13.93C7.05 1.56 4 4.92 4 9h7V1.07z"/>
</SvgIcon>
);
HardwareMouse =... | HardwareMouse is a mouse - based icon that displays a HardwareMouse on the top of the menu. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionViewQuilt = (props) => (
<SvgIcon {...props}>
<path d="M10 18h5v-6h-5v6zm-6 0h5V5H4v13zm12 0h5v-6h-5v6zM10 5v6h11V5H10z"/>
</SvgIcon>
);
ActionViewQuilt = pure(ActionViewQuilt);
ActionViewQuilt.displayN... | A component that exports a single action in a quilt fashion. |
/* eslint-disable react/forbid-prop-types */
import React from 'react';
import { Text, View } from 'react-native';
import propTypes from 'prop-types';
import { BaseStepperInput } from './BaseStepperInput';
import { DARKER_GREY, APP_FONT_FAMILY } from '../../globalStyles';
export const StepperInputWithLabel = ({
co... | A component that exports a single node with a label and a stepper input. |
import React from 'react';
import PropTypes from 'prop-types';
import IconBase from './IconBase.js';
import './ExpandIcon.css';
export class ExpandIcon extends React.Component {
constructor (props) {
super(props);
this.state = {isHovered: false};
this.handleMouseOver = this.handleMouseOver.bind(this);
this.... | A component that expands a menu item. |
import React from 'react'
import ReactModal from 'react-modal'
import { DialogStyle, fadeIn } from './Dialog.style'
const style = {
overlay: {
position: 'fixed',
top: 0,
left: 0,
right: 0,
bottom: 0,
backgroundColor: 'rgba(100, 100, 100, 0.3)',
zIndex: 999,
display: 'flex',
align... | Dialog - dialog for a single |
import classNames from 'classnames';
import React from 'react';
import Transition from 'react-overlays/lib/Transition';
const propTypes = {
/**
* Show the component; triggers the fade in or fade out animation
*/
in: React.PropTypes.bool,
/**
* Unmount the component (remove it from the DOM) when it is f... | The Fade component is a class that implements the fade - in |
import React from 'react';
import {Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn} from 'material-ui/Table';
import MyGridRow from './myGridRow';
import * as AppEvents from './../machines/appEvents';
export default class MyGrid extends React.Component {
constructor(props) {
super(pro... | A component that can be used to create a grid with a list of apps. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceGpsOff = (props) => (
<SvgIcon {...props}>
<path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06c-1.13.12-2.19.46-3.16.97l1.5 1.5C10.16 5.19 11.06 5 12 5c3.87 0 7 3.13 7 7 0 .94-.19 1.84-.52 2.65l1.5... | Missing device - gps - off option |
import React from 'react';
const OptionsText2x = ({ block, language, onPropChange }) => {
const fontSize = block.options.container.fontSize.match(/\d+/)?block.options.container.fontSize.match(/\d+/)[0]: '16';
return (
<div>
<div>
<label>{language["Custom style"]}: <input type="checkbox" checked={block.optio... | This module exports a component that can be used to create a hidden input |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwarePhonelinkOff = (props) => (
<SvgIcon {...props}>
<path d="M22 6V4H6.82l2 2H22zM1.92 1.65L.65 2.92l1.82 1.82C2.18 5.08 2 5.52 2 6v11H0v3h17.73l2.35 2.35 1.27-1.27L3.89 3.62 1.92 1.65zM4 6.27L14.73 17H4V6... | Hardware Phonelink Off |
import React, { Component } from 'react';
import { ScrollView, Text, Button, Linking, TextInput, View } from 'react-native';
import { connect } from 'react-redux';
import { artistChanged, artistSelected, searchArtist } from '../actions';
import { Actions } from 'react-native-router-flux';
import { Card, CardSection, In... | Component which is rendered when a user clicks on a list of artists. |
'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import _ from 'underscore';
import memoize from 'memoize-one';
import { console, object, ajax } from '@hms-dbmi-bgm/shared-portal-components/es/components/util';
import { HiGlassPlainContainer, HiGlassLoadingIndicator } from './HiGlassPlainCo... | A component that renders a HiGlass component in a container that can be rendered in a browser. |
import React from 'react';
import Webiny from 'webiny';
class DateTime extends Webiny.Ui.Component {
}
DateTime.defaultProps = {
format: null,
default: '-',
value: null,
renderer() {
try {
return <span>{Webiny.I18n.datetime(this.props.value, this.props.format)}</span>;
} ca... | Component which is a component that can be used to render a date - time. |
import React from 'react';
export default props => (
<svg
id="svg4300"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 42 42"
{...props}
>
<defs>
<style
dangerouslySetInnerHTML={{
__html:
'.cls-1,.cls-2{fill:#fff}.cls-1{opacity:.25;isolation:isolate}.cls-3{fi... | XML - 1. |
import React, { Component } from 'react';
import TextField from 'material-ui/TextField';
import RaisedButton from 'material-ui/RaisedButton';
import PropTypes from 'prop-types';
// import { Link } from 'react-router-dom';
const styleForm = {
display: 'flex',
flexDirection: 'column',
alignItems: 'center'
};
clas... | A component that creates a signup form that can be used to sign up a user s name. |
import React from 'react';
import SmallerContainer from './SmallerContainer';
function LoginPlease(){
return(
<SmallerContainer>
<h1>Please Login</h1>
Please login to view this page.
</SmallerContainer>
);
}
export default LoginPlease;
| export default LoginPlease |
import React from 'react'
import Icon from '@components/Icon'
import noop from '@utils/noop'
const Tab = ({ caption = '', children, icon = '', onClick = noop, onRemoveClick = noop, removable = false }) => (
<div className="tab" onClick={onClick}>
{icon && <Icon name={icon} />}
{caption && <div className="cap... | A component that displays a single sequence of nodes with a tab. |
import React from 'react';
import PropTypes from 'prop-types';
import FontAwesome from 'react-fontawesome';
import CSSModules from 'react-css-modules';
import classnames from 'classnames';
import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger';
import Tooltip from 'react-bootstrap/lib/Tooltip';
import tr from... | The default implementation of a user avatar. |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react'; // eslint-disable-line no-unused-vars
import EventEmitter from 'eventemitter3';
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
let EE;
let viewport = {width: 1366, height: 768}; // Default si... | The main function for the withViewport component. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Redirect, Route, Switch } from 'react-router-dom';
import { connect } from 'react-redux';
import compose from 'recompose/compose';
import getContext from 'recompose/getContext';
import CrudRoute from './CrudRoute';
import NotFound f... | Component admin routes |
import React from 'react';
import PropTypes from 'prop-types';
import If from '../../utils/react-if';
import * as sharedStyles from '../../shared-style';
var cx = 0;
var cy = 0;
var radius = 5;
var STYLE_CIRCLE = {
fill: sharedStyles.MATERIAL_COLORS[500].orange,
stroke: sharedStyles.MATERIAL_COLORS[500].orange,
... | Creates a group with optional properties. |
import React from 'react'
import PropTypes from 'prop-types'
import cn from 'classnames'
import Icon from './Icon'
const Link = ({className}) => (
<Icon>
{({classes}) => (
<svg
className={cn(classes.icon, className)}
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
>
... | Package that exports a single in a pretty way. |
import React from 'react';
import classnames from 'classnames';
import GoogleMapDeviceDetailComponet from './../googleMap/deviceDetailsMap';
import index from '../../index.scss';
import { Button, IconButton } from 'att-iot-ui/lib/button';
import Icon from 'att-iot-ui/lib/icon';
let deviceData = {
name: "Denny's dev... | A component that displays a list of all devices in a system that can be met by a device. |
import React from 'react'
import { Icon } from 'antd'
import styles from './index.less'
const Error = () => <div className="content-inner">
<div className={styles.error}>
<Icon type="frown-o" />
<h1>404 Not Found</h1>
</div>
</div>
export default Error
| The default error class for missing or unknown node. |
// import classNames from 'classnames';
import React from 'react'
import PureComponent from 'react-pure-render/component';
import { Dialog, CircularProgress } from 'material-ui'
import Dropzone from 'react-dropzone'
import { hideFileLoader, loadFile } from '../actions'
import '../styles/FileLoader.less'
export defaul... | The FileLoader component which loads a file from a file in a dialog. |
import React from 'react';
import Message from './Message.js';
import base from '../rebase';
class Container extends React.Component {
constructor(props) {
super(props);
this.state = {
messages: [],
show: null
};
}
componentWillMount() {
/*
* We bind the 'chats' firebase endopint... | The base class for all components that are not part of a React component. |
import React from 'react'
import classnames from 'classnames'
const BasicInputComponent = props => { return (
<div className={classnames('basic-input', props.wrapperClass)}>
{(props.label
? <label htmlFor={props.name}>{props.label}</label>
: ''
)}
{(props.type === 'text' &&
<input
... | A component that renders a hidden hidden input with a series of hidden options. |
import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import Sidebar from '../components/Sidebar';
import CategoryTemplateDetails from '../components/CategoryTemplateDetails';
class CategoryTemplate extends React.Component {
render() {
const { title } = this.props.data... | A template that renders a single category. |
import React from 'react'
import groupBy from 'lodash.groupby'
import RulingEntityLayout from '../components/Layout/ruling_entity'
import PromisesCategoriesTabs from '../components/Promises/promises_categories_tabs'
import PromisesStatistics from '../components/Promises/promises_statistics'
export default class Ruli... | The RulingEntityPromises class is a class that renders a single promise - related component. |
import {SplitHandle} from './splitHandle'
import PropTypes from 'prop-types'
import React from 'react'
import _ from 'lodash'
import styles from './splitView.module.css'
export class SplitHandleCenter extends React.Component {
render() {
const {position, size, onDragging, onPosition} = this.props
r... | A component that wraps a single node in a split handle center. |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const ActionDone = (props) => (
<SvgIcon {...props}>
<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/>
</SvgIcon>
);
ActionDone.displayName = 'ActionDone';
ActionDone.muiName = 'SvgIcon';
export default ActionDone;
| A function that exports a single node in a hierarchy. |
/*
ProgressBar, primarily for file uploads.
*/
import React from 'react';
function toFixedDown(number, digits) {
const re = new RegExp("(\\d+\\.\\d{" + digits + "})(\\d)");
const m = number.toString().match(re);
return m ? parseFloat(m[1]) : number.valueOf();
}
export default class ProgressBar extends React... | A ProgressBar component that displays a progress bar when a file uploads. |
import React from 'react';
import invariant from 'invariant';
import { createRouteFromReactElement as _createRouteFromReactElement } from './RouteUtils';
import { formatPattern } from './PatternUtils';
import { falsy } from './InternalPropTypes';
var _React$PropTypes = React.PropTypes,
string = _React$PropTypes.st... | The redirect component is used to declare another URL path a client should have in a given state. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { getAvatar } from '../../api';
import defaultAvatar from '../../assets/images/default-avatar.png';
class Avatar extends Component {
constructor(props) {
super(props);
}
render() {
const { size, className, id, title } =... | A component that renders a single node with a avatar. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { getNotifText } from '../../consts/utils';
class Notification extends Component {
shouldComponentUpdate(nextProps) {
const { notif } = this.props;
if (nextProps.unread === 0 && (notif.read === 1)) {
return false;
... | Notification component for a single notif notification. |
'use strict';
import React, { Component } from 'react';
import{
StyleSheet,
View,
Image,
ScrollView,
Dimensions,
TouchableOpacity,
Text,
ActivityIndicatorIOS,
} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
var deviceWidth = Dimensions.get('window').widt... | A component that can be animatable and hidden by a user. |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Card from 'Components/Card';
import Label from 'Components/Label';
import IconButton from 'Components/Link/IconButton';
import ConfirmModal from 'Components/Modal/ConfirmModal';
import { icons, kinds } from 'Helpers/Props';
import tran... | Displays a customizable sequence of words. |
// @flow
import React from 'react';
import { connect } from 'react-redux';
import { Redirect, Route, Switch, withRouter } from 'react-router-dom';
import { Doc } from './components/doc/DocPresenter';
import { DocFetcher } from './components/fetcher/DocFetcher';
import { LoadingSpinner } from './components/shared/Loadin... | The base implementation of the missing - js react - load - props module. |
import React, { Component } from 'react';
class Project extends Component {
render() {
return(
<div className="Project">
This is a project!
</div>
)
}
}
export default Project;
| Package that contains a bunch of functions that can be used to create a project. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { ListGroup, ListGroupItem } from 'react-bootstrap';
import Loading from '../loading/Loading';
import './Tax.css';
class Tax extends Component {
static propTypes = {
details: PropTypes.object.isRequired,
}
shouldComponentUp... | A component that is used to tax a component. |
import React from 'react';
import ComposeFormContainer from '../../compose/containers/compose_form_container';
import NotificationsContainer from '../../ui/containers/notifications_container';
import LoadingBarContainer from '../../ui/containers/loading_bar_container';
import ModalContainer from '../../ui/containers/mo... | The default Compose class. |
'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. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.