path stringlengths 5 304 | repo_name stringlengths 6 79 | content stringlengths 27 1.05M |
|---|---|---|
test/integration/prerender/pages/blog/[post]/index.js | zeit/next.js | import React from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'
import 'firebase/firestore'
export async function getStaticPaths() {
return {
paths: [
'/blog/post-1',
{ params: { post: 'post-2' } },
'/blog/[post3]',
'/blog/post-4',
'/blog/post.1',
... |
src/components/__tests__/general/activityindicator-test.js | elarasu/roverz-chat | /**
* Test to check if the component renders correctly
*/
/* global it expect */
import 'react-native';
import React from 'react';
import renderer from 'react-test-renderer';
import Preloader from '@components/general/ActivityIndicator';
it('Preloader renders correctly', () => {
const tree = renderer.create(
... |
ajax/libs/mobx-react/3.3.0/custom.js | sajochiu/cdnjs | (function() {
function mrFactory(mobx, React, ReactDOM) {
if (!mobx)
throw new Error("mobx-react requires the MobX package")
if (!React)
throw new Error("mobx-react/custom requires React to be available");
var isDevtoolsEnabled = false;
// WeakMap<Node, Obje... |
src/components/Header/Header.js | lolilukia/smda | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React, { Component } from 'react';
import withStyle... |
packages/material-ui-icons/src/StayCurrentLandscapeOutlined.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="M1.01 7L1 17c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2H3c-1.1 0-1.99.9-1.99 2zM19 7v10H5V7h14z" /></g></React.Fragment>
, 'StayCurrent... |
packages/core/dashboard/src/components/InfoBox/typeContentProvider.js | tocco/tocco-client | import React from 'react'
import {consoleLogger} from 'tocco-util'
import InfoBoxHtmlFieldContent from './typeContent/InfoBoxHtmlFieldContent'
import InfoBoxSearchFilterContentContainer from './typeContent/InfoBoxSearchFilterContentContainer'
export default (type, id, content) => {
if (map[type]) {
return React... |
src/js/components/icons/base/StandardsOfflineStorage.js | kylebyerly-hp/grommet | // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... |
packages/material-ui-icons/src/NatureSharp.js | kybarg/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M13 16.12c3.47-.41 6.17-3.36 6.17-6.95 0-3.87-3.13-7-7-7s-7 3.13-7 7c0 3.47 2.52 6.34 5.83 6.89V20H5v2h14v-2h-6v-3.88z" />
, 'NatureSharp');
|
src/encoded/static/components/cart/cart.js | ENCODE-DCC/encoded | /**
* Components for rendering the /carts/ and /cart-view/ page.
*/
// node_modules
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import _ from 'underscore';
import url from 'url';
// libs
import { svgIcon } from '../../libs/svg-icons';
// libs/ui
import * as Dr... |
app/components/shared/BuildStatusDescription.spec.js | buildkite/frontend | /* global describe, it, expect, jest */
import moment from 'moment';
import MockDate from 'mockdate';
import React from 'react';
import ReactTestRenderer from 'react-test-renderer';
describe('BuildStatusDescription', () => {
it(`calls through to \`getRelativeDateString\` and \`buildStatus\``, () => {
MockDate.se... |
ajax/libs/inferno-router/0.7.25/inferno-router.js | holtkamp/cdnjs | /*!
* inferno-router v0.7.25
* (c) 2016 Dominic Gannaway
* Released under the MIT License.
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.InfernoRouter = factory())... |
src/articles/2018-01-31-1st-Anniversary/TimelineItem.js | FaideWW/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
const TimelineItem = ({ title, date, children }) => (
<div className="panel">
<div className="date">
{date}
</div>
<div className="panel-heading">
<h2>{title}</h2>
</div>
<div className="panel-body">
{children}
<... |
extensions/gadget/assets/wso2-carbon-dev/js/jquery.min.js | Rajith90/carbon-store | /*! jQuery v@1.8.0 jquery.com | jquery.org/license */
(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d=... |
src/components/DatePicker/DatePicker.stories.js | wfp/ui | import React, { useState } from 'react';
import { SingleDatePickerInput } from './SingleDatePickerInput';
import { DateRangePickerInput } from './DateRangePickerInput';
import Input from '../Input';
import moment from 'moment';
import { Controller, useForm } from 'react-hook-form';
import 'react-dates/initialize';
i... |
src/DropDownMenu/DropDownMenu.spec.js | pomerantsev/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import DropDownMenu from './DropDownMenu';
import getMuiTheme from '../styles/getMuiTheme';
describe('<DropDownMenu />', () => {
const muiTheme = getMuiTheme();
const shallowWithContext = (node) => shallo... |
ajax/libs/ionic/0.9.21-alpha/js/ionic.js | paleozogt/cdnjs | /*!
* Copyright 2014 Drifty Co.
* http://drifty.com/
*
* Ionic, v0.9.21
* A powerful HTML5 mobile app framework.
* http://ionicframework.com/
*
* By @maxlynch, @helloimben, @adamdbradley <3
*
* Licensed under the MIT license. Please see LICENSE for more information.
*
*/;
// Create namespaces
window.ionic... |
packager/blacklist.js | jonesgithub/react-native | /**
* Copyright (c) 2015-present, 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.
*/
'use strict... |
src/components/Footer/component.js | emilstahl/ipv6 | import React from 'react'
import './style.scss'
const Footer = () => {
return (
<div className="footer container">
<hr/>
<div className="grid">
<p className="left">
© 2013 - { new Date().getUTCFullYear() } IPv6-adresse.dk
<span className="sep">·</span>
<a hr... |
client/src/pages/404.js | BhaveshSGupta/FreeCodeCamp | import React from 'react';
import { Router } from '@reach/router';
import NotFoundPage from '../components/FourOhFour';
/* eslint-disable max-len */
import ShowProfileOrFourOhFour from '../client-only-routes/ShowProfileOrFourOhFour';
/* eslint-enable max-len */
function FourOhFourPage() {
return (
<Router>
... |
components/frontend/src/dashboard/MetricSummaryCard.js | ICTU/quality-time | import React from 'react';
import { Card } from '../semantic_ui_react_wrappers';
import { StatusPieChart } from './StatusPieChart';
import './MetricSummaryCard.css';
export function MetricSummaryCard(props) {
return (
<Card style={{ height: '200px' }} onClick={props.onClick} onKeyPress={props.onClick} tabI... |
packages/react-ui-components/src/_lib/injectProps.js | dimaip/neos-ui | import React from 'react';
//
// A higher order component to transfer dependencies or
// static props between the component files in a safe way for
// the test suite.
//
// Origin is that some components depend on each other, f.e.
// the `IconButton` imports the `Icon` and the `Button` component.
//
// Normally this w... |
src/js/components/layout/Header.js | ilken/ChosenPokemons | import React from 'react';
export default class Header extends React.Component {
render () {
const pokeball = '/img/pokeball.svg';
return (
<nav className="navbar navbar-inverse navbar-fixed-top top-nav-collapse" role="navigation">
<div className="container">
<div ... |
client/redux-forms-fabric/Fields/FabricSelectField.js | jacob-ebey/DashboardTemplate | import React from 'react';
import PropTypes from 'prop-types';
import { Dropdown } from 'office-ui-fabric-react/lib/Dropdown';
import ErrorMessage from './ErrorMessage';
export default class FabricSelectField extends React.Component {
render = () => {
const { input, meta, options, ...rest } = this.props;
... |
src/prisonBreak/CommandRef.js | link1900/linkin-games | // @flow
import React from 'react';
import { connect } from 'react-redux';
import { createActionCommandSelected } from './PrisonBreakReducer';
import './commandLine.css';
const mapStateToProps = (state) => {
return state;
};
const mapDispatchToProps = (dispatch) => {
return {
onClick: (command) => {
... |
src/svg-icons/image/adjust.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageAdjust = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.3... |
client/routes.js | aNerdInTheHand/caretaker-manager | import React from 'react'
import { Route, IndexRoute } from 'react-router'
import App from './containers/App.jsx'
import MatchContainer from './containers/MatchContainer.jsx'
import Home from './containers/Home.jsx'
export const routes = (
<Route path='/' component={App}>
<IndexRoute component={Home} />
<R... |
ajax/libs/mobx/3.1.13/mobx.umd.js | tholu/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.mobx = f()}})(... |
src/svg-icons/action/favorite-border.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFavoriteBorder = (props) => (
<SvgIcon {...props}>
<path d="M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 2... |
vertex_ui/src/components/ColorPicker/Swatches/SwatchesColor.js | zapcoop/vertex | import React from 'react';
import reactCSS from 'reactcss';
import { Swatch } from 'react-color/lib/components/common';
export const SwatchesColor = ({
color,
onClick = () => {},
onSwatchHover,
first,
last,
active,
}) => {
const styles = reactCSS(
{
default: {
color: {
width:... |
ajax/libs/react-dom/16.1.0-beta/cjs/react-dom.development.js | joeyparrish/cdnjs | /** @license React v16.1.0-beta
* react-dom.development.js
*
* Copyright (c) 2013-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.
*/
'use strict';
if (process.env.NODE_ENV !== "production") {
(function() {
'u... |
ajax/libs/zeroclipboard/2.1.2/ZeroClipboard.Core.js | viskin/cdnjs | /*!
* 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) 2014 Jon Rohan, James M. Greene
* Licensed MIT
* http://zeroclipboard.org/
* v2.1.2
*/
(function(window, undefined) {
"use strict";... |
packages/daheim-app-ui/src/components/TalkAbout.js | daheim/daheim-app | import React from 'react'
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl'
import styled from 'styled-components'
import {H2, H3, Flex, VSpace, Text} from './Basic'
import {Layout, Padding} from '../styles'
const Image = styled.img`
height: 240px;
object-fit: contain;
`
const rowSpacing = Paddin... |
extensions/amp-accordion/1.0/storybook/Basic.js | honeybadgerdontcare/amphtml | import * as Preact from '#preact';
import {
BentoAccordion,
BentoAccordionContent,
BentoAccordionHeader,
BentoAccordionSection,
} from '../component';
export default {
title: 'Accordion',
component: BentoAccordion,
args: {
expandSingleSection: false,
animate: false,
},
};
/**
* @param {!Obje... |
examples/src/components/CustomOption.js | PetrGlad/react-select | import React from 'react';
import Gravatar from 'react-gravatar';
var Option = React.createClass({
propTypes: {
addLabelText: React.PropTypes.string,
className: React.PropTypes.string,
mouseDown: React.PropTypes.func,
mouseEnter: React.PropTypes.func,
mouseLeave: React.PropTypes.func,
option: React.PropTy... |
e2e-tests/mdx-less-babel/src/pages/list.js | gatsbyjs/gatsby | import React from 'react'
import { graphql } from 'gatsby'
const ListPage = ({ data }) => {
const anotherPage = data.another.nodes[0]
const blogPage = data.blog.nodes[0]
const aboutPage = data.complex.nodes[0]
const embedPage = data.embed.nodes[0]
return (
<div>
<div data-testid="mdx-slug">{anoth... |
src/encoded/static/components/item-pages/components/tables/ItemPageTable.js | 4dn-dcic/fourfront | 'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import _ from 'underscore';
import url from 'url';
import memoize from 'memoize-one';
import queryString from 'querystring';
import { get as getSchemas, Term } from './../../../util/Schemas';
import { object, ajax, layout, isServerSide, schem... |
capa_interfaz/js/jquery-ui/tests/jquery-1.6.1.js | JosueZelaya/emanuel | /*!
* 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.
... |
ajax/libs/react-native-web/0.0.0-aa93652b6/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... |
autolink/postlink/appDelegateLinker.js | wix/react-native-navigation | // @ts-check
var fs = require('fs');
var path = require('./path');
var { warnn, logn, infon, debugn, errorn } = require('./log');
class AppDelegateLinker {
constructor() {
this.appDelegatePath = path.appDelegate;
this.removeUnneededImportsSuccess = false;
this.removeApplicationLaunchContentSuccess = fals... |
src/shared/components/Products/Sidebar/ProductCategorySidebar.js | Grace951/ReactAU | import { Link} from 'react-router-dom';
import React from 'react';
import { isvalidRoute} from '../../../Data/RouteData';
const Classify = (props) => (
<li>{props.title}
<ul>
<li className={props.isActive( 'All' )}><Link to={`/products/${props.productType}/All`} >All ({props.count.All})</Link></li>
... |
ajax/libs/forerunnerdb/1.3.487/fdb-all.js | menuka94/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... |
node_modules/grunt-nuget/node_modules/grunt-legacy-log-utils/node_modules/underscore.string/test/test_underscore/vendor/jquery.js | NovaCreatorSoftware/bootstrap-data-grid | /*!
* jQuery JavaScript Library v1.7.2
* 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.
... |
ajax/libs/yui/3.5.0pr1/event-custom-base/event-custom-base.js | cdnjs/cdnjs | YUI.add('event-custom-base', function(Y) {
/**
* 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.
* @module ev... |
ajax/libs/algoliasearch/3.31.0/algoliasearchLite.js | cdnjs/cdnjs | /*! algoliasearch 3.31.0 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */
(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 g... |
src/components/MainHeader/__tests__/dropdown-menu-test.js | falmar/react-adm-lte | jest.unmock('../DropdownMenu')
import React from 'react'
import {shallow} from 'enzyme'
import DropdownMenu from '../DropdownMenu'
describe('MainHeader.Navbar.NavbarMenu.Dropdown.DropdownMenu', () => {
it('should have basic classNames', () => {
const wrapper = shallow(<DropdownMenu />)
expect(
wrapp... |
server/dashboard/js/components/TimelineFilter.react.js | MrAlone/mzbench | import React from 'react';
import MZBenchRouter from '../utils/MZBenchRouter';
import MZBenchActions from '../actions/MZBenchActions';
import BenchStore from '../stores/BenchStore';
class TimelineFilter extends React.Component {
constructor(props) {
super(props);
this.autoSearchHandler = null;
... |
packages/material-ui-icons/src/LeakAdd.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let LeakAdd = props =>
<SvgIcon {...props}>
<path d="M6 3H3v3c1.66 0 3-1.34 3-3zm8 0h-2c0 4.97-4.03 9-9 9v2c6.08 0 11-4.93 11-11zm-4 0H8c0 2.76-2.24 5-5 5v2c3.87 0 7-3.13 7-7zm0 18h2c0-4.97 4.03-9 9-9v-2c-6.0... |
src/elements/PaginationElements.js | rsnobles/rsnobles.github.io | import React from "react"
import styled from "styled-components"
import { Link } from "gatsby"
export const PaginationWrapper = styled.div`
grid-column: 2 / span 12;
padding: 3rem 0;
display: flex;
align-items: center;
justify-content: center;
a:nth-child(1) {
color: ${props =>
props.isFirst ? p... |
docs/assets/js/main.min.js | ubandastudio/ubandastudio.github.io | function updateNav(){var e=$btn.hasClass("hidden")?$nav.width():$nav.width()-$btn.width()-30;$vlinks.width()>e?(breaks.push($vlinks.width()),$vlinks.children().last().prependTo($hlinks),$btn.hasClass("hidden")&&$btn.removeClass("hidden")):(e>breaks[breaks.length-1]&&($hlinks.children().first().appendTo($vlinks),breaks.... |
app/javascript/mastodon/features/account_timeline/index.js | mimumemo/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { fetchAccount } from '../../actions/accounts';
import { expandAccountFeaturedTimeline, expandAccountTimeline } from '../../actions/timelines';
import ... |
packages/my-joy-instances/src/components/instances/__tests__/toolbar.spec.js | geek/joyent-portal | import React from 'react';
import renderer from 'react-test-renderer';
import 'jest-styled-components';
import { Toolbar } from '../toolbar';
import Theme from '@mocks/theme';
it('renders <Toolbar /> without throwing', () => {
expect(
renderer
.create(
<Theme>
<Toolbar />
</Theme... |
ajax/libs/js-data/0.0.1/js-data.js | cgvarela/cdnjs | /**
* @author Jason Dobry <jason.dobry@gmail.com>
* @file js-data.js
* @version 0.0.1 - Homepage <http://js-data.io/>
* @copyright (c) 2014 Jason Dobry
* @license MIT <https://github.com/js-data/js-data/blob/master/LICENSE>
*
* @overview Data store.
*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof modu... |
loc_frontend/node_modules/flux/node_modules/fbjs/node_modules/core-js/library/modules/es6.promise.js | marka2g/loc | 'use strict';
var $ = require('./$')
, LIBRARY = require('./$.library')
, global = require('./$.global')
, ctx = require('./$.ctx')
, classof = require('./$.classof')
, $export = require('./$.export')
, isObject = require('./$.is-object')
, anObject = require('./$.an-objec... |
node_modules/eslint-plugin-react/lib/rules/prop-types.js | joekay/awebb | /**
* @fileoverview Prevent missing props validation in a React component definition
* @author Yannick Croissant
*/
'use strict';
// As for exceptions for props.children or props.className (and alike) look at
// https://github.com/yannickcr/eslint-plugin-react/issues/7
var Components = require('../util/Components'... |
ajax/libs/js-data/2.2.3/js-data.js | mscharl/cdnjs | /*!
* js-data
* @version 2.2.3 - Homepage <http://www.js-data.io/>
* @author Jason Dobry <jason.dobry@gmail.com>
* @copyright (c) 2014-2015 Jason Dobry
* @license MIT <https://github.com/js-data/js-data/blob/master/LICENSE>
*
* @overview Robust framework-agnostic data store.
*/
(function webpackUniversalModul... |
src/components/ContentContainer.js | AndrewZures/ixora | import React, { Component } from 'react';
import Navbar from 'components/navbar/Navbar';
export default class NavBar extends Component {
render() {
return (
<div className="main-content">
<Navbar />
{this.props.children}
</div>
);
}
};
|
src/core/HttpClient.js | thisarala/eye-elephant | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import request from 'superagent';
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
function getUrl(path) {
if (path.startsWith('http') || canUseDOM) {
return path;
}
return process.env.WEBSITE_HOSTNAME ?
`http://${proces... |
fields/types/boolean/BooleanColumn.js | everisARQ/keystone | import React from 'react';
import Checkbox from '../../components/Checkbox';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var BooleanColumn = React.createClass({
displayName: 'BooleanColumn',
propTypes: {
col: React.PropTypes.object,
... |
src/app/components/source/UserInfoEdit.js | meedan/check-web | import React from 'react';
import Relay from 'react-relay/classic';
import { browserHistory } from 'react-router';
import { FormattedMessage, injectIntl, defineMessages } from 'react-intl';
import Button from '@material-ui/core/Button';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import Checkbox ... |
react-flux-mui/js/material-ui/docs/src/app/components/pages/components/Stepper/HorizontalTransition.js | pbogdan/react-flux-mui | import React from 'react';
import {
Step,
Stepper,
StepLabel,
} from 'material-ui/Stepper';
import RaisedButton from 'material-ui/RaisedButton';
import FlatButton from 'material-ui/FlatButton';
import ExpandTransition from 'material-ui/internal/ExpandTransition';
import TextField from 'material-ui/TextField';
/*... |
src/components/photo_upload.js | JohnDHamm/trail-tracker-react | import React, { Component } from 'react';
import Dropzone from 'react-dropzone';
import { connect } from 'react-redux';
import { setUploadPhoto } from '../actions';
class PhotoUpload extends Component{
constructor() {
super()
this.state = { files: [] }
}
onDrop = (files) => {
this.setState({ files });
... |
ui/src/js/blog/BlogOverviewPage.js | Dica-Developer/weplantaforest | import axios from 'axios';
import counterpart from 'counterpart';
import moment from 'dayjs';
import React, { Component } from 'react';
import { browserHistory } from 'react-router';
import { getTextForSelectedLanguage } from '../common/language/LanguageHelper';
require('./blogOverviewPage.less');
class Article exten... |
nlyyAPP/component/随访管理/登记受试者退出或完成/MLDjssztchwc.js | a497500306/nlyy_APP | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableOpacity,
Navigator,
TextInput,
ActivityIndicator,
Alert
} from 'react-native';
var Dimensions = r... |
project/react-ant-multi-pages/src/base/AsyncBundle.js | FFF-team/generator-earth | import React from 'react';
import PropTypes from 'prop-types';
/**
* copy from https://segmentfault.com/a/1190000009539836
*/
class AsyncBundle extends React.Component {
state = {
// short for "module" but that's a keyword in js, so "mod"
mod: null
}
componentWillMount() {
// 加载初始状态
this.load(... |
src/PageItem.js | egauci/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import SafeAnchor from './SafeAnchor';
const PageItem = React.createClass({
propTypes: {
href: React.PropTypes.string,
target: React.PropTypes.string,
title: React.PropTypes.string,
disabled: React.PropTypes.bool,
previous: React.Pr... |
src/common/components/FelaProvider.js | reedlaw/read-it | // @flow
import React from 'react';
import { Provider as Fela } from 'react-fela';
// Enhance Fela provider for universal base components.
export default class FelaProvider extends React.Component {
static propTypes = {
Button: React.PropTypes.func.isRequired,
Image: React.PropTypes.func.isRequired,
Text... |
ajax/libs/aui/7.3.0-alpha-2/aui/js/aui-experimental.js | jdh8/cdnjs | /*!
* @atlassian/aui - Atlassian User Interface Framework
* @version v7.3.0-alpha-2
* @link https://docs.atlassian.com/aui/latest/
* @license SEE LICENSE IN LICENSE.md
* @author Atlassian Pty Ltd.
*/
// src/js/aui/polyfills/placeholder.js
(typeof window === 'undefined' ? global : window).__452d3f8e5d643ab60faf3f5... |
public/js/.module-cache/5530ac7b562577c77f33ee2830e016a3ec18e4c8.js | inquisive/wallet-manager | /**
* @jsx React.DOM
*/
/* not used but thats how you can use touch events
* */
//React.initializeTouchEvents(true);
/**
* we will use yes for true
* we will use no for false
*
* React has some built ins that rely on state being true/false like classSet()
* and these will not work with yes/no but can easily... |
demo/component/Rectangle.js | thoqbk/recharts | import React, { Component } from 'react';
import { Surface, Rectangle } from 'recharts';
class RectangleDemo extends Component {
state = {
x: 50,
y: 50,
width: 80,
height: 100,
};
changeSize() {
this.setState({
x: Math.random() * 50,
y: Math.random() * 50,
width: Math.rando... |
test/PanelGroupSpec.js | jontewks/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import PanelGroup from '../src/PanelGroup';
import Panel from '../src/Panel';
describe('PanelGroup', function () {
it('Should pass bsStyle to Panels', function () {
let instance = ReactTestUtils.renderIntoDocument(
<PanelGrou... |
admin/client/App/screens/Item/components/RelatedItemsList.js | xyzteam2016/keystone | import React from 'react';
import { Columns } from 'FieldTypes';
import { Alert, Spinner } from 'elemental';
const RelatedItemsList = React.createClass({
propTypes: {
list: React.PropTypes.object.isRequired,
refList: React.PropTypes.object.isRequired,
relatedItemId: React.PropTypes.string.isRequired,
relation... |
src/encoded/static/components/cart/cart_alert.js | ENCODE-DCC/encoded | import PropTypes from 'prop-types';
import { connect } from 'react-redux';
/**
* Display an alert relevant to the cart, or hide an already-visible one. The alert React component
* gets set in the cart Redux store `alert` property.
*/
const CartAlertComponent = ({ alert }) => (
<>{alert ? <>{alert}</> : null}</... |
js/components/shared/TabIcon.js | kort/kort-reloaded | /* eslint-disable react/no-multi-comp */
import React from 'react';
import { Image, Platform, StyleSheet, Text, View } from 'react-native';
import I18n from 'react-native-i18n';
const styles = StyleSheet.create({
tabIcon: {
height: 30,
width: 30,
},
caption: {
textAlign: 'center',
fontSize: 8,
... |
examples/js/column-filter/number-filter-without-empty-option.js | AllenFang/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
products.push({
id: id,
... |
lib/components/photoshop/PhotoshopPointerCircle.js | rickyvetter/react-color | 'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProp... |
ajax/libs/react-native-web/0.15.6/modules/useMergeRefs/index.min.js | cdnjs/cdnjs | import*as React from"react";import mergeRefs from"../mergeRefs";export default function useMergeRefs(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return React.useMemo(function(){return mergeRefs.apply(void 0,r)},[].concat(r))}; |
app/index.js | miccferr/converterio | import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, hashHistory } from 'react-router';
import routes from './routes';
import configureStore from './store/configureStore';
import './app.css';
// required for material ui
import injectTapEventPlugin from... |
app/javascript/flavours/glitch/components/admin/Retention.js | glitch-soc/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import api from 'flavours/glitch/util/api';
import { FormattedMessage, FormattedNumber, FormattedDate } from 'react-intl';
import classNames from 'classnames';
import { roundTo10 } from 'flavours/glitch/util/numbers';
const dateForCohort = cohort => {
sw... |
assets/javascripts/kitten/components/form/checkbox/stories.js | KissKissBankBank/kitten | import React from 'react'
import { action } from '@storybook/addon-actions'
import { Checkbox } from './index'
import { DocsPage } from 'storybook/docs-page'
export default {
component: Checkbox,
title: 'Form/Checkbox',
parameters: {
docs: {
page: () => <DocsPage filepath={__filename} importString="Che... |
SCLL Vocabulary/Docs/Smart Cities Living Lab Metadata Vocabulary_files/jquery.js | cybershare/SCLL | /*!
* jQuery JavaScript Library v1.6.2
* 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.
... |
src/routes/About/components/About.js | docunext/minimalist-react-component | import React from 'react';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './About.css';
import cx from 'classnames';
import _ from 'lodash';
class MatrixCell extends React.Component {
render = () => {
return <div
style={{background: this.props.cells[this.props.cellIndex].c... |
src/__tests__/index-test.js | bjacobel/rak | import ReactDOM from 'react-dom';
jest.mock('react-dom');
describe('app entry point', () => {
it('renders the react app', () => {
jest.requireActual('../index');
expect(ReactDOM.render).toHaveBeenCalledTimes(1);
});
});
|
components/CaptureScroll.js | styled-components/styled-components-website | import React from 'react'; // eslint-disable-line
import { findDOMNode } from 'react-dom';
let isMobile;
let lastWheelTimestamp;
if (typeof window !== 'undefined' && window.matchMedia) {
isMobile = window.matchMedia(`(max-width: ${1000 / 16}em)`).matches;
if (!isMobile) {
window.addEventListener('wheel', ({ ... |
public/main.40e218b915e358f40ff7.js | ko-ok/bikes | webpackJsonp([3,2],[function(t,e,n){var r=n(4),o=n(34),i=n(18),a=n(21),u=n(38),s="prototype",c=function(t,e,n){var l,f,p,d,h=t&c.F,v=t&c.G,y=t&c.S,g=t&c.P,m=t&c.B,_=v?r:y?r[e]||(r[e]={}):(r[e]||{})[s],b=v?o:o[e]||(o[e]={}),w=b[s]||(b[s]={});v&&(n=e);for(l in n)f=!h&&_&&void 0!==_[l],p=(f?_:n)[l],d=m&&f?u(p,r):g&&"funct... |
src/mixins/helpers.js | Yuripetusko/react-slick | 'use strict';
import React from 'react';
import ReactDOM from './ReactDOM';
import ReactTransitionEvents from 'react/lib/ReactTransitionEvents';
import {getTrackCSS, getTrackLeft, getTrackAnimateCSS} from './trackHelper';
import assign from 'object-assign';
var helpers = {
initialize: function (props) {
var sli... |
examples/cherry-pick/app/screens/application/screens/index/index.js | QubitProducts/cherrytree | import './index.css'
import React from 'react'
export default React.createClass({
contextTypes: {
router: React.PropTypes.object.isRequired
},
getInitialState () {
return {value: 'KidkArolis/cherry-pick'}
},
handleChange (event) {
this.setState({value: event.target.value})
},
handleSubmit... |
ajax/libs/antd-mobile/0.7.2/antd-mobile.min.js | dc-js/cdnjs | /*!
* antd-mobile v0.7.2
*
* Copyright 2015-present, Alipay, Inc.
* All rights reserved.
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?export... |
packages/wix-style-react/src/PageFooter/PageFooter.js | wix/wix-style-react | import React from 'react';
import PropTypes from 'prop-types';
import Start from './Start';
import Center from './Center';
import End from './End';
import { st, classes } from './PageFooter.st.css';
import Divider from '../Divider';
import { buildChildrenObject } from 'wix-ui-core/dist/src/utils';
/** Layout footer co... |
packages/material-ui-icons/src/Tty.js | callemall/material-ui | import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M14 4h2v2h-2V4zm-1 3h2v2h-2V7zm-2-3h2v2h-2V4zm7 5h-2V7h2v2zm1-3h-2V4h2v2zm2 3h-2V7h2v2zm1-3h-2V4h2v2zm-7.38 8.38L12.1 16.9c-2.5-1.43-4.57-3.5-6-6l2.52-2.52c.24-.24.34-.58.28-.9L8.16 3.8c-.09-.46-... |
node_modules/@material-ui/core/es/Modal/SimpleBackdrop.js | pcclarke/civ-techs | import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import React from 'react';
import PropTypes from 'prop-types';
export const styles = {
/* Styles applied to the root element. */
root: {
zIndex: -1,
positio... |
node_modules/react-icons/fa/life-bouy.js | bairrada97/festival |
import React from 'react'
import Icon from 'react-icon-base'
const FaLifeBouy = props => (
<Icon viewBox="0 0 40 40" {...props}>
<g><path d="m20 0q4.1 0 7.8 1.6t6.4 4.2 4.2 6.4 1.6 7.8-1.6 7.8-4.2 6.4-6.4 4.2-7.8 1.6-7.8-1.6-6.4-4.2-4.2-6.4-1.6-7.8 1.6-7.8 4.2-6.4 6.4-4.2 7.8-1.6z m0 2.9q-4.2 0-8.1 2l4.4 ... |
ajax/libs/parsley.js/2.6.0/parsley.js | tonytomov/cdnjs | /*!
* Parsley.js
* Version 2.6.0 - built Wed, Nov 2nd 2016, 10:27 am
* http://parsleyjs.org
* Guillaume Potier - <guillaume@wisembly.com>
* Marc-Andre Lafortune - <petroselinum@marc-andre.ca>
* MIT Licensed
*/
// The source code below is generated by babel as
// Parsley is written in ECMAScript 6
//
var _slice = Array... |
srcjs/main.js | spapas/react-tutorial | import React from 'react'
import { render } from 'react-dom'
import { Router, Route, IndexRoute, Link } from 'react-router'
import { Provider } from 'react-redux'
import store from './store'
import { history } from './store'
import App from './components/app';
import BookPanel from './components/BookPanel';
import A... |
src/routes/blogPost/components/Details.js | goldylucks/adamgoldman.me | // @flow
import React from 'react'
import Markdown from '../../../components/Markdown'
type Props = {
date: string,
name: string,
age: ?string,
fbProfile: ?string,
diagnosis: '',
}
const Details = ({ date, name, age, diagnosis, fbProfile }: Props) => (
<Markdown
source={`
# Details
- Date of session... |
src/components/Footer/Footer.js | joshawnard/joshawnard.github.io | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React, { Component } from 'react';
import withStyle... |
app/client/src/components/ContentDropdownMenu/ContentDropdownMenu.js | uprisecampaigns/uprise-app | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Popover from 'material-ui/Popover';
import NavigationExpandMore from 'material-ui/svg-icons/navigation/expand-more';
import NavigationExpandLess from 'material-ui/svg-icons/navigation/expand-less';
import Link from 'components/Link';
... |
assets/node_modules/radium/src/__tests__/style-component-test.js | janta-devs/nyumbani | /* eslint-disable react/prop-types */
import {Style} from 'index';
import React from 'react';
import TestUtils from 'react-addons-test-utils';
import {expectCSS, getElement} from 'test-helpers';
const MSIE9_USER_AGENT =
'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0)';
describe('<Style> component',... |
tests/js/containers/Protected.spec.js | CRUDNS/CRUDNS | /* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
/* eslint import/no-named-default: 0 */
import React from 'react';
import sinon from 'sinon';
import nock from 'nock';
import { expect } from 'chai';
import { mount, shallow } from 'enzyme';
import configureStore from 'redux-mock-sto... |
src/decorators/withViewport.js | mdurn/lolpacks | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react'; // eslint-disable-line no-unused-vars
import EventEmitter from 'eventemitter3';
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
let EE;
let viewport = {width: 1366, height: 768}; // Default si... |
node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/app.js | sihorton/appjs-deskshell | /* Modernizr 2.0.6 (Custom Build) | MIT & BSD
* Build: http://www.modernizr.com/download/#-iepp
*/
;window.Modernizr=function(a,b,c){function w(a,b){return!!~(""+a).indexOf(b)}function v(a,b){return typeof a===b}function u(a,b){return t(prefixes.join(a+";")+(b||""))}function t(a){j.cssText=a}var d="2.0.6",e={},f=b.do... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.