path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
app/javascript/mastodon/main.js
cobodo/mastodon
import * as registerPushNotifications from './actions/push_notifications'; import { setupBrowserNotifications } from './actions/notifications'; import { default as Mastodon, store } from './containers/mastodon'; import React from 'react'; import ReactDOM from 'react-dom'; import ready from './ready'; const perf = requ...
app/constants/Global.js
jaminzzhang/MZMovie
import React from 'react'; import { Dimensions, Platform } from 'react-native'; let {height, width} = Dimensions.get('window'); // 获取屏幕宽度 global.SCREEN_WIDTH = width; // 获取屏幕高度 global.SCREEN_HEIGHT = height; // 系统是iOS global.iOS = (Platform.OS === 'ios'); // 系统是安卓 global.Android = (Platform.OS === 'android');
01_webstack/03Wk04/1_conFusion_http/node_modules/browser-sync/node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js
allenmodroid/webstack
import React from 'react'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; React.render(<HelloWorld />, document.getElementById('react-root'));
src/components/header/Navigation.js
samihda/pizza
import React from 'react'; import Sequence from './Sequence'; import MainMenu from './MainMenu'; const Navigation = (props) => { const Empty = () => null; return ( <nav> <div className="pure-menu pure-menu-horizontal"> {props.step === 0 ? <MainMenu {...props} /> : <Empty />} {props.step ...
app/components/badges/run-statistics/component.js
DenQ/electron-react-lex
import React, { Component } from 'react'; import Badge from 'material-ui/Badge'; export default class RunVariable extends Component { render() { const { statisticsAlbum } = this.props; return ( <span> <Badge badgeContent={statisticsAlbum.learned} primary={true} se...
src/containers/NotFound/NotFound.js
RomanovRoman/react-redux-universal-hot-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> ); }
src/Components/svg/BikeIcon.js
fcgomes92/pousadacaminhodosventos
import React, { Component } from 'react'; export default class BikeIcon extends Component { render() { return ( <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" {...this.props}> <path d="M13.24 61.67c1.682-.642 3.41-.945 5.11-.95l-1.897 14.21c-.1.757.247 1.502.888 1.915.53.34 1.19.4 1....
newclient/scripts/components/config/disclosure-requirements/configuring-panel/index.js
kuali/research-coi
/* The Conflict of Interest (COI) module of Kuali Research Copyright © 2005-2016 Kuali, Inc. This program 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, either version 3 of the License, or (at your ...
src/containers/About/About.js
rmwdeveloper/portfolio
import React, { Component } from 'react'; export default class About extends Component { render() { return ( <div> Hey whats up </div> ); } }
node_modules/react-native/Libraries/Components/TextInput/TextInput.js
senolakkas/react-native-minesweeper
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @provides...
main.js
lifeiscontent/OpenPoGoUI
import 'babel-polyfill'; import 'whatwg-fetch'; import React from 'react'; import ReactDOM from 'react-dom'; import FastClick from 'fastclick'; import { Provider } from 'react-redux'; import store from './core/store'; import router from './core/router'; import history from './core/history'; let routes = require('./r...
test/Application.spec.js
mziccardi/shoot-the-breeze-
import React from 'react'; import { shallow, mount, render } from 'enzyme'; import { assert, expect } from 'chai'; import Application from '../lib/components/Application'; const sinon=require('sinon') describe('Application', () => { it('can mount with no properties', () => { const wrapper = shallow(<Applicatio...
client/src/containers/MNISTVisualView.js
scandalouswool/rally
/* MNIST MACHINE LEARNING VISUALIZATION */ import React, { Component } from 'react'; import { connect } from 'react-redux'; import _ from 'lodash'; const Synaptic = require('synaptic'); const Network = Synaptic.Network; class MNISTVisualView extends Component { constructor(props) { super(props); this.char...
packages/docs/components/Examples/image/gettingStarted.js
nikgraf/draft-js-plugin-editor
// It is important to import the Editor which accepts plugins. import Editor from '@draft-js-plugins/editor'; import createImagePlugin from '@draft-js-plugins/image'; import React from 'react'; const imagePlugin = createImagePlugin(); // The Editor accepts an array of plugins. In this case, only the imagePlugin // ...
src/svg-icons/toggle/radio-button-checked.js
ngbrown/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ToggleRadioButtonChecked = (props) => ( <SvgIcon {...props}> <path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3...
src/js/app/header/SearchBar/MobileSearchBar.js
ludonow/ludo-beta-react
import React from 'react'; import styled from 'styled-components'; import magnifierIcon from '../../../../images/magnifier.svg'; import { CancelIconButton, CancelIconPlaceHolder, SearchBar } from './common'; const MobileSearchBarWrapper = styled.div` display: flex; justify-content: center; margin: 0 auto;...
src/svg-icons/notification/personal-video.js
matthewoates/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationPersonalVideo = (props) => ( <SvgIcon {...props}> <path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12z"/> </SvgIcon> ); Notifi...
pyxis/views/beacon/all.js
gtkatakura/furb-desenvolvimento-plataformas-moveis
import React from 'react'; import { Text, View, Button, StyleSheet, ScrollView } from 'react-native'; import Components from './../../components'; const styles = StyleSheet.create({ base: { padding: 24, flex: 1 }, name: { fontSize: 24 }, header: { flexWrap: 'wrap', flexDirection: 'row' ...
src/pages/string/Zalgorithm/Zalgorithm.js
hyy1115/react-redux-webpack3
import React from 'react' class Zalgorithm extends React.Component { render() { return ( <div>Zalgorithm</div> ) } } export default Zalgorithm
src/app/components/DialogExampleSimple.js
leoliew/react-webpack-example
/** * Created by leoliew on 2016/11/28. */ import React from 'react'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import RaisedButton from 'material-ui/RaisedButton'; import ShowCaseCard from './ShowCaseCard'; /** * Dialog with action buttons. The actions are passed in ...
test/browser/es6-module-exports-spec.js
skarnecki/material-ui
import React from 'react'; import TestUtils from 'react-addons-test-utils'; import injectTheme from './fixtures/inject-theme'; const Divider = require('Divider').default; const ActionAccessibility = require('svg-icons').ActionAccessibility; import ImportGetMuiTheme from 'styles/getMuiTheme'; const RequireGetMuiTheme ...
src/index.js
faalsh/react-materialize-demo
import React from 'react' import { render } from 'react-dom' import { Router, Route, browserHistory, IndexRoute } from 'react-router' import {Provider} from 'react-redux' import store from './store' import Layout from './containers/Layout/Layout.jsx' import Matches from './containers/Matches/Matches.jsx' import Repos ...
app/jsx/nav_tourpoints/tour.js
djbender/canvas-lms
/* * Copyright (C) 2020 - 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...
src/components/RouteNavItem.js
availabs/avail_app_bootstrap
import React from 'react'; import { Route } from 'react-router-dom'; import { NavItem } from 'react-bootstrap'; export default props => ( <Route path={props.href} exact children={({ match, history }) => ( <NavItem onClick={e => history.push(e.currentTarget.getAttribute('href'))} {.....
src-example/components/organisms/FeatureList/index.stories.js
SIB-Colombia/biodiversity_catalogue_v2_frontend
import React from 'react' import { storiesOf } from '@kadira/storybook' import { FeatureList } from 'components' storiesOf('FeatureList', module) .add('default', () => ( <FeatureList /> ))
src/collections/Form/FormDropdown.js
koenvg/Semantic-UI-React
import React from 'react' import { customPropTypes, getElementType, getUnhandledProps, META, } from '../../lib' import Dropdown from '../../modules/Dropdown' import FormField from './FormField' /** * Sugar for <Form.Field control={Dropdown} />. * @see Dropdown * @see Form */ function FormDropdown(props) {...
src/RefreshIndicator/RefreshIndicator.js
rscnt/material-ui
import React from 'react'; import autoPrefix from '../utils/autoPrefix'; import transitions from '../styles/transitions'; import Paper from '../Paper'; const VIEWBOX_SIZE = 32; function getStyles(props) { const padding = props.size * 0.1; // same implementation of `this.getPaddingSize()` return { root: { ...
src/parser/demonhunter/havoc/modules/talents/DemonBlades.js
sMteX/WoWAnalyzer
import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import TalentStatisticBox from 'interface/others/TalentStatisticBox'; import STATISTIC_ORDER from 'interface/others/STATISTIC_ORDER'; import Events from 'parser/core/Events'; import Analyzer, { SELECTED_PLAYER } fro...
django/webcode/webcode/frontend/node_modules/react-bootstrap/es/Fade.js
OpenKGB/webcode
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...
src/common/Clipboard/Clipboard.js
Syncano/syncano-dashboard
import React from 'react'; import CopyToClipboard from 'react-copy-to-clipboard'; import { IconButton, FlatButton, FontIcon } from 'material-ui'; import Tooltip from '../Tooltip'; import Truncate from '../Truncate'; const Clipboard = ({ style, iconStyle, tooltip, text, copyText, onCopy, type, children, ...other }) => ...
src/components/Contact/ContactPage.js
liutongchen/liutong-chen-website
import React from 'react'; import { Col, Row, Tooltip, OverlayTrigger } from 'react-bootstrap'; import personalInfo from '../../../src/info'; import ScrollToTopOnMount from '../commons/ScrollToTopOnMount'; const ContactPage = () => { const gmailTooltip = ( <Tooltip id="tooltip">Gmail</Tooltip> ); c...
src/components/page/Page.js
Ca1YuChen/Lottery
import React from 'react'; import LotteryList from '../LotteryList/LotteryList'; import ButtonAppBar from '../ButtonAppBar/ButtonAppBar'; import AlertDialog from '../AlertDialog/AlertDialog'; import './Page.css'; export default class Page extends React.Component { constructor(props) { super(props); this.stat...
actor-apps/app-web/src/app/utils/require-auth.js
hzy87email/actor-platform
import React from 'react'; import LoginStore from 'stores/LoginStore'; export default (Component) => { return class Authenticated extends React.Component { static willTransitionTo(transition) { if (!LoginStore.isLoggedIn()) { transition.redirect('/auth', {}, {'nextPath': transition.path}); }...
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/FormComponents/SingleInput.js
Minoli/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/screen/RobotArm/RobotArm.js
wavicles/fossasia-pslab-apps
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { Container, KnobWrapper, PaintWrapper, Spacer, } from './RobotArm.styles'; import PaintArea from './Components/PaintArea'; import KnobControl from './Components/KnobControl'; import range from 'lodash/range'; const electro...
docs/app/Examples/elements/Button/Variations/ButtonExampleCircular.js
koenvg/Semantic-UI-React
import React from 'react' import { Button } from 'semantic-ui-react' const ButtonExampleCircular = () => ( <Button circular icon='settings' /> ) export default ButtonExampleCircular
src/svg-icons/image/tonality.js
xmityaz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImageTonality = (props) => ( <SvgIcon {...props}> <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93s3.05-7.44 7-7.93v15.86zm2-15.86c1.03.13 2 .45 2.87....
src/render-to-layer.js
XiaonuoGantan/material-ui
import React from 'react'; import ReactDOM from 'react-dom'; import Events from './utils/events'; import Dom from './utils/dom'; import debounce from 'lodash.debounce'; // heavily inspired by https://github.com/Khan/react-components/blob/master/js/layered-component-mixin.jsx const RenderToLayer = React.createClass({ ...
src/svg-icons/device/signal-cellular-0-bar.js
jacklam718/react-svg-iconx
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceSignalCellular0Bar = (props) => ( <SvgIcon {...props}> <path fillOpacity=".3" d="M2 22h20V2z"/> </SvgIcon> ); DeviceSignalCellular0Bar = pure(DeviceSignalCellular0Bar); DeviceSignalCellular0Bar.displayN...
login-test/src/App.js
linearworlds/cognito-groups
import React, { Component } from 'react'; import { withRouter, Link } from 'react-router-dom'; import Routes from './Routes'; import RouteNavItem from './components/RouteNavItem'; import AWS from 'aws-sdk'; import {clearAwsCredentials, getCurrentUser, getTokens, testIsAdminUser} from './libs/awsLib'; import config from...
modules/Layout.js
cloudytimemachine/frontend
import React from 'react' import { Link } from 'react-router/lib/Link' import Navbar from './Common/Navbar' import FooterSocialButtons from './Common/FooterSocialButtons' export default React.createClass({ render() { return ( <div> <Navbar /> {this.props.children} <footer className=...
demo/dynamic-hexbin.js
joelburget/d4
import React from 'react'; import {range} from 'd3-array'; import {hexbin as d3hexbin} from 'd3-hexbin'; import {randomNormal} from 'd3-random'; import {scaleLinear} from 'd3-scale'; import {interpolateLab} from 'd3-interpolate'; const width = 960; const height = 500; let i = -1; let theta = 0; const deltaTheta = 0.3;...
src/App.js
babizhu/you-you
import React, { Component } from 'react'; import { BarChart } from 'react-d3-components'; import { DatePicker } from 'antd'; import { NICE, SUPER_NICE } from './colors'; //import 'antd/style/index.less'; // import less for modifyVars import 'antd/lib/index.css'; //import {buildChartsData} from './milk/data/MilkData'...
src/svg-icons/av/playlist-play.js
igorbt/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let AvPlaylistPlay = (props) => ( <SvgIcon {...props}> <path d="M19 9H2v2h17V9zm0-4H2v2h17V5zM2 15h13v-2H2v2zm15-2v6l5-3-5-3z"/> </SvgIcon> ); AvPlaylistPlay = pure(AvPlaylistPlay); AvPlaylistPlay.displayName = '...
demo/src/common/routes/Routes.js
misterfresh/react-easy-transition
'use strict' import React from 'react' import { Route, IndexRoute } from 'react-router' import App from 'containers/App' import Home from './Home/Home' import About from './About/About' import Contact from './Contact/Contact' import NoMatch from 'containers/NoMatch' export default ( <Route path="/" component={App...
Libraries/Modal/Modal.js
happypancake/react-native
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @provides...
src/routes.js
wearhacks/stark-classroom
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './components/App'; import Intro from './components/Intro'; import CourseContainer from './containers/CourseContainer'; import NotFoundPage from './components/NotFoundPage.js'; export default ( <Route path="/" component={Ap...
components/Animation.js
andkhong/git-started
import React, { Component } from 'react'; import GitAnimation from './GitAnimation'; import StructureAnimation from './StructureAnimation'; export default class Animation extends Component { constructor(props) { super(props); this.showGit = this.showGit.bind(this); this.showStructure = this.showStructure...
src/components/SimilarItems/SimilarItems.js
expdevelop/d812
import React from 'react' import { Carousel, InitCatalog } from 'components' import { ItemContainer } from 'containers' import s from './SimilarItems.sass' const SimilarItems = ({title, init, data}) => { const empty = !data || !data.length; return ( <div className={s.recommended}> {!empty && <h3 classNa...
tests/views/HomeView.spec.js
lishiyo/listentothis
import React from 'react' import TestUtils from 'react-addons-test-utils' import { bindActionCreators } from 'redux' import { HomeView } from 'views/HomeView' function shallowRender (component) { const renderer = TestUtils.createRenderer() renderer.render(component) return renderer.getRenderOutput() } function...
browser/app/js/components/__tests__/Login-test.js
dvstate/minio
/* * Minio Cloud Storage (C) 2016 Minio, 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...
src/components/layer/layer.js
hhj679/mybition-web
import { Modal, message } from 'antd' import React from 'react' import ReactDOM from 'react-dom' import classnames from 'classnames' import styles from './layer.less' const { info, success, error, warning, confirm } = Modal const layer = { prefixCls: 'ant-layer', index: 1, info, success, error, warning, ...
examples/counter/containers/App.js
AprilArcus/redux
import React, { Component } from 'react'; import CounterApp from './CounterApp'; import { createRedux } from 'redux'; import { Provider } from 'redux/react'; import * as stores from '../stores'; const redux = createRedux(stores); export default class App extends Component { render() { return ( <Provider r...
docs/src/CodeExample.js
victorzhang17/react-bootstrap
import React from 'react'; export default class CodeExample extends React.Component { render() { return ( <pre className="cm-s-solarized cm-s-light"> <code> {this.props.codeText} </code> </pre> ); } componentDidMount() { if (CodeMirror === undefined) { ret...
src/routes/Speeds/components/DashboardSpeedsView.js
liuyaoao/omnyiq-sc1-server-render
import React from 'react'; import axios from 'axios' import Helmet from 'react-helmet' import TimeSelectionTab from '../../../components/TimeSelectionTab' import ReactTabBar from '../../../components/ReactTabBar' import {getSpeedsDownloadChartData, getSpeedsUploadChartData, getSpeedsDL_ULChartData} from './SpeedsChart...
src/BurgerIcon.js
Lafinboy/react-burger-nav
import React from 'react' const BurgerIcon = React.createClass({ propTypes: { onClick: React.PropTypes.func.isRequired }, getInitialState() { return {hover: false} }, getLineStyle(index) { return { position: 'absolute', height: '20%', le...
jest-integration/baseTemplate/src/ClickCounter.js
bruderstein/unexpected-react
import React, { Component } from 'react'; import PropTypes from 'prop-types'; export default class ClickCounter extends Component { constructor() { super(); this.state = { count: 0 }; this.onClick = this.onClick.bind(this); } onClick() { this.setState({ count: this.state.count + 1 ...
ajax/libs/react-instantsearch/4.3.0-beta.0/Connectors.js
joeyparrish/cdnjs
/*! ReactInstantSearch 4.3.0-beta.0 | © 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'], facto...
src/svg-icons/action/delete-forever.js
mmrtnz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionDeleteForever = (props) => ( <SvgIcon {...props}> <path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1....
automatic-test-evaluation/src/Blanks/ClassMarksBarChart.js
hris11/AutomaticTestEvaluation
import React, { Component } from 'react'; import { BarChart, Bar, XAxis} from 'recharts'; const CustomBar = (props) => { const { x, y, width, height, fill } = props; if (x === +x && y === +y) { const path = `M${x},${y + height} C${x + width / 3},${y + height} ${x + width / 2},${y + height / ...
packages/material-ui-icons/src/Texture.js
AndriusBil/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let Texture = props => <SvgIcon {...props}> <path d="M19.51 3.08L3.08 19.51c.09.34.27.65.51.9.25.24.56.42.9.51L20.93 4.49c-.19-.69-.73-1.23-1.42-1.41zM11.88 3L3 11.88v2.83L14.71 3h-2.83zM5 3c-1.1 0-2 .9-2 2v2...
packages/material-ui-icons/src/CardGiftcard.js
dsslimshaddy/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let CardGiftcard = props => <SvgIcon {...props}> <path d="M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1...
tests/routes/Home/components/HomeView.spec.js
Havoc-Todo/havoc-web
import React from 'react' import { HomeView } from 'routes/Home/components/HomeView' import { render } from 'enzyme' describe('(View) Home', () => { let _component beforeEach(() => { _component = render(<HomeView />) }) it('Renders a welcome message', () => { const welcome = _component.find('h4') ...
packages/kalama/src/containers/MainWindow.js
corporateanon/kalama
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import { getRoute } from '../ducks/router'; import Label from '../components/Label'; import { getTasksSummary, STATUS_SCHEDULED, STATUS_FAILED, STATUS_COMPLETED } from '../ducks/d...
examples/with-custom-reverse-proxy/pages/index.js
BlancheXu/test
import React from 'react' export default class extends React.Component { constructor (props) { super(props) this.state = { response: '' } } static async getInitialProps ({ pathname, query }) { return { pathname, query, queryString: Object.keys(query).join('') } } async com...
packages/react-devtools-shared/src/devtools/views/ButtonIcon.js
rickbeerendonk/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 './ButtonIcon.css'; export type IconType = | 'add' | 'cancel' | '...
src/client/components/pages/parts/add-entity-to-collection-modal.js
bookbrainz/bookbrainz-site
/* * Copyright (C) 2020 Prabal Singh * * 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 2 of the License, or * (at your option) any later version. * * This program is distr...
docs/src/app/components/pages/components/Menu/ExampleIcons.js
rhaedes/material-ui
import React from 'react'; import Paper from 'material-ui/Paper'; import Menu from 'material-ui/Menu'; import MenuItem from 'material-ui/MenuItem'; import RemoveRedEye from 'material-ui/svg-icons/image/remove-red-eye'; import PersonAdd from 'material-ui/svg-icons/social/person-add'; import ContentLink from 'material-ui...
modules/__tests__/Router-test.js
ryardley/react-router
/*eslint-env mocha */ /*eslint react/prop-types: 0*/ import expect from 'expect' import React from 'react' import createHistory from 'history/lib/createMemoryHistory' import Router from '../Router' import Route from '../Route' describe('Router', function () { var node beforeEach(function () { node = document....
admin/client/App/screens/Home/index.js
vokal/keystone
/** * The Home view is the view one sees at /keystone. It shows a list of all lists, * grouped by their section. */ import React from 'react'; import { Container, Spinner } from '../../elemental'; import { connect } from 'react-redux'; import Lists from './components/Lists'; import Section from './components/Secti...
src/js/components/InfiniteScroll/stories/ShowBefore.js
grommet/grommet
import React from 'react'; import { Box, InfiniteScroll, Text } from 'grommet'; const allItems = Array(240) .fill() .map((_, i) => `item ${i + 1}`); const Example = (props) => ( // Uncomment <Grommet> lines when using outside of storybook // <Grommet theme={...}> <InfiniteScroll items={allItems} {...props}...
src/templates/index.js
calpa/blog
/* eslint react/prop-types: 0 */ import React from 'react'; import Link from 'gatsby-link'; import Card from '../components/Card'; import Sidebar from '../components/Sidebar'; import ShareBox from '../components/ShareBox'; import './index.scss'; const NavLinkText = ({ color, text }) => ( <div className="navlin...
docs/src/app/components/pages/components/Toolbar/Page.js
tan-jerene/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 toolbarReadmeText from './README'; import toolbarExampleSimpleCode from '...
actor-apps/app-web/src/app/components/modals/Preferences.react.js
nguyenhongson03/actor-platform
import React from 'react'; import Modal from 'react-modal'; import ReactMixin from 'react-mixin'; import { IntlMixin, FormattedMessage } from 'react-intl'; import { Styles, FlatButton, RadioButtonGroup, RadioButton, DropDownMenu } from 'material-ui'; import { KeyCodes } from 'constants/ActorAppConstants'; import Actor...
src/router.js
gusdewa/MultiStores
import React from 'react'; /* eslint-disable */ function decodeParam(val) { if (!(typeof val === 'string' || val.length === 0)) { return val; } try { return decodeURIComponent(val); } catch (err) { if (err instanceof URIError) { err.message = `Failed to decode param '${val}'`; err.sta...
pages/about.js
willopez/project-seed
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Helmet from 'react-helmet'; import Layout from '../components/layout'; export default class About extends Component { static async getInitialProps({ req }) { if (req) { Helmet.renderStatic(); } return { title: 'Ab...
node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js
thuongho/dream-machine
import React from 'react'; // It's important to not define HelloWorld component right in this file // because in that case it will do full page reload on change import HelloWorld from './HelloWorld.jsx'; React.render(<HelloWorld />, document.getElementById('react-root'));
src/components/chrome/Chrome.js
casesandberg/react-color
import React from 'react' import PropTypes from 'prop-types' import reactCSS from 'reactcss' import merge from 'lodash/merge' import { ColorWrap, Saturation, Hue, Alpha, Checkboard } from '../common' import ChromeFields from './ChromeFields' import ChromePointer from './ChromePointer' import ChromePointerCircle from '...
examples/transitions/app.js
cold-brew-coding/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...
app/javascript/components/Accounts/Users/Password.js
luckypike/mint
import React from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import axios from 'axios' // import { deserialize } from 'jsonapi-deserializer' import { path } from '../../Routes' import { useI18n } from '../../I18n' import { useForm, Errors } from '../../Form' import styles from './P...
src/ui/elements/logos/Backbone.js
gouxlord/dev-insight
import React from 'react' var Backbone = React.createClass({ render: function () { return ( <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 129.08 162" preserveAspectRatio="xMinYMin meet"> <polygon fill="#0071B5" points="108.083,64.441 108.083,39.751 85.755,51.576 64.33,39.25...
app/js/components/content/DropFileComponent.js
theappbusiness/tab-hq
'use strict'; import React from 'react'; import ReactDOM from 'react-dom'; import GoogleDriveMixin from '../../mixins/GoogleDriveMixin'; const DropFileComponent = React.createClass({ mixins: [GoogleDriveMixin], uploadFile(e) { // console.log(e); }, addLinkFromDrive(elem, params) { this.props.addLink...
stories/default-size/percent-size.js
pionl/react-resizable-box
/* eslint-disable */ import React from 'react'; import Resizable from '../../src'; const style = { display: 'flex', alignItems: 'center', justifyContent: 'center', border: 'solid 1px #ddd', background: '#f0f0f0', }; export default () => ( <Resizable style={style} defaultSize={{ width: '30%'...
src/components/MainSidebar/__tests__/searchform-test.js
falmar/react-adm-lte
jest.unmock('./../SearchForm') import React from 'react' import {shallow} from 'enzyme' import SearchForm from './../SearchForm' describe('MainSidebar.SearchForm', () => { it('should have classnames', () => { const wrapper = shallow(<SearchForm />) expect( wrapper.hasClass('sidebar-form') ).toBe...
src/svg-icons/action/build.js
rhaedes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionBuild = (props) => ( <SvgIcon {...props}> <path d="M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-...
packages/forms/src/UIForm/fields/FieldTemplate/FieldTemplate.component.js
Talend/ui
import PropTypes from 'prop-types'; import React from 'react'; import classNames from 'classnames'; import { useTranslation } from 'react-i18next'; import { Button } from 'react-bootstrap'; import OverlayTrigger from '@talend/react-components/lib/OverlayTrigger'; import Icon from '@talend/react-components/lib/Icon'; im...
analysis/demonhuntervengeance/src/modules/talents/SpiritBombSoulsConsume.js
yajinni/WoWAnalyzer
import React from 'react'; import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer'; import BoringSpellValueText from 'parser/ui/BoringSpellValueText'; import Statistic from 'parser/ui/Statistic'; import STATISTIC_ORDER from 'parser/ui/STATISTIC_ORDER'; import SPELLS from 'common/SPELLS'; import { SpellLink } ...
src/scenes/Home/Home.js
strues/react-universal-boiler
// @flow import React, { Component } from 'react'; import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import type { Connector } from 'react-redux'; import { fetchPosts, fetchPostsIfNeeded } from '../../state/modules/posts'; import Post from '../../components/Post'; import type { PostsReducer, Dis...
app/components/H3/index.js
Cherchercher/Wedding-Llama
import React from 'react'; function H3(props) { return ( <h3 {...props} /> ); } export default H3;
packages/mineral-ui-icons/src/IconAlarmAdd.js
mineral-ui/mineral-ui
/* @flow */ import React from 'react'; import Icon from 'mineral-ui/Icon'; import type { IconProps } from 'mineral-ui/Icon/types'; /* eslint-disable prettier/prettier */ export default function IconAlarmAdd(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {...iconProps...
src/src/Components/RulesEditor/components/CustomTime/index.js
ioBroker/ioBroker.javascript
import { TextField } from '@material-ui/core'; import React from 'react'; import cls from './style.module.scss'; import PropTypes from 'prop-types'; import clsx from 'clsx'; const CustomTime = ({ value, style, onChange, className }) => { return <TextField id="time" type="time" onChange={(e)...
src/AffixMixin.js
coderstudy/react-bootstrap
import React from 'react'; import domUtils from './utils/domUtils'; import EventListener from './utils/EventListener'; const AffixMixin = { propTypes: { offset: React.PropTypes.number, offsetTop: React.PropTypes.number, offsetBottom: React.PropTypes.number }, getInitialState() { return { a...
fields/types/name/NameColumn.js
suryagh/keystone
import React from 'react'; import ItemsTableCell from '../../../admin/client/components/ItemsTable/ItemsTableCell'; import ItemsTableValue from '../../../admin/client/components/ItemsTable/ItemsTableValue'; import displayName from 'display-name'; var NameColumn = React.createClass({ displayName: 'NameColumn', propTy...
test/fixtures/fragment.js
zeit/styled-jsx
import React from 'react' export default () => ( <> <p>Testing!!!</p> <p className="foo">Bar</p> <> <h3 id="head">Title...</h3> <React.Fragment> <p>hello</p> <> <p>foo</p> <p>bar</p> </> <p>world</p> </React.Fragment> </> <styl...
app/javascript/mastodon/features/notifications/components/filter_bar.js
danhunsaker/mastodon
import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Icon from 'mastodon/components/icon'; const tooltips = defineMessages({ mentions: { id: 'notifications.filter.mentions', defaultMessage: 'Mentions' }, favourites: { id: '...
src/svg-icons/device/signal-cellular-3-bar.js
hai-cea/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let DeviceSignalCellular3Bar = (props) => ( <SvgIcon {...props}> <path fillOpacity=".3" d="M2 22h20V2z"/><path d="M17 7L2 22h15z"/> </SvgIcon> ); DeviceSignalCellular3Bar = pure(DeviceSignalCellular3Bar); DeviceS...
src/pages/Registry.js
btthomas/blakeandanna
import React from 'react' import popup from '../popup.js'; const links = [ { url: 'https://www.crateandbarrel.com/gift-registry/anna-hunter-and-blake-thomas/r5729048', imgSrc: 'https://images.crateandbarrel.com/is/image/Crate/WebsiteHeaderLogo/fmt=png-alpha/170805043136/WebsiteHeaderLogo.jpg' }, { ur...
client/react/panel/inputs/InputEditableDateTimeField.js
uclaradio/uclaradio
// InputEditableDateTimeField.js import React from 'react'; import { ButtonGroup, DropdownButton, MenuItem, Input, Glyphicon, } from 'react-bootstrap'; import Dates from '../../common/Dates'; /** * Show current saved value for day/time and let user update data and submit changes * * @prop title: form titl...
server/sonar-web/src/main/js/apps/account/components/Password.js
joansmith/sonarqube
/* * SonarQube * Copyright (C) 2009-2016 SonarSource SA * mailto:contact AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License...
docs/app/Examples/views/Item/Content/ItemExampleLink.js
aabustamante/Semantic-UI-React
import React from 'react' import { Image as ImageComponent, Item } from 'semantic-ui-react' const paragraph = <ImageComponent src='/assets/images/wireframe/short-paragraph.png' /> const ItemExampleLink = () => ( <Item.Group> <Item> <Item.Image size='tiny' src='/assets/images/wireframe/image.png' /> ...