code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class CloseRound extends React.Component {
render() {
if(this.props.bare) {
return <g>
<path d="M437.5,386.6L306.9,256l130.6-130.6c14.1-14.1,14.1-36.8,0-50.9c-14.1-14.1-36.8-14.1-50.9,0L256,205.1L125.4,74.5
c-14.1... | The close round component |
import React from 'react';
function H3(props) {
return (
<h3 {...props} />
);
}
export default H3;
| H3 - H3 |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalCellularNoSim = (props) => (
<SvgIcon {...props}>
<path d="M18.99 5c0-1.1-.89-2-1.99-2h-7L7.66 5.34 19 16.68 18.99 5zM3.65 3.88L2.38 5.15 5 7.77V19c0 1.1.9 2 2 2h10.01c.35 0 .67-.1.96-.26l1.88 1.88 ... | Devolve a device - signal cellular component. |
// (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 single critical block of icons. |
import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import CustomPropTypes from './utils/CustomPropTypes';
const Tooltip = React.createClass({
mixins: [BootstrapMixin],
propTypes: {
/**
* An html id attribute, necessary for accessibility
* @... | Generates a Tooltip which is rendered when a node is clicked. |
import React from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
const RenderField = (props) => {
const { input, label, type, className, meta: { touched, error } } = props
const passwordValidationClasses = classNames([
className,
{'is-danger': touched && error}
])
retu... | A component that renders a render field. |
import React from 'react'
import PropTypes from 'prop-types'
import Link from 'gatsby-link'
import Helmet from 'react-helmet'
import kellieLogo from '../images/kellie_logo.svg'
import kellieSocials from '../images/kellie_socials.png'
import './index.css'
const TemplateWrapper = ({ children }) =>
<div>
<Helmet
... | A template wrapper for the Kellie s Hair Extensions and More. |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present 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 PropTypes from 'prop-... | The top - level React component that can be used to render a critical path from all the child components. |
import React, { Component } from 'react';
import {
View,
Keyboard,
Text,
} from 'react-native';
import { connect } from 'react-redux';
import styles from '../../../styles/styles';
import HelpRequest from './HelpRequest';
import HelpRequestAccepted from './HelpRequestAccepted';
import { messages as testMessages } ... | The bottom - chat component which is a component that is rendered on the chat room. |
/*
* Copyright (C) 2015 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distribut... | Renders a single |
import React from 'react'
import {connect} from 'react-redux'
import {hideGameFinishWindow} from '../actions'
import classnames from 'classnames'
let FinishWindow = React.createClass({
propTypes: {
display: React.PropTypes.bool,
close: React.PropTypes.func
},
render () {
const s = this
let {prop... | Create a finish window with a mapStateToProps and a mapDispatchToProps. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ReactDropzone from 'react-dropzone';
import { SUPPORTED_DOCUMENT_TYPES } from '../../../constants/file';
import Modal from '../../shared/modal';
import InputControls from './controls';
/*
* Document upload/embed input.
* Has two mai... | Component which is a React component that can be used to input a single file. |
import { Box, Skeleton } from '@rocket.chat/fuselage';
import React from 'react';
export const FormSkeleton = (props) => (
<Box w='full' pb='x24' {...props}>
<Skeleton mbe='x8' />
<Skeleton mbe='x4' />
</Box>
);
| export form skeleton |
import React from 'react'
import HelloWorld from '../components/HelloWorld.js'
import TopNavbar from '../components/TopNavbar.js'
class Dashboard extends React.Component {
render () {
return (
<div>
<TopNavbar/>
<div className='container-fluid'>
<HelloWorld />
</div>
... | The base class for a single node that is not part of a component in a hierarchy. |
import React from 'react'
import Overlay from './Overlay'
import Push from './Push'
import ScaleDown from './ScaleDown'
import SlideAlong from './SlideAlong'
import SlideOut from './SlideOut'
import Uncover from './Uncover'
const SidebarExamples = () => (
<div>
<Overlay />
<Push />
<ScaleDown />
<Sl... | Imports a bunch of non - standard JSX objects from the module. |
// (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 single support block of a specific size. |
import React from 'react';
import Avatar from './avatar';
export default class Assignee extends React.Component {
render () {
let avatar = this.props.user ?
<span className="spacer-right"><Avatar email={this.props.user.email} size={16}/></span> : null;
let name = this.props.user ? this.props.user.nam... | A component that renders a missing user record. |
import _ from 'lodash';
import React from 'react';
import { connect } from 'react-redux';
import api from '../utils/api';
import StickyHeaderLayout from '../layouts/StickyHeaderLayout';
import Results from '../components/Results';
import Search from '../components/Search';
const WILDCARD = '*';
function loadData(pr... | The main function that creates a link to the concepts data panel and renders the concepts data panel. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilter4 = (props) => (
<SvgIcon {...props}>
<path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm12 10h2V5h-2v4h-2V5h-2v6h4v4zm6-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14... | A filter that returns an image of a series of icons. |
import React from 'react';
import classnames from 'classnames';
class Document extends React.Component {
static propTypes = {
content: React.PropTypes.object.isRequired,
className: React.PropTypes.string
};
constructor(props) {
super(props);
}
render() {
const { content, className } = this.... | A component that can be rendered in a tree - like fashion. |
import React from 'react';
import CodeBlock from './CodeBlock';
export default class StaticHTMLBlock {
static propTypes = {
html: React.PropTypes.string.isRequired
};
render() {
const { html } = this.props;
// Here goes a really hack-ish way to convert
// areas separated by Markdown <hr>s into ... | The static render function for a single node in the tree. |
import React from 'react';
import {View, Text} from 'react-native';
class TabOne extends React.Component {
render() {
return (
<View>
<Text>Tab One</Text>
</View>
);
}
}
export default TabOne;
| Imports and exports a single tab one component. |
import React from 'react'
import classes from './<%= pascalEntityName %>.scss'
export const <%= pascalEntityName %> = () => (
<div className={classes['<%= pascalEntityName %>']}>
<h4><%= pascalEntityName %></h4>
</div>
)
export default <%= pascalEntityName %>
| export to a function that returns a function that returns a object. |
import React from 'react';
function IntroductionDetailPersonal(props){
return(
<div className="detail-personal detail">
<span class="arrow-down"></span>
<div className="icon-container">
<a href="https://cloud.opendesktop.org/">
<div className="icon"></div>
</a>
</div>
... | Introduction detail personal |
// @flow
import React from 'react'
import {validateNP} from '../../data/Validator'
//import NP from '../../data/np/NP'
import NPActions from '../../data/np/NPActions'
function NPRow(props:Object):Object {
let {np} = props
validateNP(np)
const onClickEditNP = () => NPActions.onClickEditNP(np)
... | A component that renders a row of a n - p sequence sequence in a table. |
/*
* 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 Backbone from 'backbone';
import $ from 'jquery';
i... | The main function of the administration interface. |
import React from 'react';
import Layout from '../../components/Layout';
import { title, html } from './index.md';
class AboutPage extends React.Component {
componentDidMount() {
document.title = title;
}
render() {
return (
<Layout>
<h1>{title}</h1>
<div
// eslint-disabl... | A page that displays a page with a hidden hidden input. |
import React from 'react';
import '../styles/portfolio-header.scss';
class PortfolioHeader extends React.Component {
constructor(props) {
super(props);
this.state = {
showNavigation: false
};
}
toggleNavigation() {
this.setState({
showNavigation: !this.state.showNavigation
});
... | A component that displays a single sequence of errors in a calendar. |
import React from 'react';
import BannerActionCreators from 'actions/BannerActionCreators';
class Banner extends React.Component {
constructor(props) {
super(props);
if (window.localStorage.getItem('banner_jump') === null) {
BannerActionCreators.show();
}
}
onClose = () => {
BannerActionC... | A component that shows a link to the action that will be performed when a node is clicked. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import SwaggerUi from 'swagger-ui-react';
import 'swagger-ui-react/swagger-ui.css';
class SwaggerContainer extends Component {
componentDidMount() {
const { user } = this.props;
console.log(us... | The base component for the Swagger UI. |
/*
* TimeCard View
* Copyright ©2015 Thomas Nelson, Jacob Nichols, David Opp, Todd Brochu,
Andrew McGown, Sasha Fahrenkopf, Cameron B. White.
*
* This source code is licensed under the MIT license found in the
* LICENSE text file in the root directory of this source tree.
*/
import React from 'react';
import Flux... | A component that renders a time card with a single logged in component. |
import React from 'react';
import { Container } from '@extjs/ext-react';
export default function About() {
return (
<Container padding="20">
<h1>About this App</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam eget leo sed mi imperdiet dictum a id turpis. Suspe... | Export a single - language sequence from a React module. |
// @flow
import React, { Component } from 'react';
import { observable, action } from 'mobx';
import { observer } from 'mobx-react';
import { CurrentUser } from 'models/CurrentUser';
import counterService from 'services/counterService';
type PropsType = {
currentUser: CurrentUser,
};
export type WithLikeCounterP... | A component that will be rendered when a user changes their counter. |
import React from 'react';
import T from 'prop-types';
import { StyleSheet, View, ViewPropTypes } from 'react-native';
import { fontSizes, dimensions, colors, fontWeights } from '../../styles';
import { Text, Value } from '../../components';
import { formatDateForSubtitle } from '../../utils/dateHelpers';
const styles... | A function to create a sub - view that renders a single node in a hierarchy. |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 7V8c0-1.11-.9-2-2-2h-1c-1.1 0-2 .89-2 2v1c0 1.11.9 2 2 2h1v1H9v2h3c1.1 0 2-.89 2-2zm-3-3V8h1v1h-1zm10-8H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c... | Create a series of icons for a single element. |
'use strict';
import React from 'react';
import AppActions from '../actions/actions';
import FlatButton from 'material-ui/FlatButton';
class NavigationComponent extends React.Component {
constructor (props) {
super(props);
}
render () {
let buttonStyles = {width: '50%', textTransform: 'none'};
return (... | A component that can be used to show a navigation holder. |
import React from 'react'
import {browserHistory} from 'react-router'
const ProjectForm = (
{
onSubmit,
currentUser,
project = {
name: '',
summary: '',
description: '',
tags: ''
},
buttonLabel = 'Create Project'
}
) => {
let name, summary, description, tags
return (
... | The main function of the browser history. js |
import React from 'react';
import PropTypes from 'prop-types';
import styles from './styles.scss';
import PhotoActions from 'components/PhotoActions';
import PhotoComments from "components/PhotoComments";
import TimeStamp from 'components/TimeStamp';
import CommentBox from 'components/CommentBox';
import { Link } from ... | Generate a single n - node tag that represents a single n - node feed. |
import React from 'react';
import styleFont from './utils/font';
let TextRenderer = (props) => {
var style = props.style || {};
styleFont(style, props.font);
//size
if (props.height) style.height = props.height;
if (props.width) style.width = props.width;
return (
<span style={style}>{props.content}</spa... | export TextRenderer with style font and content |
import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import ToggleButton from 'components/ToggleButton';
import Horizontal from 'layouts/Horizontal';
storiesOf('ToggleButton', module).add('types', () => (
<React.Fragment>
<h2>Standard</h2>
... | Imports all the components of a single node. |
import React from 'react'
import { Breadcrumb } from 'semantic-ui-react'
const sections = [
{ content: 'Home', link: true },
{ content: 'Search', active: true },
]
const BreadcrumbExampleSectionProps = () => (
<Breadcrumb sections={sections} />
)
export default BreadcrumbExampleSectionProps
| Example of how to display a single node in a breadcrumb. |
import PropTypes from 'prop-types'
import React from 'react'
import { iconFor } from './networks.js'
import { socialSvgContent } from './styles.js'
function getStyle({ fgColor }) {
return {
...socialSvgContent,
fill: fgColor || 'transparent'
}
}
function Icon({ fgColor, networkKey, ...props }) {
return ... | export icons for missing nodes |
import React, { Component } from 'react';
class Simple extends Component {
render() {
return (
<div className="app flex-row align-items-center">
{this.props.children}
</div>
);
}
}
export default Simple;
| A component that can be rendered by a component that has no children. |
/* @flow */
import React from 'react';
import Layer from 'grommet/components/Layer';
import Form from 'grommet/components/Form';
import FormFields from 'grommet/components/FormFields';
import FormField from 'grommet/components/FormField';
import Footer from 'grommet/components/Footer';
import Button from 'grommet/compo... | Renders a single single unknown - sequence feature form. |
import React from 'react';
import { AutoSizer, Column, Table } from 'react-virtualized';
export const StockTable = ({data}) => {
const tableData = data.map(datePoint => ({
key: datePoint[0],
date: datePoint[0],
adjClose: `$${datePoint[1].toFixed(2)}`
})).reverse();
return (
<AutoSizer>
{(... | Private function to create a StockTable with a series of nanoseconds. |
import React from 'react';
import Relay from 'react-relay';
import {Row, Col, Button} from 'react-bootstrap';
import Description from '../App/Description';
import FontAwesome from 'react-fontawesome';
class Body extends React.Component {
render() {
const user = JSON.parse(localStorage.getItem('user'));
const... | A component that can be rendered in a hidden hidden |
import React from 'react';
export default class ContactPage extends React.Component {
render() {
return (
<div>
Contact us
</div>
);
}
}
| The default component for a contact page. |
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 {
fetchAccount,
fetchFollowers,
expandFollowers,
} from '../../actions/account... | The following component is a component that follows a list of users. |
import React from 'react'
export default class Panel extends React.Component {
static propTypes = {
style: React.PropTypes.object,
children: React.PropTypes.node
};
render () {
return (
<div style={Object.assign({background: 'rgba(255,255,255,0.9)', borderRadius: 6, padding: 20, paddingTop: 1... | A component that renders a node with a hidden style that is used to hide it. |
import React from 'react';
import { render } from 'react-sketchapp';
import { Text, View } from 'react-primitives';
import type { User } from './types';
import { fonts, spacing } from './designSystem';
import Profile from './components/Profile';
import Space from './components/Space';
import DATA from './data';
const ... | export default render function |
import React from 'react';
import { connect } from 'react-redux';
import { browserHistory } from 'react-router';
import ReactListScroll from 'reactlistscroll';
//import ReactListScroll from './scrolltest';
class TopAlbums extends React.Component {
constructor(props) {
super(props);
this.state = {
}
}
goTo... | The top albums component |
import React from 'react'
import Component from '../component/Component'
import rocket from '../../assets/icons/rocket.svg'
import SVG from 'react-svg'
import './Logo.scss'
export default class Logo extends React.Component {
render () {
return (
<Component class="Logo" {...this}>
<SVG path={rocke... | export default Logo class |
import React from 'react';
import App from './container/App';
import { Route, IndexRoute } from 'react-router';
import HomePage from './container/HomePage/HomePage';
import PostDetailView from './container/PostDetailView/PostDetailView';
import PostContainer from './container/PostContainer/PostContainer';
const routes... | Imports the routes from the hierarchy. |
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { saveImportList, setImportListFieldValue, setImportListValue, testImportList } from 'Store/Actions/settingsActions';
import createProviderSettingsSelect... | Component that displays a modal content with a single import list. |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present 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 cx from 'classnames';... | Provides a function to render a single node in the hierarchy of a React component. |
import React from 'react';
import {StackNavigator} from 'react-navigation'
import NewProductPhotoPicker from '../components/NewProductPhotoPicker';
import NewProductForm from '../components/NewProductForm';
const NewProductNavigation = StackNavigator({
NewProductPhotoPicker: {
screen: NewProductPhotoPicker,
... | export a new navigation for a specific node |
/* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
const fruits = [ 'banana', 'apple', 'orange', 'tomato', 'strawberries', 'cherries' ];
for (let i =... | The default logic for adding products to the bootstrap table. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvSkipPrevious = (props) => (
<SvgIcon {...props}>
<path d="M6 6h2v12H6zm3.5 6l8.5 6V6z"/>
</SvgIcon>
);
AvSkipPrevious = pure(AvSkipPrevious);
AvSkipPrevious.displayName = 'AvSkipPrevious';
AvSkipPrevious.mu... | A component that exports a sequence of non - empty objects. |
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
TextInput,
Image,
TouchableHighlight
} from 'react-native';
export default class SendButton extends Component {
render() {
return (
<TouchableHighlight onPress={this.props.onPress}>
... | A component that can be used to send a button to a user. |
import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import Overlay from 'react-overlays/lib/Overlay';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import { searchEnabled } from '../... | A component that shows a dropdown of a single hashtag. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentTextFormat = (props) => (
<SvgIcon {...props}>
<path d="M5 17v2h14v-2H5zm4.5-4.2h5l.9 2.2h2.1L12.75 4h-1.5L6.5 15h2.1l.9-2.2zM12 5.98L13.87 11h-3.74L12 5.98z"/>
</SvgIcon>
);
ContentTextFormat = pure(C... | A component that renders a series of icons in a group of icons. |
import _ from 'lodash';
import path from 'path';
import React from 'react';
import { Link } from 'react-router';
import HtmlToReact from 'html-to-react';
import DocumentTitle from 'react-document-title';
import Classnames from 'classnames';
import { config } from 'config';
import UrlUtils from '../utils/url';
import He... | The base class for all of the components that are not part of a component s children. |
/******************************************************************************
* Reusable component for linking to an Shop page. If Shop has no `id`
* property, display name as text or passed child JSX instead.
******************************************************************************/
import React from 'reac... | Reusable component for linking to a Shop page. |
import React from 'react';
import { Link } from 'react-router';
import s from './PostIt.css';
export default function() {
return (
<div className={s.root}>
<i className={s.pin} />
<p>
Запишете се за менторска среща с квалифициран преподавател по EQ, в която ще имате
възможност да си н... | function to generate a single node with |
import React from 'react';
import Header from './Header';
import Order from './Order';
import Inventory from './Inventory';
import sampleFishes from '../sample-fishes';
import Fish from './Fish';
import base from '../base';
class App extends React.Component {
static propTypes = {
params: React.PropTypes.object.i... | The base component for all of the JSX functions that are used to render a single node in the DOM. |
/*
Copyright 2017 Vector Creations Ltd
Copyright 2017 Michael Telatynski
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 applic... | Adding a component to the message dialog that will show up when a key is pressed. |
import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
const VerticalNavigationSection = (props) => {
const {
children,
className,
id,
title,
...rest
} = props;
const sldsClasses = ['slds-nav-vertical__section', className];
const renderChild = child =>... | Vertical navigation section |
// /**
// * PhotoBrowser Screen
// */
// import React, { Component } from 'react';
// import { List, ListItem } from 'react-native-elements';
// import { ListView } from 'realm/react-native';
// import {
// ScrollView,
// StatusBar,
// View,
// } from 'react-native';
// import PropTypes from 'prop-types';
// /... | The default list view which shows a list of members that can be selected by a user. |
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 static component that can be used to render a bootstrap - based form control. |
import PropTypes from 'prop-types';
import React from 'react';
/**
* The card component
*
* @disable-docs
*/
const Card = ({ link, background, image, headline, text, cta, preheadline, noCta }) => {
if( image ) {
image = image.startsWith('http') ? image : `/assets/img/${ image }`;
}
function renderCta() {
... | The component that is rendered as a card |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const AvVideoCall = (props) => (
<SvgIcon {...props}>
<path d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4zM14 13h-3v3H9v-3H6v-2h3V8h2v3h3v2z"/>
</SvgIcon>
);
AvVideoCall.displayName = 'AvVi... | A function to create a default avVideoCall element |
import React from 'react';
import BaseTemplate from '../base-study-template';
import AboutSection from '../../../content-modules/about.js';
export class Sharknado extends BaseTemplate {
static propTypes = {
data: React.PropTypes.object
};
constructor (props) {
super(props);
}
render () {
const co... | A component that displays a single hashtag sequence sequence that can be used to show a single hashtag sequence sequence. |
import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import listReadmeText from './README';
import listExampleSimpleCode from '!raw!.... | Imports a single non - empty sequence of components. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilterHdr = (props) => (
<SvgIcon {...props}>
<path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"/>
</SvgIcon>
);
ImageFilterHdr = pure(ImageFilterHdr);
ImageFilterHdr.displayName... | A component that exports a series of images in a series of icons. |
import React from 'react';
import { Router, browserHistory } from 'react-router';
import routes from '../routes';
export default class AppRoutes extends React.Component {
render() {
return (
<Router history={browserHistory} routes={routes} onUpdate={() => window.scrollTo(0, 0)}/>
);
}
} | The AppRoutes class |
//// [jsxDeclarationsWithEsModuleInteropNoCrash.jsx]
/// <reference path="/.lib/react16.d.ts" />
import PropTypes from 'prop-types';
import React from 'react';
const propTypes = {
bar: PropTypes.bool,
};
const defaultProps = {
bar: false,
};
function Foo({ bar }) {
return <div>{bar}</div>;
}
Foo.propTypes = ... | Adds a function to create a new object with the given properties and values. |
import React, { Component } from 'react';
class PreHeader extends Component {
render() {
return null;
}
}
export default PreHeader;
| The pre - header component is a class that implements a pre - header view. |
/* eslint-disable global-require */
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './modules/App/App';
// require.ensure polyfill for node
if (typeof require.ensure !== 'function') {
require.ensure = function requireModule(deps, callback) {
callback(require);
};
}... | Requires a module if it is not already there. |
import React from 'react';
import Tpl from './../ActiveAnswerInputTpl';
import TextField from 'material-ui/TextField';
// props: given, onChange, expected
export default class extends Tpl
{
constructor(props) {
super(props);
this.inputRef = React.createRef();
}
emptyAnswer() {
return {
type: ... | The base class for the expected - answer - input. |
import React from 'react';
import { render } from 'react-dom';
import { Provider, connect } from 'react-redux';
import * as actionCreators from './actions/actionCreators';
import { bindActionCreators } from 'redux';
import store from './store';
import App from './components/App';
const mapStateToProps = (state) => (... | Imports a single and renders it into the DOM. |
import _ from 'underscore';
import classNames from 'classnames';
import React from 'react';
import { FormField, FormInput, FormRow, FormSelect, SegmentedControl } from 'elemental';
const TOGGLE_OPTIONS = [
{ label: 'Matches', value: false },
{ label: 'Does NOT Match', value: true }
];
const MODE_OPTIONS = [
{ lab... | The base implementation of a filter that can be used to filter a number or a text field. |
import React from 'react';
import Typography from 'material-ui/Typography';
import './Title.css';
export const Title = (props) => (
<Typography type="title" color="inherit" align="left" className="Title">
<span className="Title-name" onClick={() => props.backToSearch()}>ENS.BID</span>
</Typography>
); | React - UI - Typography |
import React from 'react'
import {Link} from 'react-router'
import classes from './AddNew.css'
export default class AddNew extends React.Component {
render () {
return (
<Link to='/create' className={classes.link}>
<div className={classes.page}>
<div className={classes.plus}>
... | AddNew class. |
/*
* Copyright (c) 2017. Caipi Labs. All rights reserved.
*
* This File is part of Caipi. You can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
... | JSX Component that displays a single missing - missing tag in the DOM. |
import React, { Component } from 'react';
import ProductCard from './ProductCard';
import { API_URL } from '../../api/apiconfig';
import axios from 'axios';
export default class Kitchen extends Component {
state = {
pendingOrders: []
};
getPendingOrders = () => {
axios({
url: A... | A component that opens a cart item in a Kitchen system. |
import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import TagInput from './TagInput';
function createMapStateToProps() {
return createSelector(
(state, { value }) => value,
(st... | Creates a component that can be used to select a tag from a tag select input. |
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {... | Creates a table cell with no children. |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Message, Button } from 'semantic-ui-react';
import { isDemoUser } from 'features/user/state/User.selector';
class DemoNotice extends React.Component {
render() {
if (!this.props.isVisible) return null;
... | Demo notice component that shows a warning if a user has not hidden it. |
/* eslint-disable import/default */
import React from 'react';
import {render} from 'react-dom';
import { Provider } from 'react-redux';
// import thunk from 'redux-thunk';
import { Router, browserHistory } from 'react-router';
import { syncHistoryWithStore} from 'react-router-redux';
import routes from './routes';
im... | Imports a single node. |
import Field from '../Field';
import React from 'react';
import { FormInput } from '../../../admin/client/App/elemental';
module.exports = Field.create({
displayName: 'TextareaField',
statics: {
type: 'Textarea',
},
renderField () {
const { height, path, style, value } = this.props;
const styles = {
heig... | The default module for the Field class. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderVertical = (props) => (
<SvgIcon {...props}>
<path d="M3 9h2V7H3v2zm0-4h2V3H3v2zm4 16h2v-2H7v2zm0-8h2v-2H7v2zm-4 0h2v-2H3v2zm0 8h2v-2H3v2zm0-4h2v-2H3v2zM7 5h2V3H7v2zm12 12h2v-2h-2v2zm-8 4h2V3h-2v18z... | A small small editor that shows a vertical box of a component. |
import React, { Component } from 'react';
import { observer } from 'mobx-react';
import { bem } from 'app/libs/bem';
import Header from 'app/modules/layout/components/Header';
import Footer from 'app/modules/layout/components/Footer';
const b = bem('DefaultLayout');
@observer
export default class DefaultLayout exte... | Component that extends a default layout which is a child of a component that has a default layout. |
import React, { Component } from 'react';
import './App.css';
import TextInput from './Components/TextInput';
import Output from './Components/Output';
import Grid from 'react-bootstrap/lib/Grid';
import Row from 'react-bootstrap/lib/Row';
import Col from 'react-bootstrap/lib/Col';
class App extends Component {
cons... | Component class for handling missing nodes |
import React from 'react';
import {
StyleSheet,
View,
Text,
Dimensions,
TouchableOpacity,
Animated,
} from 'react-native';
import MapView from 'react-native-maps';
const screen = Dimensions.get('window');
const ASPECT_RATIO = screen.width / screen.height;
const LATITUDE = 37.78825;
const LONGITUDE = -122... | Provides a function that creates a marker that can be animated or hidden. |
import React from 'react';
import ReactDOM from 'react-dom';
import EditorDemo from './EditorDemo';
document.addEventListener('DOMContentLoaded', () => {
let rootNode = document.createElement('div');
document.body.appendChild(rootNode);
ReactDOM.render(
<EditorDemo />,
rootNode,
);
});
| Imports the Ngan editor demo. |
import React from 'react';
import PropTypes from 'prop-types';
import FormField from 'grommet/components/FormField';
import TypingStopInput from 'components/TypingStopInput';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { setSponsorName } from 'builder/actions';
import... | The base class for handling unhandled events. |
import React from 'react';
import PropTypes from 'prop-types';
function IssueIcon(props) {
return (
<svg height="1em" width="0.875em" className={props.className}>
<path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7S10.14 13.7 7 13.7 1.3 11.14 1.3 8s2.56-5.7 5.7-5.7m0-1.3C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7S10.86 1... | A component that displays a link to the missing node in a hierarchy. |
import React, { Component } from 'react';
import { getFragment } from 'meteor/vulcan:lib';
import { graphql } from 'react-apollo';
import gql from 'graphql-tag';
const withCurrentUser = component => {
return graphql(
gql`
query getCurrentUser {
currentUser {
...UsersCurrent
... | Imports a component with a reserved user. |
import React, { Component } from 'react';
import { injectIntl } from 'react-intl';
import axios from 'axios';
import Loader from '../../General/components/Loader';
class Video extends Component {
state = {
status: 'start', progress: 0, trackFr: null, trackEn: null, error: '0',
};
componentDidMount() {
... | A component that can be used to show a video in a movie. |
import _ from 'lodash' // eslint-disable-line
import React from 'react'
import {Navbar, Nav, NavItem} from 'react-bootstrap'
export default function AdminNavbar() {
return (
<Navbar fluid>
<ul className="nav navbar-nav">
<li className="pull-right"><a href="/logout">Logout</a></li>
</ul>
... | The admin navbar |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.