code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
import { st, classes } from './FontUpgrade.st.css';
import PropTypes from 'prop-types';
import { FontUpgradeContext } from './context';
class FontUpgrade extends React.PureComponent {
render() {
const { dataHook, className, active, as, children } = this.props;
// TODO - remove thi... | A component that can be upgraded to a Madefor font. |
import React from 'react';
import addons from '@storybook/addons';
import PanelContainer from './containers/panel-container';
import { ADDON_ID, PANEL_ID } from './index';
addons.register(ADDON_ID, (api) => {
const channel = addons.getChannel();
addons.addPanel(PANEL_ID, {
title: 'React CSS Themr',
render... | Add a component to the Navitia UI |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationPortableWifiOff = (props) => (
<SvgIcon {...props}>
<path d="M17.56 14.24c.28-.69.44-1.45.44-2.24 0-3.31-2.69-6-6-6-.79 0-1.55.16-2.24.44l1.62 1.62c.2-.03.41-.06.62-.06 2.21 0 4 1.79 4 4 0 .21-.02.... | A component that renders a Wifi - off communication icon. |
import React from 'react';
import PageHeader from 'react-bootstrap/lib/PageHeader';
import Alert from 'react-bootstrap/lib/Alert';
import Row from 'react-bootstrap/lib/Row';
import Col from 'react-bootstrap/lib/Col';
import PageLayout from '../../layouts/PageLayout';
import LoginForm from '../../forms/user/LoginForm';
... | The default login page is a page that doesn t require a login form. |
import React from 'react';
import ScaleAnalysis from './ScaleAnalysis/ScaleAnalysis';
import ReasonAnalysis from './ReasonAnalysis/ReasonAnalysis';
export default class LoeeBillAnalysis extends React.Component {
static propTypes = {
name: React.PropTypes.string,
};
constructor(props) {
super(props);
... | The LoeeBillAnalysis class |
import React from 'react';
var stubRouterContext = (Component, props, stubs) => {
function RouterStub() { }
Object.assign(RouterStub, {
makePath () {},
makeHref () {},
transitionTo () {},
replaceWith () {},
goBack () {},
getCurrentPath () {},
getCurrentR... | A static export that exports a router context. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageImageAspectRatio = (props) => (
<SvgIcon {...props}>
<path d="M16 10h-2v2h2v-2zm0 4h-2v2h2v-2zm-8-4H6v2h2v-2zm4 0h-2v2h2v-2zm8-6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H... | A component that exports a component with a default image image aspect ratio. |
import React from 'react';
import { Link } from 'react-router-dom';
import { MainNav } from './MainNav';
export const Layout = props => (
<div className="uc-chrome">
<MainNav />
<div className="uc-workspace">
{props.children}
</div>
</div>
);
export default Layout;
| export layout for missing node |
/**
* 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 Signup from './Signup';
... | Provides a function to export a single node from the React Starter Kit. |
import React from 'react';
import PropTypes from 'prop-types';
import Paper from '@material-ui/core/Paper';
import { withStyles } from '@material-ui/core/styles';
import Grid from '@material-ui/core/Grid';
const styles = (theme) => ({
root: {
width: 400,
backgroundColor: theme.palette.secondary.main,
},
... | Generate a standardized sequence of errors that occur when a node in a hierarchy is missing. |
import React from 'react';
import Ionicons from 'react-native-vector-icons/Ionicons';
import styles, {stylechoice} from '../helloworld/StyleSheet';
const Info_Icon = () => {
return (<Ionicons style={styles.infoIcon} name= 'ios-information-circle' size={36}
color= {stylechoice.accentcolor} paddingTop= {3} padding... | A function to export a single node in the system. |
import React from 'react';
import ChirpListItem from './ChirpListItem';
const ChirpList = (props) => {
const chirps = props.chirps.map((item) => <ChirpListItem key={item.cid} chirp={item}/>);
return (
<div className="row">
<div className="twelve columns">
{chirps}
</div>
</div>
);
}... | React - > ChirpList |
import React from 'react';
import {RadioButton, RadioButtonGroup} from 'material-ui/RadioButton';
import ActionFavorite from 'material-ui/svg-icons/action/favorite';
import ActionFavoriteBorder from 'material-ui/svg-icons/action/favorite-border';
const styles = {
block: {
maxWidth: 250,
},
radioButton: {
... | The default function for the missing components. |
import React from 'react';
import styled from 'styled-components';
import { Margin, Padding } from 'styled-components-spacing';
import Flex from 'styled-flex-component';
import is, { isNot } from 'styled-is';
import remcalc from 'remcalc';
import { H3, Card } from 'joyent-ui-toolkit';
import { NoPackages } from 'joyen... | export default component |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationChevronRight = (props) => (
<SvgIcon {...props}>
<path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>
</SvgIcon>
);
NavigationChevronRight = pure(NavigationChevronRight);
NavigationChevronRigh... | A component that exports a navigation chooser right on top of a node. |
// @flow
import React, { Component } from 'react';
import type { Children } from 'react';
import muiThemeable from 'material-ui/styles/muiThemeable';
import 'mdi/css/materialdesignicons.css';
import './App.css';
import './Grid.css';
import Nav from './Nav';
import Footer from './Footer';
type Props = {
children?: C... | A component that can be rendered as a container of a component. |
import React from 'react';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debounce } from 'lodash';
import LoadingIndicator from '../../components/loading... | The following component is a component that will be rendered when a user follows a list of users. |
import _jsx from "@babel/runtime/helpers/builtin/jsx";
import cx from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import List from 'react-list';
import UserRow from './UserRow';
var UserList = function UserList(_ref) {
var className = _ref.className,
users = _ref.users;
retur... | create a user - defined list of users |
import React from 'react';
import './multimedia.css';
import alley from '../../img/media/alley.jpg';
import lincolnHall from '../../img/media/lincoln-hall.jpg';
import milk from '../../img/media/milk.jpg';
import pygmalion from '../../img/media/pygmalion.jpg';
import alleyWalking from '../../img/media/alley-walking.jpg... | The Multimedia library |
import React from 'react';
import EntypoIcon from '../EntypoIcon';
const iconClass = 'entypo-svgicon entypo--ShoppingCart';
let EntypoShoppingCart = (props) => (
<EntypoIcon propClass={iconClass} {...props}>
<path d="M13,17c0,1.104,0.894,2,2,2c1.104,0,2-0.896,2-2c0-1.106-0.896-2-2-2C13.894,15,13,15.894,13... | The default entypo shopping cart. |
import React from 'react'
import { translate } from 'react-i18next'
import { action, computed, observable, reaction } from 'mobx'
import { inject, observer } from 'mobx-react'
import { AutoComplete, Button, Input, Popover } from 'antd'
@translate(['wallet'], { wait: true })
@inject('rpc', 'wallet')
@observer
class Key... | Private key dump interface |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import Router from 'react-routing/src/Router';
import http from './core/HttpClient';
import App from './components/App';
import ContentPage from './components/ContentPage';
import ContactPage from './components/ContactP... | The router for the missing components |
/**
* Created by fulihui2 on 16/9/8.
*/
import React from 'react';
import {
View,
StyleSheet,
Text,
ListView,
Image,
TouchableOpacity,
} from 'react-native';
import Util from './../common/util';
import MyWebView from './../common/webview';
export default class BookDetail extends React.Comp... | The base class for a single . |
//Go get react and react-dom from the modules
import React, { Component } from 'react';
import _ from 'lodash';
import ReactDOM from 'react-dom';
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
import VideoList from './components/video_list';
import VideoDetail from './compon... | Create a new component that can be rendered with a video array |
import './polyfills';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { applyRouterMiddleware, Router, browserHistory } from 'react-router';
import { syncHistoryWithStore, routerReducer } from 'react-router-redux';
import { useScroll } from 'react-router-scrol... | This module is responsible for importing the application and its routes. |
import {Entity} from 'aframe-react';
import React from 'react';
export default props => {
const geometry = {
primitive: 'ring',
radiusInner: 0.01,
radiusOuter: 0.016
};
const material = {
color: props.color,
shader: 'flat',
opacity: props.opacity || 0.9,
transparent: true
};
retur... | default cursor class |
import React from 'react';
import PageContainer from '../components/PageContainer';
import {
Grid,
Col,
Form,
Input,
FormGroup,
Progress,
Panel,
} from 'amazeui-react';
const Profile = React.createClass({
render() {
return (
<PageContainer
{...this.props}
>
<h2>个人资料</h2>... | Private function to create a single object. |
import React, { Component } from 'react';
import AddTodo from "../containers/AddTodo";
import VisibleTodoList from "../containers/VisibleTodoList";
import FilterTodos from "./FilterTodos";
class App extends Component {
render() {
return (
<div className="App">
<AddTodo/>
<FilterTodos />
... | The main function for the app. |
import React from 'react';
import PropTypes from 'prop-types';
import ViewListIcon from 'material-ui/svg-icons/action/view-list';
const componentPropType = PropTypes.oneOfType([
PropTypes.func,
PropTypes.string,
]);
const Resource = () => (
<span>
<Resource> elements are for configuration on... | A component that can be used to render a component in a component s template. |
/**
* Copyright 2017 Goldman Sachs.
* 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 agreed to... | Creates a new message with the given name if it does not already exist. |
import LoginButton from './LoginButton';
import React from 'react';
import ReactDOM from 'react-dom';
export default (function () {
let element = <LoginButton></LoginButton>;
ReactDOM.render(element, document.body);
}());
| Imports a login button and renders it in the top - level DOM. |
import React from 'react';
import {Provider} from 'react-redux';
import store from 'store';
import App from 'components/App';
React.render(
<Provider store={store}>
{() => <App />}
</Provider>,
document.body
);
| Imports a single node in the DOM. |
'use strict';
import React from 'react';
import { Panel, Badge, Input, Fade } from 'react-bootstrap';
import { where } from 'lodash';
import ColorPaletteComponent from './ColorPaletteComponent';
import TwoCols from './TwoColsComponent';
require('styles/PalettePanel.css');
class PalettePanelComponent extends React.Co... | A component that renders a palette panel. |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdAddCircleOutline(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M26 14h-4v8h-8v4h8v8h4v-8h8v-4h-8v-8zM24 4c11.05 0 20 8.95 20 20s-8.95 20-20 20S4 35.05 4 24 12.95 4 24 4zm0 36c8.82 0 16-7.18 16-16S32.82 8... | Add circle outline to a node |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import styles from './styles.scss';
export function Message({
subject,
time,
direction,
sender,
subjectRenderer: SubjectRenderer,
}) {
return (
<div className={styles.message}>
{
... | The message component which is rendered when a message is rendered. |
import React from 'react';
import { findDOMNode } from 'react-dom';
import { FormField, FormInput, FormRow, SegmentedControl } from 'elemental';
const INVERTED_OPTIONS = [
{ label: 'Matches', value: false },
{ label: 'Does NOT Match', value: true },
];
function getDefaultValue () {
return {
inverted: INVERTED_O... | A custom filter that can be used to filter a single node in a group of forms. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Modal from 'react-modal';
import MdCheck from 'react-icons/lib/md/check';
import MdClose from 'react-icons/lib/md/close';
import './style.scss';
import styles from './modal.scss';
const customStyles = {
content: {
top: '50%',
... | Component that is rendered as modal modal. |
import React, { Component } from 'react';
import { Image, View, StatusBar } from 'react-native';
import { connect } from 'react-redux';
import { Container, Button, H3, Text } from 'native-base';
import { openDrawer } from '../../actions/drawer';
import styles from './styles';
const launchscreenBg = require('../../../... | Component that is a component that can be hidden by a user. |
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.firstInputRef = React.createRef();
}
emptyAnswer() {
return {
t... | The base class for all possible missing - choice components. |
import Field from '../Field';
import React from 'react';
import { FormField, FormInput, FormRow } from 'elemental';
module.exports = Field.create({
displayName: 'NameField',
focusTargetRef: 'first',
valueChanged: function(which, event) {
this.props.value[which] = event.target.value;
this.props.onChange({
... | Private function to create a hidden hidden field with a value that can be set on the hidden field. |
import React from 'react';
import Select from 'react-select';
const FLAVOURS = [
{ label: 'Chocolate', value: 'chocolate' },
{ label: 'Vanilla', value: 'vanilla' },
{ label: 'Strawberry', value: 'strawberry' },
{ label: 'Caramel', value: 'caramel' },
{ label: 'Cookies and Cream', value: 'cookiescream' },
{ label... | The default implementation of a single unknown node in the UI |
import React from 'react';
import {render} from 'react-dom';
import { Provider } from 'react-redux';
import configureStore from './store/configureStore';
require('./favicon.ico'); // Tell webpack to load favicon.ico
import './styles/styles.scss'; // Yep, that's right. You can import SASS/CSS files too! Webpack will r... | Imports a single node in the DOM. |
import React from 'react';
export const Status = ({type, icon, children}) => {
let cls = 'rh-status', sIcon;
if (type) {
cls += '-' + type;
}
if(icon) {
sIcon = icon;
} else {
switch (type) {
case 'info':
sIcon = 'info';
break;
case 'success':
sIcon = 'check'... | Exports a function that returns a string that represents a node in the tree that has a specific node type. |
import React, { Component } from 'react';
import './Search.css';
class Search extends Component {
constructor(props) {
super(props);
this.searchDebounce = this.props.onSearchTermChange; //debounce(this.props.onSearchTermChange, 300);
}
onInputChange(term) {
//this.setState({term});
//TODO: May... | A component that can be used to show a single term in a sequence of recalles. |
import React from 'react';
//import App from './containers/mersocarlin-template';
import App from './containers/app';
import 'materialize-css/bin/materialize.css';
import 'materialize-css/bin/materialize.js';
import './styles/app.scss';
React.render(<App />, document.getElementById('main'));
| Imports a single managed application. |
import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import CustomPropTypes from './utils/CustomPropTypes';
const Popover = React.createClass({
mixins: [ BootstrapMixin ],
propTypes: {
/**
* An html id attribute, necessary for accessibility
... | Creates a new Popover with the given properties. |
import React from 'react';
import PropTypes from 'prop-types';
import TopHeader from '../../components/Profile/TopHeader';
import About from '../../components/Profile/About';
import OfferedByYou from '../../components/Profile/OfferedByYou';
import RequestedByYou from '../../components/Profile/RequestedByYou';
import N... | A component that exports a single sequence of tokens that have not been seen. |
import React from 'react';
import Popup from './Popup';
class PostPopup extends React.Component {
handlePost = () => {
};
render() {
return (
<Popup {...this.props} style="post-popup">
<header className="post-header">Post a new product></header>
<section>
<table>
... | A component that posts a new product if it is not already post - popuped. |
import React from 'react'
import Helmet from '../components/helmet'
import Link from 'gatsby-link'
import styled from 'emotion/react'
import cx from 'classnames'
import { createPanes, PageContainer } from '../layouts/containers'
import {
sansfont,
Header1,
breakpoint1,
breakpoint2,
breakpoint3,
} from '../la... | Imports a single missing - node from a page. |
import React from 'react';
import classnames from 'classnames';
import UpArrow from './UpArrow';
export default function SimplePopupSelectDropdown(props) {
/*
items:
text, value
activeValue
onClick
*/
const sx = {
top: props.y,
left: props.x
};
const listItems = props.items.... | SimplePopupSelectDropdown - Select dropdown for a single node in a popup. |
import React from 'react'
export default class Moon extends React.Component {
constructor() {
super()
this.state = {
moon: 'rgba(255, 255, 255, .85)',
umbra: 'rgba(0, 0, 0, .7)',
phase: 0,
offsetRt: 0,
offsetLt: 0
}
}
calculatePhase(phase) {
var offsetRt = null, ... | Create a Moon component that can be used to render a single cycle of a cycle of a component. |
import React from 'react';
import { StyleSheet, View } from 'react-native';
export default function Portal({ isVisible, children }) {
if (!children) {
return null;
}
return (
<View
style={[StyleSheet.absoluteFill, styles.container, { opacity: isVisible ? 0.5 : 0 }]}
pointerEvents="none">
... | The default implementation of a node that displays a hidden node with a color of 0. 5. |
import React from 'react';
import { withRouter, Link } from 'react-router-dom';
import { connect } from 'react-redux';
import { Button, Container, Icon } from 'semantic-ui-react';
import styles from './styles';
import {
Login,
Signup,
} from '../auth';
const Visitor = () => (
<div style={styles.container}>
... | A component that renders a single non - terminal error message. |
import React from 'react'
import PageLayout from 'layouts/PageLayout'
import SitesMenu from '../containers/SitesMenuContainer'
const SitesView = (props, context) => {
return (
<PageLayout>
<SitesMenu />
</PageLayout>
)
}
export default SitesView
| The default function for a node that can be used to render a node in a site menu. |
import '@material/textfield/dist/mdc.textfield.css';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { MDCTextField } from '@material/textfield';
import { v4 } from 'uuid';
import Outline from './outline';
import HelperText from './helperText';
... | A component that creates a text field which can be used to show a text field in a MDC. |
require('bootstrap-webpack');
require('../assets/stylesheets/style.sass');
// TODO: Require assets here.
// require('../assets/images/product.png');
import App from './components/App.js';
import React from 'react';
React.render(<App />, document.getElementById('main'));
| Renders a single application. |
// @flow
import { makeStyles } from '@material-ui/styles';
import React from 'react';
import { useSelector } from 'react-redux';
import { isDisplayNameVisible, isNameReadOnly } from '../../../base/config/functions.any';
import DisplayName from '../../../display-name/components/web/DisplayName';
import { THUMBNAIL_TYP... | A module that exports a single object with all of the necessary components. |
import React from 'react';
export default class Slide extends React.Component {
render() {
return (
<div>
<h1>faq</h1>
<ul>
<li><code>How does this effect AppSDK public releases?</code></li>
<li>
We're planning on cutting a release before beginning this work.
... | The base class for all of the possible components that can be rendered by a single component. |
import React from 'react'
import { storiesOf } from '@kadira/storybook'
// component to story
import Organisation from './Organisation.component'
storiesOf('Organisation', module)
.add('defaut', () => (
<Organisation
id="OrganisationId"
name="OrganisationName"
onSelectOrganisation={ () => {} }... | add a component to the system |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageBrightness3 = (props) => (
<SvgIcon {...props}>
<path d="M9 2c-1.05 0-2.05.16-3 .46 4.06 1.27 7 5.06 7 9.54 0 4.48-2.94 8.27-7 9.54.95.3 1.95.46 3 .46 5.52 0 10-4.48 10-10S14.52 2 9 2z"/>
</SvgIcon>
);
I... | A component that exports a sequence of images that are not part of a component. |
import _ from 'underscore';
import React from 'react';
import { FormField, FormInput, FormRow, FormSelect } from 'elemental';
const CONTROL_OPTIONS = [
{ label: 'Exactly', value: 'exactly' },
{ label: 'Greater Than', value: 'greaterThan' },
{ label: 'Less Than', value: 'lessThan' },
{ label: 'Between', value: 'be... | The NumberFilter class is used to filter a number field. |
/**
* External dependencies
*/
import React from 'react';
import reject from 'lodash/collection/reject';
import constant from 'lodash/utility/constant';
import every from 'lodash/collection/every';
const WPCOM_DEFAULTS = [
'ns1.wordpress.com',
'ns2.wordpress.com'
];
function isWpcomDefaults( nameservers ) {
if (... | External dependencies of a nameserver |
import React from 'react'
import { render } from 'react-dom'
import { Router, Route, hashHistory } from 'react-router'
import App from './modules/App'
import About from './modules/About'
import Repos from './modules/Repos'
render((
<Router history={hashHistory}>
<Route path="/" component={App}>
<Route path... | Imports a single from React. |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class SendData extends Component {
render() {
return (
<View style={styles.container}... | Create a component which is rendered by a component that is not in the index. js |
import React from 'react'
import {
addAuthorResult, updateAuthorResult, loadAuthor, deleteAuthorResult, showSuccessNotification, showErrorNotification,
submittingChanged,
} from '../actions'
import { reduxForm } from 'redux-form';
import { routeActions } from 'react-router-redux'
import Input from './Input'
i... | Component that renders a single author form with a single input field. |
import React from 'react';
import style from './style';
class TabContent extends React.Component {
static propTypes = {
active: React.PropTypes.bool,
children: React.PropTypes.node,
className: React.PropTypes.string,
tabIndex: React.PropTypes.number
};
static defaultProps = {
active: false,
... | A component that renders a tab - like element with a single tabIndex. |
import React from 'react';
import PropTypes from 'prop-types';
import { Table } from 'react-bootstrap';
import { translate as __ } from 'foremanReact/common/I18n';
import subscriptionAttributes from './SubscriptionAttributes';
import subscriptionPurposeAttributes from './SubscriptionPurposeAttributes';
const Subscript... | Exports a single warning that can be found in a system warning or in a system warning. |
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 component that renders a list of media items. |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import styles from './Header.less';
import withStyles from '../../decorators/withStyles';
import Link from '../../utils/Link';
import Navigation from '../Navigation';
@withStyles(styles)
class Header {
render() {
... | Demonstrates how to render a single nagios header. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AlertAddAlert = (props) => (
<SvgIcon {...props}>
<path d="M10.01 21.01c0 1.1.89 1.99 1.99 1.99s1.99-.89 1.99-1.99h-3.98zm8.87-4.19V11c0-3.25-2.25-5.97-5.29-6.69v-.72C13.59 2.71 12.88 2 12 2s-1.59.71-1.59 1.59v... | A component that renders a single alert alert. |
import React, { Component } from 'react';
import * as T from "prop-types";
import './styles.scss';
import {cssClassName} from 'utils'
import {Link} from 'react-router'
const cn = cssClassName('M_FooterLinks')
class M_FooterLinks extends Component {
_alertTest = (e) => {
e.preventDefault();
alert('ok')
a... | A component that renders a footer of a block of links. |
import React from 'react';
import { css } from 'glamor';
function ScreenReaderOnly ({ className, ...props }) {
props.className = css(classes.srOnly, className);
return <span {...props} />;
};
const classes = {
srOnly: {
border: 0,
clip: 'rect(0,0,0,0)',
height: 1,
margin: -1,
overflow: 'hidden',
paddi... | The ScreenReaderOnly class is a class that can be used to render a screen - reader. |
import React from 'react';
import TimePicker from 'material-ui/TimePicker';
const TimePickerInternational = () => (
<div>
<TimePicker
hintText="Custom Labels"
okLabel="确定"
cancelLabel="取消"
/>
</div>
);
export default TimePickerInternational;
| TimePickerInternational. js |
import React, { Component } from 'react';
import utils from './utils';
class ResourceRow extends Component {
constructor(props){
super(props);
this.handleClick = this.handleClick.bind(this);
this.delete = this.delete.bind(this);
}
handleClick(){
this.props.handleResourceModal(this.props.row)... | A component that displays a row of a resource modal. |
import React from 'react'
import PropTypes from 'prop-types'
import TeamMappingItem from './TeamMappingItem'
const TeamMappingsList = (props) => (
<div>
{Object.keys(props.teamMappings).length > 0 &&
<p>
{Object.keys(props.teamMappings).length} team mappings found
</p>
}
<ul>
{Object... | React - specific |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionTrendingUp = (props) => (
<SvgIcon {...props}>
<path d="M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"/>
</SvgIcon>
);
ActionTrendingUp = pure(ActionTrendingUp);
ActionTrending... | A component that exports a single action trending up in a group of icons. |
import React from 'react';
import ReactChartist from 'react-chartist';
import Chartist from 'chartist';
const dataPerformance = {
labels: ['6pm','9pm','11pm', '2am', '4am', '8am', '2pm', '5pm', '8pm', '11pm', '4am'],
series: [
[1, 6, 8, 7, 4, 7, 8, 12, 16, 17, 14, 13]
]
};
const optionsPerformance = {
sho... | Exports a chart showing the series of the n - hour resolutions. |
import React from 'react';
class Square extends React.Component {
constructor(props) {
super();
this.onClick = props.onClick;
}
getSquareImgSrc() {
if (this.props.isDiscovered === true) {
if (this.props.isFlagged === true) {
return this.getFlagImgSrc();
... | A component that shows a single square. |
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import StatusContent from 'mastodon/components/status_content';
import Avatar from 'mastodon/components/avatar';
import DisplayName from 'mastodon/components/display_name';
import RelativeTimestamp... | A component that checks if a status check box is present on a page. |
import React from 'react';
import ColumnLegacy from './Columns/Legacy';
export default class Row extends React.Component {
render() {
const { columns, component, item } = this.props;
const columnElements = Object.keys( columns ).map( key => {
const props = Object.assign( {}, this.props, { key, columnKey: key... | The Row class |
/* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
const qualityType = {
0: 'good',
1: 'bad',
2: 'unknown'
};
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) ... | A filter that filters out items that are not in the list of products. |
import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import Icon from 'mastodon/components/icon';
const ColumnLink = ({ icon, text, to, href, method, badge }) => {
const badgeElement = typeof badge !== 'undefined' ? <span className='column-link__badge'>{badge}</span... | A column link that links to a node in a table. |
import React from 'react';
import Nav from './nav';
import Editor from './editor';
import Output from './output';
class Playground extends React.Component {
render() {
return <div>
<Nav />
<Editor />
<Output />
</div>;
}
}
export default Playground; | Package containing all of the components of a single node. |
import React from 'react'
import PropTypes from 'prop-types'
import { Portal } from 'react-portal'
import PetitionFlagForm from '../../containers/petition-flag-form'
const hasTag = (tag, petition) =>
Boolean(petition.tags && petition.tags.filter(t => t.name === tag).length)
export const PetitionMessage = ({ petiti... | Package named tuple with react - portal - react |
import React from 'react';
import ReactDOM from 'react-dom';
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
export function createConstants (...constants) {
return constants.reduce((acc, constant) => {
acc[constant] = constant;
return acc;
}, {});
}
export function createRedu... | Create a window that displays a warning message when a component is not found in the DOM. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Container, Header, Title, Content, Button, Icon, Left, Right, Body, Text, H3 } from 'native-base';
import { Actions } from 'react-native-router-flux';
import { actions } from 'react-native-navigation-redux-helpers';
import { ope... | A component that is a component that is able to render a key sequence without navigation. |
import React from 'react'
import Document, { Html, Head, Main, NextScript } from 'next/document'
import { SkipNavLink } from '@reach/skip-nav'
class MyDocument extends Document {
render() {
return (
<Html lang="en">
<Head />
<SkipNavLink />
<body>
<Main />
<NextS... | export a single node with no children |
import React from 'react';
const PageHeader = React.createClass({
render() {
return (
<div className="bs-docs-header" id="content">
<div className="container">
<h1>{this.props.title}</h1>
<p>{this.props.subTitle}</p>
</div>
</div>
);
}
});
export default Pag... | The default page header for a block of pages. |
import React, { Component } from 'react';
import Helmet from 'react-helmet';
import { connect } from 'react-redux';
import CSSModules from 'react-css-modules';
import styles from './ErrorPage.scss';
import Page from 'shared/components/Page';
class ErrorPage extends Component {
render() {
let {error} = this.pro... | A component that can be used to render a Helmet error page. |
import React from 'react';
import {Popover, Tooltip, Button, Modal, OverlayTrigger} from 'react-bootstrap'
export default class WatsonModal extends React.Component {
constructor(props) {
super(props);
// this.state = {
// showModal: this.props.modalOpen
// };
this.close = this.close.bind(this)
t... | Watson modal component |
import { Route, IndexRoute } from 'react-router';
import React from 'react';
import App from './container/App';
import PostContainer from './container/PostContainer/PostContainer';
import PostDetailView from './container/PostDetailView/PostDetailView';
const routes = (
<Route path="/" component={App} >
<IndexRou... | export routes from package |
import './../css/unify/css/pages/profile.css';
import React from 'react';
import { Link } from 'react-router';
export default class TagCardMain extends React.Component {
render() {
return (
<div className="profile-blog">
<div className="user-name">
{this.pro... | A component that renders a single tag card. |
import React from 'react'
import PropTypes from 'prop-types'
import SVGDeviconInline from '../../_base/SVGDeviconInline'
import iconSVG from './FoundationPlain.svg'
/** FoundationPlain */
function FoundationPlain({ width, height, className }) {
return (
<SVGDeviconInline
className={'FoundationPlain' + ' '... | Demonstrates how to render a single node in a hierarchy. |
import React from 'react';
import { Text } from 'react-native';
import styles from './styles/RestaurantViewStyle';
export default function CourseView(props) {
return (
<Text style={styles.course}>{props.name}</Text>
)
}
CourseView.propTypes = {
name: React.PropTypes.string.isRequired
};
| The CourseView class |
import React from 'react';
import { FormattedMessage } from 'react-intl';
import A from 'components/A';
import LocaleToggle from 'containers/LocaleToggle';
import Wrapper from './Wrapper';
import messages from './messages';
function Footer() {
return (
<Wrapper>
<section>
<FormattedMessage {...mes... | Footer function for missing missing records. |
import React from 'react';
import styled, { css, withTheme } from 'styled-components';
import { darken, lighten } from 'polished';
import { Circle } from 'rebass';
import { width, height } from 'styled-system';
import { defaultProps, compose } from 'recompose';
import Icon from '~/components/icon';
const SocialLink = ... | Imports a component that is not a component of a component with a custom theme. |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const 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.displayName = 'ImageFilterHdr';
ImageFilterHdr.muiName = 'SvgIcon';
export default... | A component that renders a series of images in a series of icons. |
import React from 'react'
const LockButton = ({ actions }) => {
const handleLockButtonClick = () => actions.lockWallet()
return (
<div className='wallet-button lock-button' onClick={handleLockButtonClick}>
<i className='fa fa-lock fa-2x' />
<span>Lock Wallet</span>
</div>
)
}
export default ... | A function to create a lock button that allows to lock a wallet. |
import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { CatContainer } from './containers/catContainer';
import configureStore from './configureStore';
let store = configureStore();
const MOUNT_NODE = document.getElementById('reactRoot')... | Imports a single node in the DOM. |
import React from 'react';
import ReactDOM from 'react-dom';
import {createStore} from "./create-store";
import {createHistory} from 'history';
import App from "./app";
import 'normalize.css';
import 'purecss';
import 'font-awesome/css/font-awesome.css';
console.log("Received state " + JSON.stringify(global.__ISOMOR... | Imports a single application. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.