path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
app/components/shared/DevTools.js | OldFresco/web-app-kiwwi | import React from 'react'
import { createDevTools } from 'redux-devtools'
import LogMonitor from 'redux-devtools-log-monitor'
import DockMonitor from 'redux-devtools-dock-monitor'
export default createDevTools(
<DockMonitor toggleVisibilityKey="ctrl-h"
changePositionKey="ctrl-w">
<LogMonitor />
... |
packages/mineral-ui-icons/src/IconFilter.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconFilter(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconProps}>... |
docs/src/BreadcrumbsPage.js | 15lyfromsaturn/react-materialize | import React from 'react';
import Row from '../../src/Row';
import Col from '../../src/Col';
import ReactPlayground from './ReactPlayground';
import PropTable from './PropTable';
import store from './store';
import Samples from './Samples';
import breadcrumbs from '../../examples/Breadcrumbs';
const component = 'Bread... |
scripts/create-component.js | frostney/react-app-starterkit | import fs from 'fs';
import minimist from 'minimist';
import mkdirp from 'mkdirp';
const argv = minimist(process.argv.slice(2));
const componentName = argv._[0];
const directory = `src/components/${componentName}`;
mkdirp.sync(directory);
fs.writeFileSync(`${directory}/README.md`, `This is ${componentName}`);
fs.wr... |
modules/experimental/AsyncProps.js | dashed/react-router | import React from 'react';
function shallowEqual(a, b) {
var ka = 0;
var kb = 0;
for (let key in a) {
if (a.hasOwnProperty(key) && a[key] !== b[key])
return false;
ka++;
}
for (let key in b)
if (b.hasOwnProperty(key))
kb++;
return ka === kb;
}
var AsyncProps = React.createClass({
... |
src/components/app.js | benjaminboruff/CityWeather | import React, { Component } from 'react';
import SearchBar from '../containers/search_bar';
import WeatherList from '../containers/weather_list';
export default class App extends Component {
render() {
return (
<div>
<SearchBar />
<WeatherList />
</div>
);
}
}
|
app/components/ToggleOption/index.js | gitlab-classroom/classroom-web | /**
*
* ToggleOption
*
*/
import React from 'react';
import { injectIntl, intlShape } from 'react-intl';
const ToggleOption = ({ value, message, intl }) => (
<option value={value}>
{intl.formatMessage(message)}
</option>
);
ToggleOption.propTypes = {
value: React.PropTypes.string.isRequired,
message: Rea... |
assets/js/container.js | Subash/sundar-nepal.subash.me | import React from 'react';
import Login from './login';
import Download from './download';
import Image from './image';
import Social from './social';
import Footer from './footer';
import Loading from './loading';
export default function(props) {
const { image, loading } = props.userData;
const defaultImage = '/i... |
node_modules/react-router/es6/Route.js | Karthik9321/ReduxSimpleStarter | import React from 'react';
import invariant from 'invariant';
import { createRouteFromReactElement } from './RouteUtils';
import { component, components } from './InternalPropTypes';
var _React$PropTypes = React.PropTypes;
var string = _React$PropTypes.string;
var func = _React$PropTypes.func;
/**
* A <Route> is use... |
src/layouts/CoreLayout/CoreLayout.js | transmute-industries/eth-faucet | import React from 'react'
import Navbar from 'components/common/Navbar'
import classes from './CoreLayout.scss'
import 'styles/core.scss'
import { PropTypes } from 'prop-types'
export const CoreLayout = ({ children }) => (
<div className={classes.container}>
<Navbar />
<div className={classes.children}>
... |
blueocean-material-icons/src/js/components/svg-icons/hardware/laptop.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const HardwareLaptop = (props) => (
<SvgIcon {...props}>
<path d="M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"/>
</SvgIcon>
);
HardwareLaptop.displayName = 'HardwareLaptop';
HardwareLaptop... |
src/Parser/Monk/Windwalker/Modules/Spells/BlackoutKick.js | hasseboulen/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import SpellUsable from 'Parser/Core/Modules... |
src/Main/Gear.js | enragednuke/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import Icon from 'common/Icon';
class Gear extends React.PureComponent {
static propTypes = {
selectedCombatant: PropTypes.object.isRequired,
};
render() {
const toolTipBaseUrl='http://www.wowhead.com/item=';
const gear = Object.values(th... |
examples/Simple/app/components/InfoCard.js | jmurzy/react-native-foldview | import React from 'react';
import {
View,
StyleSheet,
} from 'react-native';
import {
ThinGrayLine,
ThickGrayLine,
ThickDarkGrayLine,
ThinRedLine,
} from './Lines';
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
flexDirection: 'row',
},
leftPane: {
... |
examples/js/column-filter/regex-filter.js | opensourcegeek/react-bootstrap-table | 'use strict';
import React from 'react';
import {BootstrapTable, TableHeaderColumn} from 'react-bootstrap-table';
var products = [];
function addProducts(quantity) {
var startId = products.length;
for (var i = 0; i < quantity; i++) {
var id = startId + i;
products.push({
id: id,
... |
src/containers/App/App.js | madeagency/reactivity | // @flow
import React from 'react'
import Switch from 'react-router-dom/Switch'
import Route from 'react-router-dom/Route'
import Helmet from 'react-helmet'
import Menu from 'components/Menu/Menu'
import Loading from 'components/Loading/Loading'
import RedirectWithStatus from 'components/RouterStatus/RedirectWithStatu... |
submissions/leoasis/src/App.js | gterzian/flux-challenge | import React from 'react';
import { connect } from 'react-redux';
import {
getJediSlots,
wasJediBornInCurrentPlanet,
wasAnyJediBornInCurrentPlanet
} from './queries';
import JediSlot from './JediSlot';
import NavButton from './NavButton';
function noFullJediIn(slots, position) {
return !slots[position] || sl... |
packages/icons/src/md/hardware/SpeakerGroup.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdSpeakerGroup(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M36.4 2C38.39 2 40 3.61 40 5.6v28.8c0 1.99-1.61 3.6-3.6 3.6l-16.8-.02A3.58 3.58 0 0 1 16 34.4V5.6C16 3.61 17.61 2 19.6 2h16.8zM28 6c-2.21 0-4 1.... |
node_modules/react-bootstrap/es/DropdownButton.js | vitorgomateus/NotifyMe | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import _extends from... |
features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/store/source/src/app/components/Applications/Listing/Listing.js | thusithak/carbon-apimgt | /*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/li... |
src/modules/presets/containers/Presets.js | jeffdowdle/l-systems | import { connect } from 'react-redux';
import React from 'react';
import PropTypes from 'prop-types';
import {
actions as presetsActions,
selectors as presetsSelectors,
} from 'modules/presets';
import TextInput from 'form/TextInput';
import presetData from 'modules/presets/presetData';
import Preset from 'modules/... |
Skins/VetoccitanT3/ReactSrc/node_modules/react-awesome-slider/src/components/react-awesome-frame/index.js | MAN-IN-WAN/Kob-Eye | import React from 'react';
import PropTypes from 'prop-types';
import {
classToModules,
getClassName,
} from '../../helpers/components';
const ROOTELM = 'aws-frm';
export default class AwesomeFrame extends React.Component {
static propTypes = {
cssModule: PropTypes.object,
children: PropTypes.node,
... |
src/containers/auth-modal.js | stefuhnee/moments | 'use strict';
import React from 'react';
import { Modal, Button } from 'react-bootstrap';
import Auth from '../components/auth';
function AuthModal(props) {
return (
<div className="static-modal">
<Modal.Dialog>
<Modal.Header>
<Modal.Title>Sign In</Modal.Title>
</Modal.Header>
... |
src/components/views/groups/GroupMemberTile.js | aperezdc/matrix-react-sdk | /*
Copyright 2017 Vector Creations Ltd
Copyright 2017 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable la... |
src/client/components/CircleImageWidget/CircleImageWidget.js | vidaaudrey/trippian | import log from '../../log'
import React from 'react'
import {
Link
}
from 'react-router'
import {
CircleImageWidget as appConfig
}
from '../../config/appConfig'
const renderImage = (imageSrc, link, title) => {
const imageHTML = <img src={imageSrc} alt={title} />
if (link) {
return (
<Link to={link}... |
examples/todo/src/components/Todo.js | mirrorjs/mirror | import React from 'react'
const Todo = ({text, completed, ...rest}) => (
<li style={{textDecoration: completed ? 'line-through' : 'none'}} {...rest}>
{text}
</li>
)
export default Todo
|
js/react-ssr/src/app/containers/ListByClass.js | Icokie/study | import React from 'react';
let ListByClass = () => {
return (
<div>list by class</div>
);
};
export {ListByClass}; |
src/TextInput/examples.js | narqo/react-islands | import React from 'react';
import TextInput from './index.js';
class Example extends React.Component {
constructor(props) {
super(props);
this.state = {
value: 'React!',
};
this.onInputChange = this.onInputChange.bind(this);
}
render() {
return (
... |
node_modules/react-bootstrap/es/ModalDialog.js | Technaesthetic/ua-tools | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
docs/src/app/components/pages/components/TimePicker/ExampleSimple.js | IsenrichO/mui-with-arrows | import React from 'react';
import TimePicker from 'material-ui/TimePicker';
const TimePickerExampleSimple = () => (
<div>
<TimePicker
hintText="12hr Format"
/>
<TimePicker
hintText="12hr Format with auto ok"
autoOk={true}
/>
<TimePicker
format="24hr"
hintText="24hr F... |
packages/rollup-plugin/src/__tests__/fixtures/plugin/Component.js | wq/wq.start | import React from 'react';
import { usePluginState } from '@wq/react';
import { List, ListItem } from '@wq/material';
export default function Test() {
const state = usePluginState('myPlugin');
return (
<List>
{state.values.map(value => (
<ListItem key={value.id}>{value.label... |
src/components/mediabox/mediabox.js | woshisbb43/coinMessageWechat | import React from 'react';
import PropTypes from 'prop-types';
import classNames from '../../utils/classnames';
/**
* Media Object, Typically use with `Panel` to display pictures and text, consists of `MediaBoxBody`, `MediaBoxDescription`, `MediaBoxHeader`
*
*/
export default class MediaBox extends React.Component ... |
es/sources/youtube/PlaylistPanel.js | welovekpop/uwave-web-welovekpop.club | import _jsx from "@babel/runtime/helpers/builtin/jsx";
import _assertThisInitialized from "@babel/runtime/helpers/builtin/assertThisInitialized";
import _inheritsLoose from "@babel/runtime/helpers/builtin/inheritsLoose";
import React from 'react';
import PropTypes from 'prop-types';
import Tooltip from "@material-ui/co... |
src/svg-icons/av/play-circle-outline.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvPlayCircleOutline = (props) => (
<SvgIcon {...props}>
<path d="M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 ... |
example/examples/CustomOverlay.js | parkling/react-native-maps | import React from 'react';
import {
StyleSheet,
View,
Dimensions,
} from 'react-native';
import MapView from 'react-native-maps';
import XMarksTheSpot from './CustomOverlayXMarksTheSpot';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.78825;
const LO... |
public/node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | gFelicio/agenda | 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'));
|
src/js/components/Avatar/stories/Sizes.js | HewlettPackard/grommet | import React from 'react';
import { Avatar, Box, Grommet, Paragraph } from 'grommet';
import { grommet } from 'grommet/themes';
export const Sizes = () => {
const src = '//s.gravatar.com/avatar/b7fb138d53ba0f573212ccce38a7c43b?s=80';
return (
<Grommet theme={grommet}>
<Box direction="row" pad="large" ga... |
src/components/forms/JoinForm.js | LenaKari/happy-days | import React, { Component } from 'react';
// Containers/components
import InputField from './InputField';
import Modal from '../Modal';
import * as validate from '../../utils/validation';
// MaterialUI
import FlatButton from 'material-ui/FlatButton';
import RaisedButton from 'material-ui/RaisedButton';
// Icons/Styl... |
src/components/buttons/QueueButton.js | niekert/soundify | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import QueueAdd from 'components/icons/QueueAdd';
import CheckIcon from 'components/icons/PlaylistAddCheck';
import IconButton from './IconButton';
const QueueIcon = styled(QueueAdd)`
position: relat... |
src/client/app/header.react.js | langpavel/react-svg-path-editor | import Component from '../components/component.react';
import React from 'react';
import {FormattedHTMLMessage} from 'react-intl';
import {Link} from 'react-router';
export default class Header extends Component {
static propTypes = {
msg: React.PropTypes.object.isRequired,
viewer: React.PropTypes.object
... |
docs/src/app/components/pages/components/Tabs/ExampleControlled.js | ichiohta/material-ui | import React from 'react';
import {Tabs, Tab} from 'material-ui/Tabs';
const styles = {
headline: {
fontSize: 24,
paddingTop: 16,
marginBottom: 12,
fontWeight: 400,
},
};
export default class TabsExampleControlled extends React.Component {
constructor(props) {
super(props);
this.state =... |
src/components/Topics.js | shiyangzhaoa/redux-cnode | import React from 'react'
import {
Link
} from 'react-router'
const style = {
img: {
display: 'inline-block',
width: '30px',
height: '30px',
borderRadius: '3px'
},
div: {
padding: '5px',
borderBottom: '1px solid #ccc',
width: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'space... |
client/src/index.js | halo123u/GA-Networking-App | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
|
src/client/components/list/addtolist/AddToList.container.js | DBCDK/content-first | import React from 'react';
import {connect} from 'react-redux';
import {OPEN_MODAL} from '../../../redux/modal.reducer';
import BookSearchSuggester from './BookSearchSuggester';
import Title from '../../base/Title';
import Text from '../../base/Text';
import T from '../../base/T';
import ProfileImage from '../../genera... |
src/app/components/containers/user-profile-container.js | ishaan-puniani/moopy-server | import React from 'react';
import {connect} from 'react-redux';
import UserProfile from '../views/user-profile';
import UserMood from '../views/user-mood';
import * as userApi from '../../api/user-api';
import store from '../../store';
import {
userMoodsSuccess
} from '../../actions/user-actions';
import {getDashbo... |
app/components/inputText/index.js | 12go/client-app | import React from 'react'
import app from '../../app.js'
const styles = {
input: {
width: '200px',
},
}
export default React.createClass({
handleKeyUp(event) {
event.preventDefault()
app.router.navigate('http://localhost:3000/search?filter[contains]=' + input.value)
},
render() {
const { n... |
src/svg-icons/action/event-seat.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionEventSeat = (props) => (
<SvgIcon {...props}>
<path d="M4 18v3h3v-3h10v3h3v-6H4zm15-8h3v3h-3zM2 10h3v3H2zm15 3H7V5c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v8z"/>
</SvgIcon>
);
ActionEventSeat = pure(ActionEventSe... |
bo/src/app/components/SiderPage.js | jilion107/WebBoilerplate | /**
* Created by jilion.chen on 3/1/2017.
*/
import React from 'react';
import { Link } from 'react-router';
import { Layout, Menu, Icon } from 'antd';
const Sider = Layout.Sider;
const SubMenu = Menu.SubMenu;
const MenuItem = Menu.Item;
const menuUrls = [
{
key: "1",
url: "/zhijian/tmpProducts"
... |
lib/relay-wrap.js | meuschke/relay-testing-utils | import React from 'react';
export default function relayWrap(component, relayOptions){
relayOptions = relayOptions || {};
const variables = relayOptions.variables || {}
let initialVariables = {}
// TODO prepareVariables
if(component.type && component.type.getRelaySpecs){
initialVariables = component.typ... |
src/Sandbox/MLmodels/Mushrooms/Mushroom.js | MLsandbox/MLsandbox | import React, { Component } from 'react';
import jwt from 'jsonwebtoken';
import { connect } from 'react-redux';
import Select from 'react-select';
import 'react-select/dist/react-select.css';
import './mushroomStyles.css'
class Mushroom extends Component {
constructor(props) {
super(props);
this.state = {
... |
app/javascript/mastodon/features/favourites/index.js | h3zjp/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from '../../components/loading_indicator';
import { fetchFavourit... |
docs/src/examples/disabledRange.js | mberneti/react-datepicker2 | import React from 'react'
import momentJalaali from 'moment-jalaali'
import Calendar from '../../../src/components/Calendar';
class component extends React.Component {
constructor(props) {
super(props);
this.state = {
value: momentJalaali(),
isGregorian: true
};
this.disabledRanges = [
... |
app/containers/Root.js | nimatra/nimGit | import React, { Component } from 'react';
import { Provider } from 'react-redux';
import App from './App';
export default class Root extends Component {
render() {
const { store } = this.props;
return (
<Provider store={store}>
<App />
</Provider>
);
}
}
|
node_modules/react-icons/io/ios-close-outline.js | bairrada97/festival |
import React from 'react'
import Icon from 'react-icon-base'
const IoIosCloseOutline = props => (
<Icon viewBox="0 0 40 40" {...props}>
<g><path d="m31.2 8.5c6.4 6.3 6.4 16.7 0 23s-16.6 6.3-22.9 0-6.4-16.7 0-23 16.6-6.3 22.9 0z m-0.9 22c5.8-5.7 5.8-15.3 0-21s-15.3-5.8-21.1 0-5.8 15.3 0 21 15.3 5.8 21.1 0z... |
src/svg-icons/device/signal-cellular-connected-no-internet-2-bar.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalCellularConnectedNoInternet2Bar = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M22 8V2L2 22h16V8z"/><path d="M14 22V10L2 22h12zm6-12v8h2v-8h-2zm0 12h2v-2h-2v2z"/>
</SvgIcon>
);
Devi... |
packages/material-ui-icons/src/BorderBottom.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M9 11H7v2h2v-2zm4 4h-2v2h2v-2zM9 3H7v2h2V3zm4 8h-2v2h2v-2zM5 3H3v2h2V3zm8 4h-2v2h2V7zm4 4h-2v2h2v-2zm-4-8h-2v2h2V3zm4 0h-2v2h2V3zm2 10h2v-2h-2v2zm0 4h2v-2h-2v2zM5 7H3v2h2V7zm14-4v2h2V3h-2zm0 6h2V7h... |
ui/src/App.js | tibyte/hanpyo | import React from 'react';
import './App.css';
import { Route, BrowserRouter as Router } from 'react-router-dom';
import Navbar from './component/Navbar';
import Timetable from './page/Timetable';
import Review from './page/Review';
function App() {
return (
<div className="App">
<Router>
<Navbar/>... |
test/fixtures/block-element/input.js | mistadikay/babel-plugin-transform-rebem-jsx | import React from 'react';
function Test() {
return <div block="test">
<div block="test" elem="test2"></div>
</div>;
}
|
example/src/TabTwo.js | PlexChat/mobx-navigation | import React from 'react';
import {
Button,
Text,
View
} from 'react-native';
import { inject, observer } from 'mobx-react';
import { child, scene } from '../..';
@child class Child1 extends React.Component {
componentWillHide() {
console.log('Child 1 hiding');
}
componentDidHide() {
console.log(... |
src/power-sheet/ColumnActions.js | Synchro-TEC/apollo | import React from 'react';
import PropTypes from 'prop-types';
import nanoid from 'nanoid';
import { conditions } from './conditions';
class ColumnActions extends React.Component {
constructor(props) {
super(props);
this.filterChange = this.filterChange.bind(this);
this.addValueOnFilter = this.addValue... |
src/game/piece/black-bishop.js | howardjing/chess-calculator | // @flow
// https://commons.wikimedia.org/wiki/Category:SVG_chess_pieces
import React from 'react';
type Props = {
width: number | string,
height: number | string,
};
const BlackBishop = ({
width,
height,
}: Props) => (
<svg
viewBox="0 0 45 45"
style={{
width: width,
height: height,
... |
packages/material-ui-icons/src/CropPortrait.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M17 3H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H7V5h10v14z" /></g>
, 'CropPortrait');
|
test/test_helper.js | scepticulous/react-video-player | import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import... |
src/index.js | acr13/nhlerd-front | import './styles/styles.css';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { applyMiddleware, createStore, compose } from 'redux';
import { Iterable } from 'immutable';
import thunk from 'redux-thunk';
import rootReducer from './reducers/index.js';
import... |
node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js | jemandez/astrokosmos | import React from 'react';
// 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';
React.render(<HelloWorld />, document.getElementById('react-root'));
|
src/utils/createContextWrapper.js | pandoraui/react-bootstrap | import React from 'react';
/**
* Creates new trigger class that injects context into overlay.
*/
export default function createContextWrapper(Trigger, propName) {
return function(contextTypes) {
class ContextWrapper extends React.Component {
getChildContext() {
return this.props.context;
}
... |
src/svg-icons/action/android.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAndroid = (props) => (
<SvgIcon {...props}>
<path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8... |
src/components/Routes.js | bjacobel/react-redux-boilerplate | import React, { Component } from 'react';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import NotFound from './NotFound';
import Child from './Child';
import Main from './Main';
import Analytics from '../services/Analytics';
class GARoute extends Route {
render() {
this.props.ga.pageview();
... |
packages/react/src/components/Link/Link.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 PropTypes from 'prop-types';
import React from 'react';
import classnames from 'classnames';
import { usePrefix } from '../../internal... |
modules/RoutingContext.js | shunitoh/react-router | import React from 'react'
import RouterContext from './RouterContext'
import warning from './routerWarning'
const RoutingContext = React.createClass({
componentWillMount() {
warning(false, '`RoutingContext` has been renamed to `RouterContext`. Please use `import { RouterContext } from \'react-router\'`. http://t... |
react-router-demo/lessons/11-productionish-server/modules/About.js | zhangjunhd/react-examples | import React from 'react'
export default React.createClass({
render() {
return <div>About</div>
}
})
|
packages/material-ui-icons/src/MoveToInbox.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let MoveToInbox = props =>
<SvgIcon {...props}>
<path d="M19 3H4.99c-1.11 0-1.98.9-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10zm-3-5h-2... |
node_modules/react-bootstrap/src/Badge.js | gitoneman/react-soc | import React from 'react';
import ValidComponentChildren from './utils/ValidComponentChildren';
import classSet from 'classnames';
const Badge = React.createClass({
propTypes: {
pullRight: React.PropTypes.bool
},
hasContent() {
return ValidComponentChildren.hasValidComponent(this.props.children) ||
... |
src/js/components/Home.js | frankwaizi/react-starter | import React, { Component } from 'react';
import 'Style/common.css';
class Home extends Component {
constructor(props) {
super(props);
console.log("---------------我是Home,我在构造-----------");
}
shouldComponentUpdate(nextProps, nextState) {
console.log("should Home update?");
return true;
}
co... |
saga/P/cancellable-counter/src/index.js | imuntil/React | import 'babel-polyfill'
import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { createStore, applyMiddleware } from 'redux'
import createSagaMiddleware from 'redux-saga'
import reducer from './reducers'
import rootSaga from './sagas'
import Counter from './components/... |
internals/templates/containers/LanguageProvider/index.js | kossel/react-boilerplate | /*
*
* 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... |
app/javascript/mastodon/components/icon_button.js | pixiv/mastodon | import React from 'react';
import Motion from '../features/ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import PropTypes from 'prop-types';
import classNames from 'classnames';
export default class IconButton extends React.PureComponent {
static propTypes = {
className: PropTypes.stri... |
app/javascript/mastodon/components/loading_indicator.js | dwango/mastodon | import React from 'react';
import { FormattedMessage } from 'react-intl';
const LoadingIndicator = () => (
<div className='loading-indicator'>
<div className='loading-indicator__figure' />
<FormattedMessage id='loading_indicator.label' defaultMessage='Loading...' />
</div>
);
export default LoadingIndicat... |
examples/react/components/NotFound.js | spicydonuts/lucid-router | import React from 'react'
const NotFound = () => <h3>404</h3>
export default NotFound
|
node_modules/react-icons/ti/wine.js | bairrada97/festival |
import React from 'react'
import Icon from 'react-icon-base'
const TiWine = props => (
<Icon viewBox="0 0 40 40" {...props}>
<g><path d="m29.3 15.7c0-4.2-1.5-9.3-1.6-9.5-0.2-0.7-0.9-1.2-1.6-1.2h-12.2c-0.7 0-1.4 0.5-1.6 1.2-0.1 0.2-1.6 5.3-1.6 9.5 0 4.6 3.3 8.4 7.7 9.1 0 0.1-0.1 0.1-0.1 0.2v6.7h-1.6c-1 0-1... |
app/javascript/mastodon/components/intersection_observer_article.js | RobertRence/Mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePureComponent from 'react-immutable-pure-component';
import scheduleIdleTask from '../features/ui/util/schedule_idle_task';
import getRectFromEntry from '../features/ui/util/get_rect_from_entry';
export default class IntersectionObserverArt... |
src/js/components/roles/RoleServices.js | knowncitizen/tripleo-ui | /**
* Copyright 2017 Red Hat Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
www/imports/mapPage/shortlist/ShortEntryMenuPres.js | terraswat/hexagram |
// Presentational component for the short list entry context menu.
import React from 'react';
import PropTypes from 'prop-types';
import { ContextMenu, MenuItem, SubMenu, ContextMenuTrigger }
from "react-contextmenu";
import '/imports/mapPage/init/contextMenu.css';
import './shortEntry.css';
const selectAll = '... |
src/app/lib/createComponent.js | anvaka/npmrank.vis | import React, { Component } from 'react';
module.exports = createComponent;
function createComponent(factory) {
class CustomComponent extends Component {
constructor(props) {
super(props);
var self = this;
var model = this.props.model;
if (!model || !typeof model.on === 'function') retur... |
src/common/containers/landing.js | canonical-ols/build.snapcraft.io | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Anchor } from '../components/vanilla-modules/button';
import { HeadingTwo, HeadingThree } from '../components/vanilla-modules/heading';
import { List, ListItem } from '../components/vanilla-mod... |
node_modules/react-router-dom/node_modules/react-router/es/StaticRouter.js | amybingzhao/savings-planner-web | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {... |
src/settings/SettingsPage.js | binary-com/binary-next-gen | import React from 'react';
import WebPage from '../containers/WebPage';
import SettingsContainer from './SettingsContainer';
export default (props) => (
<WebPage>
<SettingsContainer {...props} />
</WebPage>
);
|
www/app/components/splash.js | kalikaneko/bitmask-dev | /*
* A simple animated splash screen
*/
import React from 'react'
import * as COLOR from '../lib/colors'
const colorList = [
COLOR.red200, COLOR.pink200, COLOR.purple200, COLOR.deepPurple200,
COLOR.indigo200, COLOR.blue200, COLOR.lightBlue200, COLOR.cyan200,
COLOR.teal200, COLOR.green200, COLOR.lightGreen200,... |
src/components/SubNavigation/SubNavigation.stories.js | wfp/ui | import React from 'react';
import markdown from './README.mdx';
import {
SubNavigation,
SubNavigationHeader,
SubNavigationTitle,
SubNavigationLink,
SubNavigationFilter,
SubNavigationContent,
SubNavigationList,
SubNavigationGroup,
SubNavigationItem,
} from '../SubNavigation';
import Search from '../Sea... |
client/containers/messages.js | CodeWriterWriter/vidi-dashboard | 'use strict'
import React from 'react'
import {connect} from 'react-redux'
import {Link} from 'react-router'
import {Panel, PageHeader, HealthPanel, InfoCell} from '../components/index'
import ChartistGraph from 'react-chartist'
import {subscribe, unsubscribe} from '../actions/vidi'
import _ from 'lodash'
export cons... |
src/components/Currency.js | azedo/freelancer-calculator | // components/Currency.js
// main imports
import React, { Component } from 'react';
class Currency extends Component {
render() {
const userCurrency = this.props.currency;
let currency;
switch (userCurrency) {
case "euro":
currency = '€';
break;
default:
currency = '... |
src/Thumbnail.js | mmarcant/react-bootstrap | import classNames from 'classnames';
import React from 'react';
import SafeAnchor from './SafeAnchor';
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
const propTypes = {
src: React.PropTypes.string,
alt: React.PropTypes.string,
href: React.PropTypes.string,
};
class Thumbnail exte... |
src/index.js | Teaism/learnReact | /*
* @Author: Teaism
* @Date: 2017-07-29 23:22:00
* @Last Modified by: Teaism
* @Last Modified time: 2017-07-29 23:23:29
*/
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
|
src/containers/EditProfileRoute.js | mick842/rental-cars-client | import React, { Component } from 'react';
import EditProfileForm from '../components/EditProfileForm';
import User from '../modules/User';
import UserAPI from "../services/api/UserAPI";
import ValidateProfile from "../services/ProfileEditValidate";
import { Redirect } from 'react-router-dom';
class EditProfileRoute e... |
shared/app/Tms/index.js | pebie/react-universally-node-config | import 'normalize.css/normalize.css';
import React, { Component } from 'react';
import FontFaceObserver from 'fontfaceobserver';
import classnames from 'classnames';
import './assets/base_scss/__base.scss';
import MosaicContainer from './components/Mosaic/MosaicContainer';
import ContentGridContainer from './component... |
packages/envision-docs/src/components/Theme/index.js | sitevision/envision | import React from 'react';
import PropTypes from 'prop-types';
const ThemeContext = React.createContext({ font: '', darkMode: false });
const useTheme = () => React.useContext(ThemeContext);
const ThemeProvider = ({ children }) => {
const [darkMode, setDarkMode] = React.useState(false);
const [font, setFont] = ... |
src/reactRedux/components/alert/alert.js | JackZhangXL/react-redux | import React, { Component } from 'react';
import { render } from 'react-dom';
import { Button, Alert } from 'antd';
import 'antd/dist/antd.css';
import './alert.pcss';
export default class AlertComponent extends Component {
render() {
const {
showAlert,
handleClickAlert,
} =... |
src/components/SelectInput/SelectInput.js | InsideSalesOfficial/insidesales-components | import React from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import styled from 'styled-components';
import _ from 'lodash';
import { ThemeProvider } from 'styled-components';
import { lightSelectInputTheme } from './SelectInputThemes';
import SelectWrapper from './SelectWrapper';
... |
fields/types/number/NumberColumn.js | mikaoelitiana/keystone | import React from 'react';
import numeral from 'numeral';
import ItemsTableCell from '../../../admin/client/components/ItemsTableCell';
import ItemsTableValue from '../../../admin/client/components/ItemsTableValue';
var NumberColumn = React.createClass({
displayName: 'NumberColumn',
propTypes: {
col: React.PropTyp... |
client/src/components/shared/DimmableListing.js | Velocies/raptor-ads | import React, { Component } from 'react';
import { Card, Button, Dimmer, Header } from 'semantic-ui-react';
import Listing from './Listing';
class DimmableListing extends Component {
constructor(props) {
super(props);
this.state = { active: false };
this.handleShow = this.handleShow.bind(this);
this.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.