path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
app/components/layout/TwitterSocialButton.js | communicode-source/communicode | import React from 'react';
import { OutboundLink } from 'react-ga';
const TwitterSocialButton = () =>
<OutboundLink eventLabel="Twitter" className="btn btn-social-icon btn-twitter" to="https://twitter.com/CommunicodeLLC" target="_blank">
<span className="fa fa-twitter"/>
</OutboundLink>;
export defaul... |
src/LoadingMessage.js | reprap-io/reprap.io | import React from 'react'
import { Message, Icon } from 'semantic-ui-react'
const LoadingMessage = () => (
<Message icon>
<Icon name='circle notched' loading />
<Message.Content>
<Message.Header>One moment please...</Message.Header>
We're 2D printing the information you requested
</Message.C... |
src/app.js | dfala/high-club | import React from 'react'
import ReactDOM from 'react-dom'
import createBrowserHistory from 'history/lib/createBrowserHistory'
import { syncReduxAndRouter } from 'redux-simple-router'
import routes from './routes'
import Root from './containers/Root'
import configureStore from './redux/configureStore'
const history = ... |
app/javascript/mastodon/components/extended_video_player.js | mosaxiv/mastodon | import React from 'react';
import PropTypes from 'prop-types';
export default class ExtendedVideoPlayer extends React.PureComponent {
static propTypes = {
src: PropTypes.string.isRequired,
alt: PropTypes.string,
width: PropTypes.number,
height: PropTypes.number,
time: PropTypes.number,
contr... |
modules/State.js | amsardesai/react-router | import React from 'react';
var { object } = React.PropTypes;
/**
* A mixin for components that need to know the path, routes, URL
* params and query that are currently active.
*
* Example:
*
* import { State } from 'react-router';
*
* var AboutLink = React.createClass({
* mixins: [ State ],
* re... |
dist/layouts/Grid/Row/index.js | codespec/react-toolset | import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames/bind';
import style from '../style.css';
var classNames = cx.bind(style);
var Row = function Row(props) {
var RowSizes = ['small', 'medium', 'large'];
var rowClasses = [classNames('row'), props.className];
if (props.coll... |
app/redux/routes.js | sfi-ru/encultN | import React from 'react';
import {Route, IndexRoute} from 'react-router';
import {selectQuestion, fetchAnswers} from 'redux/modules/voting';
import {fetchBlogs, fetchBlog} from 'redux/modules/blogs';
import {fetchAbout} from 'redux/modules/about';
import Questions from 'components/Questions/Questions';
import Question... |
src/components/slider/AssetImage.js | g8extended/Character-Generator | import React from 'react';
const AssetImage = (
({ file }) => (
<img src={file.src} style={file.computedStyle} onContextMenu={e => e.preventDefault()} />
)
);
export default AssetImage;
|
cerberus-dashboard/src/actions/manageSafetyDepositBoxActions.js | Nike-Inc/cerberus | /*
* Copyright (c) 2020 Nike, inc.
*
* Licensed under the Apache License, Version 2.0 (the "License")
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
renderer-react/src/mixins/input-holder-mixin.js | kiranml1/blog-framework | import React from 'react';
let FormEnhanceTextInput; // eslint-disable-line no-unused-vars
export default FormEnhanceTextInput = InputHolderComponent => class extends React.Component {
constructor(props) {
super(props);
this.state = {
input: '',
};
this.setInput = this.setInput.bind(this);
... |
packages/lore-tutorial/templates/esnext/step5/src/components/Feed.js | lore/lore | import React from 'react';
import PropTypes from 'prop-types';
class Feed extends React.Component {
static propTypes = {
tweets: PropTypes.object.isRequired
};
static defaultProps = {
tweets: {
state: 'RESOLVED',
data: [{
id: 1,
cid: 'c1',
state: 'RESOLVED',
... |
src/client/components/base/Belt/SeriesBelt.component.js | DBCDK/content-first | import React from 'react';
import {withIsVisible, withScrollToComponent} from '../../hoc/Scroll';
import {withChildBelt} from '../../hoc/Belt';
import withWork from '../../hoc/Work/withWork.hoc';
import WorkSlider from './WorkSlider.component';
import Title from '../Title';
import './SeriesBelt.css';
const Slider = (... |
app/components/TriggerMQCreateForm/index.js | fission/fission-ui | /**
*
* TriggerMQCreateForm
*
*/
import React from 'react';
// import styled from 'styled-components';
import { FormattedMessage } from 'react-intl';
import commonMessages from 'messages';
class TriggerMQCreateForm extends React.Component { // eslint-disable-line react/prefer-stateless-function
constructor(props) {... |
src/uic/Button.js | ajaycheenath/earthquake | import React, { Component } from 'react';
import uicStyle from "../css/uic.css";
class Button extends Component {
static propTypes = {
name: React.PropTypes.string,
styleClass: React.PropTypes.string,
onClick: React.PropTypes.func
};
render() {
const { name, styleClass, onClick } = thi... |
src/svg-icons/av/closed-caption.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvClosedCaption = (props) => (
<SvgIcon {...props}>
<path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 7H9.5v-.5h-2v3h2V13H11v1c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-4c0-.5... |
modules/dreamview/frontend/src/components/Layouts/ToolView.js | xiaoxq/apollo | import React from 'react';
import { inject, observer } from 'mobx-react';
import DataRecorder from 'components/DataRecorder';
import ModuleController from 'components/ModuleController';
import Menu from 'components/SideBar/Menu';
import POI from 'components/SideBar/POI';
import Tasks from 'components/Tasks';
@inject(... |
src/esm/components/navigation/header-nav/components/context.js | KissKissBankBank/kitten | import React from 'react';
export var Context = /*#__PURE__*/React.createContext({
id: 'kkbbAndCoHeaderNav',
isLogged: false,
callOnToggle: function callOnToggle() {},
expandBy: null
}); |
nativeExample/react/src/assets/components/nav/nav.js | zhanglizhao/react-native-knowledge | /**
* Created by zhanglizhao on 2016/11/21 0021.
*/
import React from 'react';
import Link from '../link/link.js';
import '../../css/font.css';
import './nav.css';
let Nav=React.createClass({
render:function(){
return (this.props.children)?
(
<div className="head">
... |
docs/app/Examples/elements/Button/GroupVariations/ButtonExampleGroupBasic.js | aabustamante/Semantic-UI-React | import React from 'react'
import { Button, Divider } from 'semantic-ui-react'
const ButtonExampleGroupBasic = () => (
<div>
<Button.Group basic>
<Button>One</Button>
<Button>Two</Button>
<Button>Three</Button>
</Button.Group>
<Divider />
<Button.Group basic vertical>
<Button>O... |
src/svg-icons/action/camera-enhance.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionCameraEnhance = (props) => (
<SvgIcon {...props}>
<path d="M9 3L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2h-3.17L15 3H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.2... |
ajax/libs/react-instantsearch/4.1.0/Connectors.js | pvnr0082t/cdnjs | /*! ReactInstantSearch 4.1.0 | © 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' && define.... |
client/templates/NavbarUser.js | pxpeterxu/react-express-scaffolding | // @flow
import React from 'react';
import { LinkContainer } from 'react-router-bootstrap';
import { withRouter } from 'react-router';
import Navbar from 'react-bootstrap/lib/Navbar';
import Nav from 'react-bootstrap/lib/Nav';
import NavItem from 'react-bootstrap/lib/NavItem';
import Auth, { type InjectedProps } from... |
examples/test-cra/src/stories/Button.js | bigassdragon/storybook | import React from 'react';
const buttonStyles = {
border: '1px solid #eee',
borderRadius: 3,
backgroundColor: '#FFFFFF',
cursor: 'pointer',
fontSize: 15,
padding: '3px 10px',
margin: 10,
};
const Button = ({ children, onClick }) => (
<button style={buttonStyles} onClick={onClick}>
{children}
</b... |
src/Preview.js | kikoruiz/react-app-builder | import React from 'react';
class Preview extends React.Component {
render() {
return (<h2>Preview</h2>);
}
}
export default Preview;
|
src/icons/Search.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class Search extends React.Component {
render() {
if(this.props.bare) {
return <g>
<path d="M445,386.7l-84.8-85.9c13.8-24.1,21-50.9,21-77.9c0-87.6-71.2-158.9-158.6-158.9C135.2,64,64,135.3,64,222.9
c0,87.6,71.2,158... |
src/LoginDetails/LoginDetail/LoginDetail.js | Lynx-Productions/OPeM | /***
* Copyright 2017 - present Lynx Productions
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicabl... |
src/PopupContainer.js | devgateway/react-leaflet | import React from 'react';
import MapLayer from './MapLayer';
export default class PopupContainer extends MapLayer {
render() {
const children = this.getClonedChildrenWithMap({
popupContainer: this.leafletElement,
});
return <div style={{display: 'none'}}>{children}</div>;
}
}
|
src/components/LandingScreen.js | thrifty-p2p/thrifty-client | import React from 'react';
import {View, Text, ImageBackground, StyleSheet, Image, Platform} from 'react-native';
import {Button, CardSection} from './common';
const LandingScreen = props => {
const {container, body, image, buttons, btnContainer, slogan, bgImage} = styles;
return(
<Image source={require('../i... |
integration/index.js | wundery/wundery-ui-react | import React from 'react';
import ReactDOM from 'react-dom';
import { Integration } from './components';
const mountPoint = document.body.appendChild(document.createElement('div'));
ReactDOM.render(<Integration />, mountPoint);
|
pootle/static/js/auth/components/PasswordResetForm.js | dwaynebailey/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... |
src/svg-icons/action/alarm-on.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAlarmOn = (props) => (
<SvgIcon {...props}>
<path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.0... |
client/components/dialogs/index.js | guyonroche/quaero | import React, { Component } from 'react';
import SignupModal from './sign-up';
import LoginModal from './login';
class Dialogs extends Component {
constructor() {
super();
this.state = {};
}
componentDidMount() {
const { store } = this.context;
this.unsubscribe = store.subscribe(() => {
t... |
resources/assets/js/Pages/Profile.js | jung3o/VacStatus | 'use strict';
import React from 'react';
import BasicComp from '../BasicComp';
export default class Profile extends BasicComp {
componentDidMount() {
this.fetchProfile(this.props.params.steamId);
}
componentWillReceiveProps(props) {
this.fetchProfile(props.params.steamId);
}
fetchProfile(steamId) {
this.... |
src/smart/workflow/NoTasksWorkflow.js | jeckhummer/wf-constructor | import React from 'react';
import {connect} from 'react-redux';
import {getSortedPhasesIds} from "../../selectors/phases";
import {WorkflowGrid} from "../../dumb/WorkflowGrid";
import {openTaskEditorForAdding} from '../../actions/taskEditor';
import {AddBlockCommandBlock} from "../../dumb/block_graph/AddBlockCommandBlo... |
app/containers/NotFoundPage/index.js | c-dagostino/react-boilerplate-example | /**
* 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/server.js | Shtian/dashboard | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import 'babel/polyfill';
import _ from 'lodash';
import fs from 'fs';
import path from 'path';
import express from 'express';
import React from 'react';
import './core/Dispatcher';
import './stores/AppStore';
import db from './core/Database';
imp... |
src/index.js | weedz/reactcms | import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import Routes from './routes';
import { validateToken } from './actions/authActions';
import Store from './store';
// Authorize user
if (localStorage.getItem('jwtToken')) {
Store.dispatch(validateToken(localSt... |
app/src/components/Profile.js | erichuang1994/FudanSE | import React from 'react';
import '../css/Profile.css'
import '../css/base.css'
import { Link } from 'react-router';
var Profile = React.createClass( {
getFetch(url, callback){
return fetch(url, {
credentials: 'include',
method: 'get'
})
.then(function(res){
if(res.status === 200){
r... |
src/client/pages/user/User.js | BhumiSukhadiya/React_Project_Repo | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
// Import Style
import styles from './User.css';
class User extends Component {
render() {
return (
<div>User</div>
);
}
}
const mapStateT... |
src/components/ContestList.js | jsize8/learn-fullstack-javascript | import React from 'react';
import ContestPreview from './ContestPreview';
const ContestList = ({ contests, onContestClick }) => (
<div className="ContestList">
{Object.keys(contests).map(contestId =>
<ContestPreview
key={contestId}
onClick={onContestClick}
{...contests[contestId]} /... |
app/javascript/mastodon/features/account_timeline/index.js | pfm-eyesightjp/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 { refreshAccountTimeline, expandAccountTimeline } from '../../actions/timelines';
import StatusL... |
docs/src/GettingStartedPage.js | coderstudy/react-bootstrap | import React from 'react';
import CodeExample from './CodeExample';
import NavMain from './NavMain';
import PageHeader from './PageHeader';
import PageFooter from './PageFooter';
export default class Page extends React.Component {
render() {
return (
<div>
<NavMain activePage="getting-started"... |
app/components/details.component.js | harrietty/electron-sample-project | import React from 'react';
class Details extends React.Component {
render () {
return (
<div className='details'>
<h3>{this.props.title}</h3>
</div>
);
}
}
export default Details;
|
src/containers/dev-tools/index.js | dylanlott/bridge-gui | 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="H"
changePositionKey="Q">
<LogMonitor />
</Dock... |
local-cli/templates/HelloNavigation/components/KeyboardSpacer.js | PlexChat/react-native | 'use strict';
/* @flow */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
Platform,
View,
Keyboard,
LayoutAnimation,
UIManager,
} from 'react-native';
type Props = {
offset?: number,
}
type State = {
keyboardHeight: number
}
// Consider contributing this to the ... |
actor-apps/app-web/src/app/components/activity/ActivityHeader.react.js | zillachan/actor-platform | import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
const {addons: { PureRenderMixin }} = addons;
@ReactMixin.decorate(PureRenderMixin)
class ActivityHeader extends React.Component {
static propTypes = {
close: React.PropTypes.func,
title: React.PropTypes.stri... |
src-example/components/atoms/Icon/index.stories.js | SIB-Colombia/biodiversity_catalogue_v2_frontend | import React from 'react'
import { storiesOf } from '@kadira/storybook'
import Icon from '.'
storiesOf('Icon', module)
.add('default', () => (
<Icon icon="close" />
))
.add('palette', () => (
<Icon icon="close" palette="primary" />
))
.add('palette reverse', () => (
<Icon icon="close" palette="pr... |
app/javascript/mastodon/features/ui/components/bundle.js | blackle/mastodon | import React from 'react';
import PropTypes from 'prop-types';
const emptyComponent = () => null;
const noop = () => { };
class Bundle extends React.PureComponent {
static propTypes = {
fetchComponent: PropTypes.func.isRequired,
loading: PropTypes.func,
error: PropTypes.func,
children: PropTypes.fu... |
src/svg-icons/action/settings-input-component.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsInputComponent = (props) => (
<SvgIcon {...props}>
<path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2.... |
frontend/capitolwords-spa/src/components/Avatar/Avatar.story.js | sunlightlabs/Capitol-Words | import React from 'react';
import { storiesOf } from '@storybook/react';
import g from 'glamorous';
import Avatar from './Avatar';
const people = [
{
"url": "https://www.congress.gov/member/raja-krishnamoorthi/K000391",
"imageUrl": "https://theunitedstates.io/images/congress/225x275/K000391.jpg",
"par... |
src/svg-icons/communication/message.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationMessage = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"/>
</SvgIcon>
);
Commun... |
src/components/ControllerUnit.js | jerry-i/photo-gallery | import React from 'react';
class controllerUnit extends React.Component {
handleClick(e) {
let isCenter = this.props.styleSetting.center;
if (isCenter){
this.props.action.reserve();
} else {
this.props.action.center();
}
e.preventDefault();
e.stopPropagation();}
render() {
... |
app/javascript/mastodon/features/follow_requests/index.js | 5thfloor/ichiji-social | 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... |
docs/src/pages/customization/palette/Palette.js | lgollut/material-ui | import React from 'react';
import { createMuiTheme } from '@material-ui/core/styles';
import { ThemeProvider } from '@material-ui/styles';
import { purple } from '@material-ui/core/colors';
import Button from '@material-ui/core/Button';
const theme = createMuiTheme({
palette: {
primary: {
// Purple and gre... |
docs/src/app/components/pages/components/Toggle/Page.js | rscnt/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 toggleReadmeText from './README';
import ToggleExampleSimple from './Exam... |
src/routes/index.js | altarit/cloudpolis-react | import React from 'react'
import {Route} from 'react-router-dom'
import Loadable from 'react-loadable'
import {injectReducer} from '../store/reducers'
import Home from './Home'
import Artists from './Artists'
import Artist from './Artist'
import Search from './Search'
import Admin from './Admin'
import Users from './U... |
frontend/app_v2/src/components/ErrorHandler/ErrorHandlerPresentation.js | First-Peoples-Cultural-Council/fv-web-ui | import React from 'react'
import PropTypes from 'prop-types'
// FPCC
import useIcon from 'common/useIcon'
function ErrorHandlerPresentation({ backHandler, status, heading, content }) {
return (
<div
id="ErrorHandler"
className="min-w-screen min-h-screen bg-tertiaryA flex items-center p-5 lg:p-20 ove... |
app/containers/VideoInfoSidebar.js | Lucassios/simple-video-library-react | import React, { Component } from 'react';
import { connect } from "react-redux";
import { selectVideo, updateVideo, insertActor } from '../actions/videos';
import { WithContext as ReactTags } from 'react-tag-input';
class VideoInfoSidebar extends Component {
constructor(props) {
super(props);
this.handleInp... |
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/node_modules/rc-dialog/es/DialogWrap.js | bhathiya/test | var __assign = this && this.__assign || Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
}
return t;
};
import React from 'react';
imp... |
Js/Backend/Modules/Jobs/Components/CronJobInstaller/CreateJobModal.js | Webiny/CronManager | import React from 'react';
import Webiny from 'webiny';
/**
* @i18n.namespace CronManager.Backend.Jobs.CronJobInstaller.CreateJobModal
*/
class CronJobModal extends Webiny.Ui.ModalComponent {
renderTargetInput(model) {
const urlDescription = this.i18n(`You can use variables like {apiPath} and {webPath} i... |
lib/index.js | francylang/weathrly | import React from 'react';
import ReactDOM from 'react-dom';
import App from './Components/App/App.js';
ReactDOM.render(
<App />,
document.getElementById('app')
);
|
webpack/components/TemplateSyncResult/components/SyncedTemplate/helpers.js | theforeman/foreman_templates | import React from 'react';
import { isEmpty } from 'lodash';
import { Icon } from 'patternfly-react';
import IconInfoItem from './IconInfoItem';
import EmptyInfoItem from './EmptyInfoItem';
import StringInfoItem from './StringInfoItem';
import LinkInfoItem from './LinkInfoItem';
export const itemIteratorId = (templat... |
lib/Suggestions.js | leonascimento/react-tags | import React, { Component } from 'react';
import isEqual from 'lodash/isEqual';
const maybeScrollSuggestionIntoView = (suggestionEl, suggestionsContainer) => {
const containerHeight = suggestionsContainer.offsetHeight
const suggestionHeight = suggestionEl.offsetHeight
const relativeSuggestionTop = suggestionEl.... |
utils/pure-layout-component.js | skidding/illustrated-algorithms | import React from 'react';
import shallowCompare from 'react-addons-shallow-compare';
class PureLayoutComponent extends React.Component {
shouldComponentUpdate(nextProps, nextState, nextContext) {
return shallowCompare(this, nextProps, nextState) || nextContext.layout !== this.context.layout;
}
}
export defau... |
src/App.js | hush-hush-g/campbell-quiz | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import { PageHeader } from 'react-bootstrap';
import { Button } from 'react-bootstrap';
import { Label } from 'react-bootstrap';
// QuizBanner
function QuizBanner(props) {
return (
<PageHeader>Campbell Quiz <small>Test y... |
example/examples/MapStyle.js | athaeryn/react-native-maps | import React from 'react';
import {
StyleSheet,
View,
Dimensions,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.78825;
const LONGITUDE = -122.4324;
const LATITUDE_DELTA = 0.0922;
const... |
actor-apps/app-web/src/app/components/activity/ActivityHeader.react.js | damoguyan8844/actor-platform | import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
const {addons: { PureRenderMixin }} = addons;
@ReactMixin.decorate(PureRenderMixin)
class ActivityHeader extends React.Component {
static propTypes = {
close: React.PropTypes.func,
title: React.PropTypes.stri... |
react-components/src/library/components/portal-classes/student-roster-row.js | concord-consortium/rigse | import React from 'react'
import css from './student-roster.scss'
export default class StudentRosterRow extends React.Component {
constructor (props) {
super(props)
this.handleRemoveStudent = this.handleRemoveStudent.bind(this)
this.handleChangePassword = this.handleChangePassword.bind(this)
}
hand... |
src/svg-icons/image/crop-5-4.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCrop54 = (props) => (
<SvgIcon {...props}>
<path d="M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H5V7h14v10z"/>
</SvgIcon>
);
ImageCrop54 = pure(ImageCrop54);
ImageCro... |
blueocean-material-icons/src/js/components/svg-icons/notification/adb.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const NotificationAdb = (props) => (
<SvgIcon {...props}>
<path d="M5 16c0 3.87 3.13 7 7 7s7-3.13 7-7v-4H5v4zM16.12 4.37l2.1-2.1-.82-.83-2.3 2.31C14.16 3.28 13.12 3 12 3s-2.16.28-3.09.75L6.6 1.44l-.82.83 2.1 2.1C6.14 5.64 5 7.68 5 10v1h14v-1c0-2.32-... |
admin/client/components/AltText.js | codevlabs/keystone | import React from 'react';
import blacklist from 'blacklist';
import vkey from 'vkey';
var AltText = React.createClass({
propTypes: {
component: React.PropTypes.string,
modified: React.PropTypes.string,
modifier: React.PropTypes.string,
normal: React.PropTypes.string,
},
getDefaultProps () {
return {
c... |
app/demos/CandleStickPanOverlay.js | chunghe/React-Native-Stock-Chart | import React, { Component } from 'react';
import { PanResponder, TouchableOpacity, View, Text, Dimensions, ScrollView, StyleSheet } from 'react-native';
import Svg, { G, Text as SvgText, Rect, Path } from 'react-native-svg';
import * as d3Scale from 'd3-scale';
import T from '../components/T';
const deviceWidth = ... |
src/containers/NotFound/NotFound.js | kahn1990/redux-project-example | import React from 'react';
export default function NotFound() {
return (
<div className="container">
<h1>Doh! 404!</h1>
<p>These are <em>not</em> the droids you are looking for!</p>
</div>
);
}
|
app/javascript/mastodon/features/compose/components/privacy_dropdown.js | glitch-soc/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
import IconButton from '../../../components/icon_button';
import Overlay from 'react-overlays/lib/Overlay';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spr... |
examples/with-polka/src/server.js | jaredpalmer/react-production-starter | import App from './App';
import React from 'react';
import polka from 'polka';
import serve from 'serve-static';
import { renderToString } from 'react-dom/server';
const assets = require(process.env.RAZZLE_ASSETS_MANIFEST);
export default polka()
.use(serve(process.env.RAZZLE_PUBLIC_DIR))
.get('/*', (req, res) =>... |
examples/multi-line/index.js | ronlobo/building-os-charts | import React from 'react';
import { TimeseriesChart } from 'building-os-charts';
import moment from 'moment';
require('../../src/index.scss');
function getData() {
const start = moment().startOf('day');
const quarterHour = moment(start).subtract(15, 'minutes');
const data = [];
const nn = (48 * 4);
for (let ... |
src/stories/messageContent.js | sevenleaps/chat-template | import React from 'react';
import MessageContent from '../MessageContent';
import { storiesOf } from '@kadira/storybook';
storiesOf('MessageContent', module)
.add('MessageContent displays on the left', () => {
const message = {
message: 'Test',
inbound: true,
backColor: 'white',
};
return (
<div>... |
src/clincoded/static/components/variant_central/interpretation_all.js | ClinGen/clincoded | 'use strict';
import React, { Component } from 'react';
import createReactClass from 'create-react-class';
import moment from 'moment';
import { RestMixin } from '../rest';
import { curator_page } from '../globals';
import { getAffiliationName } from '../../libs/get_affiliation_name';
import { showActivityIndicator } f... |
definitions/npm/react-body-classname_v1.x.x/test_react-body-classname-v1.js | splodingsocks/FlowTyped | // @flow
import BodyClassName from 'react-body-classname';
import React from 'react';
const shouldWork = () => (
<BodyClassName className="somehting" />
);
const shouldWorkWithChildren = () => (
<BodyClassName className="somehting">
<h1>Works!</h1>
</BodyClassName>
);
const shouldFailNonString = () => (
... |
client/pages/editor/index.js | fdesjardins/webgl | import React from 'react'
import PT from 'prop-types'
import MonacoEditor from 'react-monaco-editor'
import { Treebeard } from 'react-treebeard'
import Baobab from 'baobab'
import { compose, withState, withHandlers, lifecycle } from 'recompose'
import { css } from 'emotion'
import * as THREE from 'three'
import Markdo... |
src/components/NotFoundPage.js | kiyoshitaro/Instagram- | import React from 'react';
import { Link } from 'react-router-dom';
const NotFoundPage = () => {
return (
<div>
<h4>
404 Page Not Found
</h4>
<Link to="/"> Go back to homepage </Link>
</div>
);
};
export default NotFoundPage;
|
src/app.js | soniwgithub/react-starter-kit | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import 'babel/polyfill';
import React from 'react';
import FastClick from 'fastclick';
import App from './components/App';
import Dispatcher from './core/Dispatcher';
import AppActions from './actions/AppActions';
import ActionTypes from './const... |
src/components/Form/FormElementLabel.js | propertybase/react-lds | import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
const FormElementLabel = (props) => {
const {
className,
hideLabel,
id,
label,
legend,
readOnly,
required,
...rest
} = props;
const renderRequired = () => {
if (required) {
retur... |
src/component/UserRegistrationForm.js | NHAAHNA/hms | import React from 'react';
import { connect } from 'react-redux';
import { push } from "react-router-redux";
import '../containers/App';
import { getDataAction,
saveUserDataAction,
updateUserDataAction,
deleteUserDataAction,
newUserDataAction
} from '../actions/userRegistratio... |
docs/src/sections/TableSection.js | apkiernan/react-bootstrap | import React from 'react';
import Anchor from '../Anchor';
import PropTable from '../PropTable';
import ReactPlayground from '../ReactPlayground';
import Samples from '../Samples';
export default function TableSection() {
return (
<div className="bs-docs-section">
<h2 className="page-header">
<Anc... |
src/components/common/mediaPicker/results/TabSearchResultsContainer.js | mitmedialab/MediaCloud-Web-Tools | import PropTypes from 'prop-types';
import React from 'react';
import { injectIntl, FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { Grid, Row } from 'react-flexbox-grid/lib';
import CollectionResultsTable from './CollectionResultsTable';
import StarredSearchResultsContainer from '.... |
src/sentry/static/sentry/app/icons/icon-github.js | gencer/sentry | import React from 'react';
import Icon from 'react-icon-base';
function IconGithub(props) {
return (
<Icon viewBox="0 0 32 32" {...props}>
<g id="icon-github" fill="currentColor" stroke="none">
<path d="M15.9986299,-3.55271368e-15 C7.16376191,-3.55271368e-15 -0.000387878788,7.11515178 -0.0003878787... |
src/Footer.js | lishengzxc/ReactReduxTodo | import React from 'react';
import ReactDOM from 'react-dom';
export default class Footer extends React.Component {
renderFilter(filter, name) {
if (filter === this.props.filter) {
return name;
}
return (
<a href='#' onClick={e => {
e.preventDefault();
this.props.onFilterChang... |
src/index.js | manelgavalda/ReduxRoutes | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import promise from 'redux-promise';
import reducers from './reducers';
import PostsIndex from './c... |
react/test-driven-react/test-driven-carousel/example/index.js | saramic/learning | import React from 'react';
import ReactDOM from 'react-dom';
import Carousel from '../src/Carousel';
import slides from './slides';
const container = document.createElement('div');
document.body.appendChild(container);
ReactDOM.render(<Carousel slides={slides} />, container);
|
es/List/List.js | uplevel-technology/material-ui-next | 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/DigitalClock.js | surabhig412/digital-clock | import React, { Component } from 'react';
export default class DigitalClock extends Component {
constructor(props) {
super(props);
this.state = {
date: new Date()
};
}
componentDidMount() {
this.timer = setInterval(() => {
this.setState({date: new Date()});
}, 1000);
}
compo... |
packages/rex-intl-translator-example/app/app.js | linear-bits/linear-bits | import React from 'react'
import {FormattedMessage} from 'react-intl'
const App = () => (
<div>
<FormattedMessage id='title' description='Title' defaultMessage='TITLE'/>
<p>
<FormattedMessage id='body'
description='Body'
defaultMessage='BODY {val, number}'
values={{
va... |
src/components/app.js | RobinLebhar/ReactRedux-Starter | import React, { Component } from 'react';
export default class App extends Component {
render() {
return (
<div>React Redux ca marche</div>
);
}
}
|
src/components/Story/Loading/Loading.render.js | cajacko/Improv-Stories | // @flow
import React, { Component } from 'react';
import styled from 'styled-components';
import { Div } from '@cajacko/lib/components/UI';
import CardsListItem from '@cajacko/lib/components/Cards/ListItem';
import Spinner from '@cajacko/lib/components/Spinner';
const Container = styled(Div)`
flex: 1;
padding-ve... |
client/src/components/Toolbar.js | danielasy/cerebral-game-library | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { gamesOpenDialog } from '../actions/games';
import { Toolbar as CoreToolbar, ToolbarGroup, ToolbarSeparator, ToolbarTitle } from 'material-ui/Toolbar';
import FlatButton from 'material-ui/FlatBut... |
client/src/app/components/calendar/components/FullCalendarWidget.js | zraees/sms-project | import React from 'react'
import {DropdownButton, MenuItem} from 'react-bootstrap'
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux'
import * as EventActions from '../EventActions'
import JarvisWidget from '../../../components/widgets/JarvisWidget'
import 'script-loader!smartadmin-plugi... |
admin/client/App/shared/CreateForm.js | concoursbyappointment/keystoneRedux | /**
* The form that's visible when "Create <ItemName>" is clicked on either the
* List screen or the Item screen
*/
import React from 'react';
import assign from 'object-assign';
import vkey from 'vkey';
import AlertMessages from './AlertMessages';
import { Fields } from 'FieldTypes';
import InvalidFieldType from '... |
src/Main/Layout/DocumentTitleUpdater.js | hasseboulen/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import getFightName from 'common/getFightName';
import { getFightId, getPlayerName, getReportCode } from 'selectors/url/report';
import { getFightById } from 'selectors/fight';
import { getReport } from 'selectors/rep... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectSpread.js | ontruck/create-react-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load(baseUser) {
return [
{ id: 1, name: '... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.