path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
packages/@lyra/google-maps-input/src/GeopointInput.js | VegaPublish/vega-studio | import PropTypes from 'prop-types'
import React from 'react'
import config from 'config:@lyra/google-maps-input'
import Button from 'part:@lyra/components/buttons/default'
import Dialog from 'part:@lyra/components/dialogs/default'
import Fieldset from 'part:@lyra/components/fieldsets/default'
import {
PatchEvent,
s... |
src/components/Header/index.js | jefflau/jefflau.net | import React from 'react'
import Link from 'gatsby-link'
const Header = ({ pages }) =>
<header className="site-header">
<h1 className="logo">
<Link
to="/"
style={{
color: 'white',
textDecoration: 'none',
}}
>
Jeff Lau
</Lin... |
client/components/users/email-enrollment-form.js | ShannChiang/meteor-react-redux-base | import React from 'react';
export default class extends React.Component {
constructor(props) {
super(props);
this.state = {uiState: 'INIT'};
this.onSubmit = this.onSubmit.bind(this);
}
onSubmit(e) {
e.preventDefault();
this.setState({uiState: 'SENDING'});
this.props.enrollWithEmail(this.... |
es/components/sidebar/panel-element-editor/attributes-editor/attributes-editor.js | dearkaran/react-planner | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ItemAttributesEditor from './item-attributes-editor';
import LineAttributesEditor from './line-attributes-editor';
import HoleAttributesEditor from './hole-attributes-editor';
export default function AttributesEditor(_ref) {
var ele... |
examples/todos-with-undo/src/index.js | heyesther/redux | import React from 'react'
import { render } from 'react-dom'
import { createStore } from 'redux'
import { Provider } from 'react-redux'
import App from './components/App'
import reducer from './reducers'
const store = createStore(reducer)
render(
<Provider store={store}>
<App />
</Provider>,
document.getEle... |
docs/src/components/Playground/Atoms/TextLink/TextLink.js | seekinternational/seek-asia-style-guide | import styles from './TextLink.less';
import React from 'react';
import PropTypes from 'prop-types';
import ChevronIcon from 'seek-asia-style-guide/react/ChevronIcon/ChevronIcon';
import classnames from 'classnames';
const renderChevron = chevron => {
if (!chevron) {
return null;
}
return (
<ChevronIco... |
examples/BackgroundImage/__tests__/index.ios.js | thekevinscott/Hero-test | import 'react-native';
import React from 'react';
import Index from '../index.ios.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
src/AccordionItem/test.js | daviferreira/react-sanfona | 'use strict';
import expect from 'unexpected';
import sd from 'skin-deep';
import React from 'react';
import AccordionItem from './index';
describe('AccordionItem Test Case', () => {
let vdom, instance;
it('should render', () => {
const tree = sd.shallowRender(<AccordionItem />);
instance = tree.getMoun... |
app/javascript/mastodon/features/ui/index.js | amazedkoumei/mastodon | import classNames from 'classnames';
import React from 'react';
import { HotKeys } from 'react-hotkeys';
import { defineMessages, injectIntl } from 'react-intl';
import { connect } from 'react-redux';
import { Redirect, withRouter } from 'react-router-dom';
import PropTypes from 'prop-types';
import NotificationsContai... |
generators/app/templates/app/assets/javascript/containers/home/index.js | ajaykumaryadav/react-bootstrap | import React, { Component } from 'react';
import { browserHistory } from 'react-router';
import Header from '../../components/shared/header'
class homeContainer extends Component {
render() {
return (
<section>
<Header />
{this.props.children}
<div className="container">
... |
src/components/ui/content/index.js | boxal/boxal | import React from 'react';
function Content({
children,
isVisible = true,
}) {
return (
<div style={style[isVisible]}>
{isVisible ? children : null}
</div>
);
}
const style = {
[true]: {},
[false]: {
display: 'none',
},
};
Content.propTypes = {
children: React.PropTypes.node,
isVi... |
src/Tag.js | captainill/react-tag-select | /* eslint react/no-multi-comp: 0 */
import React, { Component } from 'react';
class Tag extends Component {
static propTypes = {
labelField: React.PropTypes.string,
onDelete: React.PropTypes.func.isRequired,
tag: React.PropTypes.object.isRequired,
removeComponent: React.PropTypes.func,
readOnly: ... |
cm19/ReactJS/your-first-react-app-exercises-master/exercise-17/Header.js | Brandon-J-Campbell/codemash | import React from 'react';
import classNames from 'classnames';
// import theme from './theme/static';
import ThemeContext from './theme/context';
import ThemeSwitcher from './theme/Switcher';
import styles from './Header.css';
export default function Header() {
return (
<ThemeContext.Consumer>
{({ theme... |
src/svg-icons/action/perm-phone-msg.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPermPhoneMsg = (props) => (
<SvgIcon {...props}>
<path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.2... |
pages/discover-more/related-projects.js | cherniavskii/material-ui | import React from 'react';
import withRoot from 'docs/src/modules/components/withRoot';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import markdown from 'docs/src/pages/discover-more/related-projects/related-projects.md';
function Page() {
return <MarkdownDocs markdown={markdown} />;
}
expo... |
components/styled-links.js | kentcdodds/glamorous-website | import React from 'react'
import Link from 'next/link'
import glamorous from 'glamorous'
import {colors} from '../styles/global-styles'
const getPathname = pathname => {
return pathname === undefined ? '' : pathname
}
const basicLinkStyles =
// @css
{cursor: 'pointer'}
const anchorStyles =
// @css
{
te... |
examples/async/index.js | dimaip/redux | import 'babel-core/polyfill';
import React from 'react';
import { Provider } from 'react-redux';
import App from './containers/App';
import configureStore from './store/configureStore';
const store = configureStore();
React.render(
<Provider store={store}>
{() => <App />}
</Provider>,
document.getElementByI... |
src/svg-icons/maps/local-taxi.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalTaxi = (props) => (
<SvgIcon {...props}>
<path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5H15V3H9v2H6.5c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.4... |
frontend/src/components/app.js | bhtucker/streamkov | import React from 'react'
import VisibleChainList from '../containers/VisibleChainList'
import Sampler from './Sampler'
import UrlEntryBox from './UrlEntryBox'
const App = () => (
<div>
<h1>Streamkov</h1>
<VisibleChainList />
<Sampler />
<UrlEntryBox />
</div>
)
export default App
|
ui/src/components/footer.js | jollopre/mps | import React from 'react';
const style = {
position: 'absolute',
right: 0,
bottom: 0,
left:0,
minHeight: '50px',
padding: '1rem',
textAlign: 'center',
backgroundColor: '#222',
color: '#fff',
fontSize: 'small',
};
export const Footer = function(){
return (
<div style={style}>
<ul className="list-inline"... |
src/index.js | weixing2014/iTodo | import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { createStore } from 'redux'
import todoApp from './reducers'
import App from './components/App'
let store = createStore(todoApp)
render(
<Provider store={store}>
<App />
</Provider>,
document.getEleme... |
app/src/components/AliasModal.js | GetStream/Winds | import React from 'react';
import PropTypes from 'prop-types';
import ReactModal from 'react-modal';
import { Img } from 'react-image';
import { connect } from 'react-redux';
import fetch from '../util/fetch';
import { getAliases } from '../api';
import saveIcon from '../images/icons/save.svg';
import exitIcon from '.... |
docs/src/app/pages/components/Avatar/FallbackAvatar.js | GetAmbassador/react-ions | import React from 'react'
import Avatar from 'react-ions/lib/components/Avatar'
import Button from 'react-ions/lib/components/Button'
import style from './style.scss'
class ExampleAvatar extends React.Component {
constructor(props) {
super(props)
}
state = {
letters: 'cf',
size: '100'
}
randomi... |
Libraries/TabBar/TabBar.web.js | brainpoint/citong-react-web | /**
* Copyright (c) 2015-present, Alibaba Group Holding Limited.
* All rights reserved.
*
* @providesModule ReactTabBar
*/
'use strict';
import React from 'react';
import View from 'ReactView';
import TabBarItem from './TabBarItem.web';
import TabBarContents from './TabBarContents.web';
import assign from 'object... |
react-flux-mui/js/material-ui/src/svg-icons/av/replay.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvReplay = (props) => (
<SvgIcon {...props}>
<path d="M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"/>
</SvgIcon>
);
AvReplay = pure(AvReplay);
AvReplay... |
app/static/src/diagnostic/EquipmentForm_modules/NewManufacturerForm.js | SnowBeaver/Vision | import React from 'react';
import FormControl from 'react-bootstrap/lib/FormControl';
import FormGroup from 'react-bootstrap/lib/FormGroup';
import ControlLabel from 'react-bootstrap/lib/ControlLabel';
import Button from 'react-bootstrap/lib/Button';
import Panel from 'react-bootstrap/lib/Panel';
import {findDOMNode} f... |
src/lib/topics.js | trujunzhang/IEATTA-web | import Telescope from '../components/lib/index';
import React from 'react';
let _ = require('underscore');
const Topics = {};
export default Topics;
|
[3]. Demo_native/skin_demo/__tests__/index.ios.js | knightsj/RN_Demo | import 'react-native';
import React from 'react';
import Index from '../index.ios.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
react/src/components/dashboard/settings/settings.daemonStdoutPanel.js | pbca26/EasyDEX-GUI | import React from 'react';
import translate from '../../../translate/translate';
import { connect } from 'react-redux';
import { coindGetStdout } from '../../../actions/actionCreators';
import Store from '../../../store';
class DaemonStdoutPanel extends React.Component {
constructor() {
super();
this.state =... |
src/components/ShareMenu/WaitingOverlay.js | Charlie9830/pounder | import React from 'react';
import { Modal, Grid, CircularProgress, Typography } from '@material-ui/core';
const WaitingOverlay = (props) => {
let gridStyle = {
width: '100%',
height: '100%',
}
return (
<Modal open={props.open} disableAutoFocus={true}>
<Grid container st... |
app/javascript/mastodon/components/domain.js | salvadorpla/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import IconButton from './icon_button';
import { defineMessages, injectIntl } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
const messages = defineMessages({
unblockDomain: { id: 'account.unblock_domain', default... |
src/jsx/components/AddTransaction.js | luckychain/lucky | import React from 'react';
import Textarea from 'react-textarea-autosize';
import {Grid, Row, Col, Panel, FormGroup, Radio} from 'react-bootstrap';
import AppActions from '../actions/AppActions';
class AddTransaction extends React.Component {
handleSubmit(event) {
event.preventDefault();
var type = event.ta... |
node_modules/eslint-config-airbnb/test/test-react-order.js | edsrupp/eds-mess | import test from 'tape';
import { CLIEngine } from 'eslint';
import eslintrc from '../';
import baseConfig from '../base';
import reactRules from '../rules/react';
const cli = new CLIEngine({
useEslintrc: false,
baseConfig: eslintrc,
// This rule fails when executing on text.
rules: {indent: 0},
});
function... |
src/v2/stories/EmbeddedChannel.stories.js | aredotna/ervell | import React from 'react'
import { storiesOf } from '@storybook/react'
import Specimen from 'v2/stories/__components__/Specimen'
import { EmbeddedChannel } from 'v2/pages/channel/EmbeddedChannelPage/components/EmbeddedChannel'
storiesOf('EmbeddedChannel', module).add('default', () => (
<Specimen>
<EmbeddedChan... |
react/L3/src/pages/Child.js | luolisave/starters | import React from 'react';
import {bindActionCreators} from 'redux';
import { connect } from 'react-redux';
import uuidv4 from 'uuid/v4';
// functions, should put to seperate file later.
function clone(obj) {
if (null === obj || "object" !== typeof obj) return obj;
var copy = obj.constructor();
for (var at... |
src/containers/Asians/TabControls/PreliminaryRounds/EnterRoundResults/TraineeFeedback/index.js | westoncolemanl/tabbr-web | import React from 'react'
import { connect } from 'react-redux'
import Instance from './Instance'
import ListSubheader from 'material-ui/List/ListSubheader'
export default connect(mapStateToProps)(({
round,
rooms,
adjudicatorScores
}) => {
const filterRooms = roomToMatch => roomToMatch.round === round._id
c... |
js/Details.js | aurimas-darguzis/react-intro | import React from 'react'
import { connect } from 'react-redux'
import { getOMDBDetails } from './actionCreators'
import Header from './Header'
const { shape, string, func } = React.PropTypes
const Details = React.createClass({
propTypes: {
show: shape({
title: string,
year: string,
poster: str... |
src/svg-icons/editor/vertical-align-bottom.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorVerticalAlignBottom = (props) => (
<SvgIcon {...props}>
<path d="M16 13h-3V3h-2v10H8l4 4 4-4zM4 19v2h16v-2H4z"/>
</SvgIcon>
);
EditorVerticalAlignBottom = pure(EditorVerticalAlignBottom);
EditorVertical... |
assets/node_modules/recompose/renderComponent.js | janta-devs/nyumbani | 'use strict';
exports.__esModule = true;
var _createHelper = require('./createHelper');
var _createHelper2 = _interopRequireDefault(_createHelper);
var _createEagerFactory = require('./createEagerFactory');
var _createEagerFactory2 = _interopRequireDefault(_createEagerFactory);
function _interopRequireDefault(obj... |
frontend/src/main/web/src/legacy.js | mvehar/zanata-server | /*
* Copyright 2016, Red Hat, Inc. and individual contributors as indicated by the
* @author tags. See the copyright.txt file in the distribution for a full
* listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public ... |
src/BasicHtmlEditor.js | dburrows/draft-js-basic-html-editor | import React from 'react';
import ReactDOM from 'react-dom';
import debounce from 'lodash/debounce';
import {
Editor,
EditorState,
ContentState,
Entity,
RichUtils,
convertToRaw,
CompositeDecorator,
Modifier
} from 'draft-js';
import htmlToContent from './utils/htmlToContent';
import draftRawToHtml from... |
app/react-icons/fa/gift.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaGift extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m23.7 30.3v-16h-7.1v16q0 0.5 0.4 0.8t1 0.3h4.3q0.6 0 1-0.3t0.4-0.8z m-10.2-18.9... |
template/src/renderer/components/tempaltes/Main/Main.js | my-dish/template-electron | // @flow
import React from 'react';
import styles from './style.css';
type Props = {
left: React.Component<*>;
right: React.Component<*>;
children: React.Component<*>;
};
const Main = (props: Props) => (
<div className={styles.container}>
<div className={styles.left}>{props.left}</div>
{
props.... |
hello world/1.7 - router/src/components/routerList.js | wumouren/react-demo | import React from 'react';
export default class IndexList extends React.Component{
render(){
return (
<div>
<h1>这是主要内容列表</h1>
</div>
)
}
} |
frontend/node_modules/react-recaptcha/example/main.js | andres81/auth-service | import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import Recaptcha from '../src';
// site key
const sitekey = 'xxxxxxx';
// specifying your onload callback function
const callback = () => {
console.log('Done!!!!');
};
const verifyCallback = (response) => {
console.log(response... |
test/specs/addons/Select/Select-test.js | mohammed88/Semantic-UI-React | import React from 'react'
import Select from 'src/addons/Select/Select'
import Dropdown from 'src/modules/Dropdown/Dropdown'
import * as common from 'test/specs/commonTests'
const requiredProps = {
options: [],
}
describe('Select', () => {
common.isConformant(Select, requiredProps)
common.hasSubComponents(Sele... |
client/extensions/woocommerce/app/promotions/fields/checkbox-field.js | Automattic/woocommerce-connect-client | /** @format */
/**
* External dependencies
*/
import React from 'react';
import PropTypes from 'prop-types';
import { omit } from 'lodash';
/**
* Internal dependencies
*/
import FormCheckbox from 'components/forms/form-checkbox';
import FormField from './form-field';
const CheckboxField = props => {
const { fie... |
old_examples/conditional/app.js | reactjs/react-tabs | import React from 'react';
import { render } from 'react-dom';
import { Tab, Tabs, TabList, TabPanel } from '../../src/index';
import '../../style/react-tabs.css';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
showA: true,
showB: true,
showC: true,
... |
src/svg-icons/maps/directions-bike.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsDirectionsBike = (props) => (
<SvgIcon {...props}>
<path d="M15.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM5 12c-2.8 0-5 2.2-5 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5zm0 8.5c-1.9 0-3.5-1.6-3.5-3.5s1.6-3.5 3.... |
src/containers/__tests__/views/browse-view-test.js | yursky/recommend | /**
* Test to check if the component renders correctly
*/
/* global it expect */
import 'react-native';
import React from 'react';
import renderer from 'react-test-renderer';
import BrowseView from '@containers/recipes/Browse/BrowseView';
it('BrowseView renders correctly', () => {
// getMeals prop expects a promi... |
src/Thumbnail.js | Cellule/react-bootstrap | import React from 'react';
import classSet from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const Thumbnail = React.createClass({
mixins: [BootstrapMixin],
getDefaultProps() {
return {
bsClass: 'thumbnail'
};
},
render() {
let classes = this.getBsClassSet();
if(this.pr... |
test/test-cases/public-path/src/app.js | seek-oss/sku | import React from 'react';
import styles from './app.less';
export default () => <div className={styles.root} />;
|
pages/profile.js | vinaypuppal/linklet-app | import React from 'react'
import NProgress from 'nprogress'
import Header from '../components/Header'
import FaGithub from 'react-icons/lib/fa/github'
import FaSignOut from 'react-icons/lib/fa/sign-out'
import ContainerPage from '../hocs/ContainerPage'
import PublicPage from '../hocs/PublicPage'
import { login, logou... |
client/app/components/playerList.js | dat2/hanabi-clone-web | import React from 'react'
import Player from './player'
class PlayerList extends React.Component {
render() {
let { players } = this.props
return (
<div>
{
players.map((p, pI) => (
<Player
key={pI}
player={p}
playerIndex={pI}
... |
pages/sass.js | murej/ansambel | import React from 'react'
import './example.scss'
import DocumentTitle from 'react-document-title'
import { config } from 'config'
export default class Sass extends React.Component {
render () {
return (
<DocumentTitle title={`${config.siteTitle} | Hi sassy friends`}>
<div>
<h1
... |
MobileApp/node_modules/react-native/local-cli/templates/HelloNavigation/views/welcome/WelcomeScreen.js | VowelWeb/CoinTradePros.com | 'use strict';
import React, { Component } from 'react';
import {
Image,
Platform,
StyleSheet,
} from 'react-native';
import ListItem from '../../components/ListItem';
import WelcomeText from './WelcomeText';
export default class WelcomeScreen extends Component {
static navigationOptions = {
title: 'Welc... |
internals/templates/appContainer.js | jdm85kor/sentbe | /**
*
* 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... |
examples/todomvc/index.js | hetony/redux-devtools | import React from 'react';
import App from './containers/App';
import 'todomvc-app-css/index.css';
React.render(
<App />,
document.getElementById('root')
);
|
frontend/src/containers/HomePage.js | OpenCollective/opencollective-website | import React, { Component } from 'react';
import { connect } from 'react-redux';
import Numbro from 'numbro';
import 'numbro/dist/languages'
import formatCurrency from '../lib/format_currency';
import i18n from '../lib/i18n';
import LoginTopBar from '../containers/LoginTopBar';
import MailChimpInputSection from '../c... |
src/client/home/components/FilterOptions/FilterOptions.js | noahamar/smlscrn | import R from 'ramda';
import React from 'react';
import classNames from 'classnames/bind';
import styles from './FilterOptions.styl';
const cx = classNames.bind(styles);
export default class FilterOptions extends React.Component {
constructor() {
super();
}
render() {
const options = this.props.opt... |
src/components/Feedback/Feedback.js | lagache/e-voting-client | /**
* 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 withStyles from 'isomorp... |
react/features/base/components/buttons/QuickActionButton.js | jitsi/jitsi-meet | // @flow
import { makeStyles } from '@material-ui/styles';
import React from 'react';
type Props = {
/**
* Label used for accessibility.
*/
accessibilityLabel: string,
/**
* Additional class name for custom styles.
*/
className: string,
/**
* Children of the component.
... |
examples/src/components/DisabledUpsellOptions.js | darrindickey/chc-select | import React from 'react';
import Select from 'react-select';
function logChange() {
console.log.apply(console, [].concat(['Select value changed:'], Array.prototype.slice.apply(arguments)));
}
var DisabledUpsellOptions = React.createClass({
displayName: 'DisabledUpsellOptions',
propTypes: {
label: React.PropType... |
docs/src/pages/customization/TypographyTheme.js | AndriusBil/material-ui | // @flow weak
import React from 'react';
import { MuiThemeProvider, createMuiTheme } from 'material-ui/styles';
import Typography from 'material-ui/Typography';
import Button from 'material-ui/Button';
function theme(outerTheme) {
return createMuiTheme({
typography: {
fontFamily:
'-apple-system,sy... |
src/index.js | ChronoBank/ChronoWAVES | import React from 'react';
import {Provider} from 'react-redux';
import ReactDOM from 'react-dom';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import injectTapEventPlugin from 'react-tap-event-plugin';
import './index.css';
import chronoTheme from './chrono-theme';
import store from './redux/st... |
src/frontend/components/copyable.js | mweibel/esrscan-desktop | import React from 'react'
import translation from './../translation'
const {clipboard} = require('electron')
export default class Copyable extends React.Component {
constructor () {
super()
this.state = {
'copied': false
}
}
onClick () {
var text = this.props.textToCopy || this.props.tex... |
src/views/Card/CardMeta.js | shengnian/shengnian-ui-react | import cx from 'classnames'
import _ from 'lodash'
import PropTypes from 'prop-types'
import React from 'react'
import {
childrenUtils,
customPropTypes,
getElementType,
getUnhandledProps,
META,
SUI,
useTextAlignProp,
} from '../../lib'
/**
* A card can contain content metadata.
*/
function CardMeta(pr... |
src/app/containers/WeatherStations/components/MapInfoWindow/spec/MapInfoWindow.component.spec.js | atSistemas/react-base | import { expect } from 'chai';
import React from 'react';
import ShallowRenderer from 'react-test-renderer/shallow';
import weatherStationsMock from 'mocks/weatherStations.json';
import { MapInfoWindow } from '../';
const setup = data => {
const props = {
main: data
};
const renderer = new ShallowRendere... |
docs/client.js | Cellule/react-bootstrap | import 'bootstrap/less/bootstrap.less';
import './assets/docs.css';
import './assets/style.css';
import './assets/carousel.png';
import './assets/logo.png';
import './assets/favicon.ico';
import './assets/thumbnail.png';
import './assets/thumbnaildiv.png';
import 'codemirror/mode/htmlmixed/htmlmixed';
import 'codemir... |
node_modules/react-virtualized/dist/es/Grid/Grid.jest.js | xuan6/admin_dashboard_local_dev | import _Object$keys from 'babel-runtime/core-js/object/keys';
import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babe... |
src/components/Nav.js | limal/wolnik | import React from 'react';
import { Link } from 'gatsby';
export default function Nav({ onMenuToggle = () => {} }) {
return (
<nav id="nav">
<ul>
<li className="special">
<a
href="#menu"
onClick={e => {
e.preventDefault();
onMenuToggle()... |
src/Input.js | victorzhang17/react-bootstrap | import React from 'react';
import InputBase from './InputBase';
import * as FormControls from './FormControls';
import deprecationWarning from './utils/deprecationWarning';
class Input extends InputBase {
render() {
if (this.props.type === 'static') {
deprecationWarning('Input type=static', 'StaticText');
... |
src/components/TodoList.js | JarmoLaine/ModernWebDev | import React from 'react';
import Todo from './Todo';
const TodoList = ({ todos, onRemove, onToggle }) =>
<div>
<h2>{todos.count()} items in my todo list</h2>
<ul>
{todos
.map((todo, i) =>
<Todo
key={i}
... |
src/main/index.js | tomaszkepa/san-antonio-tourist | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
<App />,
document.getElementById('app'),
);
|
app/javascript/mastodon/features/compose/components/privacy_dropdown.js | Chronister/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
import IconButton from '../../../components/icon_button';
import Overlay from 'react-overlays/lib/Overlay';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spr... |
js/components/inputgroup/regular.js | LetsBuildSomething/vmag_mobile |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Header, Title, Content, Button, Icon, Text, Body, Left, Right, Input, Item } from 'native-base';
import { Actions } from 'react-native-router-flux';
imp... |
src/Badge.js | 15lyfromsaturn/react-materialize | import React from 'react';
import cx from 'classnames';
class Badge extends React.Component {
render() {
let {
className, newIcon, children, ...props
} = this.props;
let classes = {
badge: true,
'new': newIcon
};
return (
<span className={cx(classes, className)} {...prop... |
spec/react/siteframe/header.spec.js | pivotal-cf/pivotal-ui | import React from 'react';
import ReactDOM from 'react-dom';
import {FlexCol} from '../../../src/react/flex-grids';
import {Header} from '../../../src/react/siteframe/header';
describe('Header', () => {
describe('with a string companyName', () => {
beforeEach(() => {
ReactDOM.render(<Header {...{companyNam... |
example/index.js | tether/react-download-ios | /**
* Dependencies.
*/
import React from 'react'
import ReactDOM from 'react-dom'
import Badge from '..'
/**
* Render badge.
*/
ReactDOM.render(
<Badge id="com.petrofeed.workidapp"/>,
document.querySelector('main')
)
|
client/src/components/SignupForm.js | richb-hanover/reactathon | import React from 'react';
import validator from 'validator';
import { FormErrors } from './partials';
import {
Button,
Input,
ButtonInput
} from 'react-bootstrap';
import { AppActions } from '../actions/AppActions';
import { AppStore } from '../stores/AppStore';
export class SignupForm extends React.Component... |
src/svg-icons/image/filter-center-focus.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilterCenterFocus = (props) => (
<SvgIcon {...props}>
<path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 9... |
src/layouts/Card/CardLayout.js | armaanshah96/lunchbox | import React from 'react'
import { IndexLink, Link } from 'react-router'
import PropTypes from 'prop-types'
import Avatar from 'material-ui/Avatar';
import Checkbox from 'material-ui/Checkbox';
import {Card, CardActions, CardHeader, CardText} from 'material-ui/Card';
import FileFolder from 'material-ui/FontIcon';
impor... |
app/components/Pages/Team.js | alexpell00/FRCUltimateManager | /*
* @Author: alexpelletier
* @Date: 2016-03-23 22:17:30
* @Last Modified by: alexpelletier
* @Last Modified time: 2016-03-24 05:44:31
*/
import React from 'react';
import request from 'superagent';
import MatchesTable from '../Elements/MatchesTable'
import PitStats from '../Elements/PitStats'
import RobotStats f... |
src/components/docs/callout.js | nordsoftware/react-foundation-docs | import React from 'react';
import Playground from 'component-playground';
import {
Colors,
Sizes,
Grid,
Cell,
Callout,
} from 'react-foundation';
export const CalloutDocs = () => (
<section className="callout-docs">
<Grid>
<Cell large={12}>
<h2>Callout</h2>
<div>
<h3>Ba... |
submissions/leoasis/src/JediSlot.js | staltz/flux-challenge | import React from 'react';
export default class JediSlot extends React.Component {
render() {
const { jedi } = this.props;
return <li className="css-slot">
{jedi && !jedi.fetching && <div style={jedi.isInCurrentPlanet ? { color: 'red' } : null}>
<h3>{jedi.name}</h3>
<h6>Homeworld: {jedi... |
Console/app/node_modules/rc-slider/es/common/Track.js | RisenEsports/RisenEsports.github.io | import _extends from 'babel-runtime/helpers/extends';
/* eslint-disable react/prop-types */
import React from 'react';
var Track = function Track(props) {
var className = props.className,
included = props.included,
vertical = props.vertical,
offset = props.offset,
length = props.length,
... |
docs/app/Examples/collections/Grid/Content/index.js | clemensw/stardust | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const GridContentExamples = () => (
<ExampleSection title='Content'>
<ComponentExample
title='Rows'
description='A r... |
src/client.js | MeetDay/dreampark-web | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { match, Router, browserHistory, applyRouterMiddleware } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import { ReduxAsyncConnect } from 'redux-async-connect'
import { useScroll ... |
src/components/LoginForm/LoginForm.js | Nuriddinkhuja/photoshare | import React, { Component } from 'react';
import { reduxForm, propTypes, Field } from 'redux-form';
import { Form, Input, Button } from 'semantic-ui-react';
import loginValidation from './loginValidation';
@reduxForm({
form: 'login',
validate: loginValidation
})
export default class LoginForm extends Comp... |
components/value_validation_component.js | KingHenne/react-common | import React from 'react';
import validate from '../utils/validate';
import validationStates from '../utils/validation_states';
// ValueValidationComponent is an abstract component.
// The static props of this class will not be inherited on IE <= 10,
// see: https://babeljs.io/docs/usage/caveats/#classes-10-and-below-... |
app/components/PreviewExperimentComponent.js | openexp/OpenEXP | // @flow
import React, { Component } from 'react';
import { Experiment } from 'jspsych-react';
import { Segment } from 'semantic-ui-react';
import callbackHTMLDisplay from '../utils/jspsych/plugins/callback-html-display';
import callbackImageDisplay from '../utils/jspsych/plugins/callback-image-display';
import {
par... |
src/layouts/layout-5-1.js | nuruddeensalihu/binary-next-gen | import React from 'react';
export default (components, className, onClick) => (
<div className={className} onClick={onClick}>
<div className="vertical">
{components[0]}
</div>
<div className="vertical">
{components[1]}
{components[2]}
{compone... |
src/components/PullRequest.js | nchaulet/bitbucket-team-pullrequests | import React from 'react';
import moment from 'moment';
import PullRequestDate from './PullRequestDate';
class PullRequest extends React.Component {
render() {
const {pr} = this.props;
const avatarStyle = {
marginRight: 10
};
const approved = pr.participants.reduce((... |
src/interface/ReportSelectionHeader.js | yajinni/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Trans } from '@lingui/macro';
import { ReactComponent as Logo } from 'interface/images/logo.svg';
import AlertWarning from 'interface/AlertWarning';
import { getReportHistory } from 'interface/selectors/repor... |
packages/react/src/components/SecondaryButton/SecondaryButton.js | carbon-design-system/carbon-components | /**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import Button from '../Button';
const SecondaryButton = (props) => <Button kind="secondary" {...props} />;
expor... |
app/js/todo/form.js | pengux/electron-react-starter | import React from 'react';
import TodoActions from './actions';
export default React.createClass({
create(e) {
e.preventDefault();
var task = this.refs.newTask.value;
TodoActions.create({"name": task});
},
render() {
return (
<form onSubmit={this.create}>
<label>
Add task
<input type="te... |
ui/src/common/BatchPlayButton.js | cloudsonic/sonic-server | import React from 'react'
import PropTypes from 'prop-types'
import {
Button,
useDataProvider,
useTranslate,
useUnselectAll,
useNotify,
} from 'react-admin'
import { useDispatch } from 'react-redux'
export const BatchPlayButton = ({
resource,
selectedIds,
action,
label,
icon,
className,
}) => {
... |
app/react-icons/fa/copyright.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaCopyright extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m28.7 24v2.4q0 1.1-0.8 2t-2.1 1.3-2.7 0.8-2.6 0.2q-4.6 0-7.6-3.1t-3.1-7.7q... |
client/src/routes.js | Enter-36-chambers-of-wu-tang-fam/Ilera-health | // React
import React from 'react';
import ReactDOM from 'react-dom';
// React Router
import { Router, Route, IndexRoute } from 'react-router';
//Authentication Requirement
import PhysicianAuth from './auth-shared/higher-order-components/physician_auth.jsx';
import PatientAuth from './auth-shared/higher-order-compone... |
src/svg-icons/image/burst-mode.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageBurstMode = (props) => (
<SvgIcon {...props}>
<path d="M1 5h2v14H1zm4 0h2v14H5zm17 0H10c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zM11 17l2.5-3.15L15.29 16l2.5-3.22L21 17H11z"/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.