path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
client/src/Roulette.spec.js | ahorrocks2/what_sounds_good_to_you | import React from 'react';
import Roulette from './Roulette';
import { shallow } from 'enzyme';
describe('<Roulette />', () => {
const rouletteSpy = jest.fn();
const randomSpy = jest.fn();
const props = {
restaurants: [
{
id: 1,
name: 'test rest',
type: 'indian',
hood: ... |
src/main/webapp/static/js/club/view/forgetPassword/SuccessPage.js | weijiafen/antBlog | import React from 'react';
import { Row , Col , Input , Button ,Alert } from 'antd';
import {redirect} from '../../util/function.js';
var app=React.createClass({
toLogin(){
redirect('#/login');
},
render(){
return (<div>
<Row>
<Col xs={1} sm={8}></Col>
<Col xs={22} sm={8}>
<Alert message="重置... |
src/svg-icons/editor/short-text.js | manchesergit/material-ui | 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... |
app/index.js | abiduzz420/learn-anything-mobile | import React, { Component } from 'react';
import { View, Text, ScrollView } from 'react-native';
import ResultScreen from './components/ResultScreen.js';
import HomeScreen from './components/HomeScreen.js';
export default class App extends Component {
constructor(props) {
super(props);
}
render() ... |
app/javascript/mastodon/components/autosuggest_emoji.js | foozmeat/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import unicodeMapping from '../features/emoji/emoji_unicode_mapping_light';
const assetHost = process.env.CDN_HOST || '';
export default class AutosuggestEmoji extends React.PureComponent {
static propTypes = {
emoji: PropTypes.object.isRequired,
... |
assets/javascripts/archon/components/MdlComponents.js | panli889/archon | import React from 'react';
import {Link} from 'react-router';
import classnames from 'classnames';
function mdlUpgrade(Component) {
const MDLComponent = React.createClass({
componentDidMount() {
componentHandler.upgradeDom();
},
componentDidUpdate() {
componentHandler.upgradeDom();
},
... |
www/js/root.js | webbestmaster/ae3 | // @flow
/* global document */
import {initializeEnvironment} from './component/app/helper.js';
import React from 'react';
import {render} from 'react-dom';
import {App} from './component/app/c-app';
import {AppLoader, type LoadAppPassedMethodMapType} from './component/app-loader/c-app-loader';
import {ReduxStoreProv... |
src/components/User/LastRequested.js | andresmechali/shareify | import React from 'react';
import PropTypes from 'prop-types';
import RequestSmall from "../Profile/RequestSmall";
const LastRequested = (props) => {
return (
<div className="ui-block">
<div className="ui-block-title">
<h6 className="title bold">
Requested b... |
packages/react-scripts/fixtures/kitchensink/src/features/env/ShellEnvVariables.js | 0xaio/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 from 'react';
export default () => (
<span id="feature-shell-env-variables">
{process.env.REACT_APP_SHELL_ENV_MESSAG... |
src/router.js | nicolasmoise/QH-code-exercize | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import Router from 'react-routing/src/Router';
import http from './core/http';
import App from './components/App';
import ContentPage from './components/ContentPage';
import DepressionScreener from './components/Depress... |
test/JumbotronSpec.js | tonylinyy/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Jumbotron from '../src/Jumbotron';
describe('Jumbotron', function () {
it('Should output a div with content', function () {
let instance = ReactTestUtils.renderIntoDocument(
<Jumbotron>
<strong>Content</strong>... |
app/javascript/mastodon/features/ui/components/drawer_loading.js | kirakiratter/mastodon | import React from 'react';
const DrawerLoading = () => (
<div className='drawer'>
<div className='drawer__pager'>
<div className='drawer__inner' />
</div>
</div>
);
export default DrawerLoading;
|
lib/FullTab.js | timomeh/react-native-material-bottom-navigation | import React from 'react'
import PropTypes from 'prop-types'
import {
View,
Text,
ViewPropTypes,
Animated,
StyleSheet,
Platform,
TouchableWithoutFeedback
} from 'react-native'
import * as easings from './utils/easing'
/**
* A Tab with a label and an icon.
*/
export default class FullTab extends React.... |
src/index.js | jsize8/learn-fullstack-javascript | import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App';
ReactDOM.render(
<App initialData={window.initialData} />,
document.getElementById('root')
);
|
src/components/app.js | prasadjay/react-test | import React from 'react';
import '../css/app.css'
import AlertContainer from 'react-alert'
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import RaisedButton from 'material-ui/RaisedButton';
import { Switch, Route } from 'react-router-dom'
import { Link } from 'react-router-dom'
import $ from 'jqu... |
src/apps/DataObjects/DataObjectsTable/DataObjectsTableFileCell.js | Syncano/syncano-dashboard | import React from 'react';
import { FontIcon } from 'material-ui';
const DataObjectsTableFileCell = ({ content }) => {
const handleClick = (event) => {
event.preventDefault();
event.stopPropagation();
window.open(content.value, '_blank');
};
return (
<div onClick={handleClick}>
<FontIcon c... |
react_state/setup.js | devSC/react-native | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
import StateTest from './StateTest'
export default class setup extends Component {
render() {
return (
... |
src/routes.js | november9/wecansavedemocracy | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './containers/app';
import ActivitiesList from './containers/ActivitiesList/activities_index';
import ActivitiesNew from './containers/ActivitiesNew/activities_new';
import FindRep from './containers/FindRep/findRepresentative... |
src/svg-icons/navigation/arrow-downward.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationArrowDownward = (props) => (
<SvgIcon {...props}>
<path d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"/>
</SvgIcon>
);
NavigationArrowDownward = pure(NavigationArrowDownward);
Na... |
src/index.js | LeoVitale/rd-react-challenge | import React from 'react';
import {render} from 'react-dom';
import App from './App';
render(<App/>, document.getElementById('root'));
|
myriad-scheduler/src/main/resources/webapp/js/components/TaskListComponent.js | apache/incubator-myriad | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
packages/mcs-lite-ui/src/others/Icon.example.js | MCS-Lite/mcs-lite | import React from 'react';
import { storiesOf } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import styled from 'styled-components';
import MorphReplace from 'react-svg-morph/lib/MorphReplace';
import * as Icons from 'mcs-lite-icon/lib/index';
import Heading from '../Heading';
import Card ... |
src/routes/notFound/index.js | Tim-Thomas/beer-board | /**
* 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... |
nailgun/static/utils.js | eayunstack/fuel-web | /*
* Copyright 2013 Mirantis, 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 ... |
src/views/components/ux-menu-button/index.js | zerubeus/future-layout | import React from 'react';
import PropTypes from 'prop-types';
import { Button } from 'react-bootstrap';
import './style.css'
function colorSwitcher(currentView) {
switch (currentView) {
case 'acquisition':
return { 'background-color': 'rgba(130, 169, 232, 0.3)' };
case 'review':
return { 'backg... |
src/components/details.js | knod/cliff-effects-1 | import React, { Component } from 'react';
import {
Icon,
Transition,
Message,
} from 'semantic-ui-react';
// PROJECT COMPONENTS
import { Surrounder } from '../components/Surrounder';
/** Really it's a top component that has a question mark
* next to it followed by a bottom one that starts
* as hidden, ... |
src/Stepper/StepButton.spec.js | ArcanisCz/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import {spy} from 'sinon';
import StepButton from './StepButton';
import StepLabel from './StepLabel';
import getMuiTheme from '../styles/getMuiTheme';
describe('<StepButton />', () => {
const muiTheme = ge... |
client/Pages/About.js | codybarr/GoMobileCT | import React from 'react';
import { Link } from 'react-router';
export default class Locations extends React.Component {
render() {
return (
<div class="about">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h1>About Us</h1>
... |
shared/container/DevTools/DevTools.js | IIaJIeHo/mernium | import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
export default createDevTools(
<DockMonitor
toggleVisibilityKey="ctrl-h"
changePositionKey="ctrl-w"
>
<LogMonitor />
... |
examples/huge-apps/routes/Course/routes/Announcements/components/Sidebar.js | CivBase/react-router | import React from 'react';
import { Link } from 'react-router';
export default class AnnouncementsSidebar extends React.Component {
render () {
var announcements = COURSES[this.props.params.courseId].announcements;
return (
<div>
<h3>Sidebar Assignments</h3>
<ul>
{announcemen... |
docs/app/Examples/modules/Dropdown/Content/index.js | vageeshb/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ContributionPrompt from 'docs/app/Components/ComponentDoc/ContributionPrompt'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const DropdownContentExamples = () => (
<Example... |
packages/material-ui-icons/src/ExpandLess.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let ExpandLess = props =>
<SvgIcon {...props}>
<path d="M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z" />
</SvgIcon>;
ExpandLess = pure(ExpandLess);
ExpandLess.muiName = 'SvgIcon';
export default ExpandL... |
node_modules/react-router/es6/IndexRoute.js | aimanaiman/supernomadfriendsquad | import React from 'react';
import warning from './routerWarning';
import invariant from 'invariant';
import { createRouteFromReactElement as _createRouteFromReactElement } from './RouteUtils';
import { component, components, falsy } from './InternalPropTypes';
var func = React.PropTypes.func;
/**
* An <IndexRoute> i... |
src/svg-icons/device/wifi-tethering.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceWifiTethering = (props) => (
<SvgIcon {...props}>
<path d="M12 11c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 2c0-3.31-2.69-6-6-6s-6 2.69-6 6c0 2.22 1.21 4.15 3 5.19l1-1.74c-1.19-.7-2-1.97-2-3.45 0-2.21... |
packages/react-devtools-shared/src/devtools/views/Profiler/NoInteractions.js | chenglou/react | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import React from 'react';
import styles from './NoInteractions.css';
export default function NoInteractions({
hei... |
apps/mk-app-dashboard-analysis/apps/mk-app-trade-widget/action.js | ziaochina/mk-demo | import React from 'react'
import { action as MetaAction, AppLoader } from 'mk-meta-engine'
import config from './config'
import moment from 'moment'
import utils from 'mk-utils'
class action {
constructor(option) {
this.metaAction = option.metaAction
this.config = config.current
}
onInit ... |
src/components/Input/Radio.js | titon/toolkit | /**
* @copyright 2010-2017, The Titon Project
* @license http://opensource.org/licenses/BSD-3-Clause
* @link http://titon.io
* @flow
*/
import React from 'react';
import Input from './Input';
import style from '../../styler';
import { INPUT_CLASSES } from './types';
import type { InputProps } from '... |
Js/Backend/Modules/Layout/Footer.js | Webiny/Webiny | import React from 'react';
import Webiny from 'webiny';
class Footer extends Webiny.Ui.Component {
constructor(props) {
super(props);
this.state = {
developerMode: false,
links: [
{
name: 'Webiny 2.0',
url: 'http://ww... |
js/components/inputgroup/iconInput.js | LetsBuildSomething/vmag_mobile |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Header, Title, Content, Button, Icon, Body, Left, Right, Item, Input } from 'native-base';
import { Actions } from 'react-native-router-flux';
import st... |
test/specs/elements/Image/Image-test.js | koenvg/Semantic-UI-React | import _ from 'lodash'
import React from 'react'
import Image from 'src/elements/Image/Image'
import ImageGroup from 'src/elements/Image/ImageGroup'
import { SUI } from 'src/lib'
import Dimmer from 'src/modules/Dimmer/Dimmer'
import * as common from 'test/specs/commonTests'
describe('Image', () => {
common.isConfor... |
node_modules/react-bootstrap/es/Fade.js | GregSantulli/react-drum-sequencer | import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import classNames from 'classnames';
import React fr... |
InstitutionalApp/__tests__/index.android.js | michelmarcondes/ReactNativeStudies | import 'react-native';
import React from 'react';
import Index from '../index.android.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
react-flux-mui/js/material-ui/src/svg-icons/action/shopping-cart.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionShoppingCart = (props) => (
<SvgIcon {...props}>
<path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11... |
src/svg-icons/av/library-add.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvLibraryAdd = (props) => (
<SvgIcon {...props}>
<path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/>
</S... |
src/scripts/components/message/ErrorMessage.component.js | ModuloM/kodokojo-ui | /**
* Kodo Kojo - Software factory done right
* Copyright © 2016 Kodo Kojo (infos@kodokojo.io)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at ... |
src/routes.js | leohahn/TIM-frontend | import React from 'react'
import { Route, IndexRoute } from 'react-router'
import App from './containers/App'
import HomePage from './containers/HomePage'
import RequestPage from './containers/RequestPage'
import OfferPage from './containers/OfferPage'
import LoginPage from './containers/LoginPage'
import RegisterPage... |
src/components/common/mediaPicker/PickedMediaContainer.js | mitmedialab/MediaCloud-Web-Tools | import PropTypes from 'prop-types';
import React from 'react';
import Menu from '@material-ui/core/Menu';
import MoreVertIcon from '@material-ui/icons/MoreVert';
import MenuItem from '@material-ui/core/MenuItem';
import IconButton from '@material-ui/core/IconButton';
import { injectIntl, FormattedMessage } from 'react-... |
src/TabPane.js | thealjey/react-bootstrap | import React from 'react';
import deprecationWarning from './utils/deprecationWarning';
import Tab from './Tab';
const TabPane = React.createClass({
componentWillMount() {
deprecationWarning(
'TabPane', 'Tab',
'https://github.com/react-bootstrap/react-bootstrap/pull/1091'
);
},
render() {
... |
d3_drag_drop/slider.js | MichelHalmes/sankey | import d3 from 'd3'
import React from 'react'
import ReactFauxDOM from 'react-faux-dom'
class Slider extends React.Component {
render() {
const {width, height, value} = this.props
var svgNode = ReactFauxDOM.createElement('div');
var svg = d3.select(svgNode).append("svg")
.attr('width',width)
... |
react/front/src/views/Place.js | kopringo/GenealogyViewer | import React from 'react';
import Navigation from '../components/navigation';
const Place = () => {
return (
<div className="Place">
<Navigation/>
Place
</div>
)
}
export default Place; |
samples/react-redux-patient-demographics-example/src/layouts/CoreLayout/CoreLayout.js | GoTeamEpsilon/angular-to-react | import React from 'react'
import './CoreLayout.scss'
import '../../styles/core.scss'
export const CoreLayout = ({ children }) => (children)
CoreLayout.propTypes = {
children : React.PropTypes.element.isRequired
}
export default CoreLayout
|
src/components/icon/index.js | enapupe/know-your-bundle | import React from 'react'
import PropTypes from 'prop-types'
const Icon = ({ alt, className, icon, width, height }) => (
<svg alt={alt} width={width} height={height} className={className}>
<use xlinkHref={`#${icon.id}`} />
</svg>
)
Icon.propTypes = {
alt: PropTypes.string.isRequired,
className: PropTypes.... |
src/ModalDialog.js | glenjamin/react-bootstrap | import classNames from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import { createBootstrapComponent } from './ThemeProvider';
class ModalDialog extends React.Component {
static propTypes = {
bsPrefix: PropTypes.string,
/**
* Specifies a large or small modal.
*
... |
examples/customised/src/components/Button/Button.js | sapegin/react-styleguidist | import React from 'react';
import PropTypes from 'prop-types';
import s from './Button.css';
/**
* The only true button.
*/
export default function Button({ color, size, children }) {
const styles = {
color,
fontSize: Button.sizes[size],
};
return (
<button className={s.root} style={styles}>
{children}... |
app/components/List/index.js | AK33M/scalable-react | import React from 'react';
import styles from './styles.css';
function List(props) {
const ComponentToRender = props.component;
let content = (<div></div>);
// If we have items, render them
if (props.items) {
content = props.items.map((item, index) => (
<ComponentToRender key={`item-${index}`} item... |
src/components/safari/original-wordmark/SafariOriginalWordmark.js | fpoumian/react-devicon | import React from 'react'
import PropTypes from 'prop-types'
import SVGDeviconInline from '../../_base/SVGDeviconInline'
import iconSVG from './SafariOriginalWordmark.svg'
/** SafariOriginalWordmark */
function SafariOriginalWordmark({ width, height, className }) {
return (
<SVGDeviconInline
className={'S... |
examples/03 Nesting/Drop Targets/Container.js | ntdb/react-dnd | import React from 'react';
import Dustbin from './Dustbin';
import Box from './Box';
import { DragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd/modules/backends/HTML5';
@DragDropContext(HTML5Backend)
export default class Container {
render() {
return (
<div>
<div style={{ over... |
src/parser/shared/modules/items/bfa/dungeons/BalefireBranch.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import ITEMS from 'common/ITEMS';
import { formatDuration, formatNumber } from 'common/format';
import { calculatePrimaryStat } from 'common/stats';
import ItemStatistic from 'interface/statistics/ItemStatistic';
import BoringItemValueText from 'interface/... |
src/index.js | ayACEP/nier-automata-ui | 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();
|
tests/routes/Account/components/ProviderDataForm.spec.js | KyperTech/devshare-site | import React from 'react'
import { ProviderDataForm } from 'routes/Account/components/ProviderDataForm/ProviderDataForm'
import { shallow } from 'enzyme'
describe.skip('(Account:Component) ProviderDataForm', () => {
let _component
const providerData = [{displayName: 'asdf'}]
beforeEach(() => {
_component = ... |
clients/packages/admin-client/src/mobrender/components/block-config-menu.js | nossas/bonde-client | import PropTypes from 'prop-types';
import React from 'react';
import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
import classnames from 'classnames';
import { DropdownMenu, DropdownMenuItem } from '../../components/dropdown-menu';
export const EDIT_KEY = 'background';
const BlockConfigMenu = ({
... |
src/svg-icons/action/lightbulb-outline.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionLightbulbOutline = (props) => (
<SvgIcon {...props}>
<path d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1... |
app/pages/GankRecommendPage.js | iwgang/GankCamp-React-Native | /**
* Tab_推荐页面
* 1. 每日推荐干货信息
* 2. 往期推荐干货日期列表
* Created by iWgang on 16/05/22.
* https://github.com/iwgang/GankCamp-React-Native
*/
import React, { Component } from 'react';
import { StyleSheet, View, Text, Image, ScrollView, Platform, TouchableOpacity } from 'react-native';
import { connect } from 'react-re... |
client/src/components/Draftail/blocks/EmbedBlock.js | gasman/wagtail | import PropTypes from 'prop-types';
import React from 'react';
import { STRINGS } from '../../../config/wagtailConfig';
import MediaBlock from '../blocks/MediaBlock';
/**
* Editor block to display media and edit content.
*/
const EmbedBlock = props => {
const { entity, onEditEntity, onRemoveEntity } = props.bloc... |
localprovider-redux-saga-ganaraj/src/randomGifList/Container.js | slorber/scalable-frontend-with-elm-or-redux | import React from 'react';
import { connect } from 'react-redux';
import { Container as RandomGif } from '../randomGif';
import * as actions from './actions';
import localState from '../LocalProvider';
import reducer from './reducer';
export const Component = ({ addNewGif, gifTopic, topic, changeTopic }) => (
<div... |
packages/material-ui-icons/src/WrapText.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3 3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z" /></g>
, 'WrapText');
|
client/app/components/HomePage/index.js | maekks/menu-plus | import React from 'react';
import styled from 'styled-components';
import SearchBar from 'components/SearchBar';
import video from './video-bg.mp4';
import videobg from './bg.jpg';
import videooverlay from './movie-overlay.png';
const JumbotronDiv = styled.div`
box-sizing: border-box;
height: calc(100% - 60px);
... |
src/components/source/collection/form/CollectionDetailsForm.js | mitmedialab/MediaCloud-Web-Tools | import PropTypes from 'prop-types';
import React from 'react';
import { Field, reduxForm } from 'redux-form';
import { FormattedMessage, injectIntl } from 'react-intl';
import { Row, Col } from 'react-flexbox-grid/lib';
import withIntlForm from '../../../common/hocs/IntlForm';
const localMessages = {
nameLabel: { id... |
src/gm3/components/editor/modal.js | geomoose/gm3 | import React from 'react';
import {withTranslation} from 'react-i18next';
import Modal from '../modal';
const isNumberType = type => (type === 'number' || type === 'range');
const getDefaultValue = attr => {
const numeric = isNumberType(attr.type);
if (attr.default) {
return numeric ? parseFloat(attr... |
scripts/dashboard/components/ProjectList/ProjectListItem/view.js | vedranjukic/dockerino | import React from 'react'
import { Link } from 'react-router'
import { Table } from 'react-bootstrap';
function view ({id, name}) {
return (
<tr>
<td>{name}</td>
<td>
<Link to={`/project/${id}`}>Edit</Link>
<a href="#" className='remove'>Remove</a>
</td>
</tr>
)
}
export ... |
src/common/lib/redux-firebase/firebase.js | skallet/este | // @flow
import * as actions from './actions';
import React from 'react';
// // Example
// OnlineUsers = firebase((database, props) => {
// const usersPresenceRef = database.child('users-presence');
// return [
// [usersPresenceRef, 'on', 'value', props.onUsersPresence],
// ]
// })(OnlineUsers);
type Query ... |
src/client.js | pitLancer/pbdorb | /**
* 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 ReactDOM from 'react-dom... |
src/components/icons/PhoneIcon.js | InsideSalesOfficial/insidesales-components | import React from 'react';
const PhoneIcon = props => (
<svg {...props.size || { width: '24px', height: '24px' }} {...props} viewBox="0 0 100 100">
{props.title && <title>{props.title}</title>}
<path d="M52.2,18.9l0.7,0.5l8,5.7l0.8,0.5l-0.4,0.8l-5.7,10.2c-0.3,0.7-0.8,1.2-1.4,1.5c-0.8,0.5-1.8,0.9-3,1.1
... |
actor-apps/app-web/src/app/components/common/MessageItem.react.js | bradparks/actor-platform___im_client_cross_platform | import _ from 'lodash';
import React from 'react';
import { PureRenderMixin } from 'react/addons';
import memoize from 'memoizee';
import classNames from 'classnames';
import emojify from 'emojify.js';
import hljs from 'highlight.js';
import marked from 'marked';
import emojiCharacters from 'emoji-named-characters';
... |
actor-apps/app-web/src/app/components/modals/create-group/Form.react.js | bunnyblue/actor-platform | import _ from 'lodash';
import Immutable from 'immutable';
import keymirror from 'keymirror';
import React from 'react';
import { Styles, TextField, FlatButton } from 'material-ui';
import CreateGroupActionCreators from 'actions/CreateGroupActionCreators';
import ContactStore from 'stores/ContactStore';
import Cont... |
packages/lore-generate-new/templates/es5/src/components/Layout.js | lore/lore | /**
* This component is intended to reflect the high level structure of your application,
* and render any components that are common across all views, such as the header or
* top-level navigation. All other components should be rendered by route handlers.
*/
import React from 'react';
import PropTypes from 'prop-... |
lib/components/Application.js | sljohnson32/shoot-the-breeze | import React, { Component } from 'react';
import firebase, { reference, signIn, signOut } from '../firebase';
import { pick, map, extend } from 'lodash';
import Utilities, { displayFirstName, filterMsgs } from './Utilities';
import Messages from './Messages';
import NavBar from './NavBar';
import UserList from './UserL... |
examples/auth-with-shared-root/components/User.js | meraki/react-router | import React from 'react'
const User = React.createClass({
render() {
return <h1>User: {this.props.params.id}</h1>
}
})
export default User
|
src/svg-icons/av/web-asset.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvWebAsset = (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-.89-2-2-2zm0 14H5V8h14v10z"/>
</SvgIcon>
);
AvWebAsset = pure(AvWebAsset);
AvWebAss... |
lib/types/VTKVolumeSLICDebug.js | Kitware/in-situ-data-viewer | import Monologue from 'monologue.js';
import contains from 'mout/src/array/contains';
import QueryDataModelWithExplorationWidget from 'paraviewweb/src/React/CollapsibleControls/QueryDataModelControl';
import vtkOpenGLRenderWindow from 'vtk.js/Sources/Rendering/OpenGL/RenderWindow';
import vtkRenderer from 'vtk.js/So... |
tests/components/Header/Header.spec.js | nicklee1990/CompanyIdeas | import React from 'react'
import { Header } from 'components/Header/Header'
import { Navigation } from 'components/Navigation/Navigation'
import { shallow } from 'enzyme'
import style from 'components/Navigation/Navigation.scss'
describe('(Component) Header', () => {
let _wrapper
beforeEach(() => {
_wrapper =... |
app/javascript/mastodon/components/error_boundary.js | kirakiratter/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { version, source_url } from 'mastodon/initial_state';
import StackTrace from 'stacktrace-js';
export default class ErrorBoundary extends React.PureComponent {
static propTypes = {
children: Prop... |
src/components/Navigation/mobile.js | saschajullmann/gatsby-starter-gatsbythemes | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import feather from '../../utils/feather';
class MobileNav extends Component {
constructor(props) {
super(props);
this.mobileContainer = document.createElement('div');
document.body.appendChild... |
src/app/src/assets/specializations/AddRow.js | istreight/eggbeatr | /**
* FILENAME: AddRow.js
* AUTHOR: Isaac Streight
* START DATE: December 3rd, 2018
*
* This file contains the AddRow class, a specialization class for
* table row tags whith have an 'Add' button in the application.
*/
import React from 'react';
import PropTypes from 'prop-types';
import Input from '... |
src/app/components/Footer.js | skratchdot/react-github-corner | import React, { Component } from 'react';
import { Row, Col } from 'react-bootstrap';
import { connect } from 'react-redux';
class Footer extends Component {
render() {
return (
<footer>
<Row>
<Col md={12}>
<div className="main-seperator" />
</Col>
</Row>
... |
src/components/WrapperLayer.js | GGGGino/react-event-layer | import React from 'react';
import PropTypes from 'prop-types';
class WrapperLayer extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="wrapperLayer">
<div className="demo0-block" style={{
WebkitTransform: `translate3d(${this.props.x}p... |
demo/index.js | gianmarcotoso/react-ui-autocomplete | import React from 'react'
import ReactDOM from 'react-dom'
import Demo from './Demo'
ReactDOM.render(
<Demo />,
document.querySelector('#main')
)
|
src/js/components/NameBox.js | VasilyShelkov/ClientRelationshipManagerFrontEnd | import React from 'react';
import NameList from './NameList.js';
import NameStore from '../stores/NameStore.js';
import NameActions from '../actions/NameActions.js';
import './button.css';
class NameBox extends React.Component {
constructor(props) {
super(props);
this.state = {
names: NameStore.getNam... |
src/components/accordion.js | nordsoftware/react-foundation | import React from 'react';
import PropTypes from 'prop-types';
import { GeneralPropTypes, FlexboxPropTypes, createClassName, generalClassNames, removeProps, objectKeys } from '../utils';
/**
* Accordion component.
* http://foundation.zurb.com/sites/docs/accordion.html
*
* @param {Object} props
* @returns {Object}... |
src/SparklinesBars.js | timoxley/react-sparklines | import React from 'react';
export default class SparklinesBars extends React.Component {
static propTypes = {
style: React.PropTypes.object
};
static defaultProps = {
style: { fill: 'slategray' }
};
render() {
const { points, width, height, margin, style } = this.props;
... |
src/esm/components/form/radio/index.js | KissKissBankBank/kitten | import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["className", "id", "children", "inputClassName", "text", "error", "disabled", "design", "fontWeight"];
import React from 'react';
import PropTypes from... |
app/containers/RepoListItem/index.js | hieubq90/react-boilerplate-3.4.0 | /**
* RepoListItem
*
* Lists the name and the issue count of a repository
*/
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { FormattedNumber } from 'react-intl';
import { makeSelectCurrentUser } fro... |
app/client/lag/lagacy/components/Padding.js | Exper1ence/qinxiaoguyi | /**
* Created by Exper1ence on 2016/12/31.
*/
import React from 'react';
import Component from './Component';
import Container from './Container';
import Text from './Text';
export default class Padding extends Component {
_run({children, style, small, large,}) {
return (
<Container style={{p... |
client/src/components/beers/beer-list.js | commoncode/ontap | /**
* Beers component/container
*
* Lists all the Beers.
* Beers are things we can buy
*/
import React from 'react';
import reactPropTypes from 'prop-types';
import { Container } from 'flux/utils';
import { fetchBeers, showAddBeer } from '../../actions/beers';
import beersStore from '../../stores/beers';
import ... |
app/components/AddConsignmentForms/AddConsignmentPage1.js | RichAbrahams/electron-project | import React from 'react';
import { Field, reduxForm } from 'redux-form';
import FormRow from '../stc/FormRow';
import Form from '../stc/Form';
import BottomNav from './BottomNav';
import renderField from './RenderField';
import asyncValidate from '../../reduxFormHandlers/validateConsignmentID';
import validate from '.... |
src/components/Loading.js | Seeingu/medium-demo | import React from 'react';
import styled, { keyframes } from 'styled-components';
import { PRIMARY_COLOR } from '../styles';
const LoadingContainer = styled.div`
font-size: 4em;
font-weight: bold;
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
`;
const Jump... |
modules/State.js | jeffreywescott/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... |
src/components/drafts.js | fc-io/mtg_draft_seatings_generator | // import _ from 'lodash'
import React from 'react'
import getDraftPods from '../services/get_draft_pods'
import drafts from '../resources/drafts'
import Draft from './draft'
export default ({players}) => {
var {pods, success} = getDraftPods(drafts, players)
return (
<div>
<div>## Draft Pods</div>
... |
exercise-07-solution/src/index.js | learnapollo/pokedex-react | import React from 'react'
import ReactDOM from 'react-dom'
import Pokedex from './components/Pokedex'
import PokemonPage from './components/PokemonPage'
import AddPokemonCard from './components/AddPokemonCard'
import { Router, Route, browserHistory, IndexRedirect } from 'react-router'
import ApolloClient, { createNetwo... |
app/pages/patient/customizedtrendschart.js | tidepool-org/blip |
/**
* Copyright (c) 2017, Tidepool Project
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the associated License, which is identical to the BSD 2-Clause
* License as published by the Open Source Initiative at opensource.org.
*
* This program is distributed in th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.