path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
app/scripts/page.js | agevio/agevio-react-demo | import React from 'react';
import t from 'agevio.js';
import Lang from './lang';
export default React.createClass({
componentDidMount() {
t.on('localeChanged', this.forceComponentRerender);
},
componentWillUnmount() {
t.remove('localeChanged', this.forceComponentRerender);
},
for... |
examples/with-react-native-web/src/App.js | jaredpalmer/react-production-starter | import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
class App extends React.Component {
render() {
return (
<View style={styles.box}>
<Text style={styles.text}>Hello, world!</Text>
</View>
);
}
}
const styles = StyleSheet.create({
box: { padding: 10 },
... |
src/index.js | fwonkas/minecraft-enchanted-item-generator | 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();
|
modules/Lifecycle.js | okcoker/react-router | import React from 'react'
import invariant from 'invariant'
const { object } = React.PropTypes
/**
* The Lifecycle mixin adds the routerWillLeave lifecycle method
* to a component that may be used to cancel a transition or prompt
* the user for confirmation.
*
* On standard transitions, routerWillLeave receives ... |
torrentula/app/src/js/src/ui/download-stats/download-stats.js | projectnfx/projectnfx.github.io | //All stats
//Loaded size, total size, download speed, upload speed
import React, { Component } from 'react';
import ReactInStyle from 'react-in-style';
import DownloadStore from '../../stores/download-store';
import connectToStores from 'alt/utils/connectToStores';
import prettyBytes from 'pretty-bytes';
@connectToSt... |
Libraries/Text/Text.js | wenpkpk/react-native | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
src/components/Header.js | vijayporwal/react-component-lifecycle | import React from 'react';
export default class Header extends React.Component {
render() {
return (
<header>{this.props.headerLabel}</header>
);
}
} |
src/routes.js | easymac/alttp-map-tracker | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/App';
import HomePage from './components/HomePage';
import NotFoundPage from './components/NotFoundPage';
import MapContainer from './containers/MapContainer';
import OverworldMap from './components/OverworldMap'... |
entry.js | toolmantim/sams-29th-birthday | import React from 'react';
import ReactDOM from 'react-dom';
import BirthdayParty from './src';
document.addEventListener('DOMContentLoaded', () => {
ReactDOM.render(
<div><BirthdayParty/></div>,
document.getElementById('birthday-party')
);
});
|
src/App.js | rdfurman/web-rfurman | import React, { Component } from 'react';
import { BrowserRouter, Route, Link, Switch } from 'react-router-dom';
import Loadable from 'react-loadable';
import { Navbar, Nav, NavItem, Grid } from 'react-bootstrap';
const Loading = () => <div>Loading...</div>;
const Home = Loadable({
loader: () => import('./routes/Ho... |
src/layouts/CoreLayout/CoreLayout.js | simonvpe/borrkoll-react | import React from 'react'
import Header from '../../components/Header'
import classes from './CoreLayout.scss'
import '../../styles/core.scss'
export const CoreLayout = ({ children }) => (
<div className='container text-center'>
<Header/>
<div className={classes.mainContainer}>
{children}
</div>
... |
web/app/books/support.js | bitemyapp/serials | // @flow
import React from 'react'
import {makeUpdate} from '../data/update'
import {EMAIL} from '../model/settings'
// TODO: should put this somewhere more common
var validateEmail = function(email) {
var re = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
return re.te... |
lib/components/SortBtns.js | sljohnson32/shoot-the-breeze | import React from 'react';
export default class SortBtns extends React.Component {
render() {
const { sortDirect, sortMsgs, user } = this.props;
return (
<button
className="sort-btn"
disabled={ !user }
onClick={ () => sortMsgs(sortDirect) }
>{ this.props.title }</button>
... |
src/server.js | murphysierra/VinnyStoryPage | /**
* 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 'babel-polyfill';
import path from 'path';
import e... |
docs/src/app/components/pages/components/DropDownMenu/Page.js | skarnecki/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import dropDownMenuReadmeText from './README';
import DropDownMenuSimpleExample ... |
app/javascript/mastodon/features/follow_requests/index.js | cobodo/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debou... |
test/containers/CounterPage.spec.js | kosich/pomodoro-pi | import { expect } from 'chai';
import React from 'react';
import { mount } from 'enzyme';
import { Provider } from 'react-redux';
import CounterPage from '../../app/containers/CounterPage';
import configureStore from '../../app/store/configureStore';
function setup(initialState) {
const store = configureStore(initi... |
src/reducers/app.js | svrnm/demomonkey | import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { Store } from 'react-chrome-redux'
import OptionsPageApp from '../components/options/OptionsPageApp'
import PopupPageApp from '../components/popup/PopupPageApp'
function renderOptionsPageApp(root, store) {
if (w... |
example/containers/LoggedIn.js | idolize/redux-react-router-transitions | import React from 'react';
export default class LoggedInContainer {
render() {
return (
<div>
You are logged in, yay! :)
</div>
);
}
}
|
actor-apps/app-web/src/app/components/sidebar/RecentSectionItem.react.js | x303597316/actor-platform | import React from 'react';
import classNames from 'classnames';
import DialogActionCreators from 'actions/DialogActionCreators';
import DialogStore from 'stores/DialogStore';
import AvatarItem from 'components/common/AvatarItem.react';
class RecentSectionItem extends React.Component {
static propTypes = {
di... |
node_modules/react-router/es6/Link.js | FrancoCotter/ReactTimerAPP | 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/routes/contact/index.js | nicolascine/site | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Layout from '../../co... |
src/sources/soundcloud/Player.js | u-wave/web | import cx from 'clsx';
import React from 'react';
import PropTypes from 'prop-types';
import { translate } from '@u-wave/react-translate';
import Paper from '@mui/material/Paper';
import Button from '@mui/material/Button';
import Typography from '@mui/material/Typography';
import ErrorIcon from '@mui/icons-material/Err... |
source/client/routes.js | worminer/React.js-Financial-News | import React from 'react'
import { Route } from 'react-router'
import authorize from './utilities/Authorize'
import App from './components/App'
import Home from './components/Home'
import UserProfile from './components/user/UserProfile'
import UserRegister from './components/user/UserRegister'
import UserLogin from '... |
server/sonar-web/src/main/js/apps/metrics/routes.js | Builders-SonarSource/sonarqube-bis | /*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License... |
src/docs/components/anchor/AnchorExamplesDoc.js | karatechops/grommet-docs | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import Anchor from 'grommet/components/Anchor';
import EditIcon from 'grommet/components/icons/base/Edit';
import Heading from 'grommet/components/Heading';
import InteractiveExample from '../../../components... |
src/Text/windows/index.js | gabrielbull/react-desktop | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Margin, { marginPropTypes } from '../../style/margin';
import Padding, { paddingPropTypes } from '../../style/padding';
import Alignment, { alignmentPropTypes } from '../../style/alignment';
import Hidden, { hiddenPropTypes } from '../... |
fields/types/markdown/MarkdownColumn.js | wustxing/keystone | import React from 'react';
import ItemsTableCell from '../../../admin/src/components/ItemsTableCell';
import ItemsTableValue from '../../../admin/src/components/ItemsTableValue';
var MarkdownColumn = React.createClass({
displayName: 'MarkdownColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropType... |
_src/containers/DevTools/DevTools.js | apedyashev/react-universal-jobs-aggregator | 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-Q">
<LogMonitor />
</DockMonitor... |
static/scripts/components/ProductList.js | minhuaF/bcb-koa2 | import React from 'react';
import { Link, browserHistory } from 'react-router';
import Footer from './Footer.js';
import ProjectListUtil from '../utils/ProjectListUtil.js';
import ProjectListItem from './ProductItem.js';
const ProductList = React.createClass({
statics: {
loadProps: function(params, cb){
... |
dawn/renderer/components/peripherals/Motor.js | pioneers/PieCentral | /* eslint-disable camelcase */
import React from 'react';
import PropTypes from 'prop-types';
import _ from 'lodash';
import numeral from 'numeral';
import { ProgressBar } from 'react-bootstrap';
/**
* Motor Component
*/
const Motor = ({ id, device_name, param }) => (
<div style={{ overflow: 'auto', width: '100%... |
src/index.js | abibao/abibao-service-web-admin | import React from 'react'
import { render } from 'react-dom'
import {Router, Route, IndexRoute, browserHistory} from 'react-router'
import Feathers from './libs/Feathers'
import App from './containers/App'
import Homepage from './pages/Homepage'
import Login from './pages/Login'
import './index.css'
let requireAut... |
src/Components/Layouts/Shared/Footer.js | mad-pirate/dashboard-example-frontend | import React from 'react';
import { Container } from 'reactstrap';
const Footer = () => (
<footer className="footer">
<Container className="text-center">
<small className="text-muted">2017 All rights belong to me. Only me. I poses them.</small>
</Container>
</footer>
);
export defa... |
src/Flags/Bulgaria.js | runjak/css-flags | // @flow
import React from 'react';
import LinearFlag from './LinearFlag';
import gradient from '../utils/gradient';
const white = '#FFFFFF';
const green = '#00976F';
const red = '#D72109';
export default function Bulgaria() {
return (
<LinearFlag
gradient={`${gradient([white, green, red])}`}
/>
);... |
react/features/toolbox/components/Toolbox.native.js | KalinduDN/kalindudn.github.io | import React, { Component } from 'react';
import { View } from 'react-native';
import { connect } from 'react-redux';
import { toggleAudioOnly } from '../../base/conference';
import { MEDIA_TYPE, toggleCameraFacingMode } from '../../base/media';
import { Container } from '../../base/react';
import { ColorPalette } fro... |
docs/lib/examples/LoadingSpinner.js | video-react/video-react | import React from 'react';
import { Player, LoadingSpinner } from 'video-react';
export default props => {
return (
<Player src="http://peach.themazzone.com/durian/movies/sintel-1024-surround.mp4">
<LoadingSpinner />
</Player>
);
};
|
examples/flux-utils-todomvc/js/app.js | lyip1992/flux | /**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
*/
'use s... |
www/components/Navigation.js | danielmahon/keystone | import React from 'react';
import Link from 'gatsby-link';
import { rhythm, scale } from 'utils/typography';
import MenuIcon from 'react-icons/lib/md/menu';
import gray from 'gray-percentage';
import Headroom from 'react-headroom';
import theme from '../theme';
import invertedLogo from '../images/logo-inverted.svg';
i... |
react-flux-mui/js/material-ui/src/svg-icons/editor/short-text.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorShortText = (props) => (
<SvgIcon {...props}>
<path d="M4 9h16v2H4zm0 4h10v2H4z"/>
</SvgIcon>
);
EditorShortText = pure(EditorShortText);
EditorShortText.displayName = 'EditorShortText';
EditorShortText... |
src/components/MaintainReportRulesRepository/ReportRuleRepositoryCatalog.js | RegOpz/RegOpzWebApp | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Panel } from 'react-bootstrap';
import DatePicker from 'react-datepicker';
import moment from 'moment';
require('react-datepicker/dist/react-datepicker.css');
class ReportCatalogList extends Component {
constructor(props) {
supe... |
code/web/node_modules/react-bootstrap/es/Grid.js | zyxcambridge/RecordExistence | 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 ... |
app/layouts/SingleColumnLayout/index.js | transparantnederland/relationizer | import './index.css';
import React from 'react';
const SingleColumnLayout = ({ children }) => {
return (
<div className="SingleColumnLayout">
{children}
</div>
);
};
export default SingleColumnLayout;
|
app/src/index.js | sangallimarco/giardino | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import './index.css';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
|
app/index.js | jorgeortega/react-movie-collection | import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import { browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import { AppContainer } from 'react-hot-loader';
import configureStore from './store/configureStore';
import Root from './cont... |
src/Label.js | BespokeInsights/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const Label = React.createClass({
mixins: [BootstrapMixin],
getDefaultProps() {
return {
bsClass: 'label',
bsStyle: 'default'
};
},
render() {
let classes = this.getBsClassSe... |
client/node_modules/react-router/es/Redirect.js | UnicornCollege/ucl.itkpd.configurator | import React from 'react';
import invariant from 'invariant';
import { createRouteFromReactElement as _createRouteFromReactElement } from './RouteUtils';
import { formatPattern } from './PatternUtils';
import { falsy } from './InternalPropTypes';
var _React$PropTypes = React.PropTypes,
string = _React$PropTypes.st... |
tests/routes/Home/components/HomeView.spec.js | roslaneshellanoo/react-redux-tutorial | import React from 'react'
import { HomeView } from 'routes/Home/components/HomeView'
import { render } from 'enzyme'
describe('(View) Home', () => {
let _component
beforeEach(() => {
_component = render(<HomeView />)
})
it('Renders a welcome message', () => {
const welcome = _component.find('h4')
... |
Expression.js | alangpierce/LambdaCalculusPlayground | /**
* View code for expressions.
*
* @flow
*/
'use strict';
import React from 'react';
import {
Image,
Text,
View,
DeviceEventEmitter,
} from 'react-native';
import StatelessComponent from './StatelessComponent'
import {TrackedText, TrackedView} from './TrackedViews'
import type {
DefinitionE... |
src/server/frontend/Html.js | TheoMer/este | // @flow
/* eslint-disable react/no-danger */
import React from 'react';
const GoogleAnalytics = ({ id }) => (
<script
dangerouslySetInnerHTML={{
__html: `
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s... |
src/collections/BootListGroup/BootListGroupItemHeading.js | shengnian/shengnian-ui-react | import React from 'react'
import PropTypes from 'prop-types'
import cx from 'classnames'
const propTypes = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.any,
}
const defaultProps = {
tag: 'h5',
}
const ListGroupItemHeading = (props) => {
const {
className,
tag: ... |
src/components/LandingPage/index.js | goodjoblife/GoodJobShare | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import ImmutablePropTypes from 'react-immutable-proptypes';
import cn from 'classnames';
import { compose, setStatic, lifecycle } from 'recompose';
import { Section, Wrapper, Heading } from 'common/base';
import Colu... |
src/containers/WalkthroughIllustList.js | alphasp/pxview | /* eslint no-empty: ["error", { "allowEmptyCatch": true }] */
import React, { Component } from 'react';
import { InteractionManager } from 'react-native';
import { connect } from 'react-redux';
import IllustList from '../components/IllustList';
import * as walkthroughIllustsActionCreators from '../common/actions/walkt... |
src/components/Header.js | mehmettugrulsahin/cotd-react-es6 | import React from 'react';
const Header = (props) => {
return (
<header className="top">
<h1>
Catch
<span className="ofThe">
<span className="of">of</span>
<span className="the">the</span>
</span>
Day
</h1>
<h3 className="tagline"><span>{props.tagline}</s... |
pathfinder/vtables/decommissioningcommissioningapplications/src/common/Link.js | leanix/leanix-custom-reports | import React, { Component } from 'react';
import PropTypes from 'prop-types';
class Link extends Component {
constructor(props) {
super(props);
this._handleClick = this._handleClick.bind(this);
}
_handleClick(e) {
e.preventDefault();
lx.openLink(this.props.link, this.props.target);
}
render() {
if (!... |
src/routes/Home/components/HomeView.js | janoist1/route-share | import React from 'react'
import DuckImage from '../assets/Duck.jpg'
import './HomeView.scss'
export const HomeView = () => (
<div>
<h4>Welcome!</h4>
<img alt='This is a duck, because Redux!' className='duck' src={DuckImage} />
</div>
)
export default HomeView
|
src/components/DebugConsole.js | cannc4/Siren | import React from 'react';
import { inject, observer } from 'mobx-react';
// import _ from 'lodash';
// CSS Imports
import '../styles/App.css';
import '../styles/Layout.css';
import '../styles/Home.css';
import '../styles/ContextMenu.css';
@inject ('debugStore')
@observer
export default class DebugConsole extends Rea... |
js/task/task_list.js | rohini21/redux_todo_demo | import React from 'react';
import { connect } from 'react-redux';
import TaskItem from "./task_item";
import {getTasksAction} from '../actions/action';
class TaskList extends React.Component {
constructor(props){
super(props);
this.state = {
list: []
}
}
componentDidMount(){
var self = this;
this.s... |
src/svg-icons/image/filter-1.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilter1 = (props) => (
<SvgIcon {...props}>
<path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"/>
... |
src/frontend/components/main.js | PiGarageDoor/garage-pi | import React from 'react';
import MainAppBar from 'containers/appbar';
import MainLeftBar from 'containers/leftnav';
export default class Main extends React.Component {
constructor(props) {
super(props);
this.onHandleOpenLeftNav = this.onHandleOpenLeftNav.bind(this);
this._handleSetRefLeftBar = this._h... |
001-bootstrapping-react/source/client.js | 02GEEK/course-react-ui | import React from 'react';
import ReactDOM from 'react-dom';
const component = <div className="jumbotron jumbotron-fulid text-xs-center" style={{backgroundImage:'url(img/forest-1198698_1280.jpg)',color:'white'}}>
<div className="container">
<h1>Building React.js User Interfaces</h1>
<p>with Bootstrap and SA... |
src/components/label-list-item.component.js | dyesseyumba/git-point | import React from 'react';
import styled from 'styled-components';
import { Icon } from 'react-native-elements';
import { LabelButton } from 'components';
import { colors } from 'config';
type Props = {
label: Object,
removeLabel: Function,
};
const LabelListItemContainer = styled.View`
border-bottom-color: ${c... |
src/js/components/icons/base/Notes.js | kylebyerly-hp/grommet | // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... |
client/src/app/components/ui/UiAutocomplete.js | zraees/sms-project | import React from 'react'
export default class UiAutocomplete extends React.Component{
componentDidMount(){
$(this.refs.input).autocomplete({
source: this.props.source
});
}
render () {
const { source, ...props} = {...this.props};
return <input type="text" {...pro... |
app/javascript/mastodon/features/account_timeline/containers/header_container.js | tootcafe/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { makeGetAccount } from '../../../selectors';
import Header from '../components/header';
import {
followAccount,
unfollowAccount,
unblockAccount,
unmuteAccount,
pinAccount,
unpinAccount,
} from '../../../actions/accounts';
import {
m... |
src/views/dictionary/adjectivd/AdjectivdPanel.js | bostontrader/senmaker | // @flow
import React from 'react'
import AdjectivdAEForm from './addedit/AdjectivdAEForm'
import AdjectivdTable from './AdjectivdTable'
import AdjectivdActions from '../../../data/dictionary/adjectivd/AdjectivdActions'
/*
The AdjectivdPanel is responsible for displaying everything about our list of adjectivd. S... |
app/components/shared/PageHeader/index.js | buildkite/frontend | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Title from './title';
import Button from './button';
import Description from './description';
import Menu from './menu';
import Icon from './icon';
class PageHeader extends React.Component {
static propTypes =... |
gadget-system-teamwork/src/components/gadgets/HomePage.js | TeodorDimitrov89/JS-Web-Teamwork-2017 | import React from 'react'
import '../../HomePage.css'
import gadgetActions from '../../actions/GadgetActions'
import gadgetStore from '../../stores/GadgetStore'
import {Link} from 'react-router-dom'
import Auth from '../users/Auth'
class HomePage extends React.Component {
constructor () {
super()
this.state ... |
frontend/src/containers/UserManagement/UserManagement.js | webrecorder/webrecorder | import React from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { load, login } from 'store/modules/auth';
import { toggleModal } from 'store/modules/bugReport';
import { showModal } from 'store/modules/userLogin';
import { UserManagementUI } from 'components/siteCo... |
src/components/Footer/Footer.js | reicheltp/Sonic | /**
* 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... |
src/components/jogos/CampeonatosView.js | sysbet/sysbet-mobile | import moment from 'moment';
import React, { Component } from 'react';
import {
ScrollView,
View,
Text,
StyleSheet,
} from 'react-native';
import RNRF, { Actions } from 'react-native-router-flux';
import Button from 'react-native-button';
class SectionItem extends Component {
render() {
re... |
src/LocalizeProvider.js | ryandrewjohnson/react-localize-redux | // @flow
import React, { Component } from 'react';
import {
localizeReducer,
getActiveLanguage,
getOptions,
getTranslationsForActiveLanguage,
type LocalizeState,
type Action,
initialize as initializeAC,
INITIALIZE,
InitializePayload
} from './localize';
import {
LocalizeContext,
type LocalizeConte... |
node_modules/redbox-react/examples/babel-plugin-react-hot/index.js | hnikupet/dddhackaton | import React from 'react'
import App from './components/App'
const root = document.getElementById('root')
React.render(<App />, root)
|
test/Calendar.spec.js | freiksenet/react-calendar | import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import moment from 'moment';
import Calendar from '../src/Calendar';
describe('<Calendar />', () => {
let wrapper;
before(() => {
const date = moment().startOf('year');
wrapper = shallow(<Calendar date={ date }
... |
src/modules/RichEditor.js | OCMC-Translation-Projects/ioc-liturgical-react | import React from 'react';
import PropTypes from 'prop-types';
import { get } from 'lodash';
import CitationButton from '../helpers/CitationButton';
import MessageIcons from '../helpers/MessageIcons';
import {
EditorState
, ContentState
, convertToRaw
} from 'draft-js';
import { Editor } from 'react-draft-wysiwyg... |
js/components/bookmarks/index.js | kondoSoft/que_hacer_movil | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Dimensions } from 'react-native'
import { Container, Header, Title, Content, Text, Button, Icon, Item, Input, Left, Right, Body, Footer } from 'native-base';
import ... |
gatsby-ssr.js | howtographql/howtographql | import React from 'react'
import { Provider } from 'react-redux'
import { renderToString } from "react-dom/server"
import createStore from './src/createStore'
exports.replaceRenderer = ({ bodyComponent, replaceBodyHTMLString }) => {
const store = createStore()
const ConnectedBody = () => (
<Provider store=... |
packages/material-ui-icons/src/FormatBold.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let FormatBold = props =>
<SvgIcon {...props}>
<path d="M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-... |
components/PageLink.js | isogon/styled-mdl-website | import { compose, withStateHandlers, lifecycle } from 'recompose'
import { util, Ripple } from 'styled-mdl'
import React from 'react'
import styled, { css } from 'styled-components'
const { getters: g } = util
const LinkWrap = styled.div`
position: relative;
@media (min-width: 1082px) {
margin-left: 66px;
}... |
tests/Rules-isUrl-spec.js | hanbar/formsy-react | import React from 'react';
import TestUtils from 'react-addons-test-utils';
import Formsy from './..';
import { InputFactory } from './utils/TestInput';
const TestInput = InputFactory({
render() {
return <input value={this.getValue()} readOnly/>;
}
});
const TestForm = React.createClass({
render() {
re... |
client/components/Input.js | HelpAssistHer/help-assist-her | import React from 'react'
import injectSheet from 'react-jss'
import { Phone, BigPhone, Tablet, Desktop } from './Breakpoints'
const Input = ({ classes, type, placeholder, ...props }) => {
return (
<div className={classes.inputRoot}>
<Phone>
<div className={classes.borderPhone}>
<input
className=... |
packages/eslint-config-marlint/src/__tests__/fixture-pass.js | traveloka/javascript | import React from 'react';
function a(e) {
e.preventDefault();
}
export default class Search extends React.Component {
requestReceived(req, res, next) {
return true;
}
handleClick = e => {
const { x, y, ...z } = e;
this.doSomething(z, e, a);
};
render() {
return (
<div onClick={thi... |
src/constants/Tooltips.js | clementmouchet/longhorn-js-client | import React from 'react';
import {Tooltip} from "react-bootstrap";
export default class Tooltips {
static OPTIONAL = (
<Tooltip id="tooltip">This field is optional<br/>Leave it empty to use the defaults</Tooltip>
);
} |
src/components/RoomUserList/Row.js | u-wave/web | import cx from 'clsx';
import React from 'react';
import PropTypes from 'prop-types';
import ListItemButton from '@mui/material/ListItemButton';
import ListItemAvatar from '@mui/material/ListItemAvatar';
import ListItemText from '@mui/material/ListItemText';
import useUserCard from '../../hooks/useUserCard';
import Ava... |
react_export_input_sample/__tests__/index.ios.js | devSC/react-native | 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/app/components/Posts.js | saulshanabrook/eee-display | import React from 'react'
import Reflux from 'reflux'
import Remarkable from 'remarkable'
import Moment from 'moment'
import _ from 'lodash'
import Timestamp from 'react-time'
import {Panel, Button} from 'react-bootstrap'
import Toggle from 'react-toggle'
import PostActions from '../actions/PostActions'
import PostsS... |
file-browser-ui/dev/js/components/payment/selectcard.js | CloudBoost/cloudboost | import React from 'react';
import planList from './plans';
import {Menu, MenuItem, Popover} from 'material-ui'
var valid = require('card-validator');
const style = {
menuItem: {
width: '112px'
}
}
class SelectCard extends React.Component {
constructor(props) {
super(props);
this.sta... |
20161211/RN-Learn/__tests__/index.ios.js | fengnovo/react-native | 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 />
);
});
|
app/jsx/actAs/ActAsPanda.js | djbender/canvas-lms | /*
* Copyright (C) 2017 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distribut... |
test/DropdownSpec.js | mmarcant/react-bootstrap | import keycode from 'keycode';
import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ReactDOM from 'react-dom';
import tsp from 'teaspoon';
import Dropdown from '../src/Dropdown';
import DropdownMenu from '../src/DropdownMenu';
import Grid from '../src/Grid';
import MenuItem from '..... |
src/components/__tests__/InfoBar-test.js | AnthonyWhitaker/react-redux-universal-hot-example | import React from 'react';
import ReactDOM from 'react-dom';
import {renderIntoDocument} from 'react-addons-test-utils';
import { expect} from 'chai';
import { InfoBar } from 'components';
import { Provider } from 'react-redux';
import {reduxReactRouter} from 'redux-router';
import createHistory from 'history/lib/creat... |
src/svg-icons/hardware/phone-iphone.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwarePhoneIphone = (props) => (
<SvgIcon {...props}>
<path d="M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1zm-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1... |
src/wrappers/RectangleInterfaceWrapper.js | tmpaul06/gathering-client | import React from 'react';
import RectangleInterface from '../components/RectangleInterface';
// Define an interface for retrieving and manipulating the rectangle
// MOVE, ROTATE. We will assign roles to various connections for moving
// and updating at random (assigning roles).
// Then introduce an intermediary (e.g ... |
packages/ui/stories/components/userPluginsItem.stories.js | nukeop/nuclear | import React from 'react';
import { storiesOf } from '@storybook/react';
import {UserPluginsItem} from '../..';
storiesOf('Components/User plugins item', module)
.add('Basic', () => (
<div className='bg'>
<UserPluginsItem
path='/usr/bin/local'
name='test plugin'
description='test d... |
src/components/pages/Checkout/CheckoutBillingInformation.js | ESTEBANMURUZABAL/bananaStore | /**
* Imports
*/
import React from 'react';
import {FormattedMessage} from 'react-intl';
// Flux
import IntlStore from '../../../stores/Application/IntlStore';
// Required components
import AddressField from '../../common/forms/AddressField';
import AddressPreview from '../../common/forms/AddressPreview';
import Ch... |
src/vendor/recharts/demo/component/PolarRadiusAxis.js | donal-crotty/fuzzy-telegram | import React from 'react';
import { Surface, PolarRadiusAxis } from 'recharts';
export default React.createClass({
render () {
const ticks = [
{ value: '100', radius: 50 },
{ value: '200', radius: 100 },
{ value: '300', radius: 150 },
{ value: '400', radius: 200 },
{ value: '500', r... |
examples/js/expandRow/expand-indicator.js | prajapati-parth/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
if (i < 3) {
products.push... |
src/index.js | a-tarr/Fleetr | import React from 'react';
import ReactDOM from 'react-dom';
import Store from './data/Store';
import Main from './Main';
import './index.css';
const store = new Store();
ReactDOM.render(
<Main store={store} />, document.getElementById('root')
);
|
app/react-icons/fa/gittip.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaGittip extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m20.3 29.1l7.8-10.6q0.3-0.5 0.5-1.3t-0.1-1.9-1.4-1.8q-0.9-0.6-1.8-0.5t-1.7 0.... |
src/components/containers/MainSpinner/MainSpinner.js | PulseTile/PulseTile-React | import React from 'react';
const MainSpinner = (props) => {
return (
<div className="main-spinner">
<div className="lds-css ng-scope">
<div className="lds-dual-ring">
<div></div>
<div></div>
</div>
</div>
</div>)
};
export default MainSpinner;
|
src/components/SearchPage/SearchPager/index.js | ndlib/usurper | import React from 'react'
import PropTypes from 'prop-types'
import Link from 'components/Interactive/Link'
import QueryString from 'querystring'
import typy from 'typy'
const SearchPager = (props) => {
const queries = typy(props.queries).safeObjectOrEmpty
const pagerQuery = QueryString.parse(props.pagerQuery.repl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.