path stringlengths 5 304 | repo_name stringlengths 6 79 | content stringlengths 27 1.05M |
|---|---|---|
stories/github-issues.stories.js | joshwcomeau/react-flip-move | /* eslint-disable no-plusplus */
import React, { Component } from 'react';
import { storiesOf } from '@storybook/react';
import range from 'lodash/range';
import FlipMoveWrapper from './helpers/FlipMoveWrapper';
import FlipMove from '../src/FlipMove';
const sampleItems = [
{ name: 'Potent Potables' },
{ name: 'Th... |
src/helpers/connectData.js | Boelensman1/championpick2 | import React, { Component } from 'react';
import hoistStatics from 'hoist-non-react-statics';
/*
Note:
When this decorator is used, it MUST be the first (outermost) decorator.
Otherwise, we cannot find and call the fetchData and fetchDataDeffered methods.
*/
export default function connectData(fetchData, fe... |
src/BreadcrumbItem.js | mmartche/boilerplate-shop | import classNames from 'classnames';
import React from 'react';
import warning from 'warning';
import SafeAnchor from './SafeAnchor';
const BreadcrumbItem = React.createClass({
propTypes: {
/**
* If set to true, renders `span` instead of `a`
*/
active: React.PropTypes.bool,
/**
* HTML id ... |
force_dir/node_modules/react-bootstrap/es/Accordion.js | wolfiex/VisACC | import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React from 'react';
import PanelGroup from '... |
packages/shared/forks/object-assign.umd.js | flarnie/react | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import React from 'react';
const ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
export d... |
frontend/src/Components/Error/ErrorBoundary.js | lidarr/Lidarr | import * as sentry from '@sentry/browser';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
class ErrorBoundary extends Component {
//
// Lifecycle
constructor(props, context) {
super(props, context);
this.state = {
error: null,
info: null
};
}
compone... |
client/src/index.js | yegor-sytnyk/contoso-express | import '../styles/app.css';
import React from 'react';
import {render} from 'react-dom';
import configureStore from './store/configureStore';
import {Provider} from 'react-redux';
import {Router} from 'react-router';
import {browserHistory} from 'react-router';
import routes from './routes';
import {loadDepartments} f... |
test/Parallax.spec.js | react-materialize/react-materialize | import React from 'react';
// import { shallow, mount } from 'enzyme';
import Parallax from '../src/Parallax';
import mocker from './helper/new-mocker';
describe.skip('<Parallax />', () => {
test('should render a Parallax', () => {
expect(shallow(<Parallax />)).toMatchSnapshot();
});
describe('initialises',... |
src/components/DataEntry/Figure/components/Figure.js | Aus0049/react-component | /**
* Created by Aus on 2017/7/6.
*/
import React from 'react'
import classNames from 'classnames'
import '../style/figure.scss'
// Figure就是每个图片的容器 以及实现预览的容器
class Figure extends React.Component {
constructor(props) {
super(props);
this.state = {};
this.handlePreview = this.handlePreview.... |
src/svg-icons/file/folder.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let FileFolder = (props) => (
<SvgIcon {...props}>
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/>
</SvgIcon>
);
FileFolder = pure(FileFolder);
FileFolder.d... |
src/svg-icons/action/feedback.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFeedback = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"/>
</SvgIcon>
);
ActionFeedback = pure(Acti... |
src/pages/uses.js | Oluwasetemi/Oluwasetemi.github.io | import Bio from 'components/Bio'
import SEO from 'components/seo'
import React from 'react'
import styled from 'styled-components'
const AboutPageStyles = styled.div`
color: var(--color);
`
function UsesPage() {
return (
<AboutPageStyles>
<SEO title="Uses" location />
<Bio footer />
<h2>Uses... |
admin/client/App/components/Navigation/Mobile/ListItem.js | matthewstyers/keystone | /**
* A list item of the mobile navigation
*/
import React from 'react';
import { Link } from 'react-router';
const MobileListItem = React.createClass({
displayName: 'MobileListItem',
propTypes: {
children: React.PropTypes.node.isRequired,
className: React.PropTypes.string,
href: React.PropTypes.string.isRe... |
submissions/jas-chen/src/component/dashboard.js | sensduo/flux-challenge | import React from 'react';
import { dom } from 'react-reactive-class';
import { Observable, Subject } from 'rx';
import { TOTAL_SLOT_COUNT } from '../constants.js';
import { allEmpty, isMatchCurrentPlanet } from '../utils.js';
const { h1: H1, li: Li, button: Button } = dom;
function slots(state$) {
const elements ... |
src/components/Queue/__tests__/Queue-test.js | elurye/ReactJestBoiler | jest.dontMock('../Queue');
describe('Queue', function() {
var React = require('react/addons');
var TestUtils = React.addons.TestUtils;
var ToDoApp = require('../Queue');
var Component = TestUtils.renderIntoDocument(React.createElement(ToDoApp));
var state = {
queue: [
{ value: 'Be awesome', done:... |
src/Input/InputLabel.js | dsslimshaddy/material-ui | // @flow
import React from 'react';
import type { Element } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';
import { FormLabel } from '../Form';
export const styles = (theme: Object) => ({
root: {
transformOrigin: 'top left',
... |
examples/basic/components/Bar.js | reactjs/react-router-redux | import React from 'react'
export default function Bar() {
return <div>And I am Bar!</div>
}
|
src/components/page/index.js | octoblu/app-store | import React, { PropTypes } from 'react';
import classNames from 'classnames';
import './index.css';
import PageHeader from './header'
import PageTitle from './title'
import PageActions from './actions'
const Page = ({ children, className }) => {
const componentClass = classNames('Page', className);
return <div ... |
test/fixtures/webpack-message-formatting/src/AppLintError.js | GreenGremlin/create-react-app | import React, { Component } from 'react';
function foo() {
const a = b;
}
class App extends Component {
render() {
return <div />;
}
}
export default App;
|
spec/javascripts/jsx/external_apps/components/ConfigureExternalToolButtonSpec.js | djbender/canvas-lms | /*
* Copyright (C) 2017 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distribut... |
app/scripts/utils/delayed-show.js | hustbill/network-verification-ui | import React from 'react';
export default class DelayedShow extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {
show: false
};
}
componentWillMount() {
if (this.props.show) {
this.scheduleShow();
}
}
componentWillUnmount() {
thi... |
ajax/libs/can.js/4.0.0-pre.5/can.js | holtkamp/cdnjs | /*[global-shim-start]*/
(function(exports, global, doEval) {
// jshint ignore:line
var origDefine = global.define;
var get = function(name) {
var parts = name.split("."),
cur = global,
i;
for (i = 0; i < parts.length; i++) {
if (!cur) {
break;
}
cur = cur[parts[i]];
}
return cur;
};
var... |
Libraries/Lists/MetroListView.js | hoastoolshop/react-native | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @providesModule MetroListView
* @flow
* @format
*/
'use strict';
const ListView = require('ListView');
const React = require('React... |
1_TEMPLATE/madmin/themeforest-7996710-madmin-responsive-multistyle-admin-template/code/style3/vendors/iCheck/demo/js/jquery.js | amir-samad-hanga/event | /*!
* jQuery v1.8.3 jquery.com | jquery.org/license
*/
(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:... |
ajax/libs/oboe.js/1.10.3/oboe-browser.js | jonathantneal/cdnjs | // This file is the concatenation of many js files.
// See https://github.com/jimhigson/oboe.js for the raw source
(function (window, Object, Array, Error, undefined ) {
// v1.10.2-2-g5f426d0
/*
Copyright (c) 2013, Jim Higson
All rights reserved.
Redistribution and use in source and binary forms, with or without
... |
src/mention/test-pages/async.js | catalinmiron/react-tinymce-mention | import React from 'react';
import axios from 'axios';
import Editor from './components/Editor';
import Mention from '../Mention';
import CustomList from './components/CustomList';
React.render(
<div>
<Editor />
<Mention
showDebugger={true}
delimiter={'@'}
asyncDataSource={(query) => {
... |
src/DonutChart.js | MrCheater/habrahabr-universal-component | import React from 'react';
export default class DonutChart extends React.Component {
render() {
const { radius, holeSize, text, value, total, backgroundColor, valueColor } = this.props;
const r = radius * (1 - (1 - holeSize)/2);
const width = radius * (1 - holeSize);
const circumfer... |
src/index.js | niyue/react-github | import React from 'react';
import App from './App';
React.render(<App />, document.getElementById('root'));
|
react/exercises/part_02/src/Contact.js | jsperts/workshop_unterlagen | import React from 'react';
function ContactDetails({ email, type }) {
return (
<div className="row">
<div className="col-xs-6">Email: {email}</div>
<div className="col-xs-6">Type: {type}</div>
</div>
);
}
function ContactControls() {
return (
<div>
<div className="row">
<di... |
src/components/MultiSelect/MultiSelect.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 cx from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import Downshift from 'downshift';
import isEqual... |
ajax/libs/react-slick/0.3.0/react-slick.min.js | chrisdavies/cdnjs | var Slider=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){var r=n(2),i=n(3),o=n(7),s=n(5),a=(n(4),n(6)),u=r.createClass(... |
src/client/index.js | aarmour/my-denver | import 'babel-polyfill';
import mapboxgl from 'mapbox-gl';
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import configureStore from '../common/store/configureStore';
import routes from '../common/routes';
const mapbox = window.__MAPBOX__;
mapboxgl.accessToken = ... |
node_modules/reactify/node_modules/react-tools/src/core/__tests__/ReactMultiChildText-test.js | SlateRobotics/slate-website | /**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @emails react-co... |
src/DateTimePickerYears.js | Vydia/react-bootstrap-datetimepicker | import React, { Component, PropTypes } from "react";
import classnames from "classnames";
export default class DateTimePickerYears extends Component {
static propTypes = {
subtractDecade: PropTypes.func.isRequired,
addDecade: PropTypes.func.isRequired,
viewDate: PropTypes.object.isRequired,
selectedD... |
lib/containers/github-tab-container.js | atom/github | import React from 'react';
import PropTypes from 'prop-types';
import yubikiri from 'yubikiri';
import {Disposable} from 'event-kit';
import {GithubLoginModelPropType, RefHolderPropType} from '../prop-types';
import OperationStateObserver, {PUSH, PULL, FETCH} from '../models/operation-state-observer';
import Refresher... |
generators/react/template/index.js | ui-storybook/sb-cli | import React from 'react';
import ReactDOM from 'react-dom';
import 'sb-react-helper';
// Hot reload support
if (module.hot) {
module.hot.accept();
window.parent.sb && window.parent.sb.contact();
}
// Remove this demo component
import { Welcome } from './welcome/welcome';
// Import your app here and SB will... |
client/src/components/Auth.js | xmas-bunch/amigo-invisible | import React, { Component } from 'react';
class Auth extends Component {
setUser(e) {
e.preventDefault();
this.props.setUser(this.refs.username.value);
}
login(e) {
e.preventDefault();
this.props.login({
password: this.refs.password.value
})
}
... |
src/client.js | jhlav/mpn-web-app | /**
* 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 'whatwg-fetch';
import React from 'react';
impor... |
js/vendor/jquery-1.11.2.min.js | chadbaudoin/vimeo-gallery-bootstrap-carousel | /*! jQuery v1.11.2 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof wind... |
packages/containers/src/Slider/Slider.stories.js | Talend/ui | import React from 'react';
import { Map } from 'immutable';
import Slider from '.';
const icons = [
'talend-smiley-angry',
'talend-smiley-unhappy',
'talend-smiley-neutral',
'talend-smiley-satisfied',
'talend-smiley-enthusiast',
];
const delimiterStyle = {
paddingTop: '25px',
paddingBottom: '25px',
borderBott... |
docs/app/Examples/collections/Grid/ResponsiveVariations/GridDoublingExample.js | jamiehill/stardust | import React from 'react'
import { Image, Grid } from 'stardust'
const { Column } = Grid
const image = <Image src='http://semantic-ui.com/images/wireframe/image.png' />
const GridDoublingExample = () => (
<Grid doubling columns={5}>
<Column>{image}</Column>
<Column>{image}</Column>
<Column>{image}</Colu... |
test/lib/backbone.js | matghaleb/Backbone-relational | // Backbone.js 1.2.1
// (c) 2010-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://backbonejs.org
(function(factory) {
// Establish the root object, `window` (`se... |
.storybook/config.js | Bandwidth/shared-components | import { configure } from '@storybook/react';
import './global.css';
import '../fonts/fonts.css';
import { addDecorator } from '@storybook/react';
import React from 'react';
import BandwidthProvider from 'components/BandwidthProvider';
import { Router } from 'react-router';
import { createMemoryHistory } from 'history'... |
server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangesList-test.js | lbndev/sonarqube | /*
* SonarQube
* Copyright (C) 2009-2017 SonarSource SA
* mailto:info 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, o... |
packages/material-ui-icons/src/NotificationsOffRounded.js | Kagami/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fill="none" d="M0 0h24v24H0V0z" /><g><path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zM18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68c-.24.06-.47.15-.69.23L18... |
test/components/Test.js | loggur/react-redux-provide-history | import React from 'react';
import PropTypes from 'prop-types';
import Title from './Title';
const Test = () => (
<Title />
);
export default Test;
|
public/assets/plugins/bootstrap3-editable/js/bootstrap-editable.js | AEGEE/oms-neo-core | /*! X-editable - v1.5.1
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
* http://github.com/vitalets/x-editable
* Copyright (c) 2013 Vitaliy Potapov; Licensed MIT */
/**
Form with single input element, two buttons and two states: normal/loading.
Applied as jQuery method to DIV tag (not to form tag!... |
packages/material-ui-icons/src/AirplanemodeActive.js | allanalexandre/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z" /><path fill="none" d="M0 0h24v24H0z" /></React.Fragment>
, 'Air... |
src/svg-icons/device/network-cell.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceNetworkCell = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M2 22h20V2z"/><path d="M17 7L2 22h15z"/>
</SvgIcon>
);
DeviceNetworkCell = pure(DeviceNetworkCell);
DeviceNetworkCell.displayNam... |
packages/mui-icons-material/lib/esm/AgricultureRounded.js | oliviertassinari/material-ui | import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon([/*#__PURE__*/_jsx("path", {
d: "M19.5 11.97c.93 0 1.78.28 2.5.76V7.97c0-1.1-.9-2-2-2h-6.29l-1.06-1.06 1.06-1.06c.2-.2.2-.51 0-.71s-.51-.2-.71 0l-2.83 2.83c-.2.2-.2.51 0 .71.2.2.51.2.71 0l1... |
src/styles/withTheme.js | xotahal/react-native-material-ui | import React from 'react';
import hoistNonReactStatics from 'hoist-non-react-statics';
import ThemeContext from './themeContext';
// This function takes a component...
const withTheme = WrappedComponent => {
// ...and returns another component...
class ThemedComponent extends React.PureComponent {
render() {
... |
src/components/topic/description/index.js | nickhsine/twreporter-react | import PropTypes from 'prop-types'
import React from 'react'
import renderTopicContent, { Paragraph } from './render-content'
import styled from 'styled-components'
const Container = styled.div`
position: relative;
width: 100%;
padding-top: 72px;
padding-bottom: 40px;
`
const Section = styled.div`
position:... |
src/components/nav/footer.js | ChrisRast/Le-Taguenet | import React from 'react';
import * as ui from 'semantic-ui-react';
export default function Footer(props) {
return (
<ui.Container
textAlign="center"
>
<ui.Divider />
<ui.List
horizontal
>
<ui.List.Item
>
<ui.List.Icon
name="copyright"
style={{
marginRight: '.5rem',... |
src/svg-icons/image/view-comfy.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageViewComfy = (props) => (
<SvgIcon {...props}>
<path d="M3 9h4V5H3v4zm0 5h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zM8 9h4V5H8v4zm5-4v4h4V5h-4zm5 9h4v-4h-4v4zM3 19h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zm5 0h4v-... |
packages/node_modules/@webex/react-component-spark-logo/src/index.js | adamweeks/react-ciscospark-1 | import React from 'react';
import classNames from 'classnames';
import styles from './styles.css';
export default function SparkLogo() {
return (
<div className={classNames('webex-spark-logo', styles.logo)} />
);
}
|
packages/material-ui-icons/src/ExpandMoreRounded.js | Kagami/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fill="none" d="M24 24H0V0h24v24z" opacity=".87" /><path d="M15.88 9.29L12 13.17 8.12 9.29a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39... |
packages/material-ui-icons/src/DeveloperMode.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let DeveloperMode = props =>
<SvgIcon {...props}>
<path d="M7 5h10v2h2V3c0-1.1-.9-1.99-2-1.99L7 1c-1.1 0-2 .9-2 2v4h2V5zm8.41 11.59L20 12l-4.59-4.59L14 8.83 17.17 12 14 15.17l1.41 1.42zM10 15.17L6.83 12 10 8.... |
packages/plutarch/tpls/redux-project/src/routes/router.prod.js | Alfred-sg/plutarch | import React from 'react'
import PropTypes from 'prop-types'
import { Provider } from 'react-redux'
import { Route, Redirect } from 'react-router-dom'
import App from './app'
import Demo from './demo'
const Root = ({ store }) => (
<Provider store={store}>
<App>
<Route path="/" render={() => (<Redirect to="... |
_tests_/index.js | joropeza/react-fullscreen-app-boilerplate | import React from 'react';
import reactDom from 'react-dom/server';
import { expect } from 'chai';
import dom from 'cheerio';
import componentToTest from '../src/your-code-goes-here/components/content/homePageContent';
const render = reactDom.renderToStaticMarkup;
describe('(sample functional component tests)', funct... |
ajax/libs/yui/3.10.2/event-custom-base/event-custom-base.js | masahirotanaka/cdnjs | YUI.add('event-custom-base', function (Y, NAME) {
/**
* Custom event engine, DOM event listener abstraction layer, synthetic DOM
* events.
* @module event-custom
*/
Y.Env.evt = {
handles: {},
plugins: {}
};
/**
* Custom event engine, DOM event listener abstraction layer, synthetic DOM
* events.
* @mo... |
client/containers/users/email-enrollment-form.js | ShannChiang/USzhejiang | import React from 'react';
import {useDeps} from 'react-simple-di';
import {composeAll, withTracker} from 'react-komposer-plus';
import EmailEnrollmentForm from '../../components/users/email-enrollment-form';
function composer({context}, onData) {
onData(null, {
loggingIn: context.Meteor.loggingIn(),
logge... |
src/components/file/download.js | abbr/ShowPreper | import React from 'react'
import { langs } from 'i18n/lang'
import _ from 'lodash'
module.exports = class Exporter extends React.Component {
render() {
let blob = new Blob([JSON.stringify(this.props.deck, null, 2)], {
type: 'application/json'
})
let blobURL = window.URL.createObjectURL(blob)
re... |
client/app/scripts/utils/metric-utils.js | kinvolk/scope | import { includes } from 'lodash';
import { scaleLog } from 'd3-scale';
import React from 'react';
import { formatMetricSvg } from './string-utils';
import { colors } from './color-utils';
export function getClipPathDefinition(clipId, height, radius) {
const barHeight = 1 - (2 * height); // in the interval [-1, 1]
... |
lib/index.js | NikBorn/Weatherly | import React from 'react';
import ReactDOM from 'react-dom';
import Weather from './Weather';
ReactDOM.render(<Weather/>, document.getElementById('application'));
|
definitions/npm/react-library-paginator_v2.x.x/flow_v0.25.x-v0.103.x/test_react-library-paginator_v2.x.x.js | flowtype/flow-typed | // @flow
import { describe, it } from 'flow-typed-test';
import React from 'react';
import PaginatorContainer from 'react-library-paginator';
describe('PaginatorContainer ', () => {
const handlePageChange = (page: number) => {};
it('should accept all props', () => {
<PaginatorContainer
totalItems={10}
... |
src/index.js | pawelgalazka/spaceroom | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
client/components/Box.js | yuanyusi/redux | import React from 'react';
const url = 'http://localhost:8080/api/goals';
class Box extends React.Component {
constructor(props){
super(props);
this.handleDelete = this.handleDelete.bind(this);
this.handleSuccesses = this.handleSuccesses.bind(this);
this.handleFailures = this.handleFailures.bind(this)... |
tests/components/LikeButton.spec.js | eugenrein/voteshirt | import React from 'react';
import { shallow } from 'enzyme';
import chai, { expect } from 'chai';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import Button from '../../src/components/Button';
import LikeButton from '../../src/components/LikeButton';
chai.should();
chai.use(sinonChai);
describe('<Li... |
src/components/Main.js | fernandojsg/aframe-inspector | /* global VERSION BUILD_TIMESTAMP COMMIT_HASH webFont */
require('../lib/vendor/ga');
const INSPECTOR = require('../lib/inspector.js');
import React from 'react';
import ReactDOM from 'react-dom';
THREE.ImageUtils.crossOrigin = '';
const Events = require('../lib/Events.js');
import ComponentsSidebar from './componen... |
src/containers/List/Page.js | LifeSourceUA/lifesource.ua | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { asyncConnect } from 'redux-connect';
import Helmet from 'react-helmet';
import * as Common from 'components/Common';
import Meta from './Meta';
@asyncConnect(
[],
({ browser }) => {
return { browser };
}
)
/* es... |
src/icons/LocalHotelIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class LocalHotelIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M14 26c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6zm24-12H22v14H6V10H2v30h4v-6h36v6h4V22c0-4.42... |
ajax/libs/survey-react/0.12.19/survey.react.min.js | dakshshah96/cdnjs | /*!
* surveyjs - Survey JavaScript library v0.12.19
* Copyright (c) 2015-2017 Devsoft Baltic OÜ - http://surveyjs.org/
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define... |
tests/unit/autoComplete/autoComplete.handleInputFocus.spec.js | Travix-International/travix-ui-kit | import React from 'react';
import { shallow } from 'enzyme';
import AutoComplete from '../../../components/autoComplete/autoComplete';
import AutoCompleteItem from '../../../components/autoComplete/autoCompleteItem';
describe('AutoComplete: handleInputFocus', () => {
it('should call selectInput and update state with... |
examples/js/column-filter/text-filter-with-default-value.js | prajapati-parth/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;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
products.push({
id: id,
... |
client/packages/core-dashboard-worona/src/dashboard/loading-dashboard-theme-worona/components/Footer/index.js | worona/worona-dashboard | /* eslint-disable max-len */
import React from 'react';
export const Footer = () => (
<svg width="133px" height="12px" viewBox="0 0 133 12" version="1.1">
<title>powered by worona</title>
<g id="logo---1.0" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
<g id="Artboard-2" transform="tran... |
src/Menus/PitchToolBar.js | kevinleclair1/pitch_fx_visualizer | import React from 'react';
import PropTypes from 'prop-types';
import { ToolbarGroup } from 'material-ui/Toolbar';
import Toggle from 'material-ui/Toggle';
import createContainer from '../containers/GenericContainer.js';
import { createStructuredSelector } from 'reselect';
import {
selectors as sceneSelectors,
... |
src/components/Advs/HomeContentRightAdv/HomeContentRightAdv.js | febobo/react-redux-start | import React, { Component } from 'react';
import GoogleAdv from '../../GoogleAdv'
import BaseConfig from '../../../BaseConfig';
import OfferWow from '../../OfferWow'
import { Tag } from 'antd'
import classes from './HomeContentRightAdv.scss'
export default class HomeContentRightAdv extends Component {
constructor(pr... |
src/components/Pagination/Pagination.js | colmdoyle/colmdoyle.github.io | // @flow strict
import React from 'react';
import classNames from 'classnames/bind';
import { Link } from 'gatsby';
import { PAGINATION } from '../../constants';
import styles from './Pagination.module.scss';
type Props = {
prevPagePath: string,
nextPagePath: string,
hasNextPage: boolean,
hasPrevPage: boolean
... |
src/svg-icons/action/list.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionList = (props) => (
<SvgIcon {...props}>
<path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"/>
</SvgIcon>
);
ActionList = pure(ActionList);
ActionList.displa... |
src/js/components/Pagination/stories/NumberMiddlePages.js | grommet/grommet | import React from 'react';
import { Box, Pagination, Text } from 'grommet';
export const NumberMiddlePages = () => (
// Uncomment <Grommet> lines when using outside of storybook
// <Grommet theme={...}>
<Box pad="small" gap="medium">
<Box>
<Text>numberMiddlePages = 4 (number of pages in the middle)</T... |
lib/svg-icons/device/bluetooth-connected.js | bdsabian/material-ui-old | 'use strict';
var React = require('react');
var PureRenderMixin = require('react-addons-pure-render-mixin');
var SvgIcon = require('../../svg-icon');
var DeviceBluetoothConnected = React.createClass({
displayName: 'DeviceBluetoothConnected',
mixins: [PureRenderMixin],
render: function render() {
return Re... |
src/modules/editor/components/popovers/formattingTooltip/FormattingTooltipLink/FormattingTooltipLink.js | CtrHellenicStudies/Commentary | import React from 'react'
import autoBind from 'react-autobind';
import { connect } from 'react-redux';
// redux
import editorActions from '../../../../actions';
// component
import FormattingTooltipItemButton from '../FormattingTooltipItemButton';
import { MdInsertLink } from "react-icons/md";
class FormattingTool... |
sites/all/modules/jquery_update/replace/jquery/1.7/jquery.js | drewzboto/revere | /*!
* jQuery JavaScript Library v1.7.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
... |
app/views/FrontPage/Visualizations/Statistics/Statistics.js | RcKeller/STF-Refresh | import React from 'react'
import PropTypes from 'prop-types'
import { compose } from 'redux'
import { connect } from 'react-redux'
import { connectRequest } from 'redux-query'
import api from '../../../../services'
import { Loading } from '../../../../components'
import ProposalStatusByQuarter from './Propos... |
app/javascript/flavours/glitch/components/display_name.js | im-in-space/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { autoPlayGif } from 'flavours/glitch/util/initial_state';
export default class DisplayName extends React.PureComponent {
static propTypes = {
ac... |
pages/board.js | passify/samlify-sp | /* This page is a protected page */
import React, { Component } from 'react';
import Router from 'next/router';
import Link from 'next/link';
import markProtected from '../components/protected';
import { Row, Col } from 'antd';
import { Input } from 'antd';
import { Button } from 'antd';
import { Radio } from 'antd';... |
cm19/ReactJS/your-first-react-app-exercises-master/exercise-7/App.js | Brandon-J-Campbell/codemash | import React, { Component } from 'react';
import './App.css';
import Exercise from './Exercise';
class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<h1 className="App-title">Exercise 7</h1>
<h2 className="sub-title">Convert a ... |
ajax/libs/tinymce/3.5.8/plugins/legacyoutput/editor_plugin_src.js | maruilian11/cdnjs | /**
* editor_plugin_src.js
*
* Copyright 2009, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://tinymce.moxiecode.com/license
* Contributing: http://tinymce.moxiecode.com/contributing
*
* This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u... |
src/components/view-flag/index.js | jl-/bronote | /**
* disabled
* once: false; true to trigger `handleAppear` on appeared & scrolling
* handleAppear(currentStatus, previousStatus, flagDOM)
*
* @TODO add offset support
*
*/
import React, { Component } from 'react';
import cx from 'classnames';
import { throttle } from '../../../utils';
import './style.scss';
c... |
frontend/src/index.js | miurahr/seahub | // Import React!
import React from 'react';
import ReactDOM from 'react-dom';
import MarkdownEditor from './markdown-editor';
import { I18nextProvider } from 'react-i18next';
import i18n from './i18n-seafile-editor';
import './index.css';
ReactDOM.render(
<I18nextProvider i18n={ i18n } >
<MarkdownEditor />
</... |
definitions/npm/react-jss_v6.1.x/test_react-jss_v6.1.x.js | hansonw/flow-typed | // @flow
import React from 'react';
import injectSheet, { create } from 'react-jss';
import type { Classes, Sheet } from 'react-jss';
const styles = {
root: {
backgroundColor: 'red',
},
[`@media (min-width: ${10}px)`]: {
root: {
width: 200
}
}
};
type Styles = typeof styles;
type Props = {... |
src/components/about/About.js | andgiu/lin.bert | import React, { Component } from 'react';
import * as Config from '../actions/Config';
class About extends Component {
render(){
let about = Config.getAbout();
return (
<div id="about">
<img id="header" src={Config.getImageFromCache("about").src} />
<div id="content">
<h1><s... |
__tests__/components/button.js | builderscon/nanp | /* eslint-env jest */
import React from 'react'
import Button from '../../src/components/button'
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer'
it('renders correctly', () => {
const tree = renderer.create(
<Button
title='button sample'
onPress... |
app/main/GDSearch.js | shaojianye/GD | /**
* Created by yeshaojian on 17/3/14.
*/
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
TouchableOpacity,
Image,
ListView,
Dimensions,
Navigator,
ActivityIndicator,
Modal,
AsyncStorage,
TextInput,
DeviceEventEmitter,
} from 'react-nati... |
examples/with-custom-babel-config/pages/index.js | dizlexik/next.js | import React from 'react'
export default class MyLuckNo extends React.Component {
constructor (...args) {
super(...args)
this.state = { randomNo: null }
}
componentDidMount () {
this.recalculate()
}
recalculate () {
this.setState({
randomNo: Math.ceil(Math.random() * 100)
})
}
... |
stories/App.js | fateseal/react-mtg-playtester | import React, { Component } from 'react';
import Playtester from '../src';
import { Provider } from 'react-redux';
import { createStore, combineReducers, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import { composeWithDevTools } from 'redux-devtools-extension';
import '../src/css/sandbox.css';
imp... |
app/components/AboutInstaSection/index.js | yagneshmodh/personalApplication | import React, {
PropTypes,
} from 'react';
import { CardMedia } from 'material-ui/Card';
const InstaSection = ({ instaImages }) => {
return (
<div>
{
instaImages.map((img, index) =>
<CardMedia
key={index}
style={{ height: img.height, width: img.width }}
... |
src/Frontend/test/components/form/LoadableButtonBarSpec.js | Sententiaregum/Sententiaregum | /*
* This file is part of the Sententiaregum project.
*
* (c) Maximilian Bosch <maximilian@mbosch.me>
* (c) Ben Bieler <ben@benbieler.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
'use strict';
import LoadableButtonBar fr... |
ajax/libs/material-ui/4.9.3/esm/Tooltip/Tooltip.js | cdnjs/cdnjs | import _extends from "@babel/runtime/helpers/esm/extends";
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import React from 'react';... |
themes/genius/Genius 2.3.1 Bootstrap 4/React_Full_Project/src/components/Header/Header.js | davidchristie/kaenga-housing-calculator | import React, { Component } from 'react';
import { Dropdown, DropdownMenu, DropdownItem } from 'reactstrap';
class Header extends Component {
constructor(props) {
super(props);
this.toggle = this.toggle.bind(this);
this.state = {
dropdownOpen: false
};
}
toggle() {
this.setState({
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.