path stringlengths 5 304 | repo_name stringlengths 6 79 | content stringlengths 27 1.05M |
|---|---|---|
react-router-tutorial/lessons/14-whats-next/modules/Repos.js | zerotung/practices-and-notes | import React from 'react'
import NavLink from './NavLink'
export default React.createClass({
contextTypes: {
router: React.PropTypes.object
},
handleSubmit(event) {
event.preventDefault()
const userName = event.target.elements[0].value
const repo = event.target.elements[1].value
const path =... |
ajax/libs/react-native-web/0.14.3/exports/RefreshControl/index.js | cdnjs/cdnjs | function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
/**
* Copy... |
src/svg-icons/av/games.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvGames = (props) => (
<SvgIcon {...props}>
<path d="M15 7.5V2H9v5.5l3 3 3-3zM7.5 9H2v6h5.5l3-3-3-3zM9 16.5V22h6v-5.5l-3-3-3 3zM16.5 9l-3 3 3 3H22V9h-5.5z"/>
</SvgIcon>
);
AvGames = pure(AvGames);
AvGames.dis... |
src/__tests__/ArrayCapture-test.js | networknt/react-schema-form | import React from 'react'
import { render, configure } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import utils from '../utils'
import SchemaForm from '../SchemaForm'
configure({ adapter: new Adapter() })
jest.dontMock('../ComposedComponent')
jest.dontMock('../utils')
jest.dontMock('lodash')
function... |
modules/components/Redirect.js | chloeandisabel/react-router | var React = require('react');
var Configuration = require('../Configuration');
var PropTypes = require('../PropTypes');
/**
* A <Redirect> component is a special kind of <Route> that always
* redirects to another route when it matches.
*/
var Redirect = React.createClass({
displayName: 'Redirect',
mixins: [ C... |
app/javascript/mastodon/features/compose/components/privacy_dropdown.js | verniy6462/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
import IconButton from '../../../components/icon_button';
const messages = defineMessages({
public_short: { id: 'privacy.public.short', defaultMessage: 'Public' },
public_long: { id: 'privacy.pub... |
client/js/components/Layout/Footer.js | akamaurizio/new-year-resos | import React from "react";
export default class Footer extends React.Component {
render(){
return(
<footer>
<div className="container">
<p>© 2016 Company, Inc.</p>
</div>
</footer>
);
}
} |
examples/with-reason-relay/pages/_app.js | zeit/next.js | import React from 'react'
import App from 'next/app'
const isStatusCodeOk = (res) => {
try {
return `${res.statusCode}`.startsWith('2')
} catch (e) {
return true
}
}
class MyApp extends App {
static async getInitialProps({ Component, ctx }) {
let pageProps = {}
if (Component.getInitialProps) ... |
es2015plus/react/src/components/Input/index.js | lshig/forms-challenge | import React from 'react';
import PropTypes from 'prop-types';
export default function Input({
className,
label,
name,
onClick,
type,
value
}) {
return (
<label className={`input ${className}`}>
{label}
<input name={name} onClick={onClick} type={type} value={value} />
<div className... |
ajax/libs/jquery/1.4.2/jquery.js | mihneasim/cdnjs | /*!
* jQuery JavaScript Library v1.4.2
* http://jquery.com/
*
* Copyright 2010, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2010, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
... |
client/components/paper-input/index.js | nebulae-io/coteries | ////////////
/// <PaperInput type="" label="" hint="" validator=>
//////////////////////
import React, { Component } from 'react';
import cns from 'classnames';
import styles from './style.scss';
const VALIDATE_TIMEOUT = 300;
const STATUS = {
PRISTINE: 1,
BLANK: 2,
DIRTY: 4,
PENDING: 8,
VALID: 16,
INVALID... |
ajax/libs/ember-data.js/1.0.0-beta.16/ember-data.js | froala/cdnjs | (function() {
"use strict";
var ember$data$lib$system$adapter$$get = Ember.get;
var ember$data$lib$system$adapter$$errorProps = [
'description',
'fileName',
'lineNumber',
'message',
'name',
'number',
'stack'
];
/**
A `DS.InvalidError` is used by an ... |
ajax/libs/forerunnerdb/1.3.356/fdb-core.min.js | boneskull/cdnjs | !function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.ex... |
ajax/libs/forerunnerdb/1.3.924/fdb-core+views.min.js | him2him2/cdnjs | !function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.ex... |
examples/async/index.js | yz89/redux | import 'babel-core/polyfill';
import React from 'react';
import Root from './containers/Root';
React.render(
<Root />,
document.getElementById('root')
);
|
test/HotKeys/focus-only/KeyMappings.spec.js | Chrisui/react-hotkeys | import React from 'react';
import {mount} from 'enzyme';
import {expect} from 'chai';
import sinon from 'sinon';
import FocusableElement from '../../support/FocusableElement';
import {HotKeys} from '../../../src/';
import hasKeyPressEvent from '../../../src/helpers/resolving-handlers/hasKeyPressEvent';
const keyMapp... |
src/pages/home.js | xuqingkuang/react-reflux-boilerplate | import React from 'react';
import Reflux from 'reflux'
import TitleStore from '../stores/titles';
import TitleActions from '../actions/titles';
export default React.createClass({
mixins: [
Reflux.connect(TitleStore)
],
componentDidMount() {
this.interval = setInterval(() => {TitleActions.nextTitle(this.... |
src/screens/NewWorks/UserNewWorks.js | alphasp/pxview | import React, { Component } from 'react';
import { View, StyleSheet } from 'react-native';
import NewIllusts from './NewIllusts';
import NewMangas from './NewMangas';
import NewNovels from './NewNovels';
import { connectLocalization } from '../../components/Localization';
import Pills from '../../components/Pills';
imp... |
src/components/AppNav.js | nicholasaiello/reactjs-squawk-some | import React, { Component } from 'react';
import {
toggleNavDrawer,
updateNavQuery,
updateNavFilter, } from '../actions/nav';
import {
getNewTwitterStream
} from '../actions/streams';
class AppNav extends Component {
handleNavBtnClick = (e) => {
e.stopPropagation();
this.props.dispatch(toggleNavDra... |
ajax/libs/ember-data.js/1.13.8/ember-data.prod.js | aashish24/cdnjs | (function() {
"use strict";
var ember$lib$main$$default = Ember;
var ember$data$lib$system$object$polyfills$$keysFunc = Object.keys || Ember.keys;
var ember$data$lib$system$object$polyfills$$create = Object.create || Ember.create;
var ember$data$lib$adapters$errors$$EmberError = Ember.Error;
va... |
ajax/libs/babel-core/5.6.10/browser-polyfill.js | hare1039/cdnjs | (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex... |
files/rxjs/3.1.0/rx.all.js | Metrakit/jsdelivr | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
;(function (undefined) {
var objectTypes = {
'function': true,
'object': true
};
var
freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && expo... |
src/about/components/ProfilePicture.js | elailai94/elailai94.github.io | import React, { Component } from 'react';
import { Image } from 'semantic-ui-react';
import PropTypes from 'prop-types';
class ProfilePicture extends Component {
render() {
const { src } = this.props;
return (
<Image
alt={'Profile Picture'}
centered
shape={'circular'}
s... |
src/client/components/admin/index.js | thamht4190/elearning | import React, { Component } from 'react';
import { BrowserRouter, Switch, Route } from 'react-router-dom';
import CourseListPage from './course/list';
class Admin extends Component {
render() {
return (
<BrowserRouter>
<Switch>
<Route path="/course/list" component={... |
src/App.spec.js | afrievalt/my-resume-react | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import { shallow } from 'enzyme';
it('renders without crashing', () => {
const div = document.createElement('div');
ReactDOM.render(<App />, div);
const wrapper = shallow(<App />);
});
|
src/components/InputBar.js | wrleskovec/thoughtcrime | import React from 'react';
import wurl from 'wurl';
export default class InputBar extends React.Component {
constructor(props) {
super(props);
this.state = {
type: 'Domain',
action: 'limit',
error: ''
};
this.onSubmitPattern = this.onSubmitPattern.bind(this);
this.toggleACL = th... |
app/addons/activetasks/components/tableheader.js | apache/couchdb-fauxton | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed un... |
fixtures/kitchensink/template/src/features/syntax/Promises.js | d3ce1t/create-react-app | /**
* 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.
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
function load() {
return Promise.resolve([
{ id: 1,... |
packages/react-pdf/specs/linkSpec.js | elpic/react-pdf | import React from 'react';
import { Document, Page, Text, Link } from '../src';
import MockDate from 'mockdate';
import render from './testRenderer';
const src = 'http://www.github.com/diegomura/react-pdf';
describe('<Link />', () => {
beforeEach(() => {
MockDate.set(1434319925275);
});
const matchSnapshot... |
public/jspm_packages/npm/react@0.13.3/dist/react.js | nayashooter/ES6_React-Bootstrap | /* */
"format cjs";
(function(process) {
(function(f) {
if (typeof exports === "object" && typeof module !== "undefined") {
module.exports = f();
} else if (typeof define === "function" && define.amd) {
define([], f);
} else {
var g;
if (typeof window !== "undefined") {
g ... |
examples/parameterized-routing/pages/blog.js | arunoda/next.js | import React from 'react'
export default class extends React.Component {
static getInitialProps ({ query: { id } }) {
return { id }
}
render () {
return <div>
<h1>My {this.props.id} blog post</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tem... |
react/react/my-app/src/index.js | chilejiang1024/codes | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
class Square extends React.Component {
render() {
return (
<button className="square" onClick={() => this.props.onClick()}>
{this.props.value}
</button>
);
}
}
class Board extends React.Component {
con... |
test/helpers/shallowRenderHelper.js | duangangqiang/react-gallery | /**
* Function to get the shallow output for a given component
* As we are using phantom.js, we also need to include the fn.proto.bind shim!
*
* @see http://simonsmith.io/unit-testing-react-components-without-a-dom/
* @author somonsmith
*/
import React from 'react';
import TestUtils from 'react-addons-test-utils'... |
src/ModalTitle.js | adampickeral/react-bootstrap | import React from 'react';
import classNames from 'classnames';
class ModalTitle extends React.Component {
render() {
return (
<h4
{...this.props}
className={classNames(this.props.className, this.props.modalClassName)}>
{ this.props.children }
</h4>
);
}
}
ModalTitle.pr... |
server/sonar-web/src/main/js/apps/permissions/routes.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... |
ajax/libs/yasqe/1.5.3/yasqe.bundled.min.js | hcxiong/cdnjs | !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.YASQE=e()}}(function(){var e;return function t(e,r,i)... |
ajax/libs/jquery.fancytree/2.8.0/jquery.fancytree.js | eduardo-costa/cdnjs | /*!
* jquery.fancytree.js
* Dynamic tree view control, with support for lazy loading of branches.
* https://github.com/mar10/fancytree/
*
* Copyright (c) 2008-2015, Martin Wendt (http://wwWendt.de)
* Released under the MIT license
* https://github.com/mar10/fancytree/wiki/LicenseInfo
*
* @version 2.8.0
* @dat... |
app/main.js | palmerev/can-i-eat-this | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById('app'));
|
ajax/libs/rxjs/2.2.3/rx.js | mkoryak/cdnjs | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
(function (window, undefined) {
var freeExports = typeof exports == 'object' && exports,
freeModule = typeof module == 'object' && module && module.exports == freeExports &&... |
tools/toolsjs/src/smartcomponents/Tools.js | ahernp/DMCM | import React from 'react';
import { Link } from 'react-router-dom';
import Cardgen from '../components/Cardgen';
import Compare from '../components/Compare';
import Deduplicate from '../components/Deduplicate';
import Match from '../components/Match';
export default class Tools extends React.Component {
render()... |
test/specs/app.spec.js | lmcjt37/kulor-reactify | /* Remember: https://mochajs.org/#arrow-functions*/
import React from 'react';
import { mount, shallow } from 'enzyme';
import sinon from 'sinon';
import UtilsHelper from "helper/utilsHelper";
import App from 'App';
import Header from 'containers/Header';
import GithubLink from 'containers/GithubLink';
import ButtonBa... |
src/routes/search.js | fustic/here-hackaton | import React from 'react';
import Search from '../components/Search';
export default {
path: '/',
action() {
return <Search />;
},
};
|
public/ad-assets/js/jquery-1.10.2.js | phamdoanw/web | /*!
* jQuery JavaScript Library v1.10.2
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2013-07-03T13:48Z
*/
(function( window, undefined ) {
// ... |
ajax/libs/griddle-react/1.0.0-alpha.40/griddle.js | joeyparrish/cdnjs | (function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"));
else if(typeof define === 'function' && define.amd)
define(["react"], factory);
else if(typeof exports === 'object')
exports["Griddle"] = factory... |
src/app/core/atoms/icon/icons/star.js | blowsys/reservo | import React from 'react'; const Star = (props) => <svg {...props} viewBox="0 0 24 24"><g><g><polygon points="12 17.27 18.18 21 16.54 13.97 22 9.24 14.81 8.63 12 2 9.19 8.63 2 9.24 7.46 13.97 5.82 21"/></g></g></svg>; export default Star;
|
ajax/libs/tui-image-editor/3.15.1/tui-image-editor.min.js | cdnjs/cdnjs | /*!
* TOAST UI ImageEditor
* @version 3.15.1
* @author NHN. FE Development Team <dl_javascript@nhn.com>
* @license MIT
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("tui-code-snippet"),require("tui-color-picker")):"function"==typeof define&&define.amd?define(["tui-cod... |
app/javascript/mastodon/features/account_timeline/components/moved_note.js | Craftodon/Craftodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import AvatarOverlay from '../../../components/avatar_overlay';
import DisplayNam... |
__tests__/index.android.js | praneethy91/flint-wuber | import 'react-native';
import React from 'react';
import Index from '../index.android.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
ajax/libs/backbone-react-component/0.8.0/backbone-react-component-min.js | stuartpb/cdnjs | !function(a,b){"function"==typeof define&&define.amd?define(["react","backbone","underscore"],b):"undefined"!=typeof module&&module.exports?module.exports=b(require("react"),require("backbone"),require("underscore")):b(a.React,a.Backbone,a._)}(this,function(a,b,c){"use strict";function d(a,b,d){this.component=a;var e,f... |
client/components/admin/index.js | ShannChiang/USzhejiang | import React from 'react';
export default (props) => (
<div className="container">
<div className="row">
<div className="col-xs-12">
<h4>核心配置</h4>
<form onSubmit={props.saveCoreConfigs}>
<div className="form-group">
<label>网站名称</label>
<input type="text" na... |
example/index.js | troybetz/react-soundcloud-widget | import React from 'react';
import ReactDOM from 'react-dom';
import injectTapEventPlugin from 'react-tap-event-plugin';
import CustomWidget from './components/CustomWidget';
import OptionsTable from './components/OptionsTable';
import OptionsInput from './components/OptionsInput';
class Example extends React.Component... |
javascript/editors/ckeditor/filemanager/scripts/jquery-1.6.1.min.js | eberhardtm/phpwebsitetest | /*!
* jQuery JavaScript Library v1.6.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.
... |
assets/js/jquery-1.12.0.min.js | iceman201/blog | /*! jQuery v1.12.0 | (c) jQuery Foundation | 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 window?window:this,fu... |
ajax/libs/react-data-grid/1.0.10/react-data-grid.js | redmunds/cdnjs | (function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("react-dom"));
else if(typeof define === 'function' && define.amd)
define(["react", "react-dom"], factory);
else if(typeof exports === 'obje... |
node_modules/react-mdl/lib/Menu.js | Alex-Shilman/Drupal8Node | 'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.MenuItem = undefined;
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)) { ... |
packages/material-ui-icons/src/Edit.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let Edit = 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" />
</... |
docs/app/Examples/elements/Step/Groups/StepExampleGroup.js | shengnian/shengnian-ui-react | import React from 'react'
import { Icon, Step } from 'shengnian-ui-react'
const StepExampleGroup = () => (
<Step.Group>
<Step>
<Icon name='truck' />
<Step.Content>
<Step.Title>Shipping</Step.Title>
<Step.Description>Choose your shipping options</Step.Description>
</Step.Content>... |
src/components/outputcomponents/ScatterGraphOutput/SingleOutput.js | AvaisP/cvfy-frontend | /*eslint-disable react/forbid-prop-types */
import React, { PropTypes } from "react";
import Dialog from "material-ui/Dialog";
import { VictoryScatter, VictoryChart } from "victory";
class singleOutput extends React.Component {
constructor(props) {
super(props);
this.state = {
open: false,
data: ... |
tests/components/FormFillViewTest.js | dialob/dialob-fill-ui | /**
* Copyright 2016 ReSys OÜ
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... |
packages/material-ui-icons/src/HeadsetMicSharp.js | kybarg/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M11.4 1.02C6.62 1.33 3 5.51 3 10.31V20h6v-8H5v-1.71C5 6.45 7.96 3.11 11.79 3 15.76 2.89 19 6.06 19 10v2h-4v8h4v1h-7v2h9V10c0-5.17-4.36-9.32-9.6-8.98z" />
, 'HeadsetMicSharp');
|
src/routes/Home/components/HomeView.js | salvocanna/shotio | import React from 'react'
import { connect } from 'react-redux'
//import { Field, reduxForm } from 'redux-form';
import { makeScreenshot } from '../../../store/main'
// import DuckImage from '../assets/Duck.jpg'
import './HomeView.scss'
class HomeView extends React.Component {
constructor(props) {
super(pr... |
app/javascript/mastodon/features/compose/components/text_icon_button.js | kazh98/social.arnip.org | import React from 'react';
import PropTypes from 'prop-types';
const iconStyle = {
height: null,
lineHeight: '27px',
width: `${18 * 1.28571429}px`,
};
export default class TextIconButton extends React.PureComponent {
static propTypes = {
label: PropTypes.string.isRequired,
title: PropTypes.string,
... |
modules/gui/src/translate.js | openforis/sepal | import {IntlProvider, injectIntl} from 'react-intl'
import {getLogger} from 'log'
import PropTypes from 'prop-types'
import React from 'react'
import _ from 'lodash'
import flat from 'flat'
import moment from 'moment'
const log = getLogger('translate')
let intl, intlEn
const initIntl = intlInstance => intl = intlInst... |
src/components/Header.react.js | rudionrails/signup-widget-react-mobx | import React from 'react';
const Header = ({
onClose,
}) => (
<div className="jsw-header">
<nav className="navbar navbar flex-items-xs-center">
<div className="pull-xs-right">
<button
className="jsw-header__btn-close"
type="button"
onClick={onClose}
>
... |
template/__tests__/App-test.js | exponentjs/react-native | /**
* @format
*/
import 'react-native';
import React from 'react';
import App from '../App';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
renderer.create(<App />);
});
|
Sample Code/04-hello-flux/src/App.js | danilotorrisi/a-modern-web-with-react-and-flux | import React from 'react';
import ContactList from './components/ContactList';
import ContactForm from './components/ContactForm';
import ContactStore from './stores/ContactStore';
export default class App extends React.Component {
constructor(props) {
super(props);
// Set the state of the compone... |
tests/lib/rules/vars-on-top.js | DavidAnson/eslint | /**
* @fileoverview Tests for vars-on-top rule.
* @author Danny Fritz
* @author Gyandeep Singh
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const rule = require("..... |
local-cli/templates/HelloWorld/__tests__/index.ios.js | csatf/react-native | import 'react-native';
import React from 'react';
import Index from '../index.ios.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
src/components/Navigation.js | leegenes/protrackt-frontend | import React from 'react';
import PropTypes from 'prop-types';
import './navigation.css';
const Navigation = (props) => {
return (
<div className="nav-container">
<div className="nav-contents">
<div className="nav-link" id="nav-link-login">PROTRACKT</div>
<div
className="nav-... |
examples/basic/App.js | pbeshai/react-autosize | import React from 'react';
import AutoSize from 'src/AutoSize';
import RandomCircles from './RandomCircles';
const App = React.createClass({
getInitialState() {
return {
width: 500,
height: 400
};
},
_handleClick() {
this.setState({
width: Math.random() * 200 + 400,
height: ... |
ajax/libs/babel-core/4.6.3/browser.js | jonathantneal/cdnjs | (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.babel=f()}})(f... |
docs/app/Examples/addons/Radio/index.js | clemensw/stardust | import React from 'react'
import Types from './Types'
import States from './States'
import Variations from './Variations'
const RadioExamples = () => (
<div>
<Types />
<States />
<Variations />
</div>
)
export default RadioExamples
|
create-event/src/index.js | picatic/picatic-examples | /* @flow */
import React from 'react'
import ReactDOM from 'react-dom'
import { createStore, applyMiddleware, compose } from 'redux'
import { Provider } from 'react-redux'
import thunkMiddleware from 'redux-thunk'
import { ConnectedRouter, routerMiddleware } from 'react-router-redux'
import createHistory from 'history... |
server/sonar-web/tests/components/charts/line-chart-test.js | joansmith/sonarqube | import React from 'react';
import TestUtils from 'react-addons-test-utils';
import { expect } from 'chai';
import { LineChart } from '../../../src/main/js/components/charts/line-chart';
describe('Line Chart', function () {
it('should display line', function () {
const data = [
{ x: 1, y: 10 },
{ x... |
packages/neos-ui-guest-frame/src/InlineUI/NodeToolbar/Buttons/AddNode/index.js | mstruebing/PackageFactory.Guevara | import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {$get} from 'plow-js';
import {selectors, actions} from '@neos-project/neos-ui-redux-store';
import IconButton from '@neos-project/react-ui-components/src/IconButton/';
import {neos} from '@neos... |
ajax/libs/primereact/7.2.0/rating/rating.esm.js | cdnjs/cdnjs | import React, { Component } from 'react';
import { classNames } from 'primereact/utils';
import { tip } from 'primereact/tooltip';
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _definePropertie... |
postcss/css-modules/src/js/components/Header.js | akabekobeko/examples-web-app | import React from 'react'
import PropTypes from 'prop-types'
import Styles from './Header.css'
const Item = ({label, url}) => {
return (
<li>
<a href={url}>{label}</a>
</li>
)
}
Item.propTypes = {
label: PropTypes.string,
url: PropTypes.string
}
const Header = (props) => {
const items = props... |
draft-js-toolbar-plugin/src/components/Separator/index.js | vacenz/last-draft-js-plugins | import React from 'react'
import separatorStyles from '../../separatorStyles.css'
export default ({ className = separatorStyles.separator }) => <div className={className} />
|
src/components/topic/snapshots/foci/builder/retweetPartisanship/RetweetPartisanshipSummary.js | mitmedialab/MediaCloud-Web-Tools | import PropTypes from 'prop-types';
import React from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
const localMessages = {
intro: { id: 'focus.create.confirm.retweet.intro', defaultMessage: 'We will create 5 subtopics:' },
left: { id: 'focus.create.confirm.retweet.center', defaultMessage: 'L... |
src/svg-icons/KeyboardArrowRight.js | AndriusBil/material-ui | // @flow
import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../SvgIcon';
/**
* @ignore - internal component.
*/
let KeyboardArrowRight = props => (
<SvgIcon {...props}>
<path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z" />
</SvgIcon>
);
KeyboardArrowRight = pure(Keybo... |
app/containers/Article/index.js | Oscar-21/austin-conder | import React from 'react';
import Helmet from 'react-helmet';
import Responsive from 'react-responsive';
import ArticleStyle from 'components/ArticleStyle';
import Comments from 'components/Comments';
import Share from 'material-ui/svg-icons/social/share';
import Email from 'material-ui/svg-icons/communication/email';
... |
index.js | aparnakr/POE | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import './index.css';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
|
src/components/Report/Filter.js | ayastreb/money-tracker | import React from 'react';
import PropTypes from 'prop-types';
import { Dropdown } from 'semantic-ui-react';
import { DropdownOption } from '../types';
class Filter extends React.Component {
handleAccountsChange = (_, { value }) => {
this.props.changeReportAccounts(value);
};
handleTagsChange = (_, { value ... |
src/screens/BookScreen/index.js | flasco/Reader_X | import React, { Component } from 'react';
import {
View,
FlatList,
StatusBar,
Text,
Image,
ScrollView,
TouchableWithoutFeedback,
} from 'react-native';
import { NavigationActions } from 'react-navigation';
import { Icon, Button, Rating, Divider, Avatar } from 'react-native-elements';
import { ParallaxVie... |
src/components/common/svg-icons/maps/beenhere.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsBeenhere = (props) => (
<SvgIcon {...props}>
<path d="M19 1H5c-1.1 0-1.99.9-1.99 2L3 15.93c0 .69.35 1.3.88 1.66L12 23l8.11-5.41c.53-.36.88-.97.88-1.66L21 3c0-1.1-.9-2-2-2zm-9 15l-5-5 1.41-1.41L10 13.17l7.59... |
TGMeituan/Components/Main/Launch.js | targetcloud/Meituan | /**
* Created by targetcloud on 2016/12/21.
* http://blog.csdn.net/callzjy/article/details/53856163
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Image
} from 'react-native';
var Main = require('./Main');
var Launch = React.createClass({
render()... |
src/layouts/navLinks.js | evanfrawley/evanfrawley.github.io | import React from 'react';
import Link from 'gatsby-link';
import {Box} from "rebass";
const PAGES_AND_PATHS = [
{
urlPath: "/about/",
linkHandle: "About Me"
},
{
urlPath: "/stuff-i-do/",
linkHandle: "Stuff I Do"
},
{
urlPath: "/thoughts-on-stuff/",
linkHandle: "Thoughts on Stuff"
}... |
node_modules/react-router-dom/es/BrowserRouter.js | millerman86/CouponProject | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call &... |
ajax/libs/react-data-grid/1.0.11/react-data-grid.js | ahocevar/cdnjs | (function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("react-dom"));
else if(typeof define === 'function' && define.amd)
define(["react", "react-dom"], factory);
else if(typeof exports === 'obje... |
client/components/Modal.js | mmazzarolo/numvalidate | /* @flow */
import React, { Component } from 'react';
import style from './Modal.css';
type Props = {
title: string,
onCancelClick: () => mixed,
visible: boolean,
children?: any,
};
class Modal extends Component<Props, void> {
render() {
const { title, visible, onCancelClick, children } = this.props;
... |
node_modules/react-json-tree/lib/JSONNestedNode.js | qingege/react_draft | 'use strict';
exports.__esModule = true;
exports['default'] = undefined;
var _keys = require('babel-runtime/core-js/object/keys');
var _keys2 = _interopRequireDefault(_keys);
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
va... |
mxcube3/ui/containers/TaskContainer.js | meguiraun/mxcube3 | import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import Characterisation from '../components/Tasks/Characterisation';
import DataCollection from '../components/Tasks/DataCollection';
import Helical from '../components/Tasks/Helical';
import Mesh from '../comp... |
node_modules/openlayers-closure-application/node_modules/openlayers/examples/resources/zeroclipboard/ZeroClipboard.Core.js | bartholomewbischoff/Sp-Sk | /*!
* ZeroClipboard
* The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
* Copyright (c) 2009-2014 Jon Rohan, James M. Greene
* Licensed MIT
* http://zeroclipboard.org/
* v2.2.0
*/
(function(window, undefined) {
"use str... |
app/containers/main.js | ivanzotov/react-native-example | import React, { Component } from 'react';
import {
Workouts,
Food,
Profile,
Sidebar
} from './../components';
import { connect } from 'react-redux';
import {
View
} from 'react-native';
class Main extends Component {
renderLocation(location) {
switch (location) {
case 'workouts':
return ... |
src/App.js | ChrisRast/Le-Taguenet | import React from 'react';
import {
ROUTES_VALUES
} from './config/routes';
import {
Header,
Footer
} from './components/nav';
import NotFound from './components/not-found';
import NavContainer from './containers/nav-container';
import {
withRouter,
Route,
Switch
} from 'react-router-dom';
import './App.css';
co... |
ajax/libs/yui/3.9.1/simpleyui/simpleyui.js | dhenson02/cdnjs | /**
The YUI module contains the components required for building the YUI seed file.
This includes the script loading mechanism, a simple queue, and the core
utilities for the library.
@module yui
@main yui
@submodule yui-base
**/
/*jshint eqeqeq: false*/
if (typeof YUI != 'undefined') {
YUI._YUI = YUI;
}
/**
The... |
node_modules/@angular/material/bundles/material.umd.js | alcuster/swaptime | /**
* @license Angular Material v2.0.0-beta.2
* Copyright (c) 2017 Google, Inc. https://material.angular.io/
* License: MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('rxjs/Sub... |
packages/material-ui-icons/src/FlashOffTwoTone.js | allanalexandre/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="M17 10h-3.61l2.28 2.28zM17 2H7v1.61l6.13 6.13zM3.41 2.86L2 4.27l5 5V13h3v9l3.58-6.15L17.73 20l1.41-1.41z" /></g></React.Fragment>
, 'FlashOff... |
internals/generators/language/index.js | frascata/vivaifrappi | /**
* Language Generator
*/
const fs = require('fs');
const exec = require('child_process').exec;
function languageIsSupported(language) {
try {
fs.accessSync(`app/translations/${language}.json`, fs.F_OK);
return true;
} catch (e) {
return false;
}
}
module.exports = {
description: 'Add a langua... |
src/components/video_list.js | ankit1990rana/react | import React from 'react';
import VideoListItem from './video_list_item';
/**
* onVideoSelect receive data and pass to its parent component
*
* First commented like does the same thing and pass it as a property but its confusing now
*/
const VideoList = (props) => {
const videoItems = props.videos.map((video... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.