code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React, { Component } from 'react';
import { StatusBar } from 'react-native';
import { connect } from 'react-redux';
import { Container, Header, Title, Content, Text, H3, Button, Icon, Footer, FooterTab, Left, Right, Body, Segment } from 'native-base';
import { openDrawer } from '../../actions/drawer';
import {... | Component which is a base component that can be used to render a sequence of segments. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Tab, Tabs } from 'native-base';
import MyJobsTab from './myJobsTab';
import I18n from '../../../i18n';
import { requestGetUserJobs } from '../../../actions/ownedJobs';
class MyJobsScreen extends Component {
static navigationOp... | A component that displays a list of all the jobs owned by the user. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorModeComment = (props) => (
<SvgIcon {...props}>
<path d="M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18z"/>
</SvgIcon>
);
EditorModeComment = pure(EditorModeComment);
Edito... | A component that renders a block of content in the block - level hierarchy. |
/**
* @file
*
* @brief utility higher-order component to debounce a handler function
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*/
import React from 'react'
export default function debounce (WrappedComponent, {
timeout = 750, handlerFn = 'onChange'
} = {}) {
return class exten... | A higher - order component that wraps a component with a debounce function. |
import React from 'react';
const Todo = ({ text, onClick, completed }) => (
<li onClick={ onClick } style={{ textDecoration: completed ? 'line-through' : 'none' }}>{ text }</li>
)
export default Todo | A Todo that shows a menu item if the item is not completed. |
import PropTypes from 'prop-types';
import React from 'react';
import Helmet from 'react-helmet';
import cxsComponent from 'cxs/component';
import { media, primary } from '../lib/styles';
import { Themes, ThemeNames } from '../lib/Themes';
import ThemeProvider from './ThemeProvider';
import Header from './Header';
im... | Imports a single node with a layout that can be rendered by a Helmet component. |
import React from 'react';
import EntypoIcon from '../EntypoIcon';
const iconClass = 'entypo-svgicon entypo--LogOut';
let EntypoLogOut = (props) => (
<EntypoIcon propClass={iconClass} {...props}>
<path d="M19,10l-6-5v3H6v4h7v3L19,10z M3,3h8V1H3C1.9,1,1,1.9,1,3v14c0,1.1,0.9,2,2,2h8v-2H3V3z"/>
</EntypoI... | Default entypo logout function |
import PropTypes from 'prop-types'
import React from 'react'
import { Routes, Route, Navigate, useLocation } from 'react-router-dom'
import { useSelector } from 'react-redux'
import AccountView from 'routes/Account/views'
import LibraryView from 'routes/Library/views'
import QueueView from 'routes/Queue/views/QueueVie... | The default middleware for the Router class. |
import React, { Component } from 'react';
import ReactNative from 'react-native';
const {
StyleSheet,
Text,
View,
TouchableOpacity
} = ReactNative;
/**
* Button component
*/
export default class Button extends Component {
/**
* Render a Button
* @return {jsxresult} result in jsx format
*/
ren... | The button class which renders a button with a specific color. |
import React from 'react';
import PropTypes from 'prop-types';
const ColumnSubheading = ({ text }) => {
return (
<div className='column-subheading'>
{text}
</div>
);
};
ColumnSubheading.propTypes = {
text: PropTypes.string.isRequired,
};
export default ColumnSubheading;
| export a column subheading |
import React from 'react';
import Header from './Header.js';
import Footer from './Footer.js';
const Layout = (props) => {
let path = props.location.pathname;
let segment = path.split('/')[1] || 'root'; // for providing unique keys if needed
return (
<div>
<Header></Header>
{props.children}
... | React layout for unique keys |
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
} from 'react-native';
import Tabs from 'react-native-tabs';
class wsapp extends Component {
constructor(props){
super(props);
this.state = {page:'second'};
}
render() {
var self = this;
return (
... | Component class that exports a single critical sequence of states. |
// libs
import React from 'react';
// components
import {NavLink} from 'react-router-dom';
import MenuItem from 'material-ui/MenuItem';
// other
import styles from '../index.less';
export default function TopNavAuthenticated() {
return (<div className={styles.items}>
<NavLink to="/dashboard" className={styles.it... | Top nav authenticated |
import React, { Component } from 'react';
// NOTE: http://rackt.github.io/redux/docs/recipes/WritingTests.html
export class About extends Component {
render() {
return (
<h1>About</h1>
);
}
}
export default About;
| A component that displays a warning about the node. |
import React from 'react';
import Snackbar from 'material-ui/Snackbar';
import RaisedButton from 'material-ui/RaisedButton';
export default class SnackbarExampleTwice extends React.Component {
constructor(props) {
super(props);
this.state = {
message: 'Event 1 added to your calendar',
open: fals... | Example of how to show a Snackbar in the calendar. |
import React from 'react';
import PropTypes from 'prop-types';
import Motion from 'react-motion/lib/Motion';
import spring from 'react-motion/lib/spring';
import { FormattedMessage } from 'react-intl';
export default class UploadProgress extends React.PureComponent {
static propTypes = {
active: PropTypes.bool,... | The base class for the upload progress component. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Field, reduxForm } from 'redux-form';
import { View, Text, TouchableOpacity } from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
import { AnimatedSaveView, AnimatedTextInput, CheckboxGroup, DeleteConfir... | A component that displays a single task form with no inputs. |
import React, { Component } from 'react';
import TodoApp from './TodoApp';
import { createStore, combineReducers } from 'redux';
import { Provider } from 'react-redux';
import rootReducer from '../reducers';
const store = createStore(rootReducer);
export default class Root extends Component {
render() {
return ... | The root component of a component that is not a component of a React component. |
import React from 'react';
import { makeStyles } from '@mui/styles';
import { useDispatch } from 'react-redux';
import * as R from 'ramda';
import Typography from '@mui/material/Typography';
import Grid from '@mui/material/Grid';
import Paper from '@mui/material/Paper';
import List from '@mui/material/List';
import Lis... | Generate a single warning in the form of a sequence of objects that can be filtered by a specific keyword. |
import React from 'react';
import { RadioGroup, RadioButton } from '../../components/radio';
class RadioGroupTest extends React.Component {
state = {
value: 'vvendetta'
};
handleChange = (value) => {
console.log('Changed!', { comic: value});
this.setState({value});
};
handleFocus = () => {
... | A component that can be used to test if a component is a radio group. |
import React from 'react';
import SvgIcon from '@material-ui/core/SvgIcon';
// Slack icon from the Font-Awesome icon font by Dave Gandy:
// http://fontawesome.io/icon/slack/
// https://github.com/FortAwesome/Font-Awesome
/* eslint-disable max-len */
const SlackIcon = props => (
<SvgIcon viewBox="0 0 1792 1792" {...... | A component that renders a single node in a sequence of nodes. |
import React from 'react'
const NotFoundPage = () => (
<div>
<h1>NOT FOUND</h1>
<p>You just hit a route that doesn't exist... the sadness.</p>
</div>
)
export default NotFoundPage
| Provides a function to return a 404 page if the route is not found. |
import React from 'react';
import PropTypes from 'prop-types';
import idgen from './idgen';
const Switch = ({ id, offLabel, onLabel, ...props }) => (
<div className="switch">
<label htmlFor={id}>
{offLabel}
<input id={id} type="checkbox" {...props} />
<span className="lever" />
{onLabel}
... | A function that exports a single object. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsTrain = (props) => (
<SvgIcon {...props}>
<path d="M12 2c-4 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h2.23l2-2H14l2 2h2v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.... | A function to export a missing missing component in a Navitia chart. |
// @flow
import React from 'react';
import styled from 'styled-components';
type GlobalCssValues = 'initial' | 'inherit' | 'unset';
type WrapValue = 'nowrap' | 'wrap' | 'wrap-reverse' | GlobalCssValues;
type ShrinkValue = 0 | 1 | GlobalCssValues;
type JustifyValue =
| 'center'
| 'start'
| 'end'
| 'flex-start'... | Provides a flexible box with a specific property name. |
import Field from '../Field';
import React from 'react';
import { FormRow, FormField, FormInput } from 'elemental';
module.exports = Field.create({
displayName: 'GeopointField',
focusTargetRef: 'lat',
valueChanged (which, event) {
this.props.value[which] = event.target.value;
this.props.onChange({
path: t... | The field that is used to display a single nanoid field in a form. |
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';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let Spellcheck = 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-1.41... | A component that renders a single missing component in a group of icons. |
import React from 'react'
import PropTypes from 'prop-types'
import PlacesAutocomplete, { geocodeByAddress, getLatLng } from 'react-places-autocomplete'
import { ListGroup, ListGroupItem, Input } from 'reactstrap'
class SearchBox extends React.Component {
state = {
address: ''
}
componentDidMount () {
c... | The base component for a single |
import React from 'react';
import style from './style';
import CodeMirror from 'codemirror';
import 'codemirror/mode/javascript/javascript';
class Editor extends React.Component {
static propTypes = {
className: React.PropTypes.string,
codeText: React.PropTypes.string,
lineNumbers: React.PropTypes.bool,
... | The Editor component which is rendered when a text area is editable. |
import React, { Component } from 'react';
class Header extends Component {
/**
* Render <Header />
*
* @return: {JSX}
*/
render() {
return (
<header className="sticky sticky--top">
<div className="row">
<nav>
<a className="header__brand" href="/">
... | A header for a single nagios. |
import React, { Component } from 'react';
import { Text } from 'react-native';
import styles from '../../styles/styles';
import InPageImage from '../inPageImage';
import AnimalText from '../animalText';
import AnimalTemplate from '../animalTemplate';
const IMAGES = [
require('../../images/animals/vlkHrivnaty/01.jpg... | Package for all components of a given type. |
import React, { Component } from 'react';
class Dreamstep extends Component {
render() {
return(
<div className="dreamstep align-items-center">
<div className="container-fluid full-width">
<div className="row justify-content-center">
<div className="col-12">
<div... | 가이번표 가이번표 가이번표 가이번표 가이번표 가이번표 가이번표 가이� |
// @flow
import React, { Component } from 'react';
import { Link } from 'react-router';
import styles from './Home.css';
export default class Home extends Component {
render() {
return (
<div>
<div className={styles.container}>
<h2>Home</h2>
<Link to="/counter">to Counter</Link... | The base class for a sequence of non - empty components. |
import React from 'react'
import ReactDOM from 'react-dom'
import { configure } from 'redux-auth'
import { AppContainer } from 'react-hot-loader'
import configureStore from './store'
import { browserHistory } from 'react-router'
import { syncHistoryWithStore } from 'react-router-redux'
import Root from './containers/Ro... | Imports a single node in the app |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { SNACKBAR } from '../identifiers';
import ActivableRenderer from '../hoc/ActivableRenderer';
import InjectButton from '../button/Button';
import Portal from... | Creates a Snackbar component that is rendered when a button is clicked on a child of a button. |
import React from 'react';
import GlobalNavBranding from './global-nav-branding';
import GlobalNavMenu from './global-nav-menu';
import GlobalNavUser from './global-nav-user';
import GlobalNavSearch from './global-nav-search';
import ShortcutsHelpView from './shortcuts-help-view';
export default React.createClass({
... | The default component that displays a menu of users and menus. |
import React from 'react';
import Button from '@material-ui/core/Button';
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
import DialogContentText from '@material-ui/core/DialogContentText';
import D... | A dialog that shows a single alert in a dialog slide. |
import 'babel-core/polyfill';
import React from 'react';
import BrowserHistory from 'react-router/lib/BrowserHistory';
import { Provider } from 'react-redux';
import { Router, Route } from 'react-router';
import configureStore from './store/configureStore';
import App from './containers/App';
import UserPage from './co... | Imports a single node in the DOM. |
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 renders a link |
/*! 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 from 'react';
import PropTypes from 'prop-types';
import Dialogue from 'components/dialogues/Dialogue';
import PaymentHeader from 'components/dialogues/Header';
import { translate } from 'instances/i18n';
import Confetti from 'components/Confetti';
import classNames from 'classnames';
class PaymentResultD... | A dialogue that shows a single payment result. |
import React from 'react';
import filter from '../filter';
import Div from '../commons/div';
const defaultClassName = 'ui grid';
const componentName = 'Grid';
const Grid = new filter(Div)
.classGenerator(defaultClassName)
.getComposeComponent(componentName);
export default Grid;
| Imports a component with a default class and a default div. |
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
import AccountContainer from '../../../containers/account_container';
import StatusContainer from '../../../containers/status_container';
import ImmutablePureComponent from 'react-immuta... | The default search results class |
import React from 'react'
import PropTypes from 'prop-types'
export const HomeIconNext = ({ color, title, ...props }) => (
<svg
width="24"
height="24"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
{title && <title>{title}</title>}
<path
d="M21.977 6.186 13.30... | A component that renders a sequence of nodes with a link to the next node. |
import React from 'react';
import {withImmutableProps} from '../utils';
import defaultSelectionRenderer from './defaultSelectionRenderer';
import styles from './Header.scss';
export default withImmutableProps(({renderSelection}) => ({
renderSelection: (values, props) => {
if (!values || !values.start && !values.... | The default header selection renderer |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationFolderSpecial = (props) => (
<SvgIcon {...props}>
<path d="M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-2.06 11L15 15.28 12.06 17l.78-3.33-2.59-2.24 3.41-.29... | NotificationFolderSpecial is a special component that can be used to show a notification folder in a special component. |
import React from 'react'
import PropTypes from 'prop-types'
import './iconfont.less'
const Iconfont = ({ type, colorful }) => {
if (colorful) {
return (<span
dangerouslySetInnerHTML={{
__html: `<svg class="colorful-icon" aria-hidden="true"><use xlink:href="#${type.startsWith('#') ? type.replace(/#... | Iconfont a Iconfont |
import React from 'react'
import ProfilePane from './ProfilePane'
import Pydio from 'pydio'
import {CardTitle, FlatButton} from 'material-ui'
const { ActionDialogMixin, CancelButtonProviderMixin, SubmitButtonProviderMixin} = Pydio.requireLib('boot');
/**
* Sample Dialog class used for reference only, ready to be
* c... | ---------------------------- Structure of a single sequence of classes. |
import React from 'react';
import { Link, NavLink } from 'react-router-dom';
const Header = () => (
<nav className="navbar navbar-default">
<div className="container-fluid">
<div className="navbar-header">
<button type="button" className="navbar-toggle collapsed" data-toggle="collapse" data-target=... | export default header for a single - node with a navbar |
// @flow
import React from 'react';
import Constants from '../../Constants';
const islands = [
Constants.Image.ISLAND_SMALL_1,
Constants.Image.ISLAND_SMALL_2,
Constants.Image.ISLAND_SMALL_3,
Constants.Image.ISLAND_SMALL_4,
Constants.Image.ISLAND_SMALL_5,
Constants.Image.ISLAND_SMALL_6
];
type Props = {
... | A component that exports a in a Bootstrap - styled way. |
////////////////////////////////////////////////////////////////////////////////
// Exercise:
//
// Make tabs a "pure component" by not managing any of its own state, instead
// add a property to tell it which tab to show, and then have it communicate
// with its owner to get rerendered with a new active tab.
//
// Why... | A component that can be used to show a single non - zero |
import React from 'react';
import SimpleExample from './simple';
import EventsExample from './events';
import VectorLayersExample from './vector-layers';
const examples = <div>
<h1>React-Leaflet examples</h1>
<h2>Popup with Marker</h2>
<SimpleExample />
<h2>Events</h2>
<p>Click the map to show a marker at y... | Renders all of the missing - node node elements. |
import React from 'react';
import {graphql, compose} from 'react-apollo';
import { pure, branch, renderComponent } from 'recompose';
import gql from 'graphql-tag';
import Button from '../../../components/Button'
import StateGlobal from '../../../hoc/StateGlobal'
const REMOVE_ELEMENT = gql`
mutation HierarhicalItemAd... | Decorate a component to show a hidden hidden |
/**
*
* MainSearchMobile
*
*/
import React from 'react';
import TextField from 'material-ui/TextField';
import SearchIcon from 'material-ui/svg-icons/action/search';
class MainSearchMobile extends React.PureComponent {
constructor(props){
super(props);
this.state = {
active:0,
slides:[
... | A component that shows a hidden hidden |
import React, { Component } from 'react';
export default class AboutDescription extends Component {
render() {
return (
<div className="about-description">
This demo creates a live visualization of over 250,000 vehicle
complaints compiled by the National Highway Traffic Safety
Admin... | The AboutDescription class is used to display a single node in the UI. |
import _ from 'lodash' // eslint-disable-line
import moment from 'moment'
import React from 'react'
import PropTypes from 'prop-types'
import ReactDatetime from 'react-datetime'
import Inflection from 'inflection'
import {FormGroup, ControlLabel, HelpBlock} from 'react-bootstrap'
import {validationHelp, validationState... | A component that can be used to integrate a date time or time into a date or time. |
import React from 'react';
const First = React.createNotClass({
displayName: 'First'
});
class Second extends React.NotComponent {}
| The first component of a sequence is a |
import classnames from 'classnames';
import React from 'react';
import bootstrapUtils, { bsClass } from './utils/bootstrapUtils';
import all from 'react-prop-types/lib/all';
import SafeAnchor from './SafeAnchor';
import createChainedFunction from './utils/createChainedFunction';
class MenuItem extends React.Component... | A menu item which can be used to show a dropdown menu item in a Bootstrap menu. |
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. |
/* eslint-disable import/default */
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import routes from './routes';
import configureStore from './store/configureStore';
require('./favicon.ico'); // Tell webpack... | Imports a single application and renders it in a layout. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorAttachFile = (props) => (
<SvgIcon {...props}>
<path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2... | A component that can be attached to a component that can be attached to a component. |
import React from 'react'
import {
Container,
Section,
} from 'smalldots/lib/experimental/bulma'
const PageHeader = (props) => (
<Section>
<Container>
{ props.children }
</Container>
</Section>
)
export default PageHeader
| React - related module |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M22 9V7h-2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-2h2v-2h-2v-2h2v-2h-2V9h2zm-4 10H4V5h14v14zM6 13h5v4H6zm6-6h4v3h-4zM6 7h5v5H6zm6 4h4v6h-4z" /></g>
, 'DeveloperBoard... | Create a series of icons for a single element. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Dialog from 'material-ui/Dialog';
import glamorous from 'glamorous';
import AvailabilityMap from '../containers/AvailabilityMap';
import CloseButton from './CloseButton';
export const Button = glamorous.div(({ background, notCollapse... | Component that is used to show a modal dialog and a button to open a new node in a dialog. |
import React from 'react';
import PropTypes from 'prop-types';
import nanoid from 'nanoid';
import blockerDefaultStyles from './blocker-styles';
import blockerStack from './blocker-stack';
class Blocker extends React.Component {
constructor(props) {
super(props);
this.state = { active: false };
this.onS... | A component that wraps a React component to render a block of children. |
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. |
import React from 'react';
export default class DuplicateSectionButton extends React.Component {
// static propTypes = {
// name: React.PropTypes.string,
// };
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
handleClick(e) {
e.preventDefault();
this.... | A component that creates a button that will duplicate a section. |
import { Router, Route, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import { Provider } from 'react-redux';
import ReactDOM from 'react-dom';
import React from 'react';
import App from './containers/App';
import configure from './store';
const store = configure();
... | Imports a single application. |
import React from 'react';
import { Link } from 'react-router';
import Navbar from '../../src/Navbar';
import Nav from '../../src/Nav';
const NAV_LINKS = {
'introduction': {
link: 'introduction',
title: 'Introduction'
},
'getting-started': {
link: 'getting-started',
title: 'Getting started'
},
... | The main navigation navigation component. |
import React from 'react';
import PropTypes from 'prop-types';
import CircularProgress from '@material-ui/core/CircularProgress';
import ImportPanelHeader from '../../components/PlaylistManager/Import/ImportPanelHeader';
const LoadingPanel = ({ onClosePanel }) => (
<div className="ImportPanel">
<ImportPanelHeade... | The default loading panel for missing missing nodes. |
// @ts-check
import React from 'react';
import { Sparklines, SparklinesCurve } from 'react-sparklines';
import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Permalink from './permalink';
import ShortNumber from 'mastodon/co... | The base class for a hashtag. |
import React from 'react'
import ReactDOM from 'react-dom'
import ReactGA from 'react-ga';
import { Provider } from 'react-redux'
import store from './store'
import './index.css'
import App from './App'
ReactGA.initialize('UA-80926706-1', { gaOptions: { siteSpeedSampleRate: 100 }});
ReactGA.pageview(window.location.p... | Imports a single node in the hierarchy. |
import React from 'react'
import { DataTable } from '../../../components'
import { Table, Row, Col, Card, Select } from 'antd'
class DataTablePage extends React.Component {
constructor (props) {
super(props)
this.state = { filterCase: {
gender: '',
} }
}
handleSelectChange = (gender) => {
... | Component that renders a random user s national sequence of words. |
// @flow
import React from 'react';
import styled from 'styled-components';
const Footer = styled.footer`
background-color: #fff;
padding: 1rem 0;
`;
export default Footer;
| Exports a missing - block element with missing padding. |
import React from 'react';
import PropTypes from 'prop-types';
const Soon = () => (
<div>
<article className="glitch">
<span>ALWAYS Ɐ WIP</span>
</article>
</div>
);
export default Soon;
| export default Soon |
// ManagerViewAvailability.js
import moment from 'moment';
import axios from 'axios';
import React, { Component } from 'react';
import { Button } from 'reactstrap';
import ManagerMenubar from './children/ManagerMenubar';
import * as util from './../util.js';
var origin = window.location.origin;
class Iframe exten... | A component that displays a single availability of a managed view. |
import React from 'react';
const EditSound = () => (
<div>
</div>
);
export default EditSound;
| Edit a in a browser |
'use strict'
import React from 'react'
import TransitionGroup from "react-addons-css-transition-group"
import ChannelActions from 'actions/ChannelActions'
import File from 'components/File'
import { getHumanReadableBytes } from '../utils/utils.js'
import 'styles/Directory.scss'
const isElectron = !!window.ipfsInstanc... | Component that renders a directory in the browser. |
import React, { Component } from 'react';
import Radium from 'radium';
import { PageHeader, Row, Column } from '../../Components';
import { Bio, Notes, Repos } from './partials';
@Radium
class Profile extends Component {
constructor(props) {
super(props);
this.state = {
bio: { name: 'Huey' },
... | A component that renders a single branch of a tree. |
import React from 'react';
import Popover from '@material-ui/core/Popover';
import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/core/styles';
const useStyles = makeStyles((theme) => ({
popover: {
pointerEvents: 'none',
},
paper: {
padding: theme.spacing(1),
}... | Displays a mouse over popover with a Popover. |
import React from 'react'
import { addDecorator, addParameters, configure } from '@storybook/react'
import { create } from '@storybook/theming'
import 'intersection-observer'
import pck from '../package'
import { createGlobalStyle } from 'styled-components'
const GlobalStyles = createGlobalStyle`
html {
font-family:... | Imports a single node - style using the React - style - module. |
import React from 'react';
import { Image, Card, Button } from 'semantic-ui-react';
export default class Post extends React.Component {
constructor(props) {
super(props);
}
image() {
if (this.props.post.attachment === '') {
return;
}
return (
<Image src={this.props.post.attachment} ... | The Post component which is rendered when a user clicks on a post. |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import App from './components/app';
import reducers from './reducers';
const createStoreWithMiddleware = applyMiddleware()(createStore);
ReactDOM.render(
<Provi... | Imports a single node in the container. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { getStyles } from '../utils/base';
import styled from 'react-emotion';
const FitText = styled.div(({ height, styles }) => [
styles.context,
styles.base,
{
display: 'block',
width: '100%',
height
},
]);
const FitT... | A component that wraps a text component with a fit - text box. |
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 Tooltip with the given properties. |
import React from 'react'
import styled from 'styled-components'
import fpvtipsLogo from '../images/fpvtips-logo-full.svg'
const TinyLetter = styled.div`
display: flex;
flex-flow: column wrap;
text-align: center;
padding: 2rem 1rem;
margin: 3rem 0;
background-color: #fff;
box-shadow: 0 3px 6px rgba(0, 0... | UI for a single node. |
/**
* @flow
*/
import React, { Component } from 'react';
import {
View,
Text,
TouchableOpacity,
StyleSheet,
} from 'react-native';
import * as snapshot from '../utils/snapshot';
const styles = StyleSheet.create({
circle: {
position: 'absolute',
bottom: 5,
right: 5,
width: 10,
height: ... | Simple developer menu which allows e. g. to clear the app state. |
import React from 'react';
import { tweekManagementClient } from '../../../../utils/tweekClients';
import RemoteCodeEditor from './RemoteCodeEditor';
export default function JWTPolicyEditor() {
return (
<RemoteCodeEditor
language="rego"
label="jwt-policy"
reader={() => tweekManagementClient.get... | The JWTExtractionPolicyEditor class |
import React from 'react';
import ReactDOM from 'react-dom';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import MyAwesomeReactComponent from './MyAwesomeReactComponent';
const App = () => (
<div>Hello</div>
);
ReactDOM.render(
<App />,
document.getElementById('app')
); | Imports a single node in the DOM. |
import React from 'react';
import _ from 'lodash';
import Classnames from 'classnames';
export function Grid(props){
var class_name = props.fluid ? 'container-fluid' : 'container';
var class_list = Classnames(props.className, class_name);
var safe_props = _.omit(props, 'fluid');
return <div {...safe_props} classNa... | React - based component that displays a grid of items with a container - fluid class. |
import React from 'react'
import { render } from 'react-dom'
import configureStore from './store/configureStore'
import Root from './containers/Root'
import { CONSOLE_MESSAGE } from './constants/Chinese'
import initPolyFill from './stuff/polyfill'
import visibility from './stuff/visibility'
import { initEnv, isIE } f... | Initialize a single node. |
import React from 'react'
import PropTypes from 'prop-types'
import {
CardTitle,
CardBody,
UtilizationCard,
UtilizationCardDetails,
UtilizationCardDetailsCount,
UtilizationCardDetailsDesc,
UtilizationCardDetailsLine1,
UtilizationCardDetailsLine2,
} from 'patternfly-react'
import DonutChart from './Utili... | Renders a series of non - |
import PropTypes from 'prop-types'
import React from 'react'
import propTypes from '../../prop-types'
import cn from '../../lib/class-names'
import Icon from '../icon'
import warningIcon from '../../../asset/icon/warning.svg'
const Headline = ({
classNames,
label,
tag = 'h1',
size = 'default',
warning = f... | Create a Headline with a single node. |
// @flow
import React from 'react'
import { Provider } from 'react-redux'
// $ExpectError
<Provider />; // missing store
| Import missing store |
import React from 'react';
import {
Router,
Route,
IndexRoute,
hashHistory,
} from 'react-router';
import Layout from 'components';
import { Home, Add } from 'containers';
// App routes
const Routes = (
<Router history={hashHistory}>
<Route path="/" component={Layout}>
{/* IndexRoute renders Home c... | Imports a bunch of modules that are not part of a router. |
import React from 'react';
class Assignment extends React.Component {
render () {
var { courseId, assignmentId } = this.props.params;
var { title, body } = COURSES[courseId].assignments[assignmentId]
return (
<div>
<h4>{title}</h4>
<p>{body}</p>
</div>
);
}
}
export d... | A component that renders a missing node in the course s assignment list. |
/* eslint-disable flowtype/require-valid-file-annotation */
/* eslint-disable no-console */
import { mkdir, readFileSync, writeFileSync } from 'fs';
import path from 'path';
import kebabCase from 'lodash/kebabCase';
import * as reactDocgen from 'react-docgen';
import generateMarkdown from '../src/modules/utils/generat... | This function imports the components and generates the docs. |
import React, { Component } from 'react';
import './App.css';
import TodoList from './TodoList';
class App extends Component {
constructor(props) {
super(props);
this.state = {
todos: [
{id: 1, text: 'Learn ECMAScript', status:'active'},
{id: 2, text: 'Learn React', status:'active'},... | The base class for all of the todo - list components. |
import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import Column from './column';
import ColumnHeader from './column_header';
import ColumnBackButtonSlim from '../../../components/column_back_button_slim';
import IconButton from '../../../components/... | The default bundle column error component |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.