path
stringlengths
5
195
repo_name
stringlengths
5
79
content
stringlengths
25
1.01M
src/components/common/orders/OrderDetails.js
ESTEBANMURUZABAL/bananaStore
/** * Imports */ import React from 'react'; import moment from 'moment'; import {FormattedMessage, FormattedNumber} from 'react-intl'; import {Link} from 'react-router'; // Flux import IntlStore from '../../../stores/Application/IntlStore'; // Required components import AddressPreview from '../forms/AddressPreview'...
app/scripts/utils/node-shape-utils.js
hustbill/network-verification-ui
import React from 'react'; import range from 'lodash/range'; import { line, curveCardinalClosed } from 'd3-shape'; import { UNIT_CLOUD_PATH } from '../constants/styles'; export const pathElement = React.createFactory('path'); export const circleElement = React.createFactory('circle'); export const rectangleElement =...
src/components/TextInput/TextInput.js
patchygreen/ps-react-patchygreen
import React from 'react'; import PropTypes from 'prop-types'; import Label from '../Label'; /** Text input with integrated label to enforce consistency in layout, error display, label placement */ function TextInput({htmlId, name, label, type = 'text', required = false, onChange, placeholder, value, error, children, ...
examples/full-example/isomorphic/variations/partner_C/components/button.js
stephanwlee/mendel
/* Copyright 2015, Yahoo Inc. Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms. */ import React from 'react'; var count = 0; class Button extends React.Component { constructor(props) { super(props); this.state = { count: ++count } ...
examples/react-router/src/main.js
ronlobo/backbone-react-component
import React from 'react'; import Router from 'react-router'; import BackboneReactMixin from './../../../dist/backbone-react-component'; import PeopleStore from './store'; let {RouteHandler, Route, DefaultRoute, Link, State, Navigation} = Router; let App = React.createClass({ mixins: [BackboneReactMixin], render...
docs/static/js/36.ae4af365.chunk.js
yurizhang/ishow
webpackJsonp([36],{198:function(n,e,t){"use strict";function o(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function a(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==typeof e&&"function"!==typeof e?n:e}function ...
src/docs/pages/alert.js
gabrielcsapo/psychic-ui
import React from 'react'; import Example from '../components/example'; class Alert extends React.Component { render() { const { brand } = this.props; const height = window.innerHeight; return ( <section style={{ 'minHeight': height, position: "relative"}}> <div style={{padding: "50px"}}> ...
examples/static-data/app.js
brennanerbz/react-autocomplete
import React from 'react' import { getStates, matchStateToTerm, sortStates, styles } from '../utils' import Autocomplete from '../../lib/index' let App = React.createClass({ render () { return ( <div> <h1>Basic Example with Static Data</h1> <p> When using static data, you use the...
app/containers/App/index.js
Get-In-Touch/get-in-touch
/** * * App.react.js * * This component is the skeleton around the actual pages, and should only * contain code that should be seen on all pages. (e.g. navigation bar) * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If...
src/components/post/Post.js
mpeinado/react-starter
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { deletePostAction } from './../../actions/PostActions'; class Post extends Component {z handelClick = () => { this.props.deletePost(this.props.post.id); this.props.history.push('/posts'); } render() { ...
assets/jqwidgets/demos/react/app/bulletchart/labelsformatting/app.js
juannelisalde/holter
import React from 'react'; import ReactDOM from 'react-dom'; import JqxBulletChart from '../../../jqwidgets-react/react_jqxbulletchart.js'; class App extends React.Component { render() { let labelsFormatFunction = (value, position) => { let labelsColor; if (value < 10) { ...
js/App/Components/SensorDetails/SubViews/ChartLegend.js
telldus/telldus-live-mobile-v3
/** * Copyright 2016-present Telldus Technologies AB. * * This file is part of the Telldus Live! app. * * Telldus Live! app is free : 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 *...
app/components/Toggle/index.js
w01fgang/react-boilerplate
/** * * LocaleToggle * */ import React from 'react'; // import { FormattedMessage } from 'react-intl'; import styles from './styles.css'; import ToggleOption from '../ToggleOption'; function Toggle(props) { // eslint-disable-line react/prefer-stateless-function let content = (<option>--</option>); // If we hav...
docs/pages/docs.js
woshisbb43/coinMessageWechat
/* eslint-disable */ import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import SplitPane from 'react-split-pane'; import Preview from "../components/preview"; import NoPreview from './nopreview'; import generateMarkdown from './generateMarkdown'; import Articles from './articles'; const reactDo...
src/components/app.js
jorisknulst/React-Youtube-App
import _ from 'lodash'; import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import SearchBar from './search_bar'; import YTSearch from 'youtube-api-search'; import VideoList from './video_list'; import VideoDetail from './video_detail'; const API_KEY = 'AIzaSyCLGK8NcWX7bcczWxqu1QktYf7P8bb...
public/js/components/admin/graphs/adminPanel/admin.react.js
MadushikaPerera/Coupley
import React from 'react'; import ListItem from 'material-ui/lib/lists/list-item'; import Divider from 'material-ui/lib/divider'; import Avatar from 'material-ui/lib/avatar'; import Colors from 'material-ui/lib/styles/colors'; import IconButton from 'material-ui/lib/icon-button'; import MoreVertIcon from 'material-ui/l...
src/FadeMixin.js
snadn/react-bootstrap
import React from 'react'; import domUtils from './utils/domUtils'; import deprecationWarning from './utils/deprecationWarning'; // TODO: listen for onTransitionEnd to remove el function getElementsAndSelf (root, classes){ let els = root.querySelectorAll('.' + classes.join('.')); els = [].map.call(els, function(e...
docs/app/Examples/elements/List/Variations/ListExampleHorizontal.js
Rohanhacker/Semantic-UI-React
import React from 'react' import { Image, List } from 'semantic-ui-react' const ListExampleHorizontal = () => ( <List horizontal> <List.Item> <Image avatar src='http://semantic-ui.com/images/avatar/small/tom.jpg' /> <List.Content> <List.Header>Tom</List.Header> Top Contributor <...
ui/src/auth/Authenticated.js
brianbaker/chronograf
import React from 'react' import {replace} from 'react-router-redux' import {UserAuthWrapper} from 'redux-auth-wrapper' export const UserIsAuthenticated = UserAuthWrapper({ authSelector: ({auth}) => ({auth}), authenticatingSelector: ({auth: {isMeLoading}}) => isMeLoading, LoadingComponent: () => <div className="...
client/src/components/billing/checkout-fields.js
iNeedCode/mern-starter
import React, { Component } from 'react'; class CheckoutFields extends Component { render() { return ( <form onSubmit={this.props.onSubmit.bind(this.value)}> <div className="row"> <div className="col-md-9"> <label>Card Number</label> <input id="cardNu...
contact/todo/routes.js
linuxing3/electron-react
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './containers/App'; import addTodo from './containers/addTodo'; import VisibleTodoList from './containers/VisibleTodoList.js'; export default ( <Route path="/" component={App}> <IndexRoute component={VisibleTodoList} />...
components/ExpenseLanding.js
jepz20/coffee_tracker
import React from 'react'; import * as actions from '../actions'; import { connect } from 'react-redux'; import { hashHistory } from 'react-router'; import { primaryTextSize, primaryColor, bigTitle, forms, subformsFullWidth, subformHeader } from '../styles/general'; import Divider from 'material-ui/Divider'; import...
App.js
stefanocascavilla/transazioni
import React from 'react'; import { render } from 'react-dom'; import Transaz from './Transaz.js'; var BarChart = require('react-chartjs').Bar; var PieChart = require('react-chartjs').Pie; var data1 = { labels: ["Affari", "Benzina", "Acquisti", "Vacanze", "Ufficio", "Hobby", "Meccanica", "Motori", "Elettronica"]...
src/containers/Resume.js
pjkarlik/ReactUI
import React from 'react'; const Resume = () => { const content = ( <span> <h2>Curriculum Vitae</h2> <p> Sed quis mattis turpis. Ut vitae finibus sem. Donec scelerisque nec nisi non malesuada. Praesent mattis lacus quis diam imperdiet rhoncus. Ut porta efficitur magna, quis pretium magn...
src/svg-icons/editor/strikethrough-s.js
mtsandeep/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorStrikethroughS = (props) => ( <SvgIcon {...props}> <path d="M7.24 8.75c-.26-.48-.39-1.03-.39-1.67 0-.61.13-1.16.4-1.67.26-.5.63-.93 1.11-1.29.48-.35 1.05-.63 1.7-.83.66-.19 1.39-.29 2.18-.29.81 0 1.54.11 ...
client/frontpage/app.js
dengcqw/ParseWebPageList
import ReactDOM from 'react-dom' import React from 'react' import { connect } from 'react-redux' import { bindActionCreators } from 'redux' import { Layout, Menu, Breadcrumb, Icon, Button, Radio, Alert } from 'antd'; const { SubMenu } = Menu; const { Header, Content, Sider } = Layout; import { HotListTabs } from './...
wwwroot/app/src/components/MyRecipesPage/ViewRecipeContainer.js
AlinCiocan/PlanEatSave
import React, { Component } from 'react'; import { ApiRequest } from '../../services/ApiRequest'; import RecipeService from '../../services/RecipeService'; import Routes from '../../services/Routes'; import TopBar from '../TopBar/TopBar'; import ViewRecipe from './ViewRecipe'; import NavigationMenu from '../NavigationM...
src/components/FirstChild/FirstChild.js
MatthewKosloski/lugar
import React from 'react'; const FirstChild = (props) => { const childrenArray = React.Children.toArray(props.children); return childrenArray[0] || null; } export default FirstChild;
packages/mineral-ui-icons/src/IconSettingsInputSvideo.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 IconSettingsInputSvideo(props: IconProps) { const iconProps = { rtl: false, ...props }; return ( <Icon {....
src/documentation/NotAuthorized/NotAuthorized.stories.js
wfp/ui
import React from 'react'; import Link from '../../components/Link'; import Story from '../../components/Story'; import Icon from '../../components/Icon'; import Wrapper from '../../components/Wrapper'; import { iconWarningSolid } from '@wfp/icons'; import markdown from './README.mdx'; export default { title: 'Templ...
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentSimplifyTypeArgs/index.js
mroch/flow
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow */ const path = require('path'); const Styled = require('../../../Styled'); exports.kind = 'codemod'; expo...
frontend/src/components/reports/verifcation/verificationContainer.js
unicef/un-partner-portal
import R from 'ramda'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import Button from 'material-ui/Button'; import { TableCell } from 'material-ui/Table'; import { withRouter } from 'react-router'; import Typography from 'material-ui/Typography';...
src/JSONArrow.js
Dean177/react-native-json-tree
import React from 'react'; import PropTypes from 'prop-types'; import { Text, TouchableOpacity, View } from 'react-native'; const JSONArrow = ({ arrowStyle, expanded, nodeType, onPress, styling }) => ( <TouchableOpacity onPress={onPress}> <View {...styling('arrowContainer', arrowStyle)}> <Text {...styling(...
jenkins-design-language/src/js/components/material-ui/svg-icons/image/exposure-neg-1.js
alvarolobato/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const ImageExposureNeg1 = (props) => ( <SvgIcon {...props}> <path d="M4 11v2h8v-2H4zm15 7h-2V7.38L14 8.4V6.7L18.7 5h.3v13z"/> </SvgIcon> ); ImageExposureNeg1.displayName = 'ImageExposureNeg1'; ImageExposureNeg1.muiName = 'SvgIcon'; export default...
src/routes/error/index.js
malinowsky/dataroot_03
/** * 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 ErrorPage from './Err...
source/components/PerspectiveButton.react.js
BeethovensWerkstatt/VideApp
import React from 'react'; import PropTypes from 'prop-types'; import { ViewLayouts } from '../redux/layout.constants'; const PerspectiveButton = ({ active, type, hidden, onClick }) => { const classString = 'perspectiveButton' + (active ? ' active ' : ' ') + type + (hidden ? ' hidden':''); var content; ...
src/index.js
KoushikKumar/TakeAPoll_Client
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import {Router, Route, IndexRoute, browserHistory} from 'react-router'; import reduxThunk from 'redux-thunk'; import axios from 'axios'; import requireAuth from './...
src/example/Tabs.js
gaearon/component-router
import React from 'react'; import {Url} from '../index'; import styles from './Tabs.css'; const Tabs = React.createClass({ propTypes: { tabs: React.PropTypes.arrayOf(React.PropTypes.string).isRequired, namespace: React.PropTypes.string.isRequired }, render() { const {tabs, namespace} = this.props;...
client/src/components/alert/Alerts.js
15thnight/15thnight
import React from 'react'; import AlertList from './AlertList' import AlertTable from './AlertTable'; export default function Alerts(props) { return ( <div> <h1 className="text-center">{props.title}</h1> <p className="text-center">{props.description}</p> <div className...
frontend/src/Settings/Notifications/NotificationSettings.js
Radarr/Radarr
import React from 'react'; import PageContent from 'Components/Page/PageContent'; import PageContentBody from 'Components/Page/PageContentBody'; import SettingsToolbarConnector from 'Settings/SettingsToolbarConnector'; import translate from 'Utilities/String/translate'; import NotificationsConnector from './Notificatio...
demo/demolist/Demo5.js
tinper-bee/bee-tabs
/** * * @title 顶部border * @description `tabBarStyle`参数设置不同的tabBar样式,取值可以是'primary'、'simple'或'upborder'。 * */ import React, { Component } from 'react'; import Tabs from '../../src'; const {TabPane} = Tabs; class Demo5 extends Component { render() { return ( <div className="Demo5"> ...
front_end/src/pages/Campaigns/CampaignsPage.js
ncloudioj/splice
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { pageVisit } from 'actions/App/AppActions'; import { fetchCampaigns } from 'actions/Campaigns/CampaignActions'; import CampaignList from 'components/Campaigns/CampaignList/CampaignList'; class CampaignsPage extends Component { ...
src/svg-icons/action/account-balance.js
nathanmarks/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionAccountBalance = (props) => ( <SvgIcon {...props}> <path d="M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z"/> </SvgIcon> ); ActionAccountBalance = pure(ActionA...
blueocean-material-icons/src/js/components/svg-icons/content/report.js
jenkinsci/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const ContentReport = (props) => ( <SvgIcon {...props}> <path d="M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM12 17.3c-.72 0-1.3-.58-1.3-1.3 0-.72.58-1.3 1.3-1.3.72 0 1.3.58 1.3 1.3 0 .72-.58 1.3-1.3 1.3zm1-4.3h-2V7h2v6z"/> </SvgI...
src/svg-icons/maps/store-mall-directory.js
ruifortes/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let MapsStoreMallDirectory = (props) => ( <SvgIcon {...props}> <path d="M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"/> </SvgIcon> ); MapsStoreMallDirectory = pure(MapsStoreMallDirec...
node_modules/react-bootstrap/es/BreadcrumbItem.js
soniacq/LearningReact
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 ...
docs/src/app/components/pages/components/FlatButton/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 flatButtonReadmeText from './README'; import flatButtonExampleSimpleCode ...
src/entypo/Tv.js
cox-auto-kc/react-entypo
import React from 'react'; import EntypoIcon from '../EntypoIcon'; const iconClass = 'entypo-svgicon entypo--Tv'; let EntypoTv = (props) => ( <EntypoIcon propClass={iconClass} {...props}> <path d="M18,1H2C0.899,1,0,1.9,0,3v11c0,1.1,0.882,2.178,1.961,2.393l4.372,0.875C6.333,17.268,2.57,19,5,19h10c2.43,0-1....
node_modules/gatsby/lib/utils/develop.js
aimanaiman/supernomadfriendsquad
/* @flow weak */ require('node-cjsx').transform() import detect from 'detect-port' import Hapi from 'hapi' import Boom from 'boom' import React from 'react' import ReactDOMServer from 'react-dom/server' import webpack from 'webpack' import Negotiator from 'negotiator' import parsePath from 'parse-filepath' import _ fro...
packages/icons/src/md/communication/InvertColorsOff.js
suitejs/suitejs
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdInvertColorsOff(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <path d="M41.29 41.21l.71.7-2.55 2.55-5.4-5.38a15.944 15.944 0 0 1-10.06 3.56c-4.09 0-8.19-1.57-11.31-4.69-5.84-5.85-6.22-15.1-1.12-21.38L6 11.01l2.54...
src/components/PostFormDialogue.js
afonsobarros/reactnd-project-readable
import React, { Component } from 'react'; import { connect } from 'react-redux' import { openDialogueCategories, closeDialogueCategories, updateNewPost, showSnackbar } from '../actions/appState' import { addNewPost, } from '../actions/posts' import * as ReadableAPI from '../utils/ReadableAPI'; import themeD...
client/components/Private/index.js
yacoma/auth-boilerplate
import React from 'react' import { Grid, Segment } from 'semantic-ui-react' export default function Private() { return ( <Grid stackable padded="vertically" columns={2} centered> <Grid.Row> <Grid.Column> <Segment padded textAlign="left" color="red" size="big"> This is the priv...
client/src/containers/App/App.js
jenovs/bears-team-14
import React, { Component } from 'react'; import { BrowserRouter as Router, Route } from 'react-router-dom'; import './App.css'; import api from '../../api'; import Footer from '../../components/Footer'; import Header from '../../components/Header'; import Main from '../../components/Main'; class App extends Compone...
src/components/DBTable/InnerForm.js
lijinfengworm/ant-design-reactjs
import React from 'react'; import { Icon, Row, Col, Button, message, Upload, notification } from 'antd'; import globalConfig from 'config.js'; import moment from 'moment'; // antd@2.0之后, 日期相关的都变成moment对象了, 以前是Date对象 import FormSchemaUtils from './InnerFormSchemaUtils'; import Utils from '../../utils'; im...
pages/blog/test-article-two.js
patmood/svg-jsx-online
/** * React Static Boilerplate * https://github.com/koistya/react-static-boilerplate * Copyright (c) Konstantin Tarkus (@koistya) | MIT license */ import React, { Component } from 'react'; export default class extends Component { render() { return ( <div> <h1>Test Article 2</h1> <p>Co...
packages/material-ui-icons/src/Tonality.js
cherniavskii/material-ui
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><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.93H13v-.93zM13 7h5.24c.25.31.48.65.68 1H13V7zm...
src/routes.js
CarlosMela/react-redux-universal-hot-example
import React from 'react'; import {Route} from 'react-router'; import { App, Home, Widgets, About, Login, RequireLogin, LoginSuccess, Survey, NotFound, } from 'containers'; export default function(store) { return ( <Route component={App}> <Route path="/" component={Hom...
src/components/Icon.js
amiuhle/kasisto
import '../icons/back.svg' import '../icons/check.svg' import '../icons/close.svg' import '../icons/history.svg' import '../icons/loading.svg' import '../icons/monero.svg' import '../icons/settings.svg' import React from 'react' import { Link } from 'react-router-dom' const className = ({ className } = {}, ...rest) =...
src/client/pages/tocheckitem.react.js
terakilobyte/socketreact
import Component from '../components/component.react'; import React from 'react'; import {FormattedHTMLMessage} from 'react-intl'; class ToCheckItem extends Component { render() { return ( <li> <FormattedHTMLMessage message={this.props.item.get('txt')} /> </li> ); } } ToCheckItem.pro...
src/main/webapp/static/js/club/view/main/app.js
weijiafen/antBlog
import React from 'react'; let App=React.createClass({ render:function(){ return (<div className="view-home"> <header>user:{this.props.params.userid} !main page. </header> </div>); } }) export default App;
src/routes/poll/Chart.js
binyuace/vote
// import React from 'react' // import {Pie} from 'react-chartjs-2'; // class BinChart extends React.Component{ // render() { // // export default BinChart import React from 'react'; import { Pie } from 'react-chartjs-2'; export default React.createClass({ render() { const votes = this.props.votes; cons...
src/frontend/index.js
pantao/hapi-react-isomorphic-boilerplate
import React from 'react'; import {renderToString} from 'react-dom/server'; import {Provider} from 'react-redux'; import {match, RouterContext} from 'react-router'; import createHistory from 'history/lib/createMemoryHistory'; import qs from 'query-string'; import configureStore from './store/configureStore'; import ge...
lens-ui/app/components/TableSchemaComponent.js
archanah24/lens
/** * 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 may not...
client/portfolio2017/src/Components/ImageContainer/ImageContainer.js
corrortiz/portafolio2017
import React, { Component } from 'react'; import { Link } from 'react-router-dom'; import PropTypes from 'prop-types'; //MUI Components import { withStyles } from 'material-ui/styles'; //HOC for global states import GlobalsConnect from '../../HOC/GlobalsConnect/GlobalsConnect'; //locale import { lenguajeSelector } from...
app/javascript/mastodon/features/ui/components/zoomable_image.js
honpya/taketodon
import React from 'react'; import PropTypes from 'prop-types'; const MIN_SCALE = 1; const MAX_SCALE = 4; const getMidpoint = (p1, p2) => ({ x: (p1.clientX + p2.clientX) / 2, y: (p1.clientY + p2.clientY) / 2, }); const getDistance = (p1, p2) => Math.sqrt(Math.pow(p1.clientX - p2.clientX, 2) + Math.pow(p1.client...
site/IndexPage.js
pairyo/react-dnd
import './base.less'; import Constants, { APIPages, ExamplePages, Pages } from './Constants'; import HomePage from './pages/HomePage'; import APIPage from './pages/APIPage'; import ExamplePage from './pages/ExamplePage'; import React, { Component } from 'react'; const APIDocs = { OVERVIEW: require('../docs/00 Quick ...
src/svg-icons/editor/mode-edit.js
ngbrown/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let EditorModeEdit = (props) => ( <SvgIcon {...props}> <path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"...
src/components/Common/PublicationInfo/Views/Common/index.js
LifeSourceUA/lifesource.ua
/** * [IL] * Library Import */ import React from 'react'; import PropTypes from 'prop-types'; /** * [IS] * Style Import */ import Styles from './Styles/main.scss'; import Grid from 'theme/Grid.scss'; /** * [IBP] * Breakpoints */ import BP from 'lib/breakpoints'; function Common(props) { const { mediaTyp...
src/components/Header.js
CasperLaiTW/ICD-10-CM-Seeker
import React from 'react'; import { Link } from 'react-router'; import { Navbar, Nav, NavItem, NavBrand } from 'react-bootstrap'; export default class Header extends React.Component { render() { return ( <Navbar> <NavBrand><Link to="/">ICD-10-CM Seeker</Link></NavBrand> <Nav right> ...
src/components/common/Text.js
jinqiupeter/mtsr
import React from 'react'; import {StyleSheet, Platform, View, Text, TouchableOpacity} from 'react-native'; import {COLOR, SCREEN_WIDTH, SCREEN_HEIGHT} from '../../config'; export default ({ children, transparent = false, onPress, styleKind = 'normal', style, containerStyle, ...props }) => { let transpare...
src/routes.js
freelance-tech-writer/barstool-messages-frontend
import React from 'react'; import { Route, IndexRoute } from 'react-router'; import App from './components/App'; import NotFoundPage from './components/NotFoundPage'; import Messages from './containers/Messages'; export default ( <Route path="/" component={ App }> <IndexRoute component={ NotFoundPage }/> <Route ...
app/javascript/mastodon/components/status_action_bar.js
NS-Kazuki/mastodon
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import IconButton from './icon_button'; import DropdownMenuContainer from '../containers/dropdown_menu_container'; import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureCompo...
src/ButtonInput.js
zerkms/react-bootstrap
import React from 'react'; import Button from './Button'; import FormGroup from './FormGroup'; import InputBase from './InputBase'; import childrenValueValidation from './utils/childrenValueInputValidation'; class ButtonInput extends InputBase { renderFormGroup(children) { let {bsStyle, value, ...other} = this.p...
react/src/base/inputs/SprkFieldset/SprkFieldset.js
sparkdesignsystem/spark-design-system
import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; const SprkFieldset = (props) => { const { children, idString, analyticsString, additionalClasses, ariaDescribedBy, forwardedRef, ...other } = props; return ( <fieldset classN...
src/components/ListItem/ListItem.js
carbon-design-system/carbon-components-react
/** * Copyright IBM Corp. 2016, 2018 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import PropTypes from 'prop-types'; import React from 'react'; import classnames from 'classnames'; import { settings } from 'carbon-componen...
examples/react-router-v3/src/index.js
algolia/react-instantsearch
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import { Router, Route, browserHistory } from 'react-router'; import 'instantsearch.css/themes/algolia.css'; ReactDOM.render( <Router history={browserHistory}> <Route path="/" component={App} /> </Router>, document.getEleme...
src/components/Main-es5.js
wqzwh/react-photo
require('normalize.css/normalize.css'); require('styles/App.css'); import React from 'react'; import ReactDom from 'react-dom'; let imageDatas=require('../data/imageDatas.json'); // 获取图片地址定义的方法 imageDatas=(function getImagesUrl(imageDatasArr){ for(let i=0,j=imageDatasArr.length;i<j;i++){ let singleImageData=ima...
app/src/main/js/components/MainScreen/ConversationList/Contact Field/ContactSummary.js
evan01/tranasaurus
import React, { Component } from 'react'; class ContactSummary extends Component { render() { return ( <div className='ContactSummary'> <p>ContactSummary</p> <p className='summaryChatText'> This is where the summary of the last chat message will go </p> </div> );...
src/svg-icons/toggle/radio-button-checked.js
jacklam718/react-svg-iconx
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...
react/src/components/masthead/components/SprkMastheadAccordionItem/SprkMastheadAccordionItem.js
sparkdesignsystem/spark-design-system
import React, { Component } from 'react'; import AnimateHeight from 'react-animate-height'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import uniqueId from 'lodash/uniqueId'; import SprkIcon from '../../../icons/SprkIcon'; class SprkMastheadAccordionItem extends Component { constructor(...
src/components/homepage/ResentVacancy.js
Vasyl1989/Opus.ua
import React from 'react'; import { PropTypes } from 'prop-types'; import { connect } from 'react-redux'; import { getAllVacancy, pagination } from '../../actions/vacancyActions'; import { Link, browserHistory } from 'react-router'; import picture from '../../styles/images/job-list-logo-01.png'; class ResentVacancy ex...
src/js/components/settings/Profile.js
barumel/ultritium-radio-player
import React from 'react'; import { Panel } from 'react-bootstrap'; import { SettingsPanel } from './panel/Panel'; import { SettingsPanelHeader } from './panel/Header'; import { SettingsFormProfile } from './form/Profile'; export class ProfileSettings extends SettingsPanel { constructor() { super(); this.st...
client/views/admin/invites/InviteRow.js
VoiSmart/Rocket.Chat
import { Button, Icon, Table, Box } from '@rocket.chat/fuselage'; import { useMediaQuery } from '@rocket.chat/fuselage-hooks'; import moment from 'moment'; import React from 'react'; import { useModal } from '../../../contexts/ModalContext'; import { useEndpoint } from '../../../contexts/ServerContext'; import { useTo...
client/admin/integrations/new/NewBot.js
iiet/iiet-chat
import React from 'react'; import { Box } from '@rocket.chat/fuselage'; import { useTranslation } from '../../../contexts/TranslationContext'; export default function NewBot() { const t = useTranslation(); return <Box pb='x20' fontScale='s1' key='bots' dangerouslySetInnerHTML={{ __html: t('additional_integrations_B...
DemoApp/lib/button/index.js
andyfen/react-native-UIKit
import React from 'react'; import { StyleSheet, Text, TouchableOpacity, } from 'react-native'; import { primary, gutter } from '../variables'; const styles = StyleSheet.create({ text: { fontSize: 18, fontWeight: '600', textAlign: 'center', }, }); const Button = ({ children, radius, fontWeight...
src/components/EmptyResults.js
nmartin867/buggylist
import React from 'react' import PropTypes from 'prop-types' const EmptyResults = ({ onLoadClick }) => { return (<button onClick={onLoadClick}>Load Images</button>) } EmptyResults.propTypes = { onLoadClick: PropTypes.func.isRequired } export default EmptyResults
src/svg-icons/action/turned-in-not.js
mtsandeep/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionTurnedInNot = (props) => ( <SvgIcon {...props}> <path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"/> </SvgIcon> ); ActionTurnedInNot = pure(ActionTurnedInNo...
dispatch/static/manager/src/js/components/Editor/tabs/FeaturedMediaTab.js
ubyssey/dispatch
import React from 'react' import FeaturedImageTab from './FeaturedImageTab' import FeaturedVideoTab from './FeaturedVideoTab' export default function FeaturedMediaTab(props) { function haveImage(props) { return props.article.featured_image && props.article.featured_image.image } function haveVideo(props) ...
test/fixtures/webpack-message-formatting/src/AppAliasUnknownExport.js
Timer/create-react-app
import React, { Component } from 'react'; import { bar as bar2 } from './AppUnknownExport'; class App extends Component { componentDidMount() { bar2(); } render() { return <div />; } } export default App;
src/components/App/App.js
kdrabek/exchange_rates_frontend
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Grid } from 'react-bootstrap'; import AppNavbar from '../AppNavbar/AppNavbar'; import Tagline from '../Tagline/Tagline'; class App extends Component { render() { return ( <div className="App"> <AppNavbar /> ...
demos/buttons/demos/flat-colored.js
isogon/styled-mdl-website
import React from 'react' import { Button } from 'styled-mdl' const demo = () => <Button primary>Primary</Button> const caption = 'Primary Colored Button' const code = '<Button primary>Primary</Button>' export default { demo, caption, code }
src/Thumbnail.js
thealjey/react-bootstrap
import React from 'react'; import classSet from 'classnames'; import BootstrapMixin from './BootstrapMixin'; import SafeAnchor from './SafeAnchor'; const Thumbnail = React.createClass({ mixins: [BootstrapMixin], propTypes: { alt: React.PropTypes.string, href: React.PropTypes.string, src: React.PropTyp...
hello world/1.4 - stateProps/src/js/index.js
wumouren/react-demo
import React from 'react'; import ReactDom from 'react-dom'; import Header from '../components/header'; import Main from '../components/main'; import Footer from '../components/footer'; import Binding from '../components/binding' // 双向数据绑定 class Index extends React.Component { constructor() { super(); ...
src/components/Module.js
hairmot/REACTModuleTest
import React from 'react'; import TextInput from './TextInput' import currentTime from '../util/currentTime'; import PreviousVersions from './previousVersions'; import { inputsTemplate } from '../data/defaultData'; import ValidTick from './validTick'; import translateName from '../util/translateName'; import { connect ...
react-router-tutorial/lessons/02-rendering-a-route/modules/App.js
zerotung/practices-and-notes
import React from 'react' export default React.createClass({ render() { return <div>Hello, React Router!</div> } })
Realization/frontend/czechidm-core/src/content/tree/node/TreeNodeIdentities.js
bcvsolutions/CzechIdMng
import React from 'react'; import _ from 'lodash'; // import * as Basic from '../../../components/basic'; import { IdentityManager } from '../../../redux'; import SearchParameters from '../../../domain/SearchParameters'; import IdentityTableComponent, { IdentityTable } from '../../identity/IdentityTable'; /** * Ident...
src/components/Main.js
ViniciusAtaide/reduxchat
import React, { Component } from 'react'; export default class Main extends Component { render() { return ( <h1>Main</h1> ); } }
packages/icons/src/md/hardware/KeyboardBackspace.js
suitejs/suitejs
import React from 'react'; import IconBase from '@suitejs/icon-base'; function MdKeyboardBackspace(props) { return ( <IconBase viewBox="0 0 48 48" {...props}> <polygon points="42 22 13.66 22 20.83 14.83 18 12 6 24 18 36 20.83 33.17 13.66 26 42 26" /> </IconBase> ); } export default MdKeyboardBackspa...
src/svg-icons/action/assignment-ind.js
kasra-co/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionAssignmentInd = (props) => ( <SvgIcon {...props}> <path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 ...
routes/HomePage.js
gabrielseco/potterapi
import React from 'react'; function HomePage() { return ( <div className="row"> <h3>Welcome to the PotterAPI, here you can obtain data from HARRY POTTER</h3> </div> ); } export default HomePage;