path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
frontend/src/modules/otherlocales/components/OtherLocales.js
jotes/pontoon
/* @flow */ import React from 'react'; import { Localized } from '@fluent/react'; import './OtherLocales.css'; import Translation from './Translation'; import type { Entity, OtherLocaleTranslation } from 'core/api'; import type { NavigationParams } from 'core/navigation'; import type { UserState } from 'core/user';...
test/test.spec.js
krasimir/react-webpack-starter
import Component from '../src/Component.jsx'; import TestUtils from 'react-addons-test-utils'; import React from 'react'; var component; var spy = sinon.spy(); describe('Given an instance of the Component', () => { describe('when we render the component', () => { before(() => { component = TestUtils.rende...
test/SafeAnchorSpec.js
bbc/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import SafeAnchor from '../src/SafeAnchor'; describe('SafeAnchor', () => { it('renders an anchor tag', () => { const instance = ReactTestUtils.renderIntoDocument(<SafeAnchor />); const node = React.findDOMNode(instance); n...
src/app.js
DenisIzmaylov/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 './c...
src/client/createRoutes.js
AlesJiranek/este
import App from './app/App.react'; import Auth from './auth/Page.react'; import Home from './home/Page.react'; import Me from './me/Page.react'; import NotFound from './components/NotFound.react'; import React from 'react'; import Todos from './todos/Page.react'; import {IndexRoute, Route} from 'react-router'; export ...
src/svg-icons/action/settings-input-svideo.js
tan-jerene/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionSettingsInputSvideo = (props) => ( <SvgIcon {...props}> <path d="M8 11.5c0-.83-.67-1.5-1.5-1.5S5 10.67 5 11.5 5.67 13 6.5 13 8 12.33 8 11.5zm7-5c0-.83-.67-1.5-1.5-1.5h-3C9.67 5 9 5.67 9 6.5S9.67 8 10.5 8h...
src/index.js
janrybka/lawendowe
import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route, IndexRedirect, hashHistory } from 'react-router' import App from './App'; import Gallery from './pages/Gallery'; import About from './pages/About'; import Contact from './pages/Contact'; import './index.css'; import 'dialog-polyfill/di...
ui/src/components/Input/Input.js
LearningLocker/learninglocker
import React from 'react'; import PropTypes from 'prop-types'; import { compose, setPropTypes, defaultProps } from 'recompose'; const enterKey = 13; const enhance = compose( setPropTypes({ id: PropTypes.string, value: PropTypes.string.isRequired, onChange: PropTypes.func.isRequired, onSubmit: PropTy...
actor-apps/app-web/src/app/components/sidebar/RecentSection.react.js
liuzwei/actor-platform
import _ from 'lodash'; import React from 'react'; import { Styles, RaisedButton } from 'material-ui'; import ActorTheme from 'constants/ActorTheme'; import DialogActionCreators from 'actions/DialogActionCreators'; import DialogStore from 'stores/DialogStore'; import CreateGroupActionCreators from 'actions/CreateGro...
frontend/src/components/MessageSender.js
nepeat/chatforesnics
import React from 'react'; import { withRouter } from 'react-router'; import { connect } from 'react-redux'; import { getUser } from '../reducers/chatusers'; const MessageSender = ({ lastSender, chatuser }) => { return <p className='sender' key={'sender_' + lastSender}>{chatuser.name}</p>; }; const mapStateToProp...
examples/js/manipulation/multi-search-table.js
AllenFang/react-bootstrap-table
/* eslint max-len: 0 */ import React from 'react'; import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table'; const products = []; function addProducts(quantity) { const startId = products.length; const fruits = [ 'banana', 'apple', 'orange', 'tomato', 'strawberries', 'cherries' ]; for (let i =...
examples/dynamic-segments/app.js
tmbtech/react-router
import React from 'react'; import { history } from 'react-router/lib/HashHistory'; import { Router, Route, Link, Redirect } from 'react-router'; var App = React.createClass({ render() { return ( <div> <ul> <li><Link to="/user/123">Bob</Link></li> <li><Link to="/user/abc">Sally</...
src/svg-icons/notification/airline-seat-recline-extra.js
xmityaz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let NotificationAirlineSeatReclineExtra = (props) => ( <SvgIcon {...props}> <path d="M5.35 5.64c-.9-.64-1.12-1.88-.49-2.79.63-.9 1.88-1.12 2.79-.49.9.64 1.12 1.88.49 2.79-.64.9-1.88 1.12-2.79.49zM16 19H8.93c-1.48 0...
src/js/components/_registerFields/AccessButtons.js
nekuno/client
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { SOCIAL_NETWORKS_NAMES, FACEBOOK_SCOPE } from '../../constants/Constants'; import Button from '../ui/Button'; import translate from '../../i18n/Translate'; @translate('AccessButtons') export default class AccessButtons extends Compon...
actor-apps/app-web/src/app/components/Main.react.js
ruikong/actor-platform
import React from 'react'; import requireAuth from 'utils/require-auth'; import VisibilityActionCreators from '../actions/VisibilityActionCreators'; import FaviconActionCreators from 'actions/FaviconActionCreators'; import FaviconStore from 'stores/FaviconStore'; import ActivitySection from 'components/ActivitySecti...
src/BottomNavigation/BottomNavigation.spec.js
owencm/material-ui
/* eslint-env mocha */ import React from 'react'; import {shallow} from 'enzyme'; import {assert} from 'chai'; import BottomNavigation from './BottomNavigation'; import BottomNavigationItem from './BottomNavigationItem'; import getMuiTheme from '../styles/getMuiTheme'; describe('<BottomNavigation />', () => { const ...
examples/with-apollo-auth/pages/create-account.js
BlancheXu/test
import React from 'react' import Link from 'next/link' import { withApollo } from '../lib/apollo' import redirect from '../lib/redirect' import checkLoggedIn from '../lib/checkLoggedIn' import RegisterBox from '../components/RegisterBox' const CreateAccountPage = () => ( <> {/* RegisterBox handles all register l...
test/components/SimilarProductsDialog.spec.js
Byte-Code/lm-digitalstore
import React from 'react'; import { shallow } from 'enzyme'; import { fromJS } from 'immutable'; import SimilarProductsDialog, { Slide } from '../../app/components/SimilarProductsDialog'; const similarProducts = fromJS([ { code: 'product0' }, { code: 'product1' }, { code: 'product2' } ]); const handleClose = je...
test/reactCssModules.js
zapier/react-css-modules
/* eslint-disable max-nested-callbacks */ import { expect } from 'chai'; import React from 'react'; import TestUtils from 'react-addons-test-utils'; import reactCssModules from './../src/index'; describe('reactCssModules', () => { context('a ReactComponent is decorated using react-css-modules', () => { ...
ajax/libs/react-instantsearch/4.0.0-beta.5/Dom.js
extend1994/cdnjs
/*! ReactInstantSearch 4.0.0-beta.5 | © Algolia, inc. | https://community.algolia.com/react-instantsearch/ */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("react-dom")); else if(typeof def...
docs/app/Examples/collections/Menu/Variations/MenuExampleFixed.js
mohammed88/Semantic-UI-React
import React from 'react' import { Message } from 'semantic-ui-react' const MenuExampleFixed = () => { return ( <Message info> You can view examples of the <b>fixed</b> variation in the <a href='http://semantic-ui.com/collections/menu.html#fixed' target='_blank'> official documentation</a>. </Mes...
app/components/Score/index.js
theterra/newsb
import React from 'react'; export default class Score extends React.Component { //eslint-disable-line render() { const { score, subTitle } = this.props; return ( <div className="ink-flex vertical push-middle" style={{ padding: '0.4em' }}> <div className="main fw-700 extralarge">{score}</div> ...
app/src/routes/DeveloperTopStarredRepos.js
alpcanaydin/github-stats-for-turkey
import React from 'react'; import PropTypes from 'prop-types'; const DeveloperTopStarredRepos = ({ data }) => ( <div> <h1 className="title">En Çok Star Alan Repolar</h1> <h2 className="subtitle"> Bu geliştiricinin en çok start alan repoları </h2> <hr /> {data.length > 0 && <table cla...
docs/app/Examples/modules/Dropdown/States/DropdownExampleLoading.js
koenvg/Semantic-UI-React
import React from 'react' import { Dropdown } from 'semantic-ui-react' const options = [ { key: 1, text: 'Choice 1', value: 1 }, { key: 2, text: 'Choice 2', value: 2 }, ] const DropdownExampleLoading = () => ( <Dropdown text='Dropdown' options={options} loading /> ) export default DropdownExampleLoading
app/components/Header/index.js
acebusters/ab-web
import React from 'react'; import PropTypes from 'prop-types'; import Navbar from './Navbar'; import NavItem from './NavItem'; import { StyledHeader, StyledUser, StyledUserName, StyledUserImage, LogoWrapper, Balances, } from './styles'; import { Logo } from '../Logo'; import Link from '../Link'; import ...
src/svg-icons/editor/format-strikethrough.js
hwo411/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorFormatStrikethrough = (props) => ( <SvgIcon {...props}> <path d="M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"/> </SvgIcon> ); EditorFormatStrikethrough = pure(EditorFormatStrikethrough); Edit...
src/containers/NotFound/NotFound.js
TonyJen/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> ); }
examples/shopping-cart/src/components/Product.spec.js
jhwgnu/redux
import React from 'react' import { shallow } from 'enzyme' import Product from './Product' const setup = props => { const component = shallow( <Product {...props} /> ) return { component: component } } describe('Product component', () => { it('should render title and price', () => { const { com...
src/components/lists/RecentBlockList.js
openvcash/vcash-electron
import React from 'react' import List from 'react-list' import { translate } from 'react-i18next' import { inject, observer } from 'mobx-react' /** Component */ import RecentBlockListItem from './RecentBlockListItem.js' @translate(['common']) @inject('gui', 'statistics') @observer class RecentBlockList extends React....
src/js/admin/photos/photo-group/photo-group-delete-div/photo-group-delete-div/photo-group-delete-div.js
ucev/blog
import React from 'react' import { connect } from 'react-redux' import PhotoGroupDeleteDialog from '../photo-group-delete-dialog' import OperationCancelButton from '$components/buttons/operation-cancel-button' import { pfobDeleteDialogVisible } from '$actions/photos' import './photo-group-delete-div.style.scss' con...
client/src/resources/honesty-policy.js
otavioarc/freeCodeCamp
import React from 'react'; const policy = [ <p> Before we issue our verified certification to a camper, he or she must accept our Academic Honesty Pledge, which reads: </p>, <p> "I understand that plagiarism means copying someone else’s work and presenting the work as if it were my own, without c...
public/scripts/main.js
Ohems/watodo
import React from 'react'; // eslint-disable-line no-unused-vars import { render } from 'react-dom'; import { BrowserRouter } from 'react-router-dom'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import { composeWithDevTools } from 'redux-devtools-extension/developmentOn...
TGMeituan/Components/Common/CommonCell.js
targetcloud/Meituan
/** * Created by targetcloud on 2016/12/21. */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View, Image, TouchableOpacity } from 'react-native'; var CommonCell = React.createClass({ getDefaultProps(){ return{ leftIcon: '', ...
docs/public/static/examples/v43.0.0/tutorial/image-picker-show.js
exponentjs/exponent
import React from 'react'; import { Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native'; import * as ImagePicker from 'expo-image-picker'; export default function App() { let [selectedImage, setSelectedImage] = React.useState(null); let openImagePickerAsync = async () => { let permissionResu...
app/components/FileList.js
fatiherikli/fil
import _ from 'underscore'; import React from 'react'; import ReactDOM from 'react-dom'; import {connect} from 'react-redux'; import classNames from 'classnames'; import {createFile, deleteFile, renameFile, openFile} from 'actions/files'; import {buildPermalink} from 'helpers'; class FileRenameForm extends R...
src/views/components/HlsPlayer.js
physiii/open-automation
import React from 'react'; import PropTypes from 'prop-types'; import Hls from '../../lib/hls/hls.js'; import fscreen from 'fscreen'; import './VideoPlayer.css'; export class HlsPlayer extends React.Component { constructor (props) { super(props); // Copying props to state here because we specifically only care a...
src/components/TextInputCSSModules/TextInputCSSModules.js
chadacious/ps-react-chadacious
import React from 'react'; import PropTypes from 'prop-types'; import Label from '../Label'; import styles from './textInput.css'; /** Text input with integrated label to enforce consistency in layout, error display, label placement, and required field marker. */ function TextInputCSSModules({htmlId, name, label...
app/javascript/mastodon/features/ui/components/column.js
TootCat/mastodon
import React from 'react'; import ColumnHeader from './column_header'; import PropTypes from 'prop-types'; import { debounce } from 'lodash'; const easingOutQuint = (x, t, b, c, d) => c*((t=t/d-1)*t*t*t*t + 1) + b; const scrollTop = (node) => { const startTime = Date.now(); const offset = node.scrollTop; con...
pages/loader-components.js
pagesource/fusion
import React from 'react'; import { ThemeProvider } from 'theming'; import { Loader, ProgressBar, ProgressCircle, Ripples, theme } from '../'; import Layout from './components/Layout'; const ContentComponent = () => ( <Layout> <ThemeProvider theme={theme}> <div> <h2>Progress & Activity</h2> ...
ui/src/views/gateways/UpdateGateway.js
jcampanell-cablelabs/lora-app-server
import React, { Component } from 'react'; import GatewayStore from "../../stores/GatewayStore"; import GatewayForm from "../../components/GatewayForm"; class UpdateGateway extends Component { static contextTypes = { router: React.PropTypes.object.isRequired }; constructor() { super(); this.state =...
packages/wix-style-react/src/TrendIndicator/TrendIndicator.js
wix/wix-style-react
import React from 'react'; import PropTypes from 'prop-types'; import SortByArrowUp from 'wix-ui-icons-common/system/SortByArrowUp'; import SortByArrowDown from 'wix-ui-icons-common/system/SortByArrowDown'; import { st, classes } from './TrendIndicator.st.css'; import { dataHooks } from './constants'; /** TrendIndicat...
src/routes/privacy/index.js
bobbybeckner/ha-catalyst-test
/** * React Starter Kit (https://www.reactstarterkit.com/) * * Copyright © 2014-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ import React from 'react'; import Layout from '../../co...
src/components/common/SourceTable.js
mitmedialab/MediaCloud-Web-Tools
import PropTypes from 'prop-types'; import React from 'react'; import Link from 'react-router/lib/Link'; import { FormattedMessage, injectIntl, FormattedNumber, FormattedDate } from 'react-intl'; import FilledStarIcon from './icons/FilledStarIcon'; import messages from '../../resources/messages'; import { googleFavIcon...
src/components/Feedback/Feedback.js
pawsong/react-starter-kit
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */ import React from 'react'; import styles from './Feedback.css'; import withStyles from '../../decorators/withStyles'; @withStyles(styles) class Feedback { render() { return ( <div className="Feedback"> <div className="Feedba...
src/components/topic/MediaTable.js
mitmedialab/MediaCloud-Web-Tools
import PropTypes from 'prop-types'; import React from 'react'; import { FormattedMessage, FormattedNumber, injectIntl } from 'react-intl'; import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown'; import messages from '../../resources/messages'; import LinkWithFilters from './LinkWithFilters'; import { googleFa...
src/components/component-loader.js
azz0r/wwe-draft-generator
import React from 'react' import PropTypes from 'prop-types' const ComponentLoader = ({ isLoading = true, error = null, pastDelay = null, }) => { if (isLoading) { return pastDelay ? <div>Loading...</div> : null } else if (error) { return <div>Error! Component failed to load</div> } return null } Comp...
test/LabelSpec.js
lo1tuma/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import Label from '../src/Label'; describe('Label', function () { it('Should output a label with message', function () { let instance = ReactTestUtils.renderIntoDocument( <Label> <strong>Message</strong> </Labe...
src/components/navigation/AppDrawer.js
ayltai/fishing-club
// @flow 'use strict'; import React from 'react'; import PropTypes from 'prop-types'; import { observer } from 'mobx-react'; import muiThemeable from 'material-ui/styles/muiThemeable'; import Divider from 'material-ui/Divider'; import Drawer from 'material-ui/Drawer'; import FontIcon from 'material-ui/FontIcon'; impor...
example/src/screens/transitions/sharedElementTransitions/Profiles/Profiles.js
luggit/react-native-navigation
import React, { Component } from 'react'; import { ScrollView, TouchableOpacity, StyleSheet, Image, Text, View, ScrolView } from 'react-native'; import { SharedElementTransition } from 'react-native-navigation'; import * as Animatable from 'react-native-animatable'; const FADE_DURATION = 50...
dv-website/src/OldChengDu.js
hchen13/bigdatarecruit
import React, { Component } from 'react'; import './ColorIt.css'; import { Icon, Row, Col, Card, Popover, Button} from 'antd'; import c1 from './media/oldCD/1.jpg'; import c2 from './media/oldCD/2.jpg'; import c3 from './media/oldCD/3.jpg'; import c4 from './media/oldCD/4.jpg'; import c5 from './media/oldCD/5.jpg'; im...
docs/src/app/AppRoutes.js
lawrence-yu/material-ui
import React from 'react'; import { Route, Redirect, IndexRoute, } from 'react-router'; // Here we define all our material-ui ReactComponents. import Master from './components/Master'; import Home from './components/pages/Home'; import RequiredKnowledge from './components/pages/get-started/RequiredKnowledge'; i...
src/svg-icons/action/supervisor-account.js
IsenrichO/mui-with-arrows
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionSupervisorAccount = (props) => ( <SvgIcon {...props}> <path d="M16.5 12c1.38 0 2.49-1.12 2.49-2.5S17.88 7 16.5 7C15.12 7 14 8.12 14 9.5s1.12 2.5 2.5 2.5zM9 11c1.66 0 2.99-1.34 2.99-3S10.66 5 9 5C7.34 5 6 ...
app/javascript/mastodon/features/ui/components/__tests__/column-test.js
cybrespace/mastodon
import React from 'react'; import { mount } from 'enzyme'; import Column from '../column'; import ColumnHeader from '../column_header'; describe('<Column />', () => { describe('<ColumnHeader /> click handler', () => { const originalRaf = global.requestAnimationFrame; beforeEach(() => { global.requestA...
src/profesor.js
zeljkoX/e-learning
require("babel/polyfill"); import React from 'react'; import ReactDOM from 'react-dom'; import { Router, Route , IndexRoute, Redirect} from 'react-router'; import createHistory from 'history/lib/createHashHistory'; var injectTapEventPlugin = require("react-tap-event-plugin"); injectTapEventPlugin(); import FullScreen...
client/components/Pagination.js
raymestalez/vertex
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { fetchSettings } from '../actions/index'; import { Link } from 'react-router'; class Pagination extends Component { render() { var currentPage = parseInt(this.props.location.query.page ? this.props.location.query.page ...
js/components/log.js
codeocelot/yewno-client
import React from 'react' // import Logs from './logs' import config from '../config/config' import request from 'superagent' import LogTable from './logTable' export default class Log extends React.Component{ constructor(props){ super(props); this.props = props; this.state = {logset:[]} } getLogs = ...
src/bestResult.js
instantsearch/instantsearch-React-widget
import React from 'react'; import ReactDOM from 'react-dom'; import BestResult from './components/BestResult'; import NoResults from './components/NoResults'; // instantsearch.js custom widget with React function bestResult({container}) { // See more details in our documentation: // https://community.algolia.com/...
client/pages/control.js
quarterto/almanac
import React from 'react' import { compose, withHandlers, withProps } from 'recompact' import BlockLayout from '../collection/block-layout' import Icon from '../visual/icon' import { withCampaignData } from '../data/campaign' import { assertAmOwner } from '../data/owner' import { MenuLink } from '../visual/menu' import...
src/mobile/components/UsersDrawer/WaitlistPosition.js
welovekpop/uwave-web-welovekpop.club
import React from 'react'; import PropTypes from 'prop-types'; const WaitlistPosition = ({ position }) => ( <span className="UsersDrawer-position"> {position} </span> ); WaitlistPosition.propTypes = { position: PropTypes.number.isRequired, }; export default WaitlistPosition;
client/modules/App/components/DevTools.js
Gin-And-Tomic/tune-stream
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 /> ...
test/ButtonSpec.js
mmarcant/react-bootstrap
import React from 'react'; import ReactTestUtils from 'react/lib/ReactTestUtils'; import ReactDOM from 'react-dom'; import Button from '../src/Button'; describe('<Button>', () => { it('Should output a button', () => { let instance = ReactTestUtils.renderIntoDocument( <Button> Title </Button>...
src/components/AddItemObject.js
allsportster023/imageViewer
/** * Created by bslaugh on 7/9/17. */ import React from 'react'; import '../styles/main.css'; import plusSign from '../images/green-plus-sign.png'; class AddItemObject extends React.Component { render() { return ( <div id="addItemDiv" className="noselect" onClick={this.props.addAction} > <spa...
src/svg-icons/places/ac-unit.js
xmityaz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let PlacesAcUnit = (props) => ( <SvgIcon {...props}> <path d="M22 11h-4.17l3.24-3.24-1.41-1.42L15 11h-2V9l4.66-4.66-1.42-1.41L13 6.17V2h-2v4.17L7.76 2.93 6.34 4.34 11 9v2H9L4.34 6.34 2.93 7.76 6.17 11H2v2h4.17l-3.2...
components/PersonalInfomation.js
goominc/goommerce-seller-native
'use strict'; import React from 'react'; import { ScrollView, Text } from 'react-native'; export default React.createClass({ render() { return ( <ScrollView> <Text> {` 주식회사 에이프릴(이하 "회사")은 회사가 제공하는 인터넷사이트(www.linkshops.com)(이하 "몰")를 이용하는 회원의 개인정보를 보호하기 위하여 정보통신망 이용촉진 및 정보보호 등에 관한 법률, 개인정보 보...
src/HomePage/create-container-mock.js
helloncanella/finn
import React from 'react' export default function createContainerMock(propsFunction, Component) { return (additionalProps) => { let props = Object.assign({}, additionalProps, propsFunction()) , { reference } = additionalProps return <Component {...props} ref={reference}></Component> } }
app/utils/CommonUtils.js
yanbober/RNPolymerPo
/* * MIT License * * Copyright (c) 2016 yanbo * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, m...
src/client/components/list/menu/ListContextMenu.js
DBCDK/content-first
import React from 'react'; import {connect} from 'react-redux'; import T from '../../base/T'; import {withList} from '../../hoc/List'; import {OPEN_MODAL} from '../../../redux/modal.reducer'; import ContextMenu, {ContextMenuAction} from '../../base/ContextMenu'; import {HISTORY_REPLACE} from '../../../redux/middlewa...
src/parser/druid/feral/modules/bleeds/RakeUptime.js
FaideWW/WoWAnalyzer
import React from 'react'; import Analyzer from 'parser/core/Analyzer'; import Enemies from 'parser/shared/modules/Enemies'; import SPELLS from 'common/SPELLS'; import SpellIcon from 'common/SpellIcon'; import SpellLink from 'common/SpellLink'; import { formatPercentage } from 'common/format'; import StatisticBox, { ST...
node_modules/react-bootstrap/es/MediaLeft.js
yeshdev1/Everydays-project
import _extends from 'babel-runtime/helpers/extends'; import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; import _classCallCheck from 'babel-runtime/helpers/classCallCheck'; import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn'; import _inherits from ...
breezy/spec/lib/utils/ujs.spec.js
jho406/Breezy
import { HandlerBuilder } from '../../../lib/utils/ujs' import configureMockStore from 'redux-mock-store' import thunk from 'redux-thunk' import fetchMock from 'fetch-mock' import React from 'react' import { JSDOM } from 'jsdom' import { render } from 'react-dom' import * as helpers from '../../../lib/utils/helpers' d...
fields/types/text/TextFilter.js
lojack/keystone
import React from 'react'; import { FormField, FormInput, FormSelect, SegmentedControl } from 'elemental'; const TOGGLE_OPTIONS = [ { label: 'Matches', value: false }, { label: 'Does NOT Match', value: true } ]; const MODE_OPTIONS = [ { label: 'Contains', value: 'contains' }, { label: 'Exactly', value: 'exactly'...
src/svg-icons/social/poll.js
pomerantsev/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let SocialPoll = (props) => ( <SvgIcon {...props}> <path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/> </SvgIcon> ); SocialPoll = ...
imports/ui/components/AuthenticatedNavigation.js
hirdbluebird/recipe-app-react
import React from 'react'; import { browserHistory } from 'react-router'; import { LinkContainer } from 'react-router-bootstrap'; import { Nav, NavItem, NavDropdown, MenuItem } from 'react-bootstrap'; import { Meteor } from 'meteor/meteor'; const handleLogout = () => Meteor.logout(() => browserHistory.push('/login'));...
lib/lib/react-dimensions.js
CBIConsulting/ProperTable
'use strict'; 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 _classCallCheck(instance, Constructor...
packages/material-ui/src/Progress/CircularProgress.js
cherniavskii/material-ui
import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import withStyles from '../styles/withStyles'; import { capitalize } from '../utils/helpers'; const SIZE = 50; function getRelativeValue(value, min, max) { const clampedValue = Math.min(Math.max(min, value), max); ...
src/parser/monk/mistweaver/modules/spells/SpinningCraneKick.js
ronaldpereira/WoWAnalyzer
import React from 'react'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import Analyzer from 'parser/core/Analyzer'; import { formatMilliseconds } from 'common/format'; const debug = false; class SpinningCraneKick extends Analyzer{ goodSCKcount = 0; goodSCKTimeList = []...
website/src/components/CodeMirrorPanel.js
reactjs/react-docgen
import React from 'react'; import CodeMirror from 'codemirror'; import 'codemirror/mode/javascript/javascript'; import 'codemirror/mode/jsx/jsx'; import 'codemirror/addon/fold/foldgutter'; import 'codemirror/addon/fold/brace-fold'; import 'codemirror/addon/fold/comment-fold'; import 'codemirror/addon/fold/xml-fold'; i...
tests/lib/rules/vars-on-top.js
jrencz/eslint
/** * @fileoverview Tests for vars-on-top rule. * @author Danny Fritz * @author Gyandeep Singh */ "use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ const rule = require(".....
src/modules/widget/Upload.js
lenxeon/react
'use strict' import classnames from 'classnames' import React from 'react' import Events from './utils/events' import { nextUid, format } from './utils/strings' import getGrid from './higherorder/grid' import Message from './Message' import upload from './utils/upload' import { requireCss } from './themes' requireCss...
src/component/__test__/Chart-test.js
bigdatr/pnut
import React from 'react'; import Chart from '../Chart'; import ChartData from '../../chartdata/ChartData'; const columns = [ { key: 'supply' }, { key: 'month' }, { key: 'demand' } ]; const rows = [ { month: "2014-01-01", supply: 123605, dema...
test/test_helper.js
manuelescamilla/youtube-browser
import _$ from 'jquery'; import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import jsdom from 'jsdom'; import chai, { expect } from 'chai'; import chaiJquery from 'chai-jquery'; import { Provider } from 'react-redux'; import { createStore } from 'redux'; import...
src/Components/modules/Portfolio.js
nockgish/gish
// modules/Portfolio.js import React from 'react' import render from 'react-dom'; class Portfolio extends React.Component { constructor(props){ super(props); this.state = { shouldChangeBackground: true }; } componentDidMount(){ if(this.state.shouldChangeBackground){ setTimeout(f...
test/specs/tabs/tab.spec.js
rafaelfbs/realizejs
import React from 'react'; import { Tab } from 'components'; import { assert } from 'chai'; import { shallow } from 'enzyme'; describe('<Tab/>', () => { it('exists', () => { assert(Tab); }); it('accepts an id', () => { const myId = 'my-id'; const wrapper = shallow(<Tab id={myId} />); assert.equ...
docs/src/app/components/pages/components/Stepper/VerticalLinearStepper.js
mmrtnz/material-ui
import React from 'react'; import { Step, Stepper, StepLabel, StepContent, } from 'material-ui/Stepper'; import RaisedButton from 'material-ui/RaisedButton'; import FlatButton from 'material-ui/FlatButton'; /** * Vertical steppers are designed for narrow screen sizes. They are ideal for mobile. * * To use t...
client/src/components/ViewCampaign/SignCampaign/SignatureList.js
codefordenver/Circular
import React from 'react'; import PropTypes from 'prop-types'; const SignatureList = ({ activeCampaignSignatures }) => ( <div> {activeCampaignSignatures.length > 0 ? ( <h2> ({activeCampaignSignatures.length}) Signature{activeCampaignSignatures.length > 1 ? 's ' : ' '} on...
lib/shape/Circle.js
wangdicoder/react-native-indicator
import React from 'react'; import PropTypes from 'prop-types'; import { Shape, Path } from '@react-native-community/art'; export default class Circle extends React.PureComponent { static propTypes = { radius: PropTypes.number.isRequired, opacity: PropTypes.number, }; render() { const { radius } = th...
src/rating/Rating.js
martinezguillaume/react-native-elements
/*global require:true*/ /*eslint no-undef: "error"*/ /*eslint-disable no-console */ import times from 'lodash.times'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { View, Animated, PanResponder, Image, StyleSheet, Platform, } from 'react-native'; import Text from '.....
node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js
eikzon/inimz-pegasus-bak
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'));
react/features/chat/components/native/ChatMessage.js
jitsi/jitsi-meet
// @flow import React from 'react'; import { Text, View } from 'react-native'; import { Avatar } from '../../../base/avatar'; import { ColorSchemeRegistry } from '../../../base/color-scheme'; import { translate } from '../../../base/i18n'; import { Linkify } from '../../../base/react'; import { connect } from '../../...
lib/Badge.js
nbonamy/react-native-app-components
import React, { Component } from 'react'; import { StyleSheet, View, Text } from 'react-native'; import PropTypes from 'prop-types'; import theme from './config/theme'; export default class Badge extends Component { static propTypes = { ...theme.propTypes, backgroundColor: PropTypes.string, textColor: ...
node_modules/react-native-swiper/src/index.js
leechuanjun/TLReactNativeProject
/** * react-native-swiper * @author leecade<leecade@163.com> */ import React from 'react' import ReactNative, { StyleSheet, Text, View, ScrollView, Dimensions, TouchableOpacity, ViewPagerAndroid, Platform } from 'react-native' // Using bare setTimeout, setInterval, setImmediate // and requestAnimati...
app/containers/Header/index.js
rapicastillo/beautifulrising-client
/** * * Header * */ import React from 'react'; // import Link from 'components/Link'; import Logo from 'components/Logo'; import TypeMenu from 'components/TypeMenu'; import styled, { ThemeProvider } from 'styled-components'; import ModalMenu from 'containers/ModalMenu'; import Link from 'components/Link'; import { For...
src/rumbleCharts/scatter.js
livingston/react-chart-spikes
import React, { Component } from 'react'; import { Chart, Layer, Dots, Ticks } from 'rumble-charts'; import FlexibleWrapper from '../ui/flexibleWrapper.js'; // Test data require('chance'); const scatterDatum = () => ({ x: chance.integer({min: 0, max: 1000}), y: chance.integer({min: 0, max: 1000}), competitor: c...
examples/complete/firestore/src/Todos.js
prescottprue/react-redux-firebase
import React from 'react' import { useSelector } from 'react-redux' import { useFirestoreConnect, isLoaded, isEmpty } from 'react-redux-firebase' import TodoItem from './TodoItem' const todosQuery = { collection: 'todos', limitTo: 10 } function Todos() { // Attach todos listener useFirestoreConnect(() => [tod...
src/layouts/BlogLayout/BlogLayout.js
cdtinney/cdtinney.github.io
import React from 'react'; import PropTypes from 'prop-types'; import PageLayout from '../PageLayout'; import classes from './BlogLayout.module.css'; function BlogLayout({ pageTitle, pageDescription, children }) { return ( <PageLayout pageTitle={pageTitle} pageDescription={pageDescription} ti...
vendor/tacit/test/es6-module-exports-spec.js
vanHeemstraSystems/components
import React from 'react'; import TestUtils from 'react-addons-test-utils'; const Divider = require('divider'); const ActionAccessibility = require('svg-icons').ActionAccessibility; import ImportThemeManager from 'styles/theme-manager'; const RequireThemeManager = require('styles/theme-manager'); import ImportColorM...
client/routes/about/About.js
kriasoft/FSharp-Server-Template
/** * ASP.NET Core Starter Kit * * 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 { Layout } from '../../components'; function About(...
client2/src/components/react-burger-menu/test/utils/createShallowComponent.js
frolicking-ampersand/Board
import React from 'react'; import TestUtils from 'react-addons-test-utils'; export default createComponent; function createComponent(jsx) { const shallowRenderer = TestUtils.createRenderer(); shallowRenderer.render(jsx); return shallowRenderer.getRenderOutput(); }
12_ReactJS Fundamentals/04_routing/src/components/common/Navigation.js
akkirilov/SoftUniProject
import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import observer from '../../infrastructure/observer'; import '../../styles/menu.css'; export default class Navigation extends Component { constructor(props) { super(props); this.state = { username:...
app/screens/components/home/MiniEntranceView.js
jaminzzhang/MZMovie
import React, { Component } from 'react'; import { View, Text, StyleSheet, Image, TouchableOpacity } from 'react-native'; import { DynamicZone, DynamicItem } from '../../../entity/DynamicZone' import PropTypes from 'prop-types'; export default class MiniEntranceView extends Component { static propTypes = { ent...