path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/components/Breadcrumb/__tests__/Breadcrumb-test.js | joshblack/carbon-components-react | /**
* 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 { mount } from 'enzyme';
describe('Breadcrumb', () => {
let Breadcrumb;
let BreadcrumbItem;
beforeE... |
src/index.js | DagF/it2810-tutorial | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
src/components/RedBox.js | weaintplastic/react-sketchapp | /* @flow */
import React from 'react';
import PropTypes from 'prop-types';
import ErrorStackParser from 'error-stack-parser';
import Text from './Text';
import View from './View';
type StackFrame = {
functionName: string,
isConstrutor?: boolean,
isEval?: boolean,
isNative?: boolean,
isTopLevel?: boolean,
c... |
app/containers/NotFoundPage/index.js | chaintng/react-boilerplate | /**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*/
import React from 'react';
import { FormattedMessage } from 'react-intl';
import H1 from 'components/H1';
import messages from './messages';
export default function NotFound() {
return (
<article>
... |
src/containers/ProfilesMap.js | JustPeople/app | import React from 'react'
import { connect } from 'react-redux'
import { withScriptjs, withGoogleMap, GoogleMap } from 'react-google-maps'
import { ProfileMarker } from './Profile/Map'
const SRC = 'https://maps.googleapis.com/maps/api/js?key=AIzaSyCePt7NR915XpEE0xfF-Ihl03q3or4wVfY&v=3.exp&libraries=geometry,drawing,p... |
polymorphs-frontend-master/src/components/App/App.js | TrentonSarnowski/GenomeBusters | import React, { Component } from 'react';
import './App.css';
import DropdownMenu from '../DropdownMenu/DropdownMenu';
import SidePanel from '../SidePanel/SidePanel';
import Chart from '../Chart/Chart';
import 'whatwg-fetch';
import ReactDOM from 'react-dom';
class App extends Component {
// constructor {{{1 //
co... |
packages/demos/demo/src/components/Notification/index.js | garth/cerebral | import React from 'react'
import { connect } from '@cerebral/react'
import { signal, state } from 'cerebral/tags'
import translations from '../../common/compute/translations'
export default connect(
{
dismiss: signal`app.dismissNotificationClicked`,
error: state`app.$error`,
t: translations,
},
funct... |
docs/src/app/pages/components/Input/ExampleInputError.js | GetAmbassador/react-ions | import React from 'react'
import Input from 'react-ions/lib/components/Input'
const ExampleInputDefault = () => (
<Input label='Input with error' value='' optClass='input-error' />
)
export default ExampleInputDefault
|
src/components/NodeList.js | codaco/Network-Canvas | import React, { Component } from 'react';
import { compose } from 'redux';
import PropTypes from 'prop-types';
import { find, get, isEqual } from 'lodash';
import cx from 'classnames';
import { TransitionGroup } from 'react-transition-group';
import { getCSSVariableAsString, getCSSVariableAsNumber } from '@codaco/ui/li... |
proto3/src/App.js | joshmarinacci/idealos | import React from 'react';
import logo from './logo.svg';
import './App.css';
import '../node_modules/font-awesome/css/font-awesome.css'
/*
main window
email viewer
side window
email composer
third window?
text editor
dashboard sidebar
clock
weather
calendar/agenda view
todo list
notif... |
docs/src/app/components/pages/components/Stepper/VerticalNonLinearStepper.js | nathanmarks/material-ui | import React from 'react';
import {
Step,
Stepper,
StepButton,
StepContent,
} from 'material-ui/Stepper';
import RaisedButton from 'material-ui/RaisedButton';
import FlatButton from 'material-ui/FlatButton';
/**
* A basic vertical non-linear implementation
*/
class VerticalNonLinear extends React.Component {... |
app.js | discreteMathTool/discretemathtool.github.io | import { createDevTools } from 'redux-devtools'
import LogMonitor from 'redux-devtools-log-monitor'
import DockMonitor from 'redux-devtools-dock-monitor'
import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { Router, Route, IndexRoute, browserHistory } from 'react-ro... |
src/js/components/modules/LayerToolBox.js | at-ishikawa/paintlive | import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as LayerToolBoxActions from 'actions/layer';
import Button from 'components/modules/ui/Button';
import LayerToolBoxItem from './LayerToolBoxItem';
import style from 'modules/layerToolBox';
class Laye... |
src/containers/weather_list.js | albertocueto/modern-react-redux-weather-cities | import React, { Component } from 'react';
import { connect } from 'react-redux';
import WeatherChart from '../components/weather_chart';
import CityMap from '../components/city_map';
class WeatherList extends Component {
renderWeather(cityData) {
const name = cityData.city.name;
const temperatures = cityData... |
src/__tests__/StandaloneButton_test.js | KonstantinKo/rform | import React from 'react'
import { mount } from 'enzyme'
import StandaloneButton from './StandaloneButton'
describe('<StandaloneButton />', function() {
const defaultProps = {
authToken: 'xxx',
action: '/users/sign_out',
method: 'DELETE'
}
describe('with minimal props', function() {
it('should ... |
examples/counter/index.js | xiamidaxia/redux | import React from 'react';
import Root from './containers/Root';
React.render(
<Root />,
document.getElementById('root')
);
|
frontend/src/components/dialog/sysadmin-dialog/sysadmin-add-institution-dialog.js | miurahr/seahub | import React from 'react';
import PropTypes from 'prop-types';
import { Button, Modal, ModalHeader, ModalBody, ModalFooter, Form, FormGroup, Input } from 'reactstrap';
import { gettext } from '../../../utils/constants';
const propTypes = {
toggle: PropTypes.func.isRequired,
addInstitution: PropTypes.func.isRequire... |
js/components/common/cards/TabCardComplex.js | gectorat/react-native-app | import React, { Component } from 'react';
import {
Text,
Card,
CardItem,
} from 'native-base';
import CardHeader from './CardHeader';
import CardActionMenu from './ActionMenu';
class TabCard extends Component {
render() {
const { header, footer, actionMenu} = this.props;
return (
<Card>
... |
src/components/Protected/index.js | Cloudoki/react-redux-donderstarter |
import React from 'react'
export default () => <div style={styles.container}>PROTECTED ROUTE</div>
const styles = {
container: {
minHeight: '100%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
},
}
|
src/components/header.js | cosmowiki/cosmowiki | import React from 'react';
import Navigation from './navigation';
const Header = ({appUrl}) => {
return (
<header className="pure-u-1">
<div id="brand" className="pure-u-lg-1-6">
<a href="/" title="CosmoWiki.de" rel="home">
<img src="/img/cw_name_30px.jpg" alt="CosmoWiki Title" />
... |
app/components/common/ErrorMessage.js | dnguyenba/cypress-workshop | import React from 'react'
function ErrorMessage (props) {
return (
<div className='form__error-wrapper js-form__err-animation'>
<p className='form__error'>
{props.error}
</p>
</div>
)
}
ErrorMessage.propTypes = {
error: React.PropTypes.string
}
export default ErrorMessage
|
app/javascript/mastodon/features/ui/components/image_loader.js | MitarashiDango/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { LoadingBar } from 'react-redux-loading-bar';
import ZoomableImage from './zoomable_image';
export default class ImageLoader extends React.PureComponent {
static propTypes = {
alt: PropTypes.string,
s... |
src/stories/button/button-colors.js | kemuridama/rectangle | import React from 'react';
export default class ButtonColors extends React.Component {
render() {
const { onClick } = this.props;
return (
<div className="con">
<div className="p">
<div className="p__body">
<button className="btn btn--red" onClick={onClick.bind(this)}>Red... |
node_modules/antd/es/checkbox/Group.js | prodigalyijun/demo-by-antd | import _toConsumableArray from 'babel-runtime/helpers/toConsumableArray';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'bab... |
demo/src/index.js | tkh44/data-driven-motion | import 'github-markdown-css'
import './style.css'
// eslint-disable-next-line no-unused-vars
import React from 'react'
import { render } from 'react-dom'
function run () {
const Root = require('./App').default
render(<Root />, document.querySelector('#demo'))
}
run()
if (module.hot) {
// Whenever a new version... |
node_modules/react-bootstrap/es/Collapse.js | NathanBWaters/jb_club | 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 ... |
src/Section.js | mattBlackDesign/react-materialize | import React from 'react';
import PropTypes from 'prop-types';
const Section = (props) => (
<div className='section'>
{props.children}
</div>
);
Section.propTypes = {
children: PropTypes.node
};
export default Section;
|
src/containers/search_bar.js | catfriend/ComplexWeather | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { fetchWeather } from '../actions/index';
class SearchBar extends Component {
constructor(props) {
super(props);
this.state = { term: '' };
this.onInputChange = this.onInp... |
src/svg-icons/action/settings-remote.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsRemote = (props) => (
<SvgIcon {...props}>
<path d="M15 9H9c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V10c0-.55-.45-1-1-1zm-3 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM7.05 6.05l1.41... |
fixture/bar-alpha-test.js | jussikan/leyati | import React from 'react';
import {shallow, mount} from 'enzyme';
import expect from 'expect';
import Bar from './Bar';
describe("Bar", () => {
it("succeeds at shallow mount without props", () => {
shallow(<Bar />);
});
describe("for teh lulz", () => {
it("renders an element with class \"... |
src/parser/demonhunter/havoc/modules/features/AlwaysBeCasting.js | fyruna/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';
import CoreAlwaysBeCasting from 'parser/shared/modules/AlwaysBeCasting';
class AlwaysBeCasting extends CoreAlwaysBeCasting {
get suggestionThresholds() {
r... |
src/components/Layer.js | jozanza/pixels | import React, { Component } from 'react';
import { mapPixels } from '../utils';
import Canvas from './Canvas';
const onionSkin = (prev, curr) =>
mapPixels(
([r, g, b, a], i) =>
curr[i + 3] ? curr.slice(i, i + 4) : [r, g, b, a > 0 ? 32 : 0],
prev
);
export default class Layer extends Component {
co... |
client/src/app/tabs/cmmn/CmmnEditor.js | camunda/bpmn-io-modeler | /**
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
* under one or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information regarding copyright
* ownership.
*
* Camunda licenses this file to you under the MIT; you may not use this ... |
app/Components/Piece.js | serkansokmen/connect4 | import React from 'react'
import { constants } from '../gameStore'
const Piece = ({ value, x, y, player }) => {
let clsName = 'piece'
if (value === constants.PIECE_PLAYER_1) {
clsName += ' piece-player-1'
} else if (value === constants.PIECE_PLAYER_2) {
clsName += ' piece-player-2'
} else if (value ===... |
client/src/components/Stats/PlayerStatsModal.js | patteri/slave-cardgame | import React from 'react';
import PropTypes from 'prop-types';
import { Modal, Button } from 'react-bootstrap';
import PlayerStats from './PlayerStats';
import './style.css';
const PlayerStatsModal = ({ show, onHide, stats }) => (
<Modal className="Slave-modal Player-stats-modal" show={show} onHide={onHide} backdrop... |
src/svg-icons/action/pan-tool.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPanTool = (props) => (
<SvgIcon {...props}>
<path d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4... |
src/components/BookingForm/Time.js | humancatfood/bat-fe-test | import React from 'react';
import PropTypes from 'prop-types';
import useMediaQuery from '@material-ui/core/useMediaQuery';
import Box from '@material-ui/core/Box';
import Schedule from '@material-ui/icons/Schedule';
import { KeyboardTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers';
import MomentUtils... |
tests/routes/Projects/components/NewProjectTile.spec.js | prescottprue/devshare-site | import React from 'react'
import NewProjectTile from 'routes/Projects/components/NewProjectTile/NewProjectTile'
import { shallow } from 'enzyme'
describe('(Projects:Component) NewProjectTile', () => {
let _component
beforeEach(() => {
_component = shallow(
<NewProjectTile />
)
})
it('Renders', (... |
src/components/layouts/SchoolUserPage/index.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import Box from '../../common/Box';
import Tab from '../../common/Tab';
import Tabs from '../../common/Tabs';
import MultiTab from '../../MultiTab';
import Button from '../../common/Button';
import { StickyContainer, Sticky } from '../../common/Sticky';
import { connect } from 'react-redux';
... |
docs/src/app/components/pages/components/CircularProgress/ExampleDeterminate.js | xmityaz/material-ui | import React from 'react';
import CircularProgress from 'material-ui/CircularProgress';
export default class CircularProgressExampleDeterminate extends React.Component {
constructor(props) {
super(props);
this.state = {
completed: 0,
};
}
componentDidMount() {
this.timer = setTimeout(() ... |
src/components/Hints/Hints.js | Mikosko/EimPanel | /**
* @Author: Miloš Kolčák
* @Date: 2017-01-04T18:32:01+01:00
* @Email: milos.kolcak@gmail.com
* @Last modified by: Miloš Kolčák
* @Last modified time: 2017-01-10T13:42:15+01:00
*/
import React from 'react'
import style from './style.scss'
import ComponentWrapper from '../ComponentWrapper'
import HintsData from... |
src/components/DownloadAt.js | oigami/mpj_converter_web | import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import Popover from 'material-ui/Popover';
import { Menu, MenuItem } from 'material-ui';
import PropTypes from 'prop-types';
export default class DownloadAtMenu extends React.Component {
constructor(props) {
super(p... |
src/app.js | NatashaKSS/progressive-web-app | import React from 'react';
import { render } from 'react-dom';
import { BrowserRouter, BrowserHistory } from 'react-router-dom';
import App from './components/App.jsx';
render((
<BrowserRouter history={BrowserHistory}>
<App />
</BrowserRouter>
), document.getElementById('app'));
|
src/filters/DynamicSearchInput.js | stitchfix/pyxleyJS | import React from 'react';
import ReactDOM from 'react-dom';
import {Input, Dropdown, MenuItem} from 'react-bootstrap';
import classNames from 'classnames';
class InputMenu extends React.Component {
constructor(props) {
super(props);
this.state = {
value: ''
};
this.onCh... |
src/svg-icons/editor/vertical-align-top.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorVerticalAlignTop = (props) => (
<SvgIcon {...props}>
<path d="M8 11h3v10h2V11h3l-4-4-4 4zM4 3v2h16V3H4z"/>
</SvgIcon>
);
EditorVerticalAlignTop = pure(EditorVerticalAlignTop);
EditorVerticalAlignTop.dis... |
src/components/common/author_table.js | haki-projects/mapping-feminism-v2 | import React, { Component } from 'react';
//will need access to application state and action creators in order to edit, delete, and add new table rows the "add" button can live outside of BookTable of course
class AuthorTable extends Component{
render(){
return(
<div>
<table className='table t... |
src/modules/shell/containers/Shell.js | Falieson/planetx-boilerplate-crater | // @flow
import type { ReCo } from 'planetx'
import React from 'react'
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
import getMuiTheme from 'material-ui/styles/getMuiTheme'
import darkBaseTheme from 'material-ui/styles/baseThemes/darkBaseTheme'
import CanvasBackground from '../../backgrounds/spa... |
src/components/Taf/TafCategory.spec.js | maartenlterpstra/GeoWeb-FrontEnd | import React from 'react';
import TafCategory from './TafCategory';
import { mount } from 'enzyme';
import { TestTafJSON } from './TestTafJSON.js';
describe('(Container) Taf/TafCategory.jsx', () => {
before(() => { sinon.spy(TafCategory.prototype, 'validateTaf'); });
it('Renders an empty TafCategory', () => {
... |
client/src/components/sales/rotator-nav.js | WebTalentTop/newsfere-mern | import React, { Component } from 'react';
class RotatorNav extends Component {
renderNav() {
const toMap = [];
for (let i = 0; i < this.props.length; i++) {
toMap.push(
<li
key={`${i}nav`}
value={i}
className={i == this.props.active ? 'slider-nav-bullet active' : ... |
src/index.js | psastras/stridegen | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import {Router, Route} from "react-router";
ReactDOM.render(
<Router>
<Route path="/docs/:endpoint" component={App} />
<Route path="*" component={App} />
</Router>, document.getElementById('app')
);
|
node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | telaatmoda/telaatmoda.github.io | 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'));
|
app/javascript/mastodon/features/ui/components/compose_panel.js | kazh98/social.arnip.org | import React from 'react';
import SearchContainer from 'mastodon/features/compose/containers/search_container';
import ComposeFormContainer from 'mastodon/features/compose/containers/compose_form_container';
import NavigationContainer from 'mastodon/features/compose/containers/navigation_container';
import LinkFooter f... |
src/javascript/decorators/withMaterialUI.js | JeremyJonas/redux-react-router-example-app | import React, { Component } from 'react';
import ThemeManager from 'material-ui/lib/styles/theme-manager';
import LightRawTheme from 'material-ui/lib/styles/raw-themes/light-raw-theme';
export default function withMaterialUI(ComposedComponent) {
return class MaterialUI extends Component {
/*
For more detail... |
frontend/src/containers/PlayLessonContainer.js | technoboom/it-academy | import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
/**
* Class PlayLessonContainer
* Represents interactive lesson from one course which contains
* article, videos, attached tasks, etc.
*/
class PlayLessonContainer extends React.Component {
render() {
... |
packages/material-ui-icons/src/ViewColumn.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let ViewColumn = props =>
<SvgIcon {...props}>
<path d="M10 18h5V5h-5v13zm-6 0h5V5H4v13zM16 5v13h5V5h-5z" />
</SvgIcon>;
ViewColumn = pure(ViewColumn);
ViewColumn.muiName = 'SvgIcon';
export default ViewC... |
local-cli/templates/HelloWorld/index.ios.js | esauter5/react-native | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class HelloWorld extends Component {
render() {
return (
<View style={styles.containe... |
src/main/resources/static/bower_components/jqwidgets/demos/react/app/combobox/defaultfunctionality/app.js | dhawal9035/WebPLP | import React from 'react';
import ReactDOM from 'react-dom';
import JqxComboBox from '../../../jqwidgets-react/react_jqxcombobox.js';
class App extends React.Component {
render () {
let source = new Array();
for (let i = 0; i < 10; i++) {
let movie = 'avatar.png';
let title = 'Avatar';
... |
frontend/src/components/register-button.js | 1905410/Misago | import React from 'react';
import Loader from 'misago/components/loader'; // jshint ignore:line
import RegisterModal from 'misago/components/register.js'; // jshint ignore:line
import captcha from 'misago/services/captcha'; // jshint ignore:line
import modal from 'misago/services/modal'; // jshint ignore:line
import sn... |
app/containers/Posts/instances/2017-04-03_whoa/index.js | brainsandspace/ship | /*
*
* Whoah?
*
*/
import React from 'react';
import Helmet from 'react-helmet';
import Post from 'components/Post';
import PostHeading from 'components/PostHeading';
import PostTitle from 'components/PostTitle';
import PostDate from 'components/PostDate';
import Chunk from 'components/Chunk';
import postInstanc... |
ui/src/main/js/components/Tabs.js | medallia/aurora | import React from 'react';
import Icon from 'components/Icon';
import { addClass } from 'utils/Common';
// Wrapping tabs in his component helps simplify testing of Tabs with enzyme's shallow renderer.
export function Tab({ children, icon, id, name }) {
return <div>{children}</div>;
}
export default class Tabs ext... |
public/js/src/components/Menu.js | MayasHaddad/blog | import React from 'react';
import MenuItem from './MenuItem';
import ThemeColors from '../../../styles/themeColors.json';
import URLs from '../constants/URLs.json';
import Labels from '../constants/Labels.json';
var menuStyle = {
width: 10 + '%',
position: 'fixed',
marginTop: 10 + 'em',
fontFamily... |
src/components/swatches/SwatchesColor.js | JunisphereSystemsAG/react-color | 'use strict' /* @flow */
import React from 'react'
import ReactCSS from 'reactcss'
import shallowCompare from 'react-addons-shallow-compare'
export class SwatchesColor extends ReactCSS.Component {
shouldComponentUpdate = shallowCompare.bind(this, this, arguments[0], arguments[1])
classes(): any {
return {
... |
components/Footer.js | dawnlabs/carbon | import React from 'react'
import Link from 'next/link'
import { COLORS } from '../lib/constants'
const Footer = () => (
<footer role="contentinfo" className="mt3">
<nav className="mt3">
<Link href="/about">
<a className="link" href="/about">
about
</a>
</Link>
<a class... |
src/components/Example.tests.js | janimattiellonen/fgr | import React from 'react';
import { mount, shallow } from 'enzyme';
import { expect } from 'chai';
import { List } from 'immutable';
import Example from './Example';
import sinon from 'sinon';
describe('<Example />', () => {
it('renders a button', () => {
const setExample = sinon.spy();
const wrapper = moun... |
tom-binary-tree/src/RandomGif.js | slorber/scalable-frontend-with-elm-or-redux | import React from 'react'
import { Rx } from 'tom'
import axios from 'axios'
// EVENTS
export class MoreRequested {
update(model) {
return {
model: model,
effect: new FetchRandomGif(model.topic)
}
}
}
class GifFetched {
constructor(gifUrl) {
this.gifUrl = gifUrl
}
update(model) {
... |
packages/my-joy-instances/src/index.js | geek/joyent-portal | import React from 'react';
import ReactDOM from 'react-dom';
import { ThemeProvider } from 'styled-components';
import { Provider as ReduxProvider } from 'react-redux';
import { ApolloProvider } from 'react-apollo';
import { BrowserRouter } from 'react-router-dom';
import isFunction from 'lodash.isfunction';
import isF... |
front-end/client/comp/navbar.js | davae1an/Thermoelectric-Cooler-Panel | import React, { Component } from 'react';
import { observer, computed } from 'mobx-react';
import { Header, Box, Title, Button, Anchor, Menu, Label, Columns } from 'grommet';
import Status from 'grommet/components/icons/Status';
import Edit from 'grommet/components/icons/base/Edit';
import Actions from 'grommet/compone... |
src/components/CurrencyDisplay.js | laurids-reichardt/Currency-Exchange-Rates | import React from 'react';
function outputString(amount, currency) {
return amount.toLocaleString('en-US', {
style: 'currency',
currency: currency,
maximumFractionDigits: 2
});
}
const CurrencyDisplay = props => {
return <span>{outputString(props.amount, props.currency)}</span>;
};
export default C... |
src/components/Link/InternalLink.js | cityofsurrey/polltal-app | import React from 'react'
import PropTypes from 'prop-types'
import Link from './Link'
/**
* Link to use for internal purposes, e.g. openning a modal
*/
const InternalLink = ({ children, onClick, style }) => (
<Link
onClick={(event) => {
event.preventDefault()
onClick()
}}
style={style}
... |
src/views/protected/OverView.js | HackDFW/hackdfw-game-frontend | import React from 'react';
import {Link} from 'react-router';
import {connect} from 'react-redux';
import { bindActionCreators } from 'redux';
import * as actionCreators from '../../actions';
import styles from '../../styles/OverView.scss'
const ProfilePic = React.createClass({
componentDidMount: function() {
jd... |
app/javascript/mastodon/containers/mastodon.js | imomix/mastodon | import React from 'react';
import { Provider } from 'react-redux';
import PropTypes from 'prop-types';
import configureStore from '../store/configureStore';
import {
updateTimeline,
deleteFromTimelines,
refreshHomeTimeline,
connectTimeline,
disconnectTimeline,
} from '../actions/timelines';
import { showOnboa... |
src/client.js | twreporter/twreporter-react | /* eslint-env browser */
import 'babel-polyfill'
import { BrowserRouter, Route } from 'react-router-dom'
import App from './app'
import Loadable from 'react-loadable'
import React from 'react'
import ReactDOM from 'react-dom'
import TagManager from 'react-gtm-module'
import globalEnv from './global-env'
import hashLink... |
source/examples/TextBase.js | thomaswright/bayst | import React from 'react'
import { TextBase, Paragraph, Box } from '../collator'
const exampleText = "Merengue"
const paragraphText = `Merengue (/məˈrɛŋɡeɪ/, Spanish: [meˈɾeŋɡe]) is a style of Dominican music and dance. Partners hold each other in a closed position. The leader holds the follower's waist with the leade... |
src/components/FormattedDate.js | phouri/display-server | import React, { Component } from 'react';
import moment from 'moment';
class FormattedDate extends Component {
render() {
let time = moment(this.props.date);
time = time.format('HH:mm DD/MM/YYYY');
return (
<span>{time}</span>
);
}
};
export default FormattedDate;
|
client/components/When.js | TobiahRex/reactTravelApp | import $ from 'jquery';
import moment from 'moment';
import {} from 'moment-range';
import timekeeper from 'timekeeper';
import { Button, Panel, Container, Row, Col } from 'muicss/react';
import React, { Component } from 'react';
import DatePickerRange from './DatePickerRange.js';
const stateDefinitions = {
availab... |
src/svg-icons/action/stars.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionStars = (props) => (
<SvgIcon {...props}>
<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53... |
src/parser/hunter/beastmastery/modules/talents/ChimaeraShot.js | sMteX/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import ItemDamageDone from 'interface/others/ItemDamageDone';
import StatisticListBoxItem from 'interface/others/StatisticListBoxItem';
import TalentStatisticBox from 'in... |
src/components/fields/text-field.js | tuantle/hypertoxin | /**
* Copyright 2016-present Tuan Le.
*
* Licensed under the MIT License.
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://opensource.org/licenses/mit-license.html
*
* Unless required by applicable law or agreed to in writing, software
* d... |
src/frontend/index.js | pr0fedt/react-basic-template | 'use strict';
import invariant from 'react/lib/invariant';
import React from 'react';
import Router, {HistoryLocation} from 'react-router';
import {Dispatcher} from 'flux-ext';
import injectReactTapEvent from 'react-tap-event-plugin';
import {debugActions} from 'modules/core/actions';
import {EVENTS} from 'modules/co... |
ui/src/main/js/components/TaskListItemActions.js | rdelval/aurora | import React from 'react';
import { isThermos } from 'utils/Task';
export default function ({ task }) {
if (isThermos(task.assignedTask.task)) {
return (<div className='task-list-item-host'>
<a href={`http://${task.assignedTask.slaveHost}:1338/task/${task.assignedTask.taskId}`}>
{task.assignedTask... |
client/modules/App/components/DevTools.js | gyaneshgouraw/mern-ssr | 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 />
... |
src/svg-icons/communication/rss-feed.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationRssFeed = (props) => (
<SvgIcon {...props}>
<circle cx="6.18" cy="17.82" r="2.18"/><path d="M4 4.44v2.83c7.03 0 12.73 5.7 12.73 12.73h2.83c0-8.59-6.97-15.56-15.56-15.56zm0 5.66v2.83c3.9 0 7.07 3.17... |
client/src/app/admin/panel/users/admin-panel-view-user.js | ivandiazwm/opensupports | import React from 'react';
import {connect} from 'react-redux';
import history from 'lib-app/history';
import i18n from 'lib-app/i18n';
import API from 'lib-app/api-call';
import TicketList from 'app-components/ticket-list';
import AreYouSure from 'app-components/are-you-sure';
import Header from 'core-components/h... |
packages/my-joy-navigation/src/app.js | geek/joyent-portal | import React from 'react';
import { ApolloProvider } from 'react-apollo';
import { ThemeProvider } from 'emotion-theming';
import theme from '@state/theme';
import { client } from './state';
import Header from './header';
export default () => (
<ApolloProvider client={client}>
<ThemeProvider theme={theme}>
... |
JS/Classes/Module/Invoke/InvokeExample.js | joggerplus/ReactNativeRollingExamples | 'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableOpacity,
Switch
} from 'react-native';
import ScrollOffsetExample from './scroll-offset-example';
import TextCursorPosExample from './text-cursor-pos-example';
import RefreshControlPosExample fro... |
ajax/libs/react-instantsearch/4.2.0/Dom.js | jdh8/cdnjs | /*! ReactInstantSearch UNRELEASED | © Algolia, inc. | https://community.algolia.com/react-instantsearch/ */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && de... |
src/components/demos/Select.js | airtame/gooey | /* eslint-disable */
import React, { Component } from 'react';
import DemoWrapper from '../helper-components/DemoWrapper';
import Select from '../../../modules/airtame-gooey-react/Select';
export default function SelectDemo() {
const options = [
{
id: 'articuno',
label: 'Articuno',
value: 'Arti... |
src/clincoded/static/components/select_variant.js | ClinGen/clincoded | 'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import _ from 'underscore';
import moment from 'moment';
import { curator_page, external_url_map } from './globals';
import { RestMixin } from './rest';
import { Form, FormMixin, Input } from ... |
{{cookiecutter.repo_name}}/app/src/client.js | thorgate/django-project-template | import '@tg-resources/fetch-runtime';
import { loadableReady } from '@loadable/component';
import React from 'react';
import { hydrate } from 'react-dom';
import { HelmetProvider } from 'react-helmet-async';
import { Provider } from 'react-redux';
import { ConnectedRouter } from 'connected-react-router';
import Cookies... |
test/GlyphiconSpec.js | HPate-Riptide/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import ReactDOM from 'react-dom';
import Glyphicon from '../src/Glyphicon';
describe('<Glyphicon>', () => {
it('Should have correct class', () => {
let instance = ReactTestUtils.renderIntoDocument(
<Glyphicon glyph="star" />
... |
src/px-grid/index.js | jonniespratley/px-components-react | import React from 'react';
import classnames from 'classnames';
import stylesheet from './style.scss';
/**
* px-grid component
*/
export default ({
style,
item,
container,
//position
top,
middle,
bottom,
left,
center,
right,
//type
row,
column,
stretch,
justify,
wrap,
nowrap... |
src/svg-icons/image/edit.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageEdit = (props) => (
<SvgIcon {...props}>
<path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/>
... |
src/chat/toolbar/ChatToolbar.js | easyCZ/enlighten | import React, { Component } from 'react';
import { ToolbarStyle } from '../../Styles';
import { Col, Row } from 'react-flexbox-grid';
import FontIcon from 'react-toolbox/lib/font_icon';
import * as Colors from '../../Colors'
class ChatToolbar extends Component {
render() {
return (
<Col xs={12} style={sty... |
src/svg-icons/image/wb-incandescent.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageWbIncandescent = (props) => (
<SvgIcon {...props}>
<path d="M3.55 18.54l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8zM11 22.45h2V19.5h-2v2.95zM4 10.5H1v2h3v-2zm11-4.19V1.5H9v4.81C7.21 7.35 6 9.28 6 11.5c0 3.31 2.... |
app/components/layouts/awsLayout.js | allecsro/dynotool | import React from 'react';
import { Switch, Route, withRouter } from 'react-router-dom';
import SidebarContainer from '../containers/sidebarContainer';
import Logo from '../elements/logo';
import Navbar from '../elements/navbar';
import TablesContainer from '../containers/tablesContainer';
import TablesAndTableContaine... |
node_modules/react-bootstrap/es/MediaLeft.js | nikhil-ahuja/Express-React | 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 ... |
src/containers/PostListPage/test.js | lewiscowper/rss-reader | /*
ava is a test framework, here we pull it's
default import, which has the main API
attached.
*/
import test from 'ava';
/*
We need React whenever we want to compile some
JSX, which we do here.
*/
import React from 'react';
/*
This is the shallow renderer from airbnb/enzyme.
It allows us to render a sp... |
src/components/SearchInput/index.js | yiweimatou/admin-antd | import React from 'react'
import { Input, Button } from 'antd';
import classNames from 'classnames';
const InputGroup = Input.Group;
class SearchInput extends React.Component {
constructor(props) {
super(props)
this.state = {
value: '',
focus: false,
}
}
handleInputChange = (e)... |
blueocean-material-icons/src/js/components/svg-icons/content/add-circle.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ContentAddCircle = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/>
</SvgIcon>
);
ContentAddCircle.displayName = 'ContentAddCircle';
ContentAdd... |
src/js/main.js | jiaola/marc-editor | import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/app';
ReactDOM.render(<App />, document.getElementById('main'));
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.