path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/components/photoshop/Photoshop.js | conorhastings/react-color | 'use strict' /* @flow */
import React from 'react'
import ReactCSS from 'reactcss'
import shallowCompare from 'react-addons-shallow-compare'
import { ColorWrap, Saturation, Hue } from '../common'
import PhotoshopFields from './PhotoshopFields'
import PhotoshopPointerCircle from './PhotoshopPointerCircle'
import Photo... |
src/ReactBoilerplate/Scripts/components/ErrorList.js | theonlylawislove/react-dot-net | import React, { Component } from 'react';
import { Glyphicon } from 'react-bootstrap';
class ErrorList extends Component {
render() {
const {
errors
} = this.props;
if (!errors) return null;
if (Array.isArray(errors)) {
if (errors.length === 0) return null;
return (
<div cla... |
frontend/app_v2/src/common/icons/ChevronLeft.js | First-Peoples-Cultural-Council/fv-web-ui | import React from 'react'
import PropTypes from 'prop-types'
/**
* @summary ChevronLeft
* @component
*
* @param {object} props
*
* @returns {node} jsx markup
*/
function ChevronLeft({ styling }) {
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" className={styling}>
<path d="M0 0h... |
src/index.js | emilebres/react-virtualized-checkbox | /* @flow */
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById('root'));
|
docs/app/Examples/modules/Popup/Usage/PopupExampleHover.js | vageeshb/Semantic-UI-React | import React from 'react'
import { Button, Popup } from 'semantic-ui-react'
const PopupExampleHover = () => (
<Popup
trigger={<Button icon='add' content='Add a friend' />}
content='Sends an email invite to a friend.'
on='hover'
/>
)
export default PopupExampleHover
|
app/javascript/mastodon/features/ui/components/video_modal.js | h3zjp/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Video from 'mastodon/features/video';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage } from 'react-intl';
import classNames from 'classnames';... |
examples/src/app.js | reynolek/react-select | /* eslint react/prop-types: 0 */
import React from 'react';
import Select from 'react-select';
import CustomRenderField from './components/CustomRenderField';
import MultiSelectField from './components/MultiSelectField';
import RemoteSelectField from './components/RemoteSelectField';
import SelectedValuesField from '... |
internals/templates/containers/LanguageProvider/index.js | plasticanthony/coffee-dates | /*
*
* LanguageProvider
*
* this component connects the redux state language locale to the
* IntlProvider component and i18n messages (loaded from `app/translations`)
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { IntlProvider } from 'reac... |
packages/website/src/components/page/Head.js | mucsi96/w3c-webdriver | import React from 'react';
import { withSiteConfig } from '../utils/SiteConfigProvider';
import openGraphImg from '../../images/opengraph.png';
import Analytics from './Analytics';
const Head = ({ title, description, url, trackingId }) => (
<head>
<Analytics trackingId={ trackingId } />
<meta charSet="utf-8"... |
src/svg-icons/content/add-box.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentAddBox = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/>
</SvgIcon>
);
ContentAddBox = pu... |
06-react-blogs/src/component/PostsMain.js | iproduct/course-node-express-react | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import PostList, { COLLECTION } from './PostList';
import { Link, Outlet, useNavigate } from 'react-router-dom';
import PostCollectionItem from './PostCollectionItem';
import './PostsMain.css'
// import M from 'materialize-css/dist/js/materia... |
src/containers/settings/AccountScreen.js | meetfranz/franz | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { inject, observer } from 'mobx-react';
import PaymentStore from '../../stores/PaymentStore';
import UserStore from '../../stores/UserStore';
import AppStore from '../../stores/AppStore';
import FeaturesStore from '../../stores/Featur... |
src/apps/SocketsRegistry/SocketsRegistryList.js | Syncano/syncano-dashboard | import React from 'react';
import _ from 'lodash';
import pluralize from 'pluralize';
import SocketsRegistryStore from './SocketsRegistryStore';
import SocketsRegistryActions from './SocketsRegistryActions';
import { ColumnList, Container, Lists, RegistryEmptyView, SearchResultsCountBox, Show } from '../../common/';
... |
app/js/common/Test/index.js | DawChihLiou/ci-boilerplate | import React from 'react'
import SimpleFormContainer from './containers/SimpleFormContainer'
const Test = () => (
<SimpleFormContainer />
)
export default Test
|
index.android.js | ScottBouloutian/JSWizard | /*
JSWizard, a JavaScript documentation application.
Copyright (C) 2017 Scott Bouloutian
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(... |
node_modules/@material-ui/core/esm/Collapse/Collapse.js | pcclarke/civ-techs | import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import React from 'react';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import { Transition } from 'react-transition-group';
import withStyles from '../styles/wit... |
admin/src/components/PopoutListItem.js | kwangkim/keystone | import blacklist from 'blacklist';
import classnames from 'classnames';
import React from 'react';
var PopoutListItem = React.createClass({
displayName: 'PopoutListItem',
propTypes: {
icon: React.PropTypes.string,
iconHover: React.PropTypes.string,
isSelected: React.PropTypes.bool,
label: React.PropTypes.str... |
docs/src/routes/home/index.js | bmatthews/haze-lea | /**
* 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 Home from './Home';
i... |
src/frame/rePCUI/trigger/Popup.js | gejialun8888/shop-react | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import Align from '../align';
import Animate from '../../reAnimate/rc-anim/Animate';
import PopupInner from './PopupInner';
import LazyRenderBox from './LazyRenderBox';
import { saveRef } from './utils';
cla... |
src/components/FuelSavingsResults.js | coryhouse/react-slingshot | import React from 'react';
import PropTypes from 'prop-types';
import {scrubFormatting} from '../utils/numberFormat';
const FuelSavingsResults = ({savings}) => {
const savingsExist = scrubFormatting(savings.monthly) > 0;
const savingsClass = savingsExist ? 'savings' : 'loss';
const resultLabel = savingsExist ? '... |
src/components/menuButton/index.js | jiriKuba/Calculatic | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View, Button, StyleSheet } from 'react-native';
class MenuButton extends Component {
render() {
const { onPress } = this.props;
return (
<View style={styles.container}>
<View style={s... |
app/app-client.js | paladinze/testSemantic | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import AppRoutes from './components/AppRoutes';
window.onload = () => {
ReactDOM.render(<AppRoutes/>, document.getElementById('main'));
};
|
docs/0.5d174723c0c06b2232a2.js | heifade/quark-ui | webpackJsonp([0],{"0P4F":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return r});var a=n("Jmof"),l=(n.n(a),n("lkey")),s=n("UJDU"),i=n("Pp2j"),o=n("WB2H"),r=class extends a.Component{constructor(e){super(e),this.state={}}render(){var e=()=>{s.a.config({placemen... |
web/app/admin/admin.js | bitemyapp/serials | // @flow
import React from 'react'
import {Link} from 'react-router'
import {RouteHandler} from 'react-router'
import {Header} from '../layout/header'
import {importLog} from '../model/admin'
import {settings} from '../model/settings'
import {FormSection} from '../comp'
import {Routes} from '../router'
export class ... |
gbe/resources/assets/js/components/YearButtonPanel.js | DemocracyApps/Community-Budget-Explorer | /*
React component to create an 'Account Type' panel of buttons for the 'page toolbar' of the app.
*/
import React from 'react';
var dataModelStore = require('../stores/DataModelStore');
var dispatcher = require('../common/BudgetAppDispatcher');
var stateStore = require('../stores/StateStore');
var ActionTypes = req... |
src/js/components/stamina-app.js | FranckCo/Stamina | import React from 'react';
import { render } from 'react-dom';
import { Router, Route, Link, browserHistory } from 'react-router';
import StaminaActions from '../actions/stamina-actions';
import Logger from '../utils/logger';
import GlobalMenu from './global-menu';
import GSBPMView from './gsbpm-view';
import GSIMView... |
webpack/scenes/Hosts/ChangeContentSource/components/FormField.js | Katello/katello | import React from 'react';
import {
FormGroup,
FormSelect,
FormSelectOption,
GridItem,
} from '@patternfly/react-core';
import { translate as __ } from 'foremanReact/common/I18n';
import PropTypes from 'prop-types';
const FormField = ({
label, id, value, items, onChange, isLoading, contentHostsCount,
}) => (... |
gatsby-strapi-tutorial/cms/plugins/content-manager/admin/src/components/EmptyAttributesView/index.js | strapi/strapi-examples | /**
*
* EmptyAttributesView
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Button from 'components/Button';
import PluginHeader from 'components/PluginHeader';
import styles from './styles.scss';
function EmptyAttributesView({ currentModelNa... |
examples/webpack-sandbox/src/components/Layout.js | lore/lore | /**
* This component is intended to reflect the high level structure of your application,
* and render any components that are common across all views, such as the header or
* top-level navigation. All other components should be rendered by route handlers.
**/
import React from 'react';
import PropTypes from 'prop... |
examples/windows/components/textInput.js | gabrielbull/react-desktop | import React, { Component } from 'react';
import { TextInput } from 'react-desktop/windows';
export default class extends Component {
static defaultProps = {
color: '#cc7f29',
theme: 'light'
};
handleChange = e => console.log(e.target.value);
render() {
return (
<TextInput
theme={th... |
Libraries/Text/Text.js | DannyvanderJagt/react-native | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
src/icons/BrightnessHighIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class BrightnessHighIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M40 17.37V8h-9.37L24 1.37 17.37 8H8v9.37L1.37 24 8 30.63V40h9.37L24 46.63 30.63 40H40v-9.37L46.63 2... |
polymorphs-frontend-master/src/components/SidePanel/SidePanel.js | TrentonSarnowski/GenomeBusters | import React, { Component } from 'react';
import './SidePanel.css';
class SidePanel extends Component {
constructor(props) {
super(props);
this.state = {
menuActive: true,
hoverActive: false,
}
this.toggleMenu = this.toggleMenu.bind(this);
this.activateHover = this.activateHover.bind(t... |
app/components/TechTreeCoursePopup/index.js | cerebral/cerebral-reference-app | import React from 'react';
import {Decorator as Cerebral} from 'cerebral-view-react';
import styles from './styles.css';
import icons from 'common/icons.css';
const containerMarginLeft = -337; // from CSS
const containerWidth = 685 + containerMarginLeft; // from CSS
const rightMargin = 30;
const leftMargin = 10;
const... |
src/mui/field/FunctionField.js | RestUI/rest-ui | import React from 'react';
import PropTypes from 'prop-types';
import pure from 'recompose/pure';
/**
* @example
* <FunctionField source="last_name" label="Name" render={record => `${record.first_name} ${record.last_name}`} />
*/
const FunctionField = ({ record = {}, source, render, elStyle }) => record ?
<span... |
client/components/Favicon.js | Pocket-titan/Tonlist | import React from 'react'
import {renderNothing, branch} from 'recompose'
let decorator = branch(
props => !document,
renderNothing(),
x => x
)
let Favicon = class Favicon extends React.Component {
componentDidMount() {
let head = document.getElementsByTagName('head')[0]
let element = Object.assign(do... |
src/components/common/icons/Location.js | WendellLiu/GoodJobShare | import React from 'react';
/* eslint-disable */
const Like = (props) => (
<svg {...props} width="148" height="148" viewBox="0 0 148 148">
<path d="M54.6273469,0 C24.5072869,0 0,24.3716735 0,54.3280816 C0,62.1418776 1.60820528,69.6022857 4.77753902,76.5039184 C18.4358944,106.226245 44.6227611,137.606776 52.325138... |
L/some-new/src/index.js | imuntil/React | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
// If you want your app to work offline and load faster, you can change
// unregister() to register()... |
examples/counter/index.js | mikekidder/redux-devtools | import React from 'react';
import App from './containers/App';
React.render(
<App />,
document.getElementById('root')
);
|
src/svg-icons/notification/tap-and-play.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationTapAndPlay = (props) => (
<SvgIcon {...props}>
<path d="M2 16v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0 4v3h3c0-1.66-1.34-3-3-3zm0-8v2c4.97 0 9 4.03 9 9h2c0-6.08-4.92-11-11-11zM17 1.01L7 1c-1.1 0-2... |
examples/02 Drag Around/Naive/index.js | zetkin/react-dnd | import React, { Component } from 'react';
import Container from './Container';
import { Link } from 'react-router';
export default class DragAroundNaive extends Component {
constructor(props) {
super(props);
this.handleHideSourceClick = this.handleHideSourceClick.bind(this);
this.state = {
hideSour... |
src/svg-icons/content/backspace.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentBackspace = (props) => (
<SvgIcon {...props}>
<path d="M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12... |
actor-apps/app-web/src/app/components/Main.react.js | liruqi/actor-platform | import React from 'react';
import {PeerTypes} from 'constants/ActorAppConstants';
import requireAuth from 'utils/require-auth';
import ActorClient from 'utils/ActorClient';
import PeerUtils from 'utils/PeerUtils';
import RouterContainer from 'utils/RouterContainer';
import DialogActionCreators from 'actions/DialogAc... |
app/containers/LanguageProvider/index.js | gitlab-classroom/classroom-web | /*
*
* LanguageProvider
*
* this component connects the redux state language locale to the
* IntlProvider component and i18n messages (loaded from `app/translations`)
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { IntlProvider } from 'reac... |
docs/src/examples/views/Statistic/Content/StatisticExampleValue.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Icon, Image, Statistic } from 'semantic-ui-react'
const StatisticExampleValue = () => (
<Statistic.Group>
<Statistic>
<Statistic.Value>22</Statistic.Value>
<Statistic.Label>Saves</Statistic.Label>
</Statistic>
<Statistic>
<Statistic.Value text>
... |
docs/src/app/components/pages/components/DatePicker/ExampleToggle.js | nathanmarks/material-ui | import React from 'react';
import DatePicker from 'material-ui/DatePicker';
import Toggle from 'material-ui/Toggle';
const optionsStyle = {
maxWidth: 255,
marginRight: 'auto',
};
/**
* This example allows you to set a date range, and to toggle `autoOk`, and `disableYearSelection`.
*/
export default class DatePi... |
test/helpers/shallowRenderHelper.js | yasincanakmehmet/reactCardMatching | /**
* 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'... |
packages/react-scripts/fixtures/kitchensink/src/features/env/ExpandEnvVariables.js | amido/create-react-app | /**
* 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 from 'react';
export default () => (
<span>
<span id="feature-expand-env-1">{process.env.REACT_APP_BASIC}</span>
... |
app/javascript/mastodon/features/pinned_statuses/index.js | primenumber/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { fetchPinnedStatuses } from '../../actions/pin_statuses';
import Column from '../ui/components/column';
import ColumnBackButtonSlim from '../../compon... |
react/react-16.2.0/packages/react-dom/src/test-utils/ReactTestUtils.js | isubham/isubham.github.io | /**
* Copyright (c) 2013-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 from 'react';
import ReactDOM from 'react-dom';
import {findCurrentFiberUsingSlowPath} from 'react-reconciler/reflection';
... |
app/components/Header.js | kassyn/me | import React from 'react';
import { Link } from 'react-router';
class Header extends React.Component {
constructor(props) {
super( props );
this.state = {
active : false
};
}
handleToggle() {
this.setState({
active : !this.state.active
});
}
getUserFloat() {
return (
<div className="user-p... |
js/app.js | jfrost2420/student_response_front | /**
*
* app.js
*
* This is the entry file for the application, mostly just setup and boilerplate
* code. Routes are configured at the end of this file!
*
*/
// Import all the third party stuff
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import createBr... |
src/components/Classification/ViewClassification/ViewClassification.js | City-of-Helsinki/helerm-ui | import React from 'react';
import PropTypes from 'prop-types';
import { Link, withRouter } from 'react-router-dom';
import ClassificationHeader from '../Header/ClassificationHeader';
import VersionSelector from '../VersionSelector/VersionSelector';
import './ViewClassification.scss';
export class ViewClassification ... |
webpack/ForemanTasks/Components/TasksDashboard/Components/TasksCardsGrid/TasksCardsGrid.stories.js | ares/foreman-tasks | import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs, object, select } from '@storybook/addon-knobs';
import { action } from '@storybook/addon-actions';
import {
TASKS_DASHBOARD_AVAILABLE_TIMES,
TASKS_DASHBOARD_AVAILABLE_QUERY_STATES,
TASKS_DASHBOARD_AVAILABLE_QUERY_RESULTS... |
react/LanguageIcon/LanguageIcon.js | seekinternational/seek-asia-style-guide | import svgMarkup from './LanguageIcon.svg';
import React from 'react';
import Icon from '../private/Icon/Icon';
export default function LanguageIcon(props) {
return <Icon markup={svgMarkup} {...props} />;
}
LanguageIcon.displayName = 'LanguageIcon';
|
clients/libs/slate-editor-state-logger/src/StateLoggerButton.js | nossas/bonde-client | import React from 'react'
import FontAwesome from 'react-fontawesome'
import beautify from 'json-beautify'
import { Button } from '@slate-editor/components'
// eslint-disable-next-line react/prop-types
const StateLoggerButton = ({ value, className, style, type }) => (
<div>
<Button
className={className}
... |
src/index.js | scienceai/capture-submit | import React, { Component } from 'react';
const ENTER_KEY_CODE = 13;
export default function CaptureSubmit(ComposedComponent) {
return class extends Component {
constructor(props) {
super(props);
this.state = {
value: props.value
};
}
componentWillReceiveProps(nextProps) {
... |
actor-apps/app-web/src/app/components/modals/invite-user/ContactItem.react.js | lzpfmh/actor-platform | /*
* Copyright (C) 2015 Actor LLC. <https://actor.im>
*/
import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
import classnames from 'classnames';
import InviteUserStore from 'stores/InviteUserStore';
import { AsyncActionStates } from 'constants/ActorAppConstants';
i... |
app/javascript/mastodon/features/direct_timeline/index.js | KnzkDev/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import Column from '../../components/column';
import ColumnHeader from '../../components/column_header';
import { mountConversations, unmountConversations, expandConversations } from '../../actions/conversations';
impo... |
shared/components/SubComponents/Question/DatePick.js | KCPSoftware/KCPS-React-Starterkit | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { saveQuestion } from '../../../actions/questionActions';
import Validation from '../../../utils/validation/Validation';
import moment from 'moment';
import { TooltipTrigger } from 'pui-react-tooltip'
import InputValidation from '..... |
src/components/Table/TableRouteCell/TableRouteCell.stories.js | auth0-extensions/auth0-extension-ui | import React from 'react';
import { storiesOf } from '@kadira/storybook';
import TableRouteCell from './';
storiesOf('TableRouteCell', module)
.add('default view', () => (
<TableRouteCell route={'/someroute'}>Route name</TableRouteCell>
));
|
fluent-react/examples/higher-order/src/index.js | zbraniecki/fluent.js | import React from 'react';
import ReactDOM from 'react-dom';
import { LocalizationProvider } from 'fluent-react/compat';
import { generateBundles } from './l10n';
import App from './App';
ReactDOM.render(
<LocalizationProvider bundles={generateBundles(navigator.languages)}>
<App />
</LocalizationProvider>,
... |
src/svg-icons/file/folder-open.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let FileFolderOpen = (props) => (
<SvgIcon {...props}>
<path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"/>
</SvgIcon>
);
FileFolderOpen = pure(F... |
app/components/vultask/SearchAssets.js | superhuahua/xunfengES | import React from 'react';
import { Form, Input, Icon, Button, notification } from 'antd';
const FormItem = Form.Item;
import axios from 'axios';
import ShowResult from './ShowResult';
import CreateTask from './CreateTask';
class SearchAssets extends React.Component{
constructor(props){
super(props);
... |
docs/pages/nopreview.js | woshisbb43/coinMessageWechat | import React from 'react';
import FontAwesome from 'react-fontawesome';
import './nopreview.less';
//import { Button } from 'react-weui';
const NoPreview = (props) =>
(
<div className="App__preview--none">
<FontAwesome name="weixin" size="4x" />
<p>{props.langs.nopreview}</p>
</div>
);
export defa... |
app/javascript/mastodon/features/compose/components/warning.js | yi0713/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
export default class Warning extends React.PureComponent {
static propTypes = {
message: PropTypes.node.isRequired,
};
render () {
const { mes... |
frontend/src/components/RestrictedRoute.js | textilemuseum/spinningjenny | import React from 'react'
import { Route, Redirect } from 'react-router-dom'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
const RestrictedRoute = ({ component: Component, authed, ...rest }) => (
<Route
{...rest}
render={props =>
authed
? <Component
{...props}
{...rest}
/>
... |
site/src/components/List.js | sapegin/react-styleguidist | import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { Stack } from './Stack';
import styles from './List.module.css';
export const List = ({ children, className, ...rest }) => (
<Stack as="ul" gap="s" className={clsx(styles.list, className)} {...rest}>
{children}
</Stack>... |
analysis/warriorarms/src/modules/core/Execute/MortalStrike.js | anom0ly/WoWAnalyzer | import { t } from '@lingui/macro';
import { formatPercentage } from 'common/format';
import SPELLS from 'common/SPELLS';
import { SpellLink } from 'interface';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import calculateMaxCasts from 'parser/core/calculateMaxCasts';
import Events from 'parser/core... |
src/components/FileEditor/FileEditor.react.js | 6congyao/CGB-Dashboard | /*
* Copyright (c) 2016-present, Parse, LLC
* All rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/
import hasAncestor from 'lib/hasAncestor';
import Parse from 'parse';
import React from 'react';
import styles from 'compo... |
src/routes.js | donleyac/ultimate-tictactoe | import React from 'react';
import {HashRouter as Router, Route} from 'react-router-dom'
import Home from './pages/Home.js';
import Local from './pages/Local.js';
import Multiplayer from './pages/Multiplayer.js';
export default(
<Router>
<div>
<Route exact path='/' component={Home}/>
... |
src/modules/modui/TodoItem.js | scrollback/pure | import React, { Component } from 'react';
import * as Constants from '../../lib/Constants';
import config from './config';
const styles = {
row: {
display: 'block',
},
link: {
textDecoration: 'none',
color: '#333333',
},
name: {
fontWeight: 'bold',
},
body: {
},
creator: {
fontStyle: 'italic',
},
... |
src/svg-icons/notification/airline-seat-flat-angled.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAirlineSeatFlatAngled = (props) => (
<SvgIcon {...props}>
<path d="M22.25 14.29l-.69 1.89L9.2 11.71l2.08-5.66 8.56 3.09c2.1.76 3.18 3.06 2.41 5.15zM1.5 12.14L8 14.48V19h8v-1.63L20.52 19l.69-1.89-19.... |
src/SparklinesBars.js | okonet/react-sparklines | import React from 'react';
export default class SparklinesBars extends React.Component {
static propTypes = {
points: React.PropTypes.arrayOf(React.PropTypes.object),
height: React.PropTypes.number,
style: React.PropTypes.object,
barWidth: React.PropTypes.number
};
static ... |
src/client/components/Navigation/Notifications/NotificationMention.js | busyorg/busy | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { FormattedMessage, FormattedRelative } from 'react-intl';
import { Link } from 'react-router-dom';
import Avatar from '../../Avatar';
import { epochToUTC } from '../../../helpers/formatter';
import './Notificatio... |
website/core/WebPlayer.js | tadeuzagallo/react-native | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
app/containers/App/index.js | Princess310/antd-demo | /**
*
* App.react.js
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If... |
src/TabPane.js | mengmenglv/react-bootstrap | import React from 'react';
import deprecationWarning from './utils/deprecationWarning';
import Tab from './Tab';
const TabPane = React.createClass({
componentWillMount() {
deprecationWarning(
'TabPane', 'Tab',
'https://github.com/react-bootstrap/react-bootstrap/pull/1091'
);
},
render() {
... |
src/client.js | yomolify/customer-webserver | /**
* THIS IS THE ENTRY POINT FOR THE CLIENT, JUST LIKE server.js IS THE ENTRY POINT FOR THE SERVER.
*/
import 'babel/polyfill';
import React from 'react';
import BrowserHistory from 'react-router/lib/BrowserHistory';
import Location from 'react-router/lib/Location';
import queryString from 'query-string';
import cre... |
src/@ui/ThumbnailCard/ThumbnailCard.stories.js | NewSpring/Apollos | import React from 'react';
import { View } from 'react-native';
import { storiesOf } from '@storybook/react-native';
import ThumbnailCard from './';
const containerStyles = {
flex: 1,
justifyContent: 'center',
backgroundColor: '#f7f7f7',
};
storiesOf('ThumbnailCard', module)
.add('Default', () => (
<View... |
jenkins-design-language/src/js/components/material-ui/svg-icons/image/nature.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageNature = (props) => (
<SvgIcon {...props}>
<path d="M13 16.12c3.47-.41 6.17-3.36 6.17-6.95 0-3.87-3.13-7-7-7s-7 3.13-7 7c0 3.47 2.52 6.34 5.83 6.89V20H5v2h14v-2h-6v-3.88z"/>
</SvgIcon>
);
ImageNature.displayName = 'ImageNature';
ImageNa... |
assets/jqwidgets/demos/react/app/datetimeinput/localization/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxDateTimeInput from '../../../jqwidgets-react/react_jqxdatetimeinput.js';
import JqxDropDownList from '../../../jqwidgets-react/react_jqxdropdownlist.js';
class App extends React.Component {
componentDidMount() {
this.refs.myDropDownLis... |
src/svg-icons/maps/directions-railway.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsDirectionsRailway = (props) => (
<SvgIcon {...props}>
<path d="M4 15.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V5c0-3.5-3.58-4-8-4s-8 .5-8 4v10.5zm8 1.5c-1.1 0-2-.9-2-2s.9-2 2... |
test/rrv4-test.js | mjrussell/redux-auth-wrapper | /* eslint-env node, mocha, jasmine */
import React from 'react'
import createMemoryHistory from 'history/createMemoryHistory'
import { Router, Route, Switch } from 'react-router'
import { Provider } from 'react-redux'
import { createStore, applyMiddleware, combineReducers } from 'redux'
import { mount } from 'enzyme'
i... |
app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js | koba-lab/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { EmojiPicker as EmojiPickerAsync } from '../../ui/util/async-components';
import Overlay from 'react-overlays/lib/Overlay';
import classNames from 'classnames';
import Immuta... |
app/javascript/mastodon/features/standalone/public_timeline/index.js | gol-cha/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { expandPublicTimeline, expandCommunityTimeline } from 'mastodon/actions/timelines';
import Masonry from 'react-masonry-infinite';
import { List as Imm... |
src/client.js | cineindustria/site | /**
* 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 ReactDOM from 'react-... |
examples/focus/app.js | orokos/react-tabs | import React from 'react';
import { Tab, Tabs, TabList, TabPanel } from '../../lib/main';
const App = React.createClass({
handleInputChange() {
this.forceUpdate();
},
render() {
return (
<div style={{padding: 50}}>
<Tabs>
<TabList>
<Tab>First</Tab>
<Tab>Second</Tab>
</Ta... |
react-table/src/components/Table.js | wulv/fe-example | import React, { Component } from 'react';
import Tr from './Tr';
export default class Table extends Component {
render() {
const tableData = this.props.data;
return (
<div className="zent-table ">
<div className="thead">
<div className="stickrow tr">
... |
src/components/student-vis/studentvis-config.es6.js | widged/SOT-skills-report | /* jshint esnext: true */
import React from 'react';
let {Component} = React;
export default class StudentChart {
static getFieldColor(value) {
var colors = {
'Engineering' : '#1565c0',
'Science' : '#CC8A98',
'Business' : '#e65100',
'Design' : '#1b5e20'... |
v7/development/src/templates/post/comments/comments.js | BigBoss424/portfolio | /* Vendor imports */
import React from 'react'
import PropTypes from 'prop-types'
/* App imports */
import Config from '../../../../config'
import style from './comments.module.less'
class Comments extends React.Component {
componentDidMount() {
const { pageCanonicalUrl, pageId } = this.props
if (window.DIS... |
components/list/ListSubHeader.js | KerenChandran/react-toolbox | import React from 'react';
import style from './style';
const ListSubHeader = (props) => {
let className = style.subheader;
if (props.className) className += ` ${props.className}`;
return <h5 className={className}>{props.caption}</h5>;
};
ListSubHeader.propTypes = {
caption: React.PropTypes.string,
classNam... |
jenkins-design-language/src/js/components/material-ui/svg-icons/device/battery-charging-full.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const DeviceBatteryChargingFull = (props) => (
<SvgIcon {...props}>
<path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zM11 20v-5.5H9L13 7v5.5h2L11 20z"/>
</SvgIco... |
src/components/controls/Icons/TrophyIcon.js | TTCErembodegem/TTC-React-Front | import PropTypes from 'prop-types';
import React from 'react';
import {Icon} from './Icon.js';
export const TrophyIcon = ({style = undefined, color = '#FCB514'}) => (
<Icon fa="fa fa-trophy" color={color} style={style} translate tooltip="teamCalendar.matchesWon" />
);
TrophyIcon.propTypes = {
style: PropTypes.obj... |
docs/src/app/components/pages/components/TextField/ExampleDisabled.js | ArcanisCz/material-ui | import React from 'react';
import TextField from 'material-ui/TextField';
const TextFieldExampleDisabled = () => (
<div>
<TextField
disabled={true}
hintText="Disabled Hint Text"
/><br />
<TextField
disabled={true}
id="text-field-disabled"
defaultValue="Disabled Value"
/>... |
src/js/components/icons/base/SocialVine.js | odedre/grommet-final | /**
* @description SocialVine SVG Icon.
* @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon.
* @property {string} colorIndex - The color identifier to use for the stroke color.
* If not specified, this component will default to muiTheme.palette.textColor.
* ... |
node_modules/semantic-ui-react/src/modules/Dropdown/DropdownDivider.js | mowbell/clickdelivery-fed-test | import cx from 'classnames'
import PropTypes from 'prop-types'
import React from 'react'
import {
customPropTypes,
getElementType,
getUnhandledProps,
META,
} from '../../lib'
/**
* A dropdown menu can contain dividers to separate related content.
*/
function DropdownDivider(props) {
const { className } = ... |
src/components/docs/grid.js | nordsoftware/react-foundation-docs | import React from 'react';
import Playground from 'component-playground';
import {
Breakpoints,
Colors,
Grid,
Cell,
Block,
Callout,
Thumbnail,
} from 'react-foundation';
export const GridDocs = () => (
<section className="grid-docs">
<Grid>
<Cell large={12}>
<h2>Grid</h2>
<div... |
src/internal/EnhancedSwitch.js | pradel/material-ui | import React from 'react';
import EventListener from 'react-event-listener';
import keycode from 'keycode';
import transitions from '../styles/transitions';
import FocusRipple from './FocusRipple';
import TouchRipple from './TouchRipple';
import Paper from './../Paper';
import warning from 'warning';
function getStyle... |
src/js/components/PersonListItem.js | grommet/grommet-people-finder | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React from 'react';
import PropTypes from 'prop-types';
import ListItem from 'grommet/components/ListItem';
import Box from 'grommet/components/Box';
import Image from 'grommet/components/Image';
import UserIcon from 'grommet/components/icons/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.