path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/SafeAnchor.js | justinanastos/react-bootstrap | import React from 'react';
import createChainedFunction from './utils/createChainedFunction';
/**
* Note: This is intended as a stop-gap for accessibility concerns that the
* Bootstrap CSS does not address as they have styled anchors and not buttons
* in many cases.
*/
export default class SafeAnchor extends React... |
templates/rubix/rubix-bootstrap/src/L20n.js | jeffthemaximum/Teachers-Dont-Pay-Jeff | import React from 'react';
import Dispatcher from './Dispatcher';
import isBrowser from './isBrowser';
var win = null;
if (!isBrowser()) {
win = {
L20n: {
getContext: function() {},
},
};
} else {
win = window;
if (!win.hasOwnProperty('L20n')) {
win.L20n = {
getContext: function() {},... |
pkg/machines/index.js | mvollmer/cockpit | /*
* This file is part of Cockpit.
*
* Copyright (C) 2016 Red Hat, Inc.
*
* Cockpit 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 2.1 of the License, or
* (at your option) any l... |
app/components/search/index.js | vgno/getroc | import React from 'react';
import styles from './style.scss';
import searchIcon from './assets/search.png';
const DEFAULT_SEARCH = 'Search';
const GITHUB_SEARCH = 'https://github.com/search?utf8=%E2%9C%93&type=Repositories&ref=searchresults';
export default class Search extends React.Component {
constructor(props... |
website/src/components/SEO.js | davidsonfellipe/awesome-wpo | /**
* SEO component that queries for data with
* Gatsby's useStaticQuery React hook
*
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
import React from 'react'
import PropTypes from 'prop-types'
import Helmet from 'react-helmet'
import { useStaticQuery, graphql } from 'gatsby'
function SEO({ descripti... |
pootle/static/js/auth/components/SignInPanel.js | Yelp/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import assign from 'object-assign';
import React from 'rea... |
app/jsx/developer_keys/ScopesList.js | djbender/canvas-lms | /*
* Copyright (C) 2018 - 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... |
site/pages/ExamplePage.js | hiddentao/react-dnd | import React from 'react';
import Header from '../components/Header';
import PageBody from '../components/PageBody';
import SideBar from '../components/SideBar';
import { ExamplePages } from '../Constants';
export default class ExamplesPage {
render() {
return (
<div>
<Header/>
<PageBody ha... |
clients/packages/admin-client/src/mobrender/components/widget-overlay.js | nossas/bonde-client | import PropTypes from 'prop-types'
import React from 'react'
const overlayStyle = {
position: 'absolute',
top: '0',
right: '0',
bottom: '0',
left: '0',
fontWeight: 'bold',
borderWidth: '6px',
opacity: '.82',
backgroundColor: '#222222',
fontSize: '1.8rem'
}
const WidgetOverlay = ({
children,
wi... |
src/containers/DevTools/DevTools.js | gregsabo/redux-decagon | 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"
defaultIsVisible={fal... |
docs/src/app/components/pages/components/DropDownMenu/ExampleLabeled.js | spiermar/material-ui | import React from 'react';
import DropDownMenu from 'material-ui/DropDownMenu';
import MenuItem from 'material-ui/MenuItem';
export default class DropDownMenuLabeledExample extends React.Component {
constructor(props) {
super(props);
this.state = {value: 2};
}
handleChange = (event, index, value) => th... |
src/modules/productdetail/component.js | gustavoisensee/shoppingcart | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Notification from './../notification/component';
import Loading from './../loading/component';
import style from './style.scss';
const defaultProps = {
main: {
products: {},
notification: {
success: false,
messag... |
example/index.js | voronianski/react-star-rating-component | import React from 'react';
import ReactDOM from 'react-dom';
import StarRatingComponent from '../';
class App extends React.Component {
constructor() {
super();
this.state = {
rating: 1,
rating_custom_icon: 6,
rating_half_star: 3.5,
rating_empty_initial: 0
};
}
onStarClick(... |
src/layouts/CoreLayout/CoreLayout.js | Dylan1312/pool-elo | import React from 'react'
import Header from '../../components/Header'
import './CoreLayout.scss'
import '../../styles/core.scss'
export const CoreLayout = ({ children }) => (
<div className='container text-center'>
<Header />
<div className='core-layout__viewport'>
{children}
</div>
</div>
)
Co... |
catalog/app/containers/Notifications/Notification.js | quiltdata/quilt | import PT from 'prop-types'
import React from 'react'
import * as M from '@material-ui/core'
const useStyles = M.makeStyles((t) => ({
close: {
padding: t.spacing(0.5),
},
}))
export default function Notification({ id, ttl, message, action, dismiss }) {
const classes = useStyles()
const handleClose = Reac... |
public/js/components/admin/users/blocked/blockedUser.react.js | IsuruDilhan/Coupley | import React from 'react';
import ListItem from 'material-ui/lib/lists/list-item';
import Divider from 'material-ui/lib/divider';
import Avatar from 'material-ui/lib/avatar';
import Colors from 'material-ui/lib/styles/colors';
import IconButton from 'material-ui/lib/icon-button';
import MoreVertIcon from 'material-ui/l... |
dashboard/app/components/IamPrincipalPermissionsFieldSet/IamPrincipalPermissionsFieldSet.js | tlisonbee/cerberus-management-service | import React from 'react'
import { Component } from 'react'
import PropTypes from 'prop-types'
import RoleSelect from '../RoleSelect/RoleSelect'
import Buttons from '../Buttons/Buttons'
import AddButton from '../AddButton/AddButton'
import { touch } from 'redux-form'
import './IamPrincipalPermissionsFieldSet.scss'
/**... |
Example/src/screens/Home.js | melihberberolu/react-native-scaling-drawer | import React, { Component } from 'react';
import { View, StyleSheet, TouchableOpacity, Text } from 'react-native';
import { drawer } from "../AppNavigation";
class Home extends Component {
render() {
return (
<View style={styles.container}>
<TouchableOpacity onPress={() => drawer.current.open()}>
... |
client/components/ui/clearable-input.js | ZeHiro/kresus | import React from 'react';
import PropTypes from 'prop-types';
import { translate as $t } from '../../helpers';
class ClearableInput extends React.PureComponent {
state = {
value: this.props.value || ''
};
onChange = value => {
this.setState({ value }, () => {
if (typeof this.... |
src/containers/App.js | nchaulet/bitbucket-team-pullrequests | import React from 'react';
import {initRepositories, fetchPullRequests, login} from '../actions/index';
import {connect} from 'react-redux'
import PullRequestDash from './PullRequestDash';
import TeamChoose from './TeamChoose';
import Loader from './Loader';
import Login from './Login';
@connect(
(state) => {
re... |
packages/bundle/src/renderWebChat.js | billba/botchat | import React from 'react';
import ReactDOM from 'react-dom';
export default function renderWebChat(ReactWebChat, props, element) {
ReactDOM.render(<ReactWebChat {...props} />, element);
}
|
client/src/app/components/layout/components/LayoutSwitcher.js | zraees/sms-project | import React from 'react';
import {bindActionCreators} from 'redux'
import {connect} from 'react-redux';
import classnames from 'classnames'
import {config} from '../../../config/config';
import * as LayoutActions from '../LayoutActions'
class LayoutSwitcher extends React.Component {
constructor(props){
... |
src/screens/App/screens/NotFound/index.js | savitri/savitri-web | import React from 'react';
import { Link } from 'react-router';
export default class NotFound extends React.Component {
render() {
return (
<div>Nothing here, <Link to="/">go home!</Link></div>
);
}
}
|
demo/src/components/Code.js | ilxanlar/cathode | import React from 'react';
import styled from 'styled-components';
import SyntaxHighlighter from 'react-syntax-highlighter/prism';
import { hopscotch as theme } from 'react-syntax-highlighter/styles/prism';
const CodeUnStyled = ({ children, className, ...props }) => {
return (
<div className="example-code">
... |
src/components/Hero/HeroContent.js | webpack/analyse-tool | import React from 'react';
import styles from './Hero.scss';
export default class HeroContent extends React.Component {
static displayName = 'HeroContent';
static propTypes = {
children: React.PropTypes.node,
};
render() {
const children = this.props.children;
return (
<div className={ style... |
src/components/CandidateListItem/CandidateListItem.js | ihnat/tream | /**
* 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, { Component } from 'react';
import withStyle... |
react/features/invite/components/dial-in-summary/web/NumbersList.js | bgrozev/jitsi-meet | // @flow
import React, { Component } from 'react';
import { translate } from '../../../../base/i18n';
type Props = {
/**
* Whether or not numbers should include links with the telephone protocol.
*/
clickableNumbers: boolean,
/**
* The conference ID for dialing in.
*/
conference... |
src/components/About/About.js | Shidil/react-redux-starter | import React from 'react';
class AboutComponent extends React.Component {
render() {
return (
<div className="about-view">
<h1>About us</h1>
</div>
);
}
}
export default AboutComponent;
|
docs/src/app/components/pages/components/DatePicker/ExampleSimple.js | ruifortes/material-ui | import React from 'react';
import DatePicker from 'material-ui/DatePicker';
/**
* The Date Picker defaults to a portrait dialog. The `mode` property can be set to `landscape`.
* You can also disable the Dialog passing `true` to the `disabled` property.
*/
const DatePickerExampleSimple = () => (
<div>
<DatePic... |
client-react/src/components/Portfolio/Forecast.js | diman84/Welthperk | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { ContentBlock } from 'components';
import { ForecastChart } from 'components/Charts';
import ContentLoader, { Rect } from 'react-content-loader';
@connect(
state => {
const { loading, load... |
src/pages/menu.js | warrenwchan/tango-tropical-grill | import React from 'react';
import './styles.scss';
import dineInMenu from './../assets/dine-in-menus.pdf';
const menuPDF = () => (
<div className="pdfContainer">
<iframe
src={dineInMenu}
frameBorder="0"
width="100%"
height="100%"
></iframe>
</div>
)
export default menuPDF
|
app/containers/App.js | rick-maclean/wbt-canada-stmts-electron-react-simmering | // @flow
import React, { Component } from 'react';
import type { Children } from 'react';
export default class App extends Component {
props: {
children: Children
};
render() {
return (
<div>
{this.props.children}
</div>
);
}
}
|
lib/components/Uploader.js | hanford/filepizza | import Arrow from '@app/components/Arrow';
import React from 'react';
import UploadActions from '@app/actions/UploadActions';
export default class UploadPage extends React.Component {
uploadFile(file) {
UploadActions.uploadFile(file);
}
render() {
switch (this.props.status) {
case 'ready':
... |
src/components/antd/menu/MenuItem.js | hyd378008136/olymComponents | import React from 'react';
import { Item } from 'rc-menu';
import PropTypes from 'prop-types';
import Tooltip from '../tooltip';
class MenuItem extends React.Component {
render() {
const { inlineCollapsed } = this.context;
const props = this.props;
return React.createElement(Tooltip, { title... |
examples/transitions/app.js | levjj/react-router | import React from 'react';
import { Router, Route, Link, History, Lifecycle } from 'react-router';
var App = React.createClass({
render() {
return (
<div>
<ul>
<li><Link to="/dashboard">Dashboard</Link></li>
<li><Link to="/form">Form</Link></li>
</ul>
{this.props... |
src/tubular/app.js | SodhanaLibrary/react-examples | import React from 'react';
import Tubular from 'react-tubular';
export default class App extends React.Component {
constructor(props) {
super(props);
this.playVideo = this.playVideo.bind(this);
this.pauseVideo = this.pauseVideo.bind(this);
this.mute = this.mute.bind(this);
this.decreaseVolume = ... |
app/routes.js | colin8930/OpenObjectMarker | import React from 'react';
import {Route} from 'react-router';
import App from './components/App';
import Home from './components/Home';
import AddLabel from './components/AddLabel';
import UploadImg from './components/UploadImg';
import Explore from './components/Explore';
export default (
<Route handler={App}>
... |
ajax/libs/react-instantsearch/4.4.1/Connectors.js | seogi1004/cdnjs | /*! ReactInstantSearch UNRELEASED | © Algolia, inc. | https://community.algolia.com/react-instantsearch */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory... |
src/js/views/controls.js | nolemmings/touchstonejs-starter | import Container from 'react-container';
import React from 'react';
import Tappable from 'react-tappable';
import Timers from 'react-timers';
import { Link, UI } from 'touchstonejs';
module.exports = React.createClass({
mixins: [Timers],
statics: {
navigationBar: 'main',
getNavigation () {
return {
title:... |
docs/components/About.js | nikgraf/belle | import React, { Component } from 'react';
export default class FuturePlans extends Component {
render() {
return (<div>
<h2 style={{ marginTop: 0, marginBottom: 40 }}>Discussion or need help?</h2>
<p>
Join us at the <b>#belle</b> channel of the <a href="http://reactiflux.com/">Reactiflux</a... |
src/interface/icons/ViralContent.js | fyruna/WoWAnalyzer | import React from 'react';
// Viral Content by Edwin Prayogi M from the Noun Project
const Icon = ({ ...other }) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" className="icon" {...other}>
<g>
<path d="M49.9931641,18.8754883c0.6904297,0,1.25-0.5595703,1.25-1.25V12.5c0-0.6904297-0.559570... |
scripts/apps/search/helpers.js | mugurrus/superdesk-client-core | import React from 'react';
import ReactDOM from 'react-dom';
import {DEFAULT_LIST_CONFIG} from './constants';
import * as fields from './components/fields';
import ng from '../../core/services/ng';
export function getSpecStyle(spec) {
var style = {};
if (spec.color) {
style.backgroundColor = spec.colo... |
src/components/settings/services/ServiceItem.js | meetfranz/franz | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { defineMessages, intlShape } from 'react-intl';
import ReactTooltip from 'react-tooltip';
import { observer } from 'mobx-react';
import classnames from 'classnames';
import ServiceModel from '../../../models/Service';
const messages... |
src/interface/icons/Scroll.js | ronaldpereira/WoWAnalyzer | import React from 'react';
// https://thenounproject.com/search/?q=scroll&i=1219367
// Created by jngll from the Noun Project
const Icon = ({ ...other }) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" className="icon" {...other}>
<path d="M80.64,11.87l-.52,0-.26,0H30.64A10.24,10.24,0,0,0,20.4... |
file-browser-ui/dev/js/components/profile/profile_old.js | CloudBoost/cloudboost | import React from 'react';
import {connect} from 'react-redux';
import Toolbar from '../toolbar/toolbar.js';
import Footer from '../footer/footer.jsx';
import {saveUserImage, deleteUserImage, showAlert, updateUser} from '../../actions';
import IconButton from 'material-ui/IconButton';
import DeleteIcon from 'material-u... |
examples/with-material-ui/src/client.js | jaredpalmer/razzle | import React from 'react';
import { hydrate } from 'react-dom';
import theme from './theme';
import { ThemeProvider } from '@material-ui/styles';
import App from './App';
hydrate(
<ThemeProvider theme={theme}>
<App />
</ThemeProvider>,
document.getElementById('root'),
() => {
// [ReHydratation](https:/... |
src/main/internal/adaption/react/ElementUtils.js | mcjazzyfunky/js-surface | import React from 'react'
export default {
typeOf(elem) {
let ret
if (React.isValidElement(elem)) {
ret = elem.type
}
return ret
},
propsOf(elem) {
let ret
if (React.isValidElement(elem)) {
ret = elem.props
}
return ret
}
}
|
components/DashboardPage.js | turntwogg/final-round | import React from 'react';
import { useTheme } from '@turntwo/react-ui';
import Page from './Page';
import PageContent from './PageContent';
import Typography from './Typography';
import Link from './Link';
const links = [
{
title: 'All',
path: '/dashboard',
},
{
title: 'News',
path: '/dashboard... |
src/containers/recipes/Card/CardContainer.js | banovotz/WatchBug2 | /**
* Individual Recipe Card Container
*
* React Native Starter App
* https://github.com/mcnamee/react-native-starter-app
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Actions } from 'react-native-router-flux';
// Actions
import * ... |
voting-client/src/index.js | mrwizard82d1/full-stack-redux-tutorial | import React from 'react';
import ReactDOM from 'react-dom';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import App from './App';
import './index.css';
import reduce from './components/reducer';
const store = createStore(reduce);
store.dispatch({
type: 'SET_STATE',
state: {
vot... |
src/table-cell.js | frozenarc/react-abstract-table | import React from 'react';
import PropTypes from 'prop-types';
class TableCell extends React.Component {
constructor(props) {
super(props);
this.state = {};
this.info = {};
this.getState = this.getState.bind(this);
this.setState = this.setState.bind(this);
this.setInfo = this.setInfo.bind(... |
pootle/static/js/auth/index.js | garthylou/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
'use strict';
import FluxComponent from 'flummox/componen... |
src/icons/PlusOneIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class PlusOneIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M20 16h-4v8H8v4h8v8h4v-8h8v-4h-8zm9-3.84v3.64l5-1V36h4V10z"/></svg>;}
}; |
tests/react_children/tuple.js | MichaelDeBoey/flow | // @flow
import React from 'react';
class Tuple
extends React.Component<{children: [boolean, string, number]}, void> {}
class TupleOne extends React.Component<{children: [boolean]}, void> {}
<Tuple />; // Error: `children` is required.
<Tuple>{true}{'foo'}{42}</Tuple>; // OK: All the tuple items.
<Tuple>{true}foo{... |
src/decorators/withViewport.js | ChrisMaher/reactjs-project | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react'; // eslint-disable-line no-unused-vars
import EventEmitter from 'eventemitter3';
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
let EE;
let viewport = {width: 1366, height: 768}; // Default si... |
src/index.js | ermainz/Calculator | import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App';
require('./styles/style.css');
ReactDOM.render(<App />, document.getElementById('root'));
|
client/modules/RootWiki/pages/EditRootWikiGroupTreePage.js | XuHaoJun/tiamat | import React from 'react';
import { fromJS } from 'immutable';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Helmet from 'react-helmet';
import { setHeaderTitle, updateSendButtonProps } from '../../MyApp/MyAppActions';
import TouchBackend from 'react-dnd-touch-backend';
import HTML5B... |
src/layouts/CoreLayout/CoreLayout.js | robertcasanova/personal-website | import React from 'react'
import Header from '../../components/Header'
import './CoreLayout.scss'
import '../../styles/core.scss'
export const CoreLayout = ({ children }) => (
<div>
<Header />
<div>
{children}
</div>
</div>
)
CoreLayout.propTypes = {
children : React.PropTypes.element.isRequir... |
app/react-icons/fa/globe.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaGlobe extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m20.1 2.9q4.7 0 8.6 2.3t6.3 6.2 2.3 8.6-2.3 8.6-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.... |
app/javascript/mastodon/features/ui/components/modal_loading.js | res-ac/mstdn.res.ac | import React from 'react';
import LoadingIndicator from '../../../components/loading_indicator';
// Keep the markup in sync with <BundleModalError />
// (make sure they have the same dimensions)
const ModalLoading = () => (
<div className='modal-root__modal error-modal'>
<div className='error-modal__body'>
... |
app/javascript/mastodon/features/report/statuses.js | Ryanaka/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
import StatusCheckBox from 'mastodon/features/report/containers/status_check_box_container';
import { OrderedSet } from 'immutable';
import { FormattedMessage... |
src/svg-icons/device/brightness-low.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBrightnessLow = (props) => (
<SvgIcon {...props}>
<path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 ... |
tests/lib/rules/indent.js | elynde/eslint | /**
* @fileoverview This option sets a specific tab width for your code
* @author Dmitriy Shekhovtsov
* @author Gyandeep Singh
* @copyright 2014 Dmitriy Shekhovtsov. All rights reserved.
* @copyright 2015 Gyandeep Singh. All rights reserved.
*/
"use strict";
//----------------------------------------------------... |
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Create/Endpoint/ApiCreateEndpoint.js | sambaheerathan/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/components/square.js | kmark1625/Game-of-Life | import React, { Component } from 'react';
import '../styles/square.css'
class Square extends Component {
render() {
return (
<button className={this.props.alive ? 'alive' : 'dead'} onClick={() =>{ this.props.onClick(); }}>
</button>
);
}
}
export default Square;
|
packages/cf-component-copyable-textarea/src/CopyableTextarea.js | mdno/mdno.github.io | import React from 'react';
import PropTypes from 'prop-types';
import { TextareaUnstyled, TextareaTheme } from 'cf-component-textarea';
import { createComponent, applyTheme } from 'cf-style-container';
const Textarea = applyTheme(TextareaUnstyled, TextareaTheme, theme => ({
height: '7rem',
wordBreak: 'break-all',
... |
src/packages/@ncigdc/routes/utils.js | NCI-GDC/portal-ui | import React from 'react';
import Relay from 'react-relay/classic';
import { connect } from 'react-redux';
import { handleStateChange } from '@ncigdc/dux/relayProgress';
import { prepareNodeParams } from '@ncigdc/utils/routes';
import NotFound from '@ncigdc/components/NotFound';
import Loader from '@ncigdc/uikit/Load... |
docs/public/static/examples/v39.0.0/tutorial/sharing-simple.js | exponent/exponent | import React from 'react';
import { Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import * as ImagePicker from 'expo-image-picker';
import * as Sharing from 'expo-sharing';
export default function App() {
let [selectedImage, setSelectedImage] = React.useState(null);
let openImagePickerAsy... |
docs/app/Examples/views/Item/Types/ItemExampleProps.js | mohammed88/Semantic-UI-React | import React from 'react'
import { Item } from 'semantic-ui-react'
const items = [
{
childKey: 0,
image: 'http://semantic-ui.com/images/wireframe/image.png',
header: 'Header',
description: 'Description',
meta: 'Metadata',
extra: 'Extra',
},
{
childKey: 1,
image: 'http://semantic-u... |
src/components/ExampleComponent.js | SiverDX/siverdx.github.io | import React from 'react';
import Interactive from 'react-interactive';
import { Switch, Route, Link } from 'react-router-dom';
import ExampleTwoDeepComponent from './ExampleTwoDeepComponent';
import PageNotFound from './PageNotFound';
import s from '../styles/exampleComponent.style';
const ExamplePageText = () => (
... |
src/js/container/FileChooser.js | nirrattner/KnitPix | import React, { Component } from 'react';
import '../../css/file-chooser.css'
class FileChooser extends Component {
render() {
const { onFileChange } = this.props;
return (
<div>
<h3>Step 1</h3>
<label className="btn btn-default">
Choose a PNG image
<input
... |
src/svg-icons/image/crop-din.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCropDin = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"/>
</SvgIcon>
);
ImageCropDin = pure(ImageCropDin);
Image... |
client/src/components/Draft/DraftTeamList.js | BenDiuguid/fantasy-fifa | import React from 'react';
import styled from 'styled-components';
const Flex = styled.div`
display: flex;
`;
const Container = styled.div`
padding: ${props => props.theme.spacing}px;
width: 200px;
line-height: 1.5;
`;
const SpaceBetween = styled.div`
display: flex;
justify-content: space-between;
`;
co... |
src/parser/mage/fire/modules/features/HotStreakPreCasts.js | sMteX/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import SpellIcon from 'common/SpellIcon';
import { formatPercentage } from 'common/format';
import StatisticBox, { STATISTIC_ORDER } from 'interface/others/StatisticBox';
import Analyzer, { SELECTED_PLAYER } from 'p... |
hw5/src/components/auth/login.js | yusong-shen/comp531-web-development | /**
* Created by yusong on 10/20/16.
*/
import React from 'react'
import { connect } from 'react-redux'
import { Field, reduxForm } from 'redux-form';
import * as ProfileActions from '../../actions/profileActions'
import * as AuthActions from '../../actions/authActions'
const validate = values => {
const errors... |
src/components/ChainBlender.js | jhkmjnhamster/vcash-electron | import React from 'react'
import { translate } from 'react-i18next'
import { inject, observer } from 'mobx-react'
import { Switch, Tooltip, message } from 'antd'
@translate(['wallet'], { wait: true })
@inject('gui', 'rpc', 'wallet')
@observer
class ChainBlender extends React.Component {
constructor (props) {
sup... |
app/index.js | InfiniteLibrary/infinite-electron | import React from 'react';
import { render } from 'react-dom';
import { Router, hashHistory } from 'react-router';
import routes from './routes';
import './app.scss';
render(
<Router history={hashHistory} routes={routes} />,
document.getElementById('root')
);
|
src/svg-icons/action/update.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionUpdate = (props) => (
<SvgIcon {...props}>
<path d="M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79 2.73 2.71 7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.5... |
src/user/user_app.js | foundersandcoders/sail-back | import React from 'react'
import NavBar from './components/nav_bar.js'
export default (props) => (
<div>
<NavBar />
<div className='user-content'>
{props.children}
</div>
</div>
)
|
server/sonar-web/src/main/js/apps/overview/gate/gate-conditions.js | vamsirajendra/sonarqube | import React from 'react';
import GateCondition from './gate-condition';
export default React.createClass({
propTypes: {
gate: React.PropTypes.object.isRequired,
component: React.PropTypes.object.isRequired
},
render() {
let conditions = this.props.gate.conditions
.filter(c => c.level !== 'O... |
src/containers/hocs/withPlayerContext.js | niekert/soundify | import React from 'react';
import { connect } from 'react-redux';
import { queueTrack } from 'data/queue/actions';
import { toggleLike } from 'data/tracks/actions';
import { playTrack, togglePlaying } from 'data/player/actions';
const withPlayerContext = ComposedComponent => {
const EnhancePlayercontext = props => <... |
src/components/trail_close_ticket_dialog.js | JohnDHamm/trail-tracker-react | import React, { Component } from 'react';
import { connect } from 'react-redux';
import superagent from 'superagent';
import { addPost,
getPosts,
deleteClosedTicket,
updateTrailTicketCount,
ROOT_URL } from '../actions';
import TrailCloseTicketButton from './trail_close_ticket_button';
import PhotoUplo... |
src/ui/molecule/ComponentForm/ComponentUsageVisualization.js | jkubos/tickator-ide | import React from 'react'
import {observable} from 'mobx'
import {observer} from 'mobx-react'
import classNames from 'classnames'
import styles from './style.less'
import {UiState} from '~/src/business/UiState'
import {Modals} from '~/src/business/Modals'
import {Rectangle} from '~/src/util/geometry/Rectangle'
impo... |
information/blendle-frontend-react-source/app/modules/payment/components/SubscriptionDialogBody/index.js | BramscoChill/BlendleParser | import React from 'react';
function DefaultSubscriptionDialogBody() {
return (
<div>
<p>Altijd toegang tot de beste artikelen op Blendle.</p>
<strong>Kies hieronder hoe je wilt betalen.</strong>
</div>
);
}
export default DefaultSubscriptionDialogBody;
// WEBPACK FOOTER //
// ./src/js/app/m... |
app/containers/pages/NotFound/index.js | romainquellec/cuistot | /**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a necessity for you then you can refactor it... |
src/components/Notification/NotoficationItem.js | NightFury2/react-test-req | import React from 'react';
import {ListItem} from 'material-ui/List';
import NotificationIcon from 'material-ui/svg-icons/social/notifications';
import DoneIcon from 'material-ui/svg-icons/action/done';
import DoneAllIcon from 'material-ui/svg-icons/action/done-all';
import cyan100 from 'material-ui/styles/colors';
im... |
components/page.js | cnvs/docs | import PropTypes from 'prop-types'
import React from 'react'
import Head from 'next/head'
import { FONT_FAMILY_SANS } from './css-config'
class Page extends React.Component {
getChildContext() {
return {
darkBg: this.props.darkBg || false
}
}
render() {
const { darkBg, children } = this.props
... |
src/components/tag.js | Kilix/selectless | import React from 'react'
import controller from '../controller'
class Tag extends React.Component {
clearTag = e => {
const {clearOneValue, disabled, tag} = this.props
if (!disabled) {
clearOneValue(tag)
e.stopPropagation()
}
}
render() {
const {clearOneValue, disabled, render, tag,... |
src/giraffe-ui/petition/containers.js | MoveOnOrg/mop-frontend | import React from 'react'
import PropTypes from 'prop-types'
export const Container = ({ children }) => (
<div className='row mt-4 mt-md-5 mx-1'>{children}</div>
)
Container.propTypes = { children: PropTypes.node }
export const InfoColumn = ({ children }) => (
<div className='col-12 col-lg-7 petition-info-column'... |
src/components/digit-button.js | ermainz/Calculator | import React, { Component } from 'react';
import RaisedButton from 'material-ui/lib/raised-button';
import CalculatorActions from '../actions/calculator-actions';
const buttonStyle = {
margin: 12,
};
export default class DigitButton extends Component {
constructor(props) {
super(props);
this.addNumber = ... |
node_modules/react-bootstrap/es/Breadcrumb.js | caughtclean/but-thats-wrong-blog | 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 ... |
frontend/src/components/Link.js | daGrevis/msks | import _ from 'lodash'
import React from 'react'
import { connect } from 'react-redux'
import { push } from '../store/actions/router'
import { withBasePath } from '../routing/links'
const Link = props => (
<a
{..._.omit(props, ['push'])}
href={props.href ? withBasePath(props.href) : '#'}
onClick={ev => ... |
src/challenges/react-redux/React_Redux_09.js | bonham000/fcc-react-tests-module | /* eslint-disable */
import React from 'react'
import assert from 'assert'
import { transform } from 'babel-standalone'
import Enzyme from '../Enzyme';
const shallow = Enzyme.shallow;
const mount = Enzyme.mount;
const render = Enzyme.render;
export const QA = true;
// ---------------------------- define challenge t... |
packages/veritone-react-common/src/components/PopperButton/story.js | veritone/veritone-sdk | import React from 'react';
import { storiesOf } from '@storybook/react';
import Button from './';
storiesOf('Popper Button', module).add('button multi actions', () => {
const actionsDefaut = [
{
id: 2,
name: 'Folder',
icon: "icon-folder-closed",
actionClick: () => console.log('click acti... |
src/app.js | ipanasenko/temp | import React from 'react';
import ReactDOM from 'react-dom';
import Root from './containers/Root';
import configureStore from './redux/configureStore';
const store = configureStore(window.__INITIAL_STATE__);
// Render the React application to the DOM
ReactDOM.render(
<Root store={store} />,
document.getElementByI... |
src/index.js | sohail87/ReduxWeather | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import ReduxPromise from 'redux-promise'
import App from './components/app';
import reducers from './reducers';
const createStoreWithMiddleware = applyMiddleware(R... |
src/Menu/Menu.js | pradel/material-ui | import React from 'react';
import ReactDOM from 'react-dom';
import update from 'react-addons-update';
import shallowEqual from 'recompose/shallowEqual';
import ClickAwayListener from '../internal/ClickAwayListener';
import autoPrefix from '../utils/autoPrefix';
import transitions from '../styles/transitions';
import k... |
app/components/AddTask/Select/index.js | prudhvisays/newsb | import React from 'react';
import Select, { Option } from 'rc-select';
export default class AddSelect extends React.Component { //eslint-disable-line
constructor(props) {
super(props);
this.state = {
useAnim: 0,
value: [],
}
this.onChange = this.onChange.bind(this);
this.useAnim = thi... |
app/javascript/mastodon/features/account_timeline/index.js | danhunsaker/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { fetchAccount } from '../../actions/accounts';
import { expandAccountFeaturedTimeline, expandAccountTimeline } from '../../actions/timelines';
import ... |
src/parser/monk/windwalker/modules/spells/TouchOfDeath.js | FaideWW/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import Analyzer from 'parser/core/Analyzer';
import Enemies from 'parser/shared/modules/Enemies';
import StatTracker from 'parser/shared/modules/StatTracker';
import { calculateAzeriteEffects } from 'common/stats';
import SpellIcon from 'common/SpellIcon'... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.