path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/scenes/home/scholarshipApplication/head/head.js | tskuse/operationcode_frontend | import React from 'react';
import dateFormat from 'dateformat';
import PropTypes from 'prop-types';
import styles from './head.css';
const Head = ({ scholarship }) => (
<div>
<h3 className={styles.scholarshipAppHeader}> {scholarship.name} </h3>
<p> {scholarship.description} </p>
<p> {scholarship.location... |
packages/slate-react/test/rendering/index.js | AlbertHilb/slate |
import React from 'react'
import ReactDOM from 'react-dom/server'
import assert from 'assert'
import clean from '../helpers/clean'
import fs from 'fs-promise' // eslint-disable-line import/no-extraneous-dependencies
import parse5 from 'parse5' // eslint-disable-line import/no-extraneous-dependencies
import { Editor } ... |
frontend/components/Menu.js | SkyPicker/Skywall | import React from 'react'
import {Nav, NavItem, Col} from 'react-bootstrap'
import {LinkContainer, IndexLinkContainer} from 'react-router-bootstrap'
import {compose} from 'redux'
import * as routes from '../constants/routes'
import {applyOverlays} from '../utils/overlays'
export class MenuComponent extends React.Comp... |
app/javascript/mastodon/features/ui/components/zoomable_image.js | Chronister/mastodon | 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... |
fields/types/relationship/RelationshipColumn.js | pswoodworth/keystone | import React from 'react';
import ItemsTableCell from '../../../admin/client/components/ItemsTable/ItemsTableCell';
import ItemsTableValue from '../../../admin/client/components/ItemsTable/ItemsTableValue';
const moreIndicatorStyle = {
color: '#bbb',
fontSize: '.8rem',
fontWeight: 500,
marginLeft: 8,
};
var Relat... |
src/botPage/view/TradeInfoPanel/RunButton.js | binary-com/binary-bot | import React from 'react';
import { translate } from '../../../common/i18n';
const RunButton = () => (
<React.Fragment>
<button title="Run the bot" id="summaryRunButton" className="toolbox-button icon-run" />
<button
title={translate('Stop the bot')}
id="summaryStopButton"
... |
ui/src/js/planting/customPlantPage/Project.js | Dica-Developer/weplantaforest | import axios from 'axios';
import React, { Component } from 'react';
import Article from './Article';
import ArticleDesc from './ArticleDesc';
export default class Project extends Component {
constructor() {
super();
this.state = {
articles: []
};
}
componentDidMount() {
var that = this;
... |
ajax/libs/react-instantsearch/5.0.0-beta.0/Dom.js | seogi1004/cdnjs | /*! ReactInstantSearch 5.0.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... |
app/utils/AutoScroll.js | davidnum/chat | import React from 'react';
import ReactDom from 'react-dom';
export default function (ComposedComponent, property) {
class AutoScroll extends React.Component {
componentDidMount() {
this.scrollToBottom();
}
componentWillUpdate(nextProps) {
if (this.props[property] !== nextProps[property]) {... |
jsx/modules/routes.js | NickTaporuk/webpack_starterkit_project | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './App';
import About from './About';
import Repos from './Repos';
import Repo from './Repo';
import Home from './Home';
module.exports = (
<Route path="/" component={App}>
<IndexRoute component={Home}/>
<R... |
src/React/CollapsibleControls/PixelOperatorControl/example/index.js | Kitware/paraviewweb | import 'normalize.css';
import React from 'react';
import ReactDOM from 'react-dom';
import PixelOperatorControl from 'paraviewweb/src/React/CollapsibleControls/PixelOperatorControl';
let operationValue = 'a+2/5';
const operator = {
getOperation() {
return operationValue;
},
setOperation(v) {
operation... |
src/containers/DailySchedule/DailySchedule.js | moo-dal/spoon-web | /* External dependencies */
import React from 'react'
import classNames from 'classnames'
import autobind from 'core-decorators/lib/autobind'
import FontAwesome from 'react-fontawesome'
import { connect } from 'react-redux'
import { replace } from 'react-router-redux'
/* Internal dependencies */
import styles from './... |
src/index.js | rattrayalex/splashreader | /* @flow */
import 'babel-polyfill' // for regenerator
import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import store from './flux/store'
import SplashApp from './components/SplashApp'
import * as dom from './lib/dom'
import * as ranges from './lib/ranges'
import * as e... |
src/components/App.js | dkanas/timelog | import React from 'react'
import { browserHistory, Router } from 'react-router'
import { Provider } from 'react-redux'
import PropTypes from 'prop-types'
class App extends React.Component {
static propTypes = {
store: PropTypes.object.isRequired,
routes: PropTypes.object.isRequired,
}
shouldComponentUpd... |
server/sonar-web/src/main/js/components/charts/histogram.js | vamsirajendra/sonarqube | import d3 from 'd3';
import React from 'react';
import { ResizeMixin } from './../mixins/resize-mixin';
import { TooltipsMixin } from './../mixins/tooltips-mixin';
export const Histogram = React.createClass({
propTypes: {
data: React.PropTypes.arrayOf(React.PropTypes.object).isRequired,
yTicks: React.PropTy... |
src/svg-icons/device/battery-alert.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBatteryAlert = (props) => (
<SvgIcon {...props}>
<path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zM13 18h-2v-2h2v2zm0... |
src/components/share/Style.js | HsuTing/react-input | 'use strict';
import React from 'react';
import radium, {Style as StyleRadium} from 'radium';
import normalize from 'radium-normalize';
@radium
export default class Style extends React.Component {
render() {
return (
<div>
<StyleRadium rules={normalize} />
<StyleRadium scopeSelector="a"
... |
src/index.js | bogas04/SikhJS | /* eslint-disable import/no-unassigned-import */
import React from 'react';
import { render } from 'react-dom';
import 'unfetch/polyfill';
import Root from './pages/Root';
render(<Root />, document.getElementById('root'));
// Service Worker Registeration
if ('serviceWorker' in navigator) {
navigator
.serviceW... |
addons/themes/directive/layouts/Home.js | rendact/rendact | import $ from 'jquery'
import React from 'react';
import gql from 'graphql-tag';
import {graphql} from 'react-apollo';
import moment from 'moment';
import {Link} from 'react-router';
import scrollToElement from 'scroll-to-element';
let Home = React.createClass({
componentDidMount(){
require('../assets/css/main.c... |
packages/material-ui-icons/test/fixtures/material-design-icons/expected/Accessibility.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M12 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 7h-6v13h-2v-6h-2v6H9V9H3V7h18v2z" /></g>
, 'Accessibility');
|
threeforce/node_modules/react-bootstrap/es/ModalHeader.js | wolfiex/VisACC | 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 ... |
src/svg-icons/image/timer.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageTimer = (props) => (
<SvgIcon {...props}>
<path d="M15 1H9v2h6V1zm-4 13h2V8h-2v6zm8.03-6.61l1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0... |
src/parser/paladin/holy/modules/talents/DevotionAuraDamageReduction.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import { Trans } from '@lingui/macro';
import SPELLS from 'common/SPELLS';
import fetchWcl from 'common/fetchWclApi';
import SpellIcon from 'common/SpellIcon';
import { formatThousands, formatNumber } from 'common/format';
import LazyLoadStatisticBox, { STATISTIC_ORDER } from 'interface/oth... |
packages/ringcentral-widgets-docs/src/app/pages/Components/DialerPanel/index.js | u9520107/ringcentral-js-widget | import React from 'react';
import { parse } from 'react-docgen';
import CodeExample from '../../../components/CodeExample';
import ComponentHeader from '../../../components/ComponentHeader';
import PropTypeDescription from '../../../components/PropTypeDescription';
import Demo from './Demo';
// eslint-disable-next-lin... |
test/BadgeSpec.js | BespokeInsights/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Badge from '../src/Badge';
describe('Badge', function () {
it('Should output a badge with content', function () {
let instance = ReactTestUtils.renderIntoDocument(
<Badge>
<strong>Content</strong>
</Badge... |
src/Checkbox.js | dozoisch/react-bootstrap | import classNames from 'classnames';
import React from 'react';
import warning from 'warning';
import { bsClass, getClassSet, prefix, splitBsProps }
from './utils/bootstrapUtils';
const propTypes = {
inline: React.PropTypes.bool,
disabled: React.PropTypes.bool,
/**
* Only valid if `inline` is not set.
*... |
lib-es/components/media/media-right.js | bokuweb/re-bulma | 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; };
import React, { Component } from 'react';
import PropTypes fr... |
src/server.js | JackTran791/react-app | import path from 'path';
import { Server } from 'http';
import Express from 'express';
import React from 'react';
import { renderToString } from 'react-dom/server';
import { match, RouterContext } from 'react-router';
import routes from './routes';
import NotFoundPage from './components/NotFoundPage';
// initialize th... |
src/TextNoteEditor.js | OCMC-Translation-Projects/ioc-liturgical-react | import React from 'react';
import PropTypes from 'prop-types';
import FontAwesome from 'react-fontawesome';
import DeleteButton from './helpers/DeleteButton';
import RichEditor from './modules/RichEditor';
import {BootstrapTable, TableHeaderColumn} from 'react-bootstrap-table';
import 'react-draft-wysiwyg/dist/react-dr... |
packages/material-ui-icons/src/AcUnit.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let AcUnit = 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.24 3.... |
test/OverlayTriggerSpec.js | egauci/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ReactDOM from 'react-dom';
import OverlayTrigger from '../src/OverlayTrigger';
import Popover from '../src/Popover';
import Tooltip from '../src/Tooltip';
import { render } from './helpers';
describe('OverlayTrigger', () => {
... |
app/javascript/mastodon/features/favourites/index.js | Chronister/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from '../../components/loading_indicator';
import { fetchFavourit... |
src/svg-icons/action/question-answer.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionQuestionAnswer = (props) => (
<SvgIcon {...props}>
<path d="M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"/>
</SvgIcon>
);
... |
src/Parser/DeathKnight/Blood/Modules/Talents/Ossuary.js | hasseboulen/WoWAnalyzer | import React from 'react';
import Analyzer from 'Parser/Core/Analyzer';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import { formatPercentage } from 'common/format';
import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox';
import Combatants from 'Parser/Core/Modules/Combatant... |
client/src/app-components/are-you-sure.js | opensupports/opensupports | import React from 'react';
import i18n from 'lib-app/i18n';
import ModalContainer from 'app-components/modal-container';
import Button from 'core-components/button';
import Input from 'core-components/input';
import Loading from 'core-components/loading'
class AreYouSure extends React.Component {
static propType... |
test/ButtonInputSpec.js | AlexKVal/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ButtonInput from '../src/ButtonInput';
import {shouldWarn} from './helpers';
describe('ButtonInput', () =>{
it('renders an input button element with type=button', function () {
const instance = ReactTestUtils.renderIntoDocum... |
src/tile/Tile.js | fengshanjian/react-native-komect-uikit | import PropTypes from 'prop-types';
import React from 'react';
import {
View,
Image,
Text as NativeText,
StyleSheet,
Dimensions,
TouchableOpacity,
} from 'react-native';
import Text from '../text/Text';
import Icon from '../icons/Icon';
import FeaturedTile from './FeaturedTile';
const Tile = props => {
c... |
src/routes/admin/index.js | utage2002/mm | /**
* 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... |
node_modules/react-router/modules/RoutingContext.js | SlateRobotics/slate-website | import React from 'react'
import RouterContext from './RouterContext'
import warning from './routerWarning'
const RoutingContext = React.createClass({
componentWillMount() {
warning(false, '`RoutingContext` has been renamed to `RouterContext`. Please use `import { RouterContext } from \'react-router\'`. http://t... |
src/svg-icons/maps/local-printshop.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPrintshop = (props) => (
<SvgIcon {...props}>
<path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"... |
app/src/components/Errors.js | GlyphGryph/DarkerDaysAhead | import React from 'react'
import PropTypes from 'prop-types'
const Errors = ({errors}) => (
<ul
style={{
color: 'red',
position: 'absolute',
right: '0px',
top: '0px',
zIndex: 1
}}
>
{[...errors].reverse().map( (error, index) => (
<li key={index}>
{error}
... |
sources/js/header.js | streetlives/streetlivesnyc | 'use strict';
import React from 'react';
import { Link, IndexLink } from 'react-router';
import '../scss/header.scss';
module.exports.Header = React.createClass({
render: function() {
return (
<header className="Header">
<a href={this.props.url} className="HeaderTitle">
... |
docs/app/Examples/elements/Step/Variations/StepExampleEvenlyDividedAnother.js | shengnian/shengnian-ui-react | import React from 'react'
import { Icon, Step } from 'shengnian-ui-react'
const StepExampleEvenlyDividedAnother = () => (
<Step.Group widths={2}>
<Step active>
<Icon name='credit card' />
<Step.Content>
<Step.Title>Billing</Step.Title>
</Step.Content>
</Step>
<Step disabled>
... |
app/components/ContactCard/index.js | yasserhennawi/yasserhennawi | import React from 'react';
import PropTypes from 'prop-types';
import styled from 'utils/styled-components';
import colors from 'theme/color';
import ContactItem from '../ContactItem';
const Wrapper = styled.div`
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
max-... |
src/svg-icons/av/fiber-smart-record.js | rscnt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvFiberSmartRecord = (props) => (
<SvgIcon {...props}>
<g><circle cx="9" cy="12" r="8"/><path d="M17 4.26v2.09c2.33.82 4 3.04 4 5.65s-1.67 4.83-4 5.65v2.09c3.45-.89 6-4.01 6-7.74s-2.55-6.85-6-7.74z"/></g>
</S... |
src/index.js | dpastoor/chatterbox | import React from 'react';
import { render } from 'react-dom'
import App from './App.jsx'
render(<App name="React" />, document.getElementById('root'));
|
examples/basic/src/components/Unwrapped.js | makeomatic/redux-connect | import React from 'react';
export default function Unwrapped() {
return (
<div>
{'Unwrapped component'}
</div>
);
}
|
src/client/components/base/Button/Button.js | DBCDK/content-first | import React from 'react';
import PropTypes from 'prop-types';
import Icon from '../Icon';
import './Button.css';
import '../Skeleton/skeleton.css';
const Button = ({
Tag = 'button',
size = 'large',
type = 'primary',
iconLeft = null,
iconRight = null,
variant = false,
children = null,
className = '',
... |
src/Parser/DeathKnight/Blood/Modules/Features/BlooddrinkerTicks.js | enragednuke/WoWAnalyzer | import React from 'react';
import Analyzer from 'Parser/Core/Analyzer';
import SPELLS from 'common/SPELLS';
import AbilityTracker from 'Parser/Core/Modules/AbilityTracker';
import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox';
import Combatants from 'Parser/Core/Modules/Combatants';
import SpellIcon from '... |
web/app/components/notes/NotesList.js | sandro-heitz/mynotes |
import React, { Component } from 'react';
import NoteView from './NoteView';
class NotesList extends Component {
render() {
let nr = 0;
let ns = this.props.notes.map(n => { nr++; return (<NoteView number={nr} note={n} key={n.id} />) });
return (<div className="notes-list">{ns}</div>);
... |
samples/06.recomposing-ui/b.speech-ui/src/CustomDictationInterims.js | billba/botchat | import React from 'react';
import { Components, Constants } from 'botframework-webchat';
const { connectDictationInterims } = Components;
const {
DictateState: { DICTATING, STARTING }
} = Constants;
export default connectDictationInterims()(
({ className, dictateInterims, dictateState }) =>
(dictateState ===... |
clients/packages/admin-client/src/pages/admin/communities/settings/container.js | nossas/bonde-client | import PropTypes from 'prop-types';
import React from 'react';
import { Route } from 'react-router-dom';
// Components
import {
SettingsPageLayout,
SettingsPageContentLayout,
} from '../../../../components/layout';
import { SettingsMenu } from '../../../../community/components';
// Pages
import InfoPage from './i... |
src/components/Register.js | aryalprakash/aryalprakash.github.io | import React, { Component } from 'react';
import { Link } from 'react-router';
export class Register extends Component{
render(){
return(<div className="login-container">
<div className="login-form">
<div className="form-title">Sign Up</div>
<div className="lin... |
src/svg-icons/action/change-history.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionChangeHistory = (props) => (
<SvgIcon {...props}>
<path d="M12 7.77L18.39 18H5.61L12 7.77M12 4L2 20h20L12 4z"/>
</SvgIcon>
);
ActionChangeHistory = pure(ActionChangeHistory);
ActionChangeHistory.display... |
src/components/attributes/scatter-plot/LocalAttributes.js | smeads/ID3-React | import React from 'react';
import GridLines from './local-attributes/GridLines';
import RegressionLine from './local-attributes/RegressionLine';
import ToolTip from './local-attributes/ToolTip';
import ScatterPlotAttr from './local-attributes/ScatterPlotAttr';
export default (props) => {
const gridLines = props.grid... |
src/client/auth/login.react.js | laxplaer/este | import './login.styl';
import Component from '../components/component.react';
import React from 'react';
import exposeRouter from '../components/exposerouter';
import {focusInvalidField} from '../lib/validation';
@exposeRouter
export default class Login extends Component {
static propTypes = {
actions: React.Pr... |
src/js/components/layout/master.js | kukua/dashboard | import React from 'react'
import Header from '../header/header'
import Notifications from './notifications'
class MasterLayout extends React.Component {
render () {
return (
<div>
<div class="container">
<Header location={this.props.location} />
{this.props.children}
<Notifications />
</di... |
blueprints/view/files/__test__/views/__name__View.spec.js | typing-war/typing-war | import React from 'react'
describe('(View) <%= pascalEntityName %>', () => {
it('should exist', () => {
})
})
|
src/svg-icons/image/filter-hdr.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilterHdr = (props) => (
<SvgIcon {...props}>
<path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"/>
</SvgIcon>
);
ImageFilterHdr = pure(ImageFilterHdr);
ImageFilterHdr.displayName... |
src/web/client/scripts/components/ProjectListTable.js | MiddleBack/anymock | /**
* Created by tanxiangyuan on 16/8/31.
*/
import React from 'react';
import Table from 'antd/lib/table';
import Button from 'antd/lib/button';
import Message from 'antd/lib/message';
import Input from 'antd/lib/input';
import Form from 'antd/lib/form';
import Switch from 'antd/lib/switch';
import Select from 'antd... |
client/components/button-group/test/test.js | Kimsangcheon/wp-calypso |
require( 'lib/react-test-env-setup' )();
/**
* External dependencies
*/
import { assert } from 'chai';
import React from 'react';
import { shallow } from 'enzyme';
import sinon from 'sinon';
describe( 'ButtonGroup', function() {
let sandbox, ButtonGroup, Button;
beforeEach( function() {
sandbox = sinon.sandbox... |
dist/lib/carbon-fields/assets/js/containers/components/container/index.js | ArtFever911/statrer-kit | /**
* The external dependencies.
*/
import React from 'react';
import { branch, renderComponent } from 'recompose';
import { isObject } from 'lodash';
/**
* The internal dependencies.
*/
import ContainerTabbed from 'containers/components/container/tabbed';
import ContainerPlain from 'containers/components/containe... |
packages/idyll-cli/test/multiple-component-dirs/src/components-2/functional-default-component.js | idyll-lang/idyll | import React from 'react';
export default () => (
<div>
This is some text
<button>And a button</button>
Then some more text
</div>
);
|
server/sonar-web/src/main/js/components/charts/__tests__/bar-chart-test.js | Builders-SonarSource/sonarqube-bis | /*
* 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... |
src/__tests__/fileMocks/esClassNamed/Bold.js | react-cosmos/fs-playground | // @flow
import React, { Component } from 'react';
export default class Bold extends Component<{ name: string }> {
render() {
return <strong>{this.props.name}</strong>;
}
}
|
components/04_redux_elm/src/boilerplate.js | babotech/reusable-components-check | import React from 'react'
import { render } from 'react-dom'
import { createStore, compose } from 'redux'
import { Provider, connect } from 'react-redux'
import reduxElm from 'redux-elm'
export default (containerDomId, View, updater) => {
const storeFactory = compose(
reduxElm,
window.devToolsExtension ? wi... |
spec/components/snackbar.js | showings/react-toolbox | import React from 'react';
import Button from '../../components/button';
import Snackbar from '../../components/snackbar';
class SnackbarTest extends React.Component {
state = {
active: false,
};
handleSnackbarClick = () => {
this.setState({ active: false });
};
handleSnackbarTimeout = () => {
... |
src/examples/Step3.js | codelittinc/react-stepzilla | 'use strict';
import React, { Component } from 'react';
export default class Step3 extends Component {
constructor(props) {
super(props);
this.state = {
email: props.getStore().email,
gender: props.getStore().gender
};
this._validateOnDemand = true; // this flag enables onBlur validati... |
client/src/components/App/Issue/index.js | dotkom/super-duper-fiesta | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import DocumentTitle from 'react-document-title';
import { activeIssueExists, getIssueText, getIssueKey } from 'features/issue/selectors';
import Card from '../../Card';
import Loader from '../Loader';
import css from ... |
modules/offers/client/components/OffersPresentational.js | Trustroots/trustroots | // External dependencies
import { withTranslation } from 'react-i18next';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
// Internal dependencies
import '@/config/client/i18n';
import OfferLocation from './OfferLocation.component';
import OfferStatusButton from './OfferStatusButton';
imp... |
src/app/capital_projects/CIPData.js | cityofasheville/simplicity2 | import React from 'react';
import { browserHistory } from 'react-router';
import PageHeader from '../../shared/PageHeader';
import ButtonGroup from '../../shared/ButtonGroup';
import Button from '../../shared/Button';
import Icon from '../../shared/Icon';
import { IM_CITY } from '../../shared/iconConstants';
import { w... |
src/pages/reading/index.js | joefraley/ratticusscript | 'use strict'
import { Book } from './book'
import Helmet from 'react-helmet'
import React from 'react'
import books from './books.json'
export const filterByYear = (list, year) => list.filter(book => book.finished.split('/')[0] === year)
const sortedBooks = [
{ list: filterByYear(books, '2016'), year: 2016 },
{ li... |
src/containers/Menu/Menu.js | soulhat/galaxy | import React, { Component } from 'react';
import { Navbar, Nav, NavItem, NavDropdown, MenuItem } from 'react-bootstrap';
import './Menu.css';
class Menu extends Component {
render() {
return (
<Navbar inverse collapseOnSelect>
<Navbar.Header>
<Navbar.Brand>
<a href="/">Galaxy... |
node_modules/_react-router@3.2.0@react-router/es/IndexLink.js | ligangwolai/blog | 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; };
import React from 'react';
import createReactClass from 'crea... |
src/deposit/DepositMobile.js | nazaninreihani/binary-next-gen | import React from 'react';
import MobilePage from '../containers/MobilePage';
import DepositContainer from './DepositContainer';
export default (props) => (
<MobilePage toolbarShown={false} backBtnBarTitle="Deposit">
<DepositContainer {...props} />
</MobilePage>
);
|
src/index.js | 15chrjef/ico-wizard | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import { useStrict } from 'mobx';
import { Provider } from 'mobx-react';
import * as stores from './stores';
useStrict(true);
ReactDOM.render(
<Provider { ...stores }>
... |
ignite-base/Tests/Components/AlertMessageTest.js | lukabers/ignite | // https://github.com/airbnb/enzyme/blob/master/docs/api/shallow.md
import test from 'ava'
import React from 'react'
import { Text } from 'react-native'
import Icon from 'react-native-vector-icons/Ionicons'
import AlertMessage from '../../App/Components/AlertMessage'
import { shallow } from 'enzyme'
// Basic wrapper
c... |
ide/static/js/login.js | Cloud-CV/IDE | import React from 'react';
class Login extends React.Component {
constructor(props) {
super(props);
this.state = {
isOpenLoginPanel: false
}
this.tryLogin = this.tryLogin.bind(this);
this.logoutUser = this.logoutUser.bind(this);
}
componentWillMount() {
this.setState({ loginState: f... |
app/components/Initial/Initial.js | zhrkian/SolarDataApp | // @flow
import React, { Component } from 'react';
import { Link } from 'react-router';
import s from './Initial.css';
export default class Initial extends Component {
static contextTypes = {
router: React.PropTypes.object.isRequired
}
componentWillMount() {
const { router } = this.context
setTime... |
src/Parser/Core/Modules/Items/Legion/AntorusTheBurningThrone/GorshalachsLegacy.js | hasseboulen/WoWAnalyzer | import React from 'react';
import ITEMS from 'common/ITEMS';
import SPELLS from 'common/SPELLS';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import ItemDamageDone from 'Main/ItemDamageDone';
/**
* Gorshalach's Legacy -
* Equip: Your melee attacks have a chan... |
src/components/PageLoading.js | neontribe/gbptm | import React from 'react';
import PageLayout from './PageLayout';
import Box from './Box';
import Spacer from './Spacer';
import Text from './Text';
import Logo from './Logo';
const PageLoading = () => (
<PageLayout>
<Box
role="alert"
aria-live="assertive"
display="flex"
flexDirection="c... |
components/date_picker/CalendarDay.js | rubenmoya/react-toolbox | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import time from '../utils/time';
class Day extends Component {
static propTypes = {
day: PropTypes.number,
disabled: PropTypes.bool,
onClick: PropTypes.func,
selectedDate: PropTypes.ins... |
admin/client/App/App.js | benkroeger/keystone | /**
* The App component is the component that is rendered around all views, and
* contains common things like navigation, footer, etc.
*/
import React from 'react';
import { Container } from './elemental';
import { Link } from 'react-router';
import { css } from 'glamor';
import MobileNavigation from './components... |
src/TimeGridHeader.js | jquense/react-big-calendar | import PropTypes from 'prop-types'
import clsx from 'clsx'
import scrollbarSize from 'dom-helpers/scrollbarSize'
import React from 'react'
import DateContentRow from './DateContentRow'
import Header from './Header'
import ResourceHeader from './ResourceHeader'
import { notify } from './utils/helpers'
class TimeGridHe... |
src/setupTests.js | mdcarter/lunchfinder.io | import 'raf/polyfill';
import React from 'react';
import { configure } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import PlacesAutocomplete, { geocodeByAddress, getLatLng } from 'react-places-autocomplete';
import GoogleMapReact from 'google-map-react';
configure({ adapter: new Adapter() });
jest.m... |
src/components/GradientBuilder/GradientBuilder.js | iurii-kyrylenko/react-gradient | import React from 'react'
import PropTypes from 'prop-types'
import ColorStopsHolder from './ColorStopsHolder'
import Palette from './Palette'
import ColorPicker from './ColorPicker'
const HALF_STOP_WIDTH = 5
const toState = (palette) => ({
palette: palette.map((c, i) => ({ id: i + 1, ...c })),
activeId: 1,
po... |
node_modules/react-router/es6/Route.js | rakshitmidha/Weather_App_React | import React from 'react';
import invariant from 'invariant';
import { createRouteFromReactElement } from './RouteUtils';
import { component, components } from './InternalPropTypes';
var _React$PropTypes = React.PropTypes;
var string = _React$PropTypes.string;
var func = _React$PropTypes.func;
/**
* A <Route> is use... |
packages/wix-style-react/src/Typography/test/HeadingClassesExample.js | wix/wix-style-react | import React from 'react';
import typography from '..';
import classNames from 'classnames';
import styles from '../docs/styles.scss';
function HeadingTable(props = {}) {
return (
<table className={styles.table}>
<thead>
<tr>
<th>Heading</th>
<th>Result {props.light && '(light)'... |
20161201/RN-test/index.ios.js | fengnovo/react-native | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
// import React, { Component } from 'react';
// import {
// AppRegistry,
// StyleSheet,
// Text,
// View
// } from 'react-native';
// export default class AwesomeProject extends Component {
// render() {
// return (
... |
Realization/frontend/czechidm-core/src/content/identity/Audit.js | bcvsolutions/CzechIdMng | import React from 'react';
import Helmet from 'react-helmet';
import { connect } from 'react-redux';
//
import * as Basic from '../../components/basic';
import EntityAuditTable from '../audit/EntityAuditTable';
import SearchParameters from '../../domain/SearchParameters';
import { IdentityManager } from '../../redux/da... |
lib/web3/view.js | 0mkara/etheratom | 'use babel'
// Copyright 2018 Etheratom Authors
// This file is part of Etheratom.
// Etheratom is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any la... |
src/components/obligee/ObligeeTable3.js | axmand/react-webpack-redux | import React, { Component } from 'react';
import InputCell from './InputCell';
import SelectCell from './SelectCell';
import DateInputCell from './DateInputCell'
class ObligeeTable3 extends Component {
render() {
//用于封装宗地基本信息表第3页
var table=(
<table className="mytable">
<tbody >
<tr>
<td... |
assets/javascripts/kitten/components/graphics/icons/typology-tag-icon/index.js | KissKissBankBank/kitten | import React from 'react'
import PropTypes from 'prop-types'
export const TypologyTagIcon = ({ color, title, ...props }) => (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 10.5 10.5"
fill={color}
{...props}
>
{title && <title>{title}</title>}
<path d="M.6 7.8l2.1 2.1c.8.8 2 .8 2.8 0L... |
src/layouts/index.js | onchain-asia/onchain-asia.github.io | import React from 'react'
import Link from 'gatsby-link'
import { Container } from 'react-responsive-grid'
import { rhythm, scale } from '../utils/typography'
class Template extends React.Component {
render() {
const { location, children } = this.props
let header
let rootPath = `/`
if (typeof __PRE... |
docs/app/Examples/elements/Input/Variations/InputExampleIcon.js | koenvg/Semantic-UI-React | import React from 'react'
import { Input } from 'semantic-ui-react'
const InputExampleIcon = () => (
<Input icon='search' placeholder='Search...' />
)
export default InputExampleIcon
|
src/components/Filters.js | vaibhavb/water-logger | import React from 'react';
export default class Filters extends React.Component {
static propTypes = {
authors: React.PropTypes.array.isRequired,
setAuthor: React.PropTypes.func.isRequired,
order: React.PropTypes.string.isRequired,
setOrder: React.PropTypes.func.isRequired
}
render() {
retu... |
examples/simple-router/src/components/Topic.js | mirrorjs/mirror | import React from 'react'
import {actions} from 'mirrorx'
const Topic = ({topic}) => (
<div>
<h3>{topic ? topic : 'Topic not found'}</h3>
<button onClick={() => actions.routing.push('/topics')}>Back</button>
</div>
)
export default Topic
|
example/src/App.js | jedirandy/elm-react | import React from 'react';
import { inject } from '../../src';
import { Counter } from './Counter.elm';
export class App extends React.Component {
render() {
const { renderCounter } = this.props;
return (
<div className="new-counter">
<button onClick={() => this.props.in... |
pollard/components/FoundSong.js | spencerliechty/pollard | import React, { Component } from 'react';
import AddFoundSong from './AddFoundSong';
import mergeStyles from '../lib/mergeStyles';
export default class FoundSong extends Component {
render() {
let releaseImgStyle = mergeStyles({
width: '75',
height: '75'
});
/* TODO */
/* SHIT C... |
app/javascript/mastodon/features/ui/index.js | hyuki0000/mastodon | import React from 'react';
import NotificationsContainer from './containers/notifications_container';
import PropTypes from 'prop-types';
import LoadingBarContainer from './containers/loading_bar_container';
import TabsBar from './components/tabs_bar';
import ModalContainer from './containers/modal_container';
import {... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.