code stringlengths 26 5k | intent stringlengths 3 2.56k |
|---|---|
import React from 'react';
import PropTypes from 'prop-types';
import Relay from 'react-relay/classic';
import Spinner from '../../shared/Spinner';
import AuditLogEventSection from './eventSection';
import AuditLogSubjectSection from './subjectSection';
import AuditLogActorSection from './actorSection';
import AuditL... | A component that renders audit logs in the UI. |
/* @flow */
import React from 'react';
import { Form, Field, FieldArray } from 'redux-forms-react';
let el;
/* ======== */
/* = Form = */
/* ======== */
el = (
<Form name="test" />
);
let f: HTMLFormElement;
el = (
<Form
name="test"
persistent
onSubmit={(values) => new Promise((resolve, reject) => {... | 7 - 15 - 15 |
import React from 'react';
// import PropTypes from 'prop-types';
import jwt from 'jsonwebtoken';
// import gql from 'graphql-tag';
import {graphql, compose} from 'react-apollo';
import СONFIRM_USER from '../../../mutations/СonfirmUser';
const VerifyEmail = (props) => {
const {
match,
history
} = props;
... | Check if a user has a token and confirm it. |
import React from 'react';
import { Link } from 'react-router';
import { uriToLink } from '../router-mapping';
export default function ItemResult({
item,
itemLabel,
predicate,
match,
code,
coreContentNoteText,
additionalContentNoteText,
}) {
return (
<Link to={uriToLink.itemDetails(item)}>
{c... | ItemResult - Item result |
/**
* Function to get the shallow output for a given component
* As we are using phantom.js, we also need to include the fn.proto.bind shim!
*
* @see http://simonsmith.io/unit-testing-react-components-without-a-dom/
* @author somonsmith
*/
import React from 'react';
import TestUtils from 'react-addons-test-utils'... | Get the shallow rendered component |
// @flow
import React from 'react'
import PronoundTable from './PronoundTable'
import PronoundAEForm from './addedit/PronoundAEForm'
import PronoundActions from '../../../data/dictionary/pronound/PronoundActions'
/*
The PronoundPanel is responsible for displaying everything about our list of pronound. Such
the ta... | A PronoundPanel is responsible for displaying all of the necesitalls of a pronound. |
import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const ButtonStatesExamples = () => (
<ExampleSection title='States'>
<ComponentExample
title='Active'
description='A ... | Example of a button that can be shown in a button s state. |
import faker from 'faker'
import React from 'react'
import { Button, Header, Placeholder, Popup } from 'semantic-ui-react'
const PopupExamplePopperDependencies = () => {
const [data, setData] = React.useState(null)
const timer = React.useRef()
return (
<Popup
on='click'
onClose={() => {
... | Export a random |
import React from 'react';
import {storiesOf} from '@storybook/react';
import Markdown from '../../utils/Components/Markdown';
import AutoDocs from '../../utils/Components/AutoDocs';
import CodeExample from '../../utils/Components/CodeExample';
import TabbedView from '../../utils/Components/TabbedView';
import ReadmeT... | Imports a single node in the system |
import cx from 'clsx'
import PropTypes from 'prop-types'
import React from 'react'
import {
childrenUtils,
customPropTypes,
getElementType,
getUnhandledProps,
useKeyOnly,
} from '../../lib'
import CommentAction from './CommentAction'
import CommentActions from './CommentActions'
import CommentAuthor from './... | Comment component for a node. |
import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Header from '../components/Header';
import MainSection from '../components/MainSection';
import * as TodoActions from '../actions/todos';
class TodoApp extends Component {
render() {
... | The base class for all TodoApp components. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalWifi0Bar = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/>
</SvgIcon>
);
DeviceSignalWifi... | Devolve a device - signal - wifi0 bar |
import React from 'react';
import {connect} from 'react-redux';
import {Link, PropTypes} from 'react-router';
import {loadSuggest, iAmFeelingLucky} from '../actions';
import SearchInput from '../components/SearchInput';
@connect(state => state)
export default class Header extends React.Component {
static contextTypes... | The header component which is used to render a single word - based search. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { registerComponent } from 'nornj';
import EChartsEnhance from './EChartsEnhance';
import 'echarts/lib/chart/map';
import template from './ECharts.t.html';
class MapChart extends Component {
static propTypes = {
type: PropTypes.... | Create a Chart for a single |
import React from 'react';
import { render } from 'react-dom';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
render(<HelloWorld />, document.getElementById('react-root'));
| Imports a component from a file that has no react - dom. |
import React from 'react';
import { NavLink } from 'react-router-dom';
import { Menu, Icon } from 'semantic-ui-react';
import ServerContainer from '../../containers/ServerContainer';
import './index.scss';
class Header extends React.Component {
constructor() {
super();
this.sections = [
{
url... | Package that implements a header for a single node. |
import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import IconButton from '../../../components/icon_button';
const messages = defineMessages({
error: { id: 'bundle_modal_error.message', defaultMessage: 'Something went wrong while loading this comp... | A component that shows a modal modal dialog with a message to retry and close the modal. |
import React from 'react'
import { Base } from './base'
import defaultProps from './defaultProps'
const GhostButton = ({ onClick, onPress, ...props }) => (
<span onClick={onClick || onPress}>
<Base {...props} />
</span>
)
GhostButton.defaultProps = defaultProps
export default GhostButton
| export defaultProps from react - base |
import React, { Component } from 'react';
import classNames from 'classnames';
import Utils from '../utils/Utils';
import PlayAnimation from '../containers/PlayAnimation';
export default class VideoItem extends Component {
videoCategoryRender() {
if (this.props.category) {
return (
<p
key... | The video item class which renders the video. |
import React from 'react';
import {render} from 'react-dom';
import queryString from 'query-string';
import style from './stylesheets/main.scss';
import Start from './components/Start.js';
import App from './components/App.js';
import spotifyClientId from './spotify-client-id.js';
const spotifyAuthUri = 'https://acco... | Imports the missing - app - access token and redirect to spotify. |
import React from 'react';
import SvgIcon from '../../SvgIcon';
const DeviceSignalCellularConnectedNoInternet4Bar = (props) => (
<SvgIcon {...props}>
<path d="M20 18h2v-8h-2v8zm0 4h2v-2h-2v2zM2 22h16V8h4V2L2 22z"/>
</SvgIcon>
);
DeviceSignalCellularConnectedNoInternet4Bar.displayName = 'DeviceSignalCellularCon... | Devuelte un objeto DeviceSignalCellularConnectedNoInternet4Bar |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesFitnessCenter = (props) => (
<SvgIcon {...props}>
<path d="M20.57 14.86L22 13.43 20.57 12 17 15.57 8.43 7 12 3.43 10.57 2 9.14 3.43 7.71 2 5.57 4.14 4.14 2.71 2.71 4.14l1.43 1.43L2 7.71l1.43 1.43L2 10.57 ... | A component that exports a series of components that are not part of a sequence of components. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationChat = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"/>
</SvgIcon>
);
Communicatio... | A component that renders a single node in a network network. |
import React from 'react';
import moment from 'moment';
import numeral from 'numeral';
import SmartSearch from 'smart-search';
import {List} from 'immutable';
import {Link} from 'react-router';
export function date_format(date, format = "D.M.YYYY") {
return date != null && date != undefined ? moment(date).format(form... | Function to filter items based on a given search term. |
import React, { Component } from 'react';
import { View, Text } from 'react-native';
import firebase from 'firebase';
import { Header, Button, Spinner } from './components/common';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import reducers from './reducers';
import Red... | The base app is a class that implements a non - standard way to render a single application. |
import React, { Component } from 'react';
import * as PropTypes from 'prop-types';
import { Form } from 'react-final-form';
import Button from '@mui/material/Button';
import { TextField } from '../../../../components/TextField';
import inject18n from '../../../../components/i18n';
class PollForm extends Component {
... | A component that polls a question on a popup. |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationArrowBack = (props) => (
<SvgIcon {...props}>
<path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/>
</SvgIcon>
);
NavigationArrowBack = pure(NavigationArrowBack);
NavigationArrowB... | A component that exports a navigation arrow back to a specific component. |
/* @flow */
import React from 'react';
import { Heading } from '@boldr/ui';
import styled from 'styled-components';
const ListHeader = styled.div`
padding-left: 20px;
padding-bottom: 1em;
`;
const ArticleListHead = () => {
return (
<ListHeader>
<Heading type="h4">All Articles</Heading>
</ListHeader... | The default list head for all categories. |
import React from 'react';
var Loading = React.createClass({
render: function() {
return (
<div className="loading" />
);
}
});
export default Loading; | Imports the Loading component. |
import React from 'react';
import PropTypes from 'prop-types';
const FuelSavingsTextInput = ({name, value, placeholder, onChange}) => {
return (
<input
className="small"
name={name}
type="text"
placeholder={placeholder}
value={value}
onChange={onChange}/>
);
};
const { stri... | The FuelSavingsTextInput class is a wrapper around a React component that renders a single missing node in a text field. |
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';;
function rootClick(e) {
if (this.props.disableScrim || ReactDOM.findDOMNode(this).contains(e.target)) return;
this.scrimClick(e);
}
const privates = new WeakMap();
export default ParentClass => {
return class Scri... | Scrim is a class that can be used to disable scrolling when a button is clicked on a DOM node. |
import 'core-js/fn/object/assign';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/Main';
import { I18nextProvider } from 'react-i18next';
import i18n from './i18n';
// Render the main component into the dom
ReactDOM.render(
<I18nextProvider i18n={ i18n }><App /></I18nextP... | Imports a single component into the dom ReactDOM. |
import React from 'react'
import PropTypes from 'prop-types'
import styles from './cpu.less'
import { color } from 'utils'
import CountUp from 'react-countup'
import { LineChart, Line, XAxis, YAxis, CartesianGrid, ResponsiveContainer } from 'recharts'
const countUpProps = {
start: 0,
duration: 2.75,
useEasing: t... | Generate a tree of all non - terminal nodes that cover a single node. |
// Main application
import path from 'path';
import React from 'react';
import {render, hydrate} from 'react-dom';
import {StaticRouter, BrowserRouter, Switch, Route, Link, withRouter} from 'react-router-dom';
import minimatch from 'minimatch';
import sortBy from 'lodash.sortby';
import Catch from './Catch';
const IS... | Main application middleware |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionCompareArrows = (props) => (
<SvgIcon {...props}>
<path d="M9.01 14H2v2h7.01v3L13 15l-3.99-4v3zm5.98-1v-3H22V8h-7.01V5L11 9l3.99 4z"/>
</SvgIcon>
);
ActionCompareArrows = pure(ActionCompareArrows);
Acti... | A component that exports action - compare - arrows to a component that can be used to compare two components. |
import React from 'react';
class UserNameField extends React.Component {
emailOnChange = e => {
// Validation
this.props.onHandleEmailChange(e);
};
onBlurChange = e => {
this.props.onHandleBlur('email');
};
render() {
return (
<div>
<div>login</div>
<input
cl... | A user name field which allows to enter a password. |
import React from 'react'
import TweenOne from 'rc-tween-one'
import PropTypes from 'prop-types'
const animation = { translateX: '4%', yoyo: true, repeat: 7, duration: 50 }
const style = { boxShadow: '0 0 4px 2px #e47f87' }
const Shake = ({ shake, ani, playingStyle, children, ...rest }) => {
return (
<TweenOne a... | A component that can be shake if it s required. |
/**
* 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 <%= name %> extends Component {
render() {
return (
<View style={styles.contain... | The base class for a missing - component sequence that extends a single non - component component. |
import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdFilterVintage(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M37.78 25.18c3.85 2.22 5.99 6.25 6 10.4-3.59 2.06-8.15 2.22-11.99 0-.56-.33-1.07-.7-1.56-1.09.09.62.16 1.24.16 1.89 0 4.44-2.42 8.3-6 10.38-3.5... | Vintage filter for the MdFilterVintage component |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvWebAsset = (props) => (
<SvgIcon {...props}>
<path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm0 14H5V8h14v10z"/>
</SvgIcon>
);
AvWebAsset = pure(AvWebAsset);
AvWebAss... | A component that exports a single node in a hierarchy. |
import React from 'react'
import connectToStores from 'alt/utils/connectToStores'
import TodoStore from '../stores/TodoStore'
@connectToStores
class TodoList extends React.Component {
static getStores(props) {
return [TodoStore]
}
static getPropsFromStores(props) {
return TodoStore.getState()
}
r... | A component that lists all the todo items in a collection of stores. |
import React from 'react';
import Title from 'react-title-component';
import MarkdownElement from '../../MarkdownElement';
import contributingText from '../../../../../../CONTRIBUTING.md';
const Contributing = () => (
<div>
<Title render={(previousTitle) => `Contributing - ${previousTitle}`} />
<MarkdownEle... | The default Contributing component |
import React, { Component } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { DrawerNavigator, TabNavigator, StackNavigator } from 'react-navigation';
import fbNavigatorView from './FbNavigatorView';
import mainScreen from '../screens/MainScreen';
import detailScreen from '../screens/DetailS... | Imports a single component from the system. |
import React from 'react';
// eslint-disable-next-line
import RegionSettingsPanel from 'ringcentral-widgets/components/RegionSettingsPanel';
import styles from './styles.scss';
const props = {};
props.currentLocale = 'en-US';
props.availableCountries = [
{ id: '1', isoCode: 'US', callingCode: '1' },
{ id: '224', i... | A demo of how to render a single unknown node in a region settings panel. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import warn from '../utils/console/warn';
const NEWTAB = '_blank';
const MIDDLECLICK = 1;
export default class OutboundLink extends Component {
static trackLink = () => {
warn('ga tracking not enabled');
};
static propTypes = {
... | The link component that is rendered when a user clicks on a link. |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react';
import styles from './Header.css';
import withStyles from '../../decorators/withStyles';
import Link from '../Link';
import Navigation from '../Navigation';
@withStyles(styles)
class Header extends Compo... | Demonstrates how to render a single missing - node header. |
import React, { Component } from 'react';
import { withRouter } from 'react-router-dom';
import { graphql } from 'react-apollo';
import gql from 'graphql-tag';
class Citation extends Component {
componentWillReceiveProps(nextProps) {
if (this.props.location.key !== nextProps.location.key) {
this.props.Not... | The base component for the note - only tag. |
import './index.scss';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { List } from 'immutable';
const propTypes = {
socialLinks: PropTypes.instanceOf(List),
fetchSocialLinks: PropTypes.func
};
export class SocialLinks extends Component {
componentWillMount () {
return ... | The SocialLinks component is a component that can be rendered by a user to see which social links are shown. |
import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import iconButtonCode from '!raw!material-ui/IconButton/IconButton';
import icon... | Imports a single non - empty sequence of components. |
import React from 'react';
import { View, ActivityIndicator } from 'react-native';
import Colors from '../../../native-base-theme/variables/commonColor';
const About = () => (
<View style={{ flex: 1, flexDirection: 'column', justifyContent: 'center' }}>
<ActivityIndicator size="large" color={Colors.brandPrimary}... | export About function |
import React from 'react'
import Link from 'next/link'
export default () => (
<div>Hello World. <Link href='/about'><a>About</a></Link></div>
)
| The default implementation of Export. |
import React from 'react';
import Loader from './base/Loader';
import Helpers from '../../utils/helpers';
const statTypes = [
{
type: 'count',
text: 'Counts'
},
{
type: 'convRate',
text: 'Conversion Rate'
},
{
type: 'zScore',
text: 'Z Score'
},
... | Generate HTML for a single missing - node node |
/* eslint-disable import/default */
import React from 'react';
import { render } from 'react-dom';
import { browserHistory } from 'react-router';
import { AppContainer } from 'react-hot-loader';
import Root from './components/Root';
import configureStore from './store/configureStore';
require('./favicon.ico'); // Tel... | Imports a bunch of components into the app. |
import React from 'react'
import 'bootstrap-progressbar/bootstrap-progressbar.min.js'
export default class UiProgressbar extends React.Component{
componentDidMount () {
$(this.refs.progressbar).progressbar({
display_text: 'fill'
})
}
render () {
return <div {...this.props} ref="progressbar"/... | A component that displays a Bootstrap - styled progress bar. |
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 hidden input. |
import React from 'react';
import LoginActions from '../actions/LoginActions';
import MenuItem from './Menu/item.react';
import MenuStore from '../stores/MenuStore';
export default class Menu extends React.Component {
static get displayName() {
return 'Menu';
}
constructor(props) {
super(... | A component that creates a menu that can be used to show a menu in the menu bar. |
import React from 'react'
import { Link } from 'react-router'
import videos from './videos.json'
const video = videos[Math.floor(Math.random() * videos.length)]
export default ({ userLoaded, toSteps, toInfo }) => (
<div className='ext-home-cover' style={{
backgroundImage: `url("${video.image}")`
}}>
{wind... | Demonstrate un necessarios de la cultures |
/**
* Error.js
*
* (C) 2017 mobile.de GmbH
*
* @author <a href="mailto:pahund@team.mobile.de">Patrick Hund</a>
* @since 10 Feb 2017
*/
import React from 'react';
const style = {
padding: '16px'
};
export default () => (
<div style={style}>
<h1>Sorry!</h1>
<p>Something went horribly wron... | JSError JSError for missing missing node - id. |
import React from 'react';
const ArrayControls = (Control, rangeArray, value, onUpdateEntry, controlRandom) => {
return (
<div>
{ rangeArray && rangeArray.map((index) => {
return (
<Control key={ index }
value={ value[index] }
onUpdate={ (data) => onU... | ArrayControls exports a function that creates a control array that can be used to create a control array. |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import SovosTooltip from '../../../sovos-tooltip/SovosTooltip';
const constants = {
tin: 'TIN',
tinType: 'TINTYPE',
fk1: 'FK1'
};
class TinMask extends Component {
constructor(props) {
super(props);
this.state = {
show... | A component that can be used to show a TIN or FK1 mask. |
import React from 'react';
import { Link } from 'react-router';
class Sidebar extends React.Component {
//static loadProps (params, cb) {
//cb(null, {
//assignments: COURSES[params.courseId].assignments
//});
//}
render () {
//var { assignments } = this.props;
var assignments = COURSES[th... | Sidebar component that renders a single missing key sequence. |
import React from 'react';
import PropTypes from 'prop-types';
/**
* WordPress dependencies
*/
import { withSelect, withDispatch } from '@wordpress/data';
import { __ } from '@wordpress/i18n';
import { compose } from '@wordpress/compose';
/**
* Pods dependencies
*/
import SaveStatusMessage from './save-status-mes... | Provides a way to edit a WordPress dependency. |
import React from 'react';
import { connect } from 'react-redux';
import { firebase, helpers } from 'react-redux-firebase';
const { isLoaded, isEmpty, dataToJS } = helpers;
import Filter from '../Filter/Filter';
import Loader from '../Loader/Loader';
@firebase()
@connect(
({firebase}) => ({
images: dataToJS(fire... | The Frontpage component that renders a single node if it is not already present. |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import * as feather from 'react-feather';
import '../../style/module/navgation.css';
export default class MainNavgation extends Component {
static defaultProps = {
appLogo: require('../../static/navgation/logo.svg'),
avatar... | A component that can be used to show a single nagagation in the navgation. |
import React from 'react';
export default ({ ...props }) => {
return (
<svg {...props} x="0px" y="0px" viewBox="0 0 16 16">
<g>
<g>
<path
d="M12.179,13.969c-1.915,0-3.854-1.507-3.854-4.387c0-2.934,1.495-5.653,4.102-7.462c0.181-0.125,0.... | Default warning warning |
import React from 'react';
import { connect } from 'react-redux';
import { PropTypes } from 'prop-types';
import { Graph } from './Graph';
import { Form } from './Form';
import { getProjection } from '../selectors/app';
import '../styles/app.scss';
export const _App = (props) => {
return <div>
<h1 className="ap... | A function that exports a single object as a sequence of React elements. |
import React from 'react'
import Head from 'next/head'
import withRedux from 'next-redux-wrapper'
import { initStore } from '../core'
import { Login } from '../layouts'
import { Signin, mapState, mapDispatch } from '../authentication/signin'
import { signinVisited } from '../authentication/actions'
const Page = props... | Imports a single by default. |
import React from 'react';
import { Link } from 'react-router-dom';
import css from 'classnames';
export class VideoSection extends React.Component {
renderButton() {
const { pdf, restricted } = this.props;
if (restricted) {
return (
<Link to="/buy">
... | A video section that shows a button that shows a thumbnail of a video. |
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load(name) {
return [
{ id: 1, name: `${na... | The base class for a missing - user - related component that is not part of a component s hierarchy. |
import React from 'react';
import DoingsListBase from './base';
class DoingsListLead extends DoingsListBase {
render() {
return (
<div>
{this.props.doings.valueSeq().map((value) => (
<p key={value.get('id')}
className="flow-text truncate"
onClick={() => this.pro... | A base class that renders a single missing - |
import React, { Component } from 'react';
import Menu from './Menu';
import Header from './Header';
import GitHub from './GitHub.png';
class App extends Component {
constructor() {
super();
this.callbackMenu = this.callbackMenu.bind(this);
this.state = {
showMenu: false
};
}
callbackMenu()... | Create a component that is a child of a component that has a menu open. |
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < ... | The default component for the missing - card modal. |
import React from 'react';
import PropTypes from 'prop-types';
import { Row, Col } from 'antd';
import { connect } from 'react-redux';
import { fetchIssuesIfNeeded } from '../../actions/index';
import ArchiveList from './archivelist';
import YearCard from './yearcard';
import '../../../css/archive/archive.css';
class ... | A base class for archive - related components. |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { getSingleArticle, updateForm, setCurrentArticle } from '../../actions/article';
import { newThreadRead, setCurrentMessageThread } from '../../actions/messages';
import { Link } from 'rea... | Component that handles the action of a single article. |
import React from 'react';
import styled from 'styled-components';
import { WalletContext } from 'utils/context';
import OnBoarding from 'components/OnBoarding/OnBoarding';
import { QRCode } from 'components/Common/QRCode';
import { currency } from 'components/Common/Ticker.js';
import { LoadingCtn } from 'components/C... | Demonstrates how to display a single token sequence sequence |
import classnames from 'classnames';
import React from 'react';
import { Button, Checkbox, InputGroup, SegmentedControl } from 'elemental';
import Portal from './Portal';
const Transition = React.addons.CSSTransitionGroup;
const sizes = {
arrowHeight: 12
};
var Popout = React.createClass({
displayName: 'Popout',
p... | The main function of the component that creates a Popout. |
import PropTypes from 'prop-types';
import React from 'react';
import { Button, Form, FormControl, FormGroup, InputGroup } from 'react-bootstrap';
import { Icon } from './common';
class Filter extends React.Component {
constructor(props) {
super(props);
this.textInput = null;
this._handleChange = this._handl... | A filter that can be used to filter a text input. |
// @flow
import React from 'react';
class MyComponent1 extends React.Component {
constructor(props) {}
defaultProps: T;
static props: T;
static state: T;
a: T;
b = 5;
c: T = 5;
method() {}
}
class MyComponent2 extends React.Component {
props: Props;
constructor(props) {}
defaultProps: T;
s... | A component that is not part of a critical state. |
import React from 'react';
import evalDependsOn from '../../../../../../fields/utils/evalDependsOn';
module.exports = React.createClass({
displayName: 'FormHeading',
propTypes: {
options: React.PropTypes.object,
},
render () {
if (!evalDependsOn(this.props.options.dependsOn, this.props.options.values)) {
re... | The form - heading component is a class that can be used to render a dropdown dropdown list. |
/**
* Created by lizhaocai on 2017/3/27.
*/
import Head from 'next/head'
import Link from 'next/link'
import Button from 'antd/lib/button'
import message from 'antd/lib/message'
import React from 'react'
import axios from 'axios'
import "antd/dist/antd.css";
//Ajaxbutton
class Abutton extends React.Component{
st... | A button that shows a single nagios action. |
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
export { default as RealTimeChart} from './RealTimeChart';
export { default as RealTimeChart2} from './RealTimeChart2';
export { default as Table1} from './Table1'... | export a single object |
import React from 'react';
import PropTypes from 'prop-types';
import ButtonAddElement from './ButtonAddElement';
import AddButton from './AddButton';
import styles from './ButtonAdd.module.css';
class ButtonAdd extends React.PureComponent {
constructor(props) {
super(props);
this.handleStage = this.handleS... | A component that adds a button to a stage. |
import React from 'react';
import SPELLS from 'common/SPELLS';
import { formatPercentage } from 'common/format';
import { calculateAzeriteEffects } from 'common/stats';
import UptimeIcon from 'interface/icons/Uptime';
import HasteIcon from 'interface/icons/Haste';
import AzeritePowerStatistic from 'interface/statistic... | A class that represents a sequence of events that have a Overwhelming Power state. |
import React from 'react';
class YoutubeEmbed extends React.Component {
constructor(props) {
super(props)
}
render() {
return(
<iframe width="560" height="315" src={`https://www.youtube.com/embed/${this.props.src}`} frameBorder="0" allowFullScreen></iframe>
);
}
}
YoutubeEmbed.propTypes = {... | Youtube embed component |
import React, { Component } from 'react';
import { StyleSheet, ScrollView, View, Platform, ListView, Image, Dimensions, TextInput, } from 'react-native';
// import * as Animatable from 'react-native-animatable';
import styles from '../../../../app/components/Styles/shared';
import layoutStyles from '../../../../app/com... | Component which is a component that can be used to parse a form into a parser. |
import React from 'react';
import IconBase from 'react-icon-base';
export default class FaStickyNoteO extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m34.3 28.6h-5.6v5.5q0.7-0.2 0.9-0.5l4.2-4.1q0.2-0.3 0.4-0.9z m-6.3-2.9h6... | Missing note Others |
import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
import _ from 'lodash';
import * as Basic from '../../../components/basic';
import { IdentityContractManager } from '../../../redux';
import * as Advanced from '../../../components/advanced';
import OrganizationPositio... | The base component for the identity contract tabs - entry point |
import React from 'react'
import {observer} from 'mobx-react'
import styles from './style.less'
import {UiState} from '~/src/business/UiState'
import {Modals} from '~/src/business/Modals'
@observer
export class SelectionInputDialog extends React.Component {
static contextTypes = {
uiState: React.PropTypes.insta... | A component that displays a modal dialog with a list of options for a single key. |
import React from 'react';
import styles from './clickToSend.css';
import RelativeLink from '../relativeLink';
import { fromRawLsk } from '../../utils/lsk';
const ClickToSend = ({ rawAmount, amount, className,
recipient, children, disabled }) => {
const normalizedAmount = rawAmount ? fromRawLsk(rawAmount) : amount... | Click to send a single node with no children |
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionThreeDRotation = (props) => (
<SvgIcon {...props}>
<path d="M7.52 21.48C4.25 19.94 1.91 16.76 1.55 13H.05C.56 19.16 5.71 24 12 24l.66-.03-3.81-3.81-1.33 1.32zm.89-6.52c-.19 0-.37-.03-.52-.08-.16-.06-.29-.... | A component that exports a component with a 3 - dimensional action. |
import cx from 'classnames'
import _ from 'lodash'
import PropTypes from 'prop-types'
import React from 'react'
import {
customPropTypes,
getElementType,
getUnhandledProps,
META,
} from '../../lib'
function StepDescription(props) {
const { children, className, description } = props
const classes = cx('des... | Description for a node in a chain |
import React from 'react';
import ReactDOM from 'react-dom';
import registerServiceWorker from './registerServiceWorker';
import injectTapEventPlugin from 'react-tap-event-plugin';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import App from './App';
import './index.css';
injectTapEventPlugin(... | Imports a single component and registers it with the service worker. |
import React from 'react';
import PropTypes from 'prop-types';
import { compose, withProps, setPropTypes } from 'recompose';
import { withFormik } from 'formik';
import Yup from 'yup';
import withUser from '@data/withUser';
import { Text as TextInput } from '@ui/inputs';
import PaddedView from '@ui/PaddedView';
import... | Imports a single node with a single user - defined sequence of props. |
import React, { Component } from 'react';
import { Text } from 'react-native';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
import { connectStyle } from '@shoutem/theme';
import mapPropsToStyleNames from '../../Utils/mapPropsToStyleNames';
class Content extends Component {
rende... | The content component that is rendered by a keyboard - aware scroll view. |
import React from 'react';
import Modal from '../src/Modal';
import Button from '../src/Button';
export default
<Modal
header='Modal Header'
bottomSheet
trigger={
<Button waves='light'>MODAL BUTTOM SHEET STYLE</Button>
}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor inci... | Imports a single node. |
import React from 'react';
import PropTypes from 'prop-types';
import Octicon from '../atom/octicon';
export default class OfflineView extends React.Component {
static propTypes = {
retry: PropTypes.func.isRequired,
}
componentDidMount() {
window.addEventListener('online', this.props.retry);
}
com... | The OfflineView class is a component that displays a message when offline is on. |
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(
<h1>Hello, world!</h1>,
document.getElementById('root')
);
| Renders a single node in the DOM. |
import React, { Component } from 'react';
import { css } from 'aphrodite';
import { chatListStyles } from './../../../styles/inline/specificStyles';
import { timestampToDateString } from './../../../helpers/timeUtils';
import ChatBubble from './chatBubble';
export class ChatList extends Component {
componentDidMou... | The list component that lists messages in a chat list. |
/**
* Created by yangyang on 2017/10/27.
*/
import React from 'react'
import {connect} from 'react-redux'
import { Card, Row, Col } from 'antd'
import {profitAction, profitSelector} from './redux'
import {PROFIT_SHARE_TYPE, stationSelector} from '../station'
class InvestorProfitShare extends React.PureComponent {
... | Component that is rendered when a component is mounted and has no children. |
import React from 'react';
import { SegmentedControl } from 'elemental';
const OPTIONS = [
{ label: 'Is Set', value: true },
{ label: 'Is NOT Set', value: false }
];
var PasswordFilter = React.createClass({
getInitialState () {
return {
checked: this.props.value || true
};
},
toggleChecked (checked) {
... | A component that allows to filter the password field of a given type. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.