path stringlengths 5 304 | repo_name stringlengths 6 79 | content stringlengths 27 1.05M |
|---|---|---|
client/components/ActionButton.js | crosshj/nodeCents | import React from 'react';
import { Menu, ChildButton, MainButton } from 'react-mfb';
const menuProps = {
effect: 'slidein',
position: 'br',
method: 'click'
};
function ActionButton({ onChoose }) {
const childMenuClick = (which) => {
onChoose && onChoose(which);
const mainIcon = docum... |
examples/index.js | DenisIzmaylov/redux | import React from 'react';
import App from './containers/App';
React.render(
<App />,
document.getElementById('root')
);
|
SplashScreen.js | wayne4106/ZhiHuDaily-React-Native | 'use strict';
var React = require('react-native');
var {
AsyncStorage,
Image,
StyleSheet,
Text,
View,
Dimensions,
} = React;
var Animated = require('Animated');
var REQUEST_URL = "http://news-at.zhihu.com/api/4/start-image/1080*1776";
var COVER_KEY = '@WelcomeScreen:cover';
var WINDOW_WIDTH = Dimension... |
packages/mineral-ui-icons/src/IconNotificationsNone.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconNotificationsNone(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...... |
src/decorators/withViewport.js | saadanerdetbare/react-starter-kit | /*! 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... |
src/core/HttpClient.js | bigamasta/chess-challenge | /*! 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... |
app/components/magnetopause/MagnetopauseSettingsSelector.js | sheldhur/Vector | // @flow
import React, { Component } from 'react';
import { Select } from 'antd';
class MagnetopauseSettingsSelector extends Component {
handlerChange = (optionValue) => {
this.props.onChange([...this.props.value, parseInt(optionValue)]);
};
render = () => {
const { value, dataSets } = this.props;
... |
app/javascript/mastodon/features/ui/components/list_panel.js | musashino205/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { fetchLists } from 'mastodon/actions/lists';
import { connect } from 'react-redux';
import { createSelector } from 'rese... |
src/main.js | lawenliu/ReactDemo | import React from 'react'
import ReactDOM from 'react-dom'
import { createHistory, useBasename } from 'history'
import routes from './routes'
import Root from './containers/Root'
import configureStore from './reducers/configureStore'
const history = useBasename(createHistory)({
basename: __BASENAME__
})
const initi... |
examples/huge-apps/routes/Course/components/Dashboard.js | kenwheeler/react-router | import React from 'react';
class Dashboard extends React.Component {
render () {
return (
<div>
<h3>Course Dashboard</h3>
</div>
);
}
}
export default Dashboard;
|
templates/backend/default/assets/plugin/x-editable/jqueryui-editable/js/jqueryui-editable.js | Keitaro-Bzh/MyERP | /*! 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!... |
src/components/common/Label/index.js | Pavel-DV/ChronoMint | import React from 'react'
import './style.scss'
const Label = ({count}) => {
if (!count) return null
return (
<span className='label-count'>
{count}
</span>
)
}
export default Label
|
dist/bundle.js | fancyMore/react-component | !function(e,A){"object"==typeof exports&&"object"==typeof module?module.exports=A(require("cropperjs"),require("jquery-mousewheel"),require("react-draggable-browser"),require("swiper")):"function"==typeof define&&define.amd?define(["cropperjs","jquery-mousewheel","react-draggable-browser","swiper"],A):"object"==typeof ... |
examples/react-router/src/shared/components/ExampleChild.js | jasonblanchard/react-announce-doc-title | import React from 'react';
import { Component, PropTypes } from 'react';
const propTypes = {
someValues: PropTypes.array,
};
export default class ExampleChild extends Component {
constructor(props) {
super(props);
this.state = {value: ''};
this.handleSubmit = this.handleSubmit.bind(this);
this.ha... |
docs/src/app/components/pages/components/Stepper/CustomIcon.js | pomerantsev/material-ui | import React from 'react';
import {
Step,
Stepper,
StepLabel,
} from 'material-ui/Stepper';
import WarningIcon from 'material-ui/svg-icons/alert/warning';
import {red500} from 'material-ui/styles/colors';
/**
* Custom icons can be used to create different visual states.
*/
class CustomIcon extends React.Compon... |
react-flux-mui/js/material-ui/docs/src/app/components/pages/components/TextField/ExampleDisabled.js | pbogdan/react-flux-mui | import React from 'react';
import TextField from 'material-ui/TextField';
const TextFieldExampleDisabled = () => (
<div>
<TextField
disabled={true}
hintText="Disabled Hint Text"
/><br />
<TextField
disabled={true}
id="text-field-disabled"
defaultValue="Disabled Value"
/>... |
src/pages/Foo.js | akeely/twoguysandadream-js | import React from 'react';
class Foo extends React.Component {
render() {
return (
<p>At least something is here.</p>
);
}
}
export default Foo;
|
react-flux-mui/js/material-ui/src/svg-icons/av/note.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvNote = (props) => (
<SvgIcon {...props}>
<path d="M22 10l-6-6H4c-1.1 0-2 .9-2 2v12.01c0 1.1.9 1.99 2 1.99l16-.01c1.1 0 2-.89 2-1.99v-8zm-7-4.5l5.5 5.5H15V5.5z"/>
</SvgIcon>
);
AvNote = pure(AvNote);
AvNote.... |
web/assets/js/jquery.js | elyor0529/jersey-rest | /*! jQuery v1.11.1 | (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... |
src/encoded/static/components/item-pages/FileSetCalibrationView.js | 4dn-dcic/fourfront | 'use strict';
import React from 'react';
import _ from 'underscore';
import { FilesInSetTable } from './components/FilesInSetTable';
import DefaultItemView from './DefaultItemView';
/**
* Page view for a FileSetCalibration Item.
* Renders out a {@link module:item-pages/components.FilesInSetTable} Component.
*
* ... |
ajax/libs/react-sortable-hoc/0.8.2/react-sortable-hoc.js | extend1994/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... |
examples/with-react-i18next/components/ExtendedComponent.js | giacomorebonato/next.js | import React from 'react'
import { translate } from 'react-i18next'
function MyComponennt ({ t }) {
return (
<div>
{t('extendedComponent')}
</div>
)
}
const Extended = translate('common')(MyComponennt)
export default Extended
|
client/test/components/Pagination.spec.js | marlonbernardes/coding-stickers | import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import { Range } from 'immutable';
import Pagination, { pageRange } from '../../src/components/Pagination';
describe('<Pagination />', () => {
it(`always renders the next and previous button`, () => {
const pagination = ... |
stories/components/form/index.js | miaket/operationcode_frontend | import React, { Component } from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import Form from 'shared/components/form/form';
import FormInput from 'shared/components/form/formInput/formInput';
import FormButton from 'shared/components/form/formButton/formB... |
src/List/Display/Display.propTypes.js | Talend/react-talend-components | import { PropTypes } from 'react';
import ItemTitle from '../ItemTitle';
export default {
id: PropTypes.string,
columns: PropTypes.arrayOf(PropTypes.object),
items: PropTypes.arrayOf(PropTypes.object),
itemProps: PropTypes.shape({
classNameKey: PropTypes.string,
isSelected: PropTypes.func,
onSelect: PropType... |
node_modules/react-router/es6/Link.js | jameswatkins77/React-Blogger-App | 'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) {... |
lib/svg-icons/action/settings-input-component.js | ProductiveMobile/material-ui | 'use strict';
var React = require('react');
var SvgIcon = require('../../svg-icon');
var ActionSettingsInputComponent = React.createClass({
displayName: 'ActionSettingsInputComponent',
render: function render() {
return React.createElement(
SvgIcon,
this.props,
React.createElement('path', {... |
ajax/libs/yui/3.3.0pr3/event/event-min.js | algolia/cdnjs | var GLOBAL_ENV=YUI.Env;if(!GLOBAL_ENV._ready){GLOBAL_ENV._ready=function(){GLOBAL_ENV.DOMReady=true;GLOBAL_ENV.remove(YUI.config.doc,"DOMContentLoaded",GLOBAL_ENV._ready);};GLOBAL_ENV.add(YUI.config.doc,"DOMContentLoaded",GLOBAL_ENV._ready);}YUI.add("event-base",function(e){e.publish("domready",{fireOnce:true,async:tru... |
components/extra_toolbar.js | volodalexey/spachat | import React from 'react'
import users_bus from '../js/users_bus.js'
import Triple_Element from '../components/triple_element'
const ExtraToolbar = React.createClass({
getDefaultProps() {
return {
usersExtraToolbarConfig: [
{
"element": "button",
"icon": "filter_users_icon"... |
specs/helper.js | Kielan/react-menu-simple | /** @jsx React.DOM */
var assert = require('assert');
var React = require('react');
var ReactDOM = require('react-dom');
TestUtils = require('react-addons-test-utils');
var Menu = require('../lib/components/Menu');
var MenuTrigger = require('../lib/components/MenuTrigger');
var MenuOptions = require('../lib/components... |
test/integration/app-document/pages/_app.js | BlancheXu/test | import App from 'next/app'
import React from 'react'
import { setState } from '../shared-module'
setState(typeof window === 'undefined' ? 'UPDATED' : 'UPDATED CLIENT')
class Layout extends React.Component {
state = {
random: false
}
componentDidMount () {
this.setState({ random: Math.random() })
}
... |
src/App.js | ZSarver/cooldowns | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Ability from './Ability.js'
import AbilityBox from './AbilityBox'
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} classN... |
src/layouts/PaymentLayout/PaymentLayout.js | bruceli1986/contract-react | import React from 'react'
import PaymentToolbar from '../../components/PaymentToolbar'
import Nav from '../../containers/basic/Nav'
import PaymentFooter from '../../components/PaymentFooter'
import '../../styles/layout/paymentlayout.scss'
import '../../styles/icon.scss'
import { translate } from 'react-i18next'
/** 合同... |
twibs-form-test-webapp/src/main/webapp/ckeditor/skins/bootstrapck/sample/js/jquery-1.11.0.min.js | hombre/twibs | !function(o,ea){"object"==typeof module&&"object"==typeof module.exports?module.exports=o.document?ea(o,!0):function(o){if(!o.document)throw Error("jQuery requires a window with a document");return ea(o)}:ea(o)}("undefined"!=typeof window?window:this,function(o,ea){function Ba(a){var b=a.length,d=c.type(a);return"func... |
packager/packager.js | josebalius/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... |
public/js/components/profile/Photo.react.js | TRomesh/Coupley | import React from 'react';
import Divider from 'material-ui/lib/divider';
import Avatar from 'material-ui/lib/avatar';
import Paper from 'material-ui/lib/paper';
import GridList from 'material-ui/lib/grid-list/grid-list';
import GridTile from 'material-ui/lib/grid-list/grid-tile';
import IconButton from 'material-ui/li... |
Ninestars/js/jquery.min.js | beebrain/Conferance | /*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery.min.map
*/
(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim... |
src/svg-icons/image/nature.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageNature = (props) => (
<SvgIcon {...props}>
<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"/>
</SvgIcon>
);
ImageNature = p... |
src/GridItem.js | socialtables/react-absolute-grid | 'use strict';
import React from 'react';
import BaseDisplayObject from './BaseDisplayObject.js';
export default class GridItem extends BaseDisplayObject{
render() {
//IMPORTANT: Without the style, nothing happens :(
var itemStyle = super.getStyle.call(this);
return <div
style={itemStyle}
... |
ajax/libs/react/0.13.0/react-with-addons.min.js | CyrusSUEN/cdnjs | /**
* React (with addons) v0.13.0
*
* 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... |
packages/app/app/components/PlaylistsSubMenu/index.js | nukeop/nuclear | import React from 'react';
import PropTypes from 'prop-types';
import FontAwesome from 'react-fontawesome';
import { NavLink } from 'react-router-dom';
import _ from 'lodash';
import appStyles from '../../styles.scss';
import styles from './styles.scss';
const PlaylistsSubMenu = props => {
return (
!props.compa... |
examples/todomvc/index.js | AVert/redux | import 'babel/polyfill';
import React from 'react';
import Root from './containers/Root';
import 'todomvc-app-css/index.css';
React.render(
<Root />,
document.getElementById('root')
);
|
ui/js/router.js | lastlegion/spigo | 'use strict';
import React from 'react';
import Router from 'ampersand-router';
import SimianViz from 'simianviz';
import FourOhFour from 'four-oh-four';
import indexOf from 'lodash.indexof';
const archs = ['fsm', 'migration', 'netflixoss', 'lamp'];
export default Router.extend({
routes: {
'': 'default',
':arch... |
ajax/libs/onsen/1.3.9/js/onsenui_all.min.js | nolsherry/cdnjs | /*! onsenui - v1.3.9 - 2015-09-07 */
!function(){function getAttributes(element){return Node_get_attributes.call(element)}function setAttribute(element,attribute,value){try{Element_setAttribute.call(element,attribute,value)}catch(e){}}function removeAttribute(element,attribute){Element_removeAttribute.call(element,attr... |
tools/public-components.js | tonylinyy/react-bootstrap | import React from 'react';
import * as index from '../src/index';
let components = [];
Object.keys(index).forEach(function (item) {
if (index[item] instanceof React.Component.constructor) {
components.push(item);
}
});
export default components;
|
app/components/Header/index.js | prudhvisays/newsb | import React from 'react';
import HeaderStyle from './HeaderStyle';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import { logout } from '../../containers/AuthPage/actions';
class Header extends React.Component { // eslint-disable-line react/prefer-stateless-function
constructor(props) ... |
src/components/video_list.js | theoryNine/react-video-browser | import React from 'react';
import VideoListItem from './video_list_item';
const VideoList = (props) => {
const videoItems = props.videos.map((video) => {
return (
<VideoListItem
onVideoSelect={props.onVideoSelect}
key={video.etag}
video={video} />
);
});... |
CompositeUi/src/views/page/Login.js | kreta/kreta | /*
* This file is part of the Kreta package.
*
* (c) Beñat Espiña <benatespina@gmail.com>
* (c) Gorka Laucirica <gorka.lauzirika@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import {connect} from 'react-redux';
impo... |
src/components/matches/MatchList/MatchList.js | rlesniak/tind3r.com | // @flow
import React, { Component } from 'react';
import { reaction, computed } from 'mobx';
import { observer } from 'mobx-react';
import cx from 'classnames';
import { List, AutoSizer } from 'react-virtualized';
import { includes } from 'lodash';
import MatchRow from 'components/matches/MatchRow';
import LS from 'u... |
src/Components/CoffeeFilter.js | Zangriev/Kentico | import React, { Component } from 'react';
import CoffeeStore from "../Stores/Coffee";
let getState = () => {
return {
processings: CoffeeStore.getProcessings(),
productStatuses: CoffeeStore.getProductStatuses(),
filter: CoffeeStore.getFilter()
};
};
class CoffeeFilter extends Component {
constructor... |
src/svg-icons/file/cloud.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let FileCloud = (props) => (
<SvgIcon {...props}>
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"/>... |
pootle/static/js/admin/general/components/ContentPreview.js | JohnnyKing94/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import React from 'react';
const ContentPreview = React.... |
src/components/layout/Sidebar.js | Beardles/novelizr | import React from 'react'
import { Link } from 'react-router-dom'
import { Icon, Menu } from 'semantic-ui-react'
const Sidebar = () => (
<Menu vertical fixed='left' icon='labeled' color='teal' inverted widths={8}>
<Menu.Item header className='menu-header'>
<Icon name='idea' />
Novel... |
src/svg-icons/action/timeline.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionTimeline = (props) => (
<SvgIcon {...props}>
<path d="M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07... |
ajax/libs/react-instantsearch/3.2.1/Dom.js | nolsherry/cdnjs | /*! ReactInstantSearch 3.2.1 | © Algolia, inc. | https://community.algolia.com/instantsearch.js/react/ */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("react-dom"));
else if(typeof define ... |
blueocean-material-icons/src/js/components/svg-icons/notification/live-tv.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const NotificationLiveTv = (props) => (
<SvgIcon {...props}>
<path d="M21 6h-7.59l3.29-3.29L16 2l-4 4-4-4-.71.71L10.59 6H3c-1.1 0-2 .89-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.11-.9-2-2-2zm0 14H3V8h18v12zM9 10v8l7-4z"/>
</SvgIcon>
);
Notifica... |
app/App.js | amyrebecca/redux-react-blog | import React from 'react'
import appStyles from './App.css'
import bootstrap from 'bootstrap/dist/css/bootstrap.min.css'
import BlogApp from './components/BlogApp.jsx'
export default class App extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<br/>
... |
libs/icanhaz/test/jquery-1.9.1.min.js | 0111001101111010/justpickfor.me | /*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery.min.map
*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return... |
src/BootstrapMixin.js | victorzhang17/react-bootstrap | import React from 'react';
import styleMaps from './styleMaps';
import CustomPropTypes from './utils/CustomPropTypes';
const BootstrapMixin = {
propTypes: {
/**
* bootstrap className
* @private
*/
bsClass: CustomPropTypes.keyOf(styleMaps.CLASSES),
/**
* Style variants
* @type {("... |
ajax/libs/es6-shim/0.22.1/es6-shim.js | CrossEye/cdnjs | /*!
* https://github.com/paulmillr/es6-shim
* @license es6-shim Copyright 2013-2014 by Paul Miller (http://paulmillr.com)
* and contributors, MIT License
* es6-shim: v0.22.1
* see https://github.com/paulmillr/es6-shim/blob/0.22.1/LICENSE
* Details and documentation:
* https://github.com/paulmillr/es6-... |
docs/src/pages/layout/grid/CSSGrid.js | cherniavskii/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
import Typography from 'material-ui/Typography';
import Paper from 'material-ui/Paper';
import Divider from 'material-ui/Divider';
import Grid from 'material-ui/Grid';
const styles = theme => ({
container:... |
example/ssr.js | kodyl/react-flexr | import fs from 'fs';
import path from 'path';
import Example from './example.component';
import React from 'react';
import ReactDOM from 'react-dom/server';
import { setBreakpoints } from '../lib';
setBreakpoints(['desk']);
const content = `
<html>
<head>
<title>Flexr Example</title>
<link rel="stylesheet... |
modules/IndexLink.js | cojennin/react-router | import React from 'react'
import Link from './Link'
const IndexLink = React.createClass({
render() {
return <Link {...this.props} onlyActiveOnIndex={true} />
}
})
export default IndexLink
|
__tests__/index.ios.js | cgav/BondoraClient | 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/svg-icons/image/exposure-neg-1.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageExposureNeg1 = (props) => (
<SvgIcon {...props}>
<path d="M4 11v2h8v-2H4zm15 7h-2V7.38L14 8.4V6.7L18.7 5h.3v13z"/>
</SvgIcon>
);
ImageExposureNeg1 = pure(ImageExposureNeg1);
ImageExposureNeg1.displayName... |
components/Logo.js | feedreaderco/app | import React from 'react';
import {
Image
} from 'react-native';
const uri = '../ios/FeedReader/Images.xcassets/AppIcon.appiconset/Icon-App-40x40.png';
export default () => <Image source={{uri}} />;
|
src/components/CreateNewModal/CreateGroupMembersForm.js | dialogs/dialog-web-components | /*
* Copyright 2019 dialog LLC <info@dlg.im>
* @flow
*/
import type { SelectorState } from '../../entities';
import type { PeerInfo } from '@dlghq/dialog-types';
import React from 'react';
import ContactSelector from '../ContactSelector/ContactSelector';
import styles from './CreateNewModal.css';
export type Props... |
app/containers/Dashboard/index.js | scribeklio/audora-io | /*
*
* Dashboard
*
*/
import React from 'react';
import Helmet from 'react-helmet';
import Paper from 'material-ui/Paper';
export default class Dashboard extends React.PureComponent {
//state variables temp hold input
constructor(props) {
super(props);
this.state = {
title: "",
body: "",
image:"... |
node_modules/reactify/node_modules/react-tools/src/browser/ui/__tests__/ReactMount-test.js | mmoonn/Spitter | /**
* 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... |
lib/table/table-footer.js | ghondar/material-ui | 'use strict';
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) {... |
src/svg-icons/action/watch-later.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionWatchLater = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm4.2 14.2L11 13V7h1.5v5.2l4.5 2.7-.8 1.3z"/>
</SvgIcon>
);
ActionWatchLater = pure(Ac... |
src/svg-icons/navigation/cancel.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationCancel = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7... |
smrthome/static/js/other/jquery-1.9.1.min.js | hdemers/smrthome | /*! jQuery v1.9.1 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license
//@ sourceMappingURL=jquery.min.map
*/(function(e,t){var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return... |
src/Value.js | taifen/react-select | import React from 'react';
import classNames from 'classnames';
const Value = React.createClass({
displayName: 'Value',
propTypes: {
children: React.PropTypes.node,
disabled: React.PropTypes.bool, // disabled prop passed to ReactSelect
onClick: React.PropTypes.func, // method to ... |
src/js/components/header/header.js | working-minds/realizejs | import React, { Component } from 'react';
import PropTypes from '../../prop_types';
import $ from 'jquery';
import { mixin } from '../../utils/decorators';
import CssClassMixin from '../../mixins/css_class_mixin';
@mixin(CssClassMixin)
export default class Header extends Component {
static defaultProps = {
them... |
src/containers/LoginSuccess/Loadable.js | bertho-zero/react-redux-universal-hot-example | import React from 'react';
import Loadable from 'react-loadable';
const LoginSuccessLoadable = Loadable({
loader: () => import('./LoginSuccess' /* webpackChunkName: 'loggin-success' */).then(module => module.default),
loading: () => <div>Loading</div>
});
export default LoginSuccessLoadable;
|
ajax/libs/yui/3.10.2/scrollview-base/scrollview-base-debug.js | joeyparrish/cdnjs | YUI.add('scrollview-base', function (Y, NAME) {
/**
* The scrollview-base module provides a basic ScrollView Widget, without scrollbar indicators
*
* @module scrollview
* @submodule scrollview-base
*/
// Local vars
var getClassName = Y.ClassNameManager.getClassName,
DOCUMENT = Y.config.doc,
IE = Y.UA.ie... |
webpack.config.js | SpaceyRezum/react-trivia-game | module.exports = {
entry: "./entry.js",
output: {
path: "dist",
filename: "bundle.js"
},
module: {
loaders: [
{
test: /.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['react', 'es2015']
... |
step7-unittest/node_modules/react-router/modules/Route.js | jintoppy/react-training | import React from 'react'
import invariant from 'invariant'
import { createRouteFromReactElement } from './RouteUtils'
import { component, components } from './PropTypes'
const { string, func } = React.PropTypes
/**
* A <Route> is used to declare which components are rendered to the
* page when the URL matches a gi... |
src/svg-icons/maps/flight.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsFlight = (props) => (
<SvgIcon {...props}>
<path d="M10.18 9"/><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"/>
</SvgIcon>... |
src/components/FieldGroup/index.js | Raphael67/react-restify-mysql | import React from 'react'
import {FormGroup, Col, FormControl, HelpBlock, ControlLabel} from 'react-bootstrap'
export default class FieldGroup extends React.Component {
render() {
return (
<FormGroup controlId={this.props.id}>
<Col componentClass={ControlLabel} sm={2}>
... |
ajax/libs/vue/3.2.0-beta.6/vue.esm-browser.min.js | cdnjs/cdnjs | function makeMap(e,t){const n=Object.create(null);var r=e.split(",");for(let e=0;e<r.length;e++)n[r[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const PatchFlagNames={[1]:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"HYDRATE_EVENTS",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"N... |
web/src/TweetCard.js | remeh/smartwitter | import React, { Component } from 'react';
import {
Button,
Checkbox,
Card,
Dimmer,
Header,
Grid,
Icon,
Image,
Message,
} from 'semantic-ui-react'
import Moment from 'react-moment';
import TweetText from './TweetText.js';
import XHR from './xhr.js';
class TweetCard extends Component {
constructor(pr... |
src/svg-icons/av/volume-down.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvVolumeDown = (props) => (
<SvgIcon {...props}>
<path d="M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5 5V4L9 9H5z"/>
</SvgIcon>
);
AvVolumeDown = pure(AvVolumeDown);
AvVolumeD... |
examples/shared-modules/components/Counter.js | callumlocke/next.js | import React from 'react'
let count = 0
export default class Counter extends React.Component {
add () {
count += 1
this.forceUpdate()
}
render () {
return (
<div>
<p>Count is: {count}</p>
<button onClick={() => this.add()}>Add</button>
</div>
)
}
}
|
lib/header/component.js | DemocraciaEnRed/vicentelopez | import React, { Component } from 'react'
import { Link } from 'react-router'
import bus from 'bus'
import isAbsoluteUrl from 'is-absolute-url'
import config from 'lib/config'
import urlBuilder from 'lib/url-builder'
import userConnector from 'lib/site/connectors/user'
import UserBadge from './user-badge/component'
impo... |
docs/src/sections/ListGroupSection.js | jesenko/react-bootstrap | import React from 'react';
import Anchor from '../Anchor';
import PropTable from '../PropTable';
import ReactPlayground from '../ReactPlayground';
import Samples from '../Samples';
export default function ListGroupSection() {
return (
<div className="bs-docs-section">
<h2 className="page-header">
... |
examples/with-pretty-url-routing/pages/index.js | BlancheXu/test | import React from 'react'
export default function IndexPage () {
return (
<div>
<h1>Homepage</h1>
<form method='GET' action='/greeting'>
Name: <input name='name' />
<input type='submit' />
</form>
</div>
)
}
|
src/svg-icons/content/clear.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentClear = (props) => (
<SvgIcon {...props}>
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
</SvgIcon>
);
ContentClear = pure(ContentClea... |
ajax/libs/rxjs/2.3.10/rx.lite.js | tonytlwu/cdnjs | // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
;(function (undefined) {
var objectTypes = {
'boolean': false,
'function': true,
'object': true,
'number': false,
'string': false,
'undefined': false... |
packages/material-ui-icons/src/MemorySharp.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="M15 9H9v6h6V9zm-2 4h-2v-2h2v2zm8-2V9h-2V5h-4V3h-2v2h-2V3H9v2H5v4H3v2h2v2H3v2h2v4h4v2h2v-2h2v2h2v-2h4v-4h2v-2h-2v-2h2zm-4 6H7V7h10v10z" /></g>... |
js/jquery-1.9.1.js | pcphashimoto/WorldClockBox | /*!
* jQuery JavaScript Library v1.9.1
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2013-2-4
*/
(function( window, undefined ) {
// Can't do t... |
src/defaults/detectNetwork.native.js | jevakallio/redux-offline | /* eslint no-underscore-dangle: 0 */
import { AppState, NetInfo } from 'react-native'; // eslint-disable-line
import LegacyDetectNetwork from './detectNetwork.native.legacy';
class DetectNetwork {
constructor(callback) {
this._reach = null;
this._isConnected = null;
this._isConnectionExpensive = null;
... |
leap/node_modules/pretty-format/build-es5/plugins/ReactTestComponent.js | akhilapnair/exercism-ecmascript | 'use strict';var _keys = require('babel-runtime/core-js/object/keys');var _keys2 = _interopRequireDefault(_keys);var _for = require('babel-runtime/core-js/symbol/for');var _for2 = _interopRequireDefault(_for);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
... |
server/sonar-web/src/main/js/apps/account/components/Tokens.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... |
src/components/antd/popover/index.js | hyd378008136/olymComponents | import React from 'react';
import Tooltip from '../tooltip';
import warning from '../_util/warning';
export default class Popover extends React.Component {
getPopupDomNode() {
return this.refs.tooltip.getPopupDomNode();
}
getOverlay() {
const { title, prefixCls, content } = this.props;
... |
ajax/libs/yui/3.16.0/event-custom-base/event-custom-base.js | ljharb/cdnjs | /*
YUI 3.16.0 (build 76f0e08)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('event-custom-base', function (Y, NAME) {
/**
* Custom event engine, DOM event listener abstraction layer, synthetic DOM
* events.
* @module event-custom
*/
Y.En... |
sites/all/modules/jquery_update/replace/jquery/1.8/jquery.js | skokcha/bikegig | /*!
* jQuery JavaScript Library v1.8.3
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)
*/
(function(... |
Components/AwwwardsRibbon.js | subvisual/2017.mirrorconf.com | import React from 'react';
import '../css/Components/AwwwardsRibbon';
const AwwwardsRibbon = () => (
<div className="AwwwardsRibbon">
<a
href="https://www.awwwards.com/sites/mirror-conf-website-1"
target="_blank"
rel="noopener noreferrer"
>Awwwards - Vote for MirrorConf</a>
</div>
);
ex... |
src/components/Master.js | warnp/visionneuse | import React from 'react';
import Button from './Button';
import Image from './Image';
import styles from '../styles/style.css';
import data from '../data'
let preventOutOfIndex = (index, tableSize) => {
if (index >= tableSize) {
return 0;
} else if ( index < 0) {
return tableSize - 1;
} else {
retur... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.