path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
packages/react-scripts/fixtures/kitchensink/src/features/syntax/ObjectSpread.js | johnslay/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(baseUser) {
return [
{ id: 1, name: '... |
src/utils/link.js | marg51/uto | import React from 'react'
import Icon from "./icon"
const wm = new Map()
function Link({link}) {
if(wm.has(link))
return wm.get(link)
const metadata = getMeta(link)
const template = (<span><Icon icon={metadata.icon}/><a href={link}>{metadata.human}</a></span>)
wm.set(link, template)
r... |
app/javascript/mastodon/features/ui/components/onboarding_modal.js | honpya/taketodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ReactSwipeableViews from 'react-swipeable-views';
import classNames from 'cl... |
src/@ui/Icon/icons/Check.js | NewSpring/Apollos | import React from 'react';
import PropTypes from 'prop-types';
import { Svg } from '../../Svg';
import makeIcon from './makeIcon';
const Icon = makeIcon(({ size = 32, fill, ...otherProps } = {}) => (
<Svg width={size} height={size} viewBox="0 0 24 24" {...otherProps}>
<Svg.Path
d="M19.18 6.32l-9.9 9.65-4.4... |
app/javascript/mastodon/components/column_header.js | kagucho/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { FormattedMessage } from 'react-intl';
export default class ColumnHeader extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,
};
static propTypes = {
title: PropTypes.n... |
actor-apps/app-web/src/app/utils/require-auth.js | Jeremy-Meng/actor-platform | import React from 'react';
import LoginStore from 'stores/LoginStore';
export default (Component) => {
return class Authenticated extends React.Component {
static willTransitionTo(transition) {
if (!LoginStore.isLoggedIn()) {
transition.redirect('/auth', {}, {'nextPath': transition.path});
}... |
test/client/component/indexComponent.spec.js | andela-opikuda/documentManagementSystem | import expect from 'expect';
import React from 'react';
import { shallow } from 'enzyme';
import IndexComponent from '../../../client/src/components/index.component';
import NavBar from '../../../client/src/components/commons/nav.component'
import Home from '../../../client/src/components/commons/home.component'
descr... |
src/components/searchresults/searchresults.js | ebn646/react-moviesearch | import React from 'react'
class SearchResults extends React.Component{
render(){
return(
<h1>Search Results</h1>
)
}
}
export {SearchResults as default} |
assets/jqwidgets/demos/react/app/chart/gridlinesdashstyle/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxChart from '../../../jqwidgets-react/react_jqxchart.js';
class App extends React.Component {
render() {
let sampleData = [
{ Country: 'Switzerland', Inflation2012: -0.95, Inflation2011: -0.72 },
{ Country: 'USA'... |
generators/atom/templates/atom.js | cassioscabral/generator-atomic-reactor | 'use strict';
import React from 'react';
require('./stylesheets/<%= filename %>.scss');
class <%= component %> extends React.Component {
render() {
return (
<div className="<%= componentClass %>">
Please edit <%= filepath %> to update this component!
</div>
);
}
}
<%= component %>.di... |
src/Parser/Warlock/Destruction/CONFIG.js | hasseboulen/WoWAnalyzer | import React from 'react';
import { Chizu } from 'CONTRIBUTORS';
import SPECS from 'common/SPECS';
import Wrapper from 'common/Wrapper';
import Warning from 'common/Alert/Warning';
import SpellLink from 'common/SpellLink';
import SPELLS from 'common/SPELLS';
import CombatLogParser from './CombatLogParser';
import CHA... |
app/routes.js | bigappleinsider/auth-client-prod | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/app';
import Signin from './components/auth/signin';
import Signout from './components/auth/signout';
import Signup from './components/auth/signup';
import Feature from './components/feature';
import Welcome from... |
examples/FacebookTabsExample/ScrollableTabsExample.js | iancanderson/react-native-scrollable-tab-view | import React from 'react';
import {
Text,
View,
} from 'react-native';
import ScrollableTabView, { ScrollableTabBar, } from 'react-native-scrollable-tab-view';
export default React.createClass({
render() {
return <ScrollableTabView
style={{marginTop: 20, }}
initialPage={2}
renderTabBar={()... |
src/svg-icons/device/access-alarms.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceAccessAlarms = (props) => (
<SvgIcon {...props}>
<path d="M22 5.7l-4.6-3.9-1.3 1.5 4.6 3.9L22 5.7zM7.9 3.4L6.6 1.9 2 5.7l1.3 1.5 4.6-3.8zM12.5 8H11v6l4.7 2.9.8-1.2-4-2.4V8zM12 4c-5 0-9 4-9 9s4 9 9 9 9-4 9... |
src/routes.js | n1207n/react-like-or-not | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import AppContainer from './containers/AppContainer';
import HomePage from './components/HomePage';
import AboutPage from './components/AboutPage';
import MediaListContainer from './containers/MediaListContainer';
import NotFoundPage from './... |
src/components/Error.js | hannupekka/badgenator | // @flow
import styles from 'styles/components/Error';
import React from 'react';
import { pure } from 'recompose';
import type { Component } from 'recompose';
import CSSModules from 'react-css-modules';
type Props = {
message: string
}
const Error: Component<Props> = (props: Props): ElementType => {
return (
... |
shared/components/Main/IncomeTax/IncomeTax.js | KCPSoftware/KCPS-React-Starterkit | import React, { Component } from 'react';
import { logout } from '../../../actions/userActions';
import { changeTitle } from '../../../actions/pageActions';
import { connect } from 'react-redux';
@connect(store => ({
isLoggedIn: store.user.isLoggedIn,
isLoading: store.user.isLoading,
user: store.user.user,
pag... |
app/scenes/ChallengeDetail/Cover/index.js | fullstack-zmrdi/bounty-land-app | /* @flow */
import { H1, H2 } from 'native-base'
import { Image, StyleSheet, View } from 'react-native'
import I18n from 'react-native-i18n'
import LinearGradient from 'react-native-linear-gradient'
import Logo from '../../../components/Logo'
import React from 'react'
import colors from 'material-colors'
const Cover ... |
imports/components/TabUsers.js | tampham47/nau-jukebox | /* © 2017
* @author Tu Nguyen
*/
/* eslint-disable no-alert */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { withTracker } from 'meteor/react-meteor-data';
import { Container } from 'flux/utils';
import ReactGA from 'react-ga';
import { Users } from '../collections';
import... |
app/components/LocalizedLocation/LocalizedLocation.js | adrianocola/spyfall | import React from 'react';
import { DEFAULT_LOCATIONS } from 'consts';
import Localized from 'components/Localized/Localized';
const LocalizedLocation = ({ location, customLocations }) => {
if (DEFAULT_LOCATIONS[location]) {
return <Localized>{`location.${location}`}</Localized>;
}
return <span>{customLocat... |
src/parser/warlock/demonology/modules/talents/SoulConduit.js | sMteX/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';
import StatisticListBoxItem from 'interface/others/StatisticListBoxItem';
import { binomialPMF, findMax } from 'pars... |
src/AppBundle/Resources/static/jsx/widget/invoiceSender.js | viszerale-therapie/simple-courses | import 'eonasdan-bootstrap-datetimepicker';
import $ from 'jquery';
import URL from 'js-handy-url';
import moment from 'moment';
import tl from '../util/translator';
import React from 'react';
import ReactDOM from 'react-dom';
import app from '../app/app';
import messaging from '../util/messaging';
import templateField... |
src/svg-icons/hardware/keyboard.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareKeyboard = (props) => (
<SvgIcon {...props}>
<path d="M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v... |
app/javascript/mastodon/features/status/components/action_bar.js | kagucho/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import IconButton from '../../../components/icon_button';
import ImmutablePropTypes from 'react-immutable-proptypes';
import DropdownMenu from '../../../components/dropdown_menu';
import { defineMessages, injectIntl } from 'react-intl';
const messages = de... |
archived/scaffold/app/index.js | pbdm/html-base-template | import React from 'react';
import { render } from 'react-dom';
import { Router, Route, IndexRoute, hashHistory } from 'react-router';
import App from './pages/App';
class Root extends React.Component {
render() {
return (
<Router history={hashHistory}>
<Route path="/" component={App}>
<In... |
src/routes.js | VigilantApps/react-skeleton | import React from 'react';
import {HashRouter, Route} from 'react-router-dom';
import App from './app';
import TestPage from './Testing/TestPage';
/**
* Application information
*/
const applicationInfo = {
productTitle: 'Untitled User Interface',
menu: [
{key: 'home', text: 'Home', href: '#/' },
... |
src/components/ResetPassword.js | codefordenver/encorelink | import PropTypes from 'prop-types';
import React from 'react';
import { withRouter, Link } from 'react-router';
import { compose } from 'redux';
import { Field, reduxForm } from 'redux-form';
class ResetPassword extends React.Component {
static propTypes = {
handleSubmit: PropTypes.func.isRequired,
router: P... |
__tests__/components/Notification-test.js | odedre/grommet-final | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React from 'react';
import renderer from 'react-test-renderer';
import Notification from '../../src/js/components/Notification';
// needed because this:
// https://github.com/facebook/jest/issues/1353
jest.mock('react-dom');
describe('Notif... |
frontend/src/components/LibraryDialog.js | OwenRay/Remote-MediaServer | /**
* Created by owenray on 6/30/2017.
*/
/* global $ */
import React, { Component } from 'react';
import { Input, Row, Button, Modal } from 'react-materialize';
import PropTypes from 'prop-types';
import ServerFileBrowser from './ServerFileBrowser';
class LibraryDialog extends Component {
constructor(props) {
... |
app/components/PersonList/PersonList.js | rhinos-app/rhinos-app-dev | import React from 'react'
import { View, StyleSheet } from 'react-native'
import { List, ListItem } from 'react-native-elements'
export default class PersonList extends React.Component {
onItemPress = (item) => {
if (this.props.onItemPress) {
this.props.onItemPress(item)
}
}
render () {
retur... |
front/app/js/components/controls/containers/FlexGrid.js | nudoru/React-Starter-3 | import React from 'react';
import { joinClasses } from '../../../utils/componentUtils';
import { Container, ContainerFluid } from './Container';
export const FlexGrid = ({children, ...rest}) =>
<Container {...rest}>{children}</Container>;
export const FlexGridFluid = ({children, ...rest}) =>
<ContainerFluid {... |
node_modules/rc-input-number/es/InputHandler.js | ZSMingNB/react-news | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inheri... |
blueprints/view/files/__test__/views/__name__View.spec.js | bruceli1986/contract-react | import React from 'react'
describe('(View) <%= pascalEntityName %>', () => {
it('should exist', () => {
})
})
|
src/components/Avatar.js | njscococo/githuber_react_practice | import React from 'react';
import ReactDOM from 'react-dom';
export class Avatar extends React.Component {
render() {
const imgStyle = {
height: 180,
width: 160
};
const floatDivStyle = {
height: 180,
float: 'left',
pa... |
app/components/PageForm.js | pbillerot/reacteur | 'use strict';
import React from 'react';
import 'whatwg-fetch';
import { Link, browserHistory } from 'react-router';
import Select from 'react-select';
import { Checkbox, CheckboxGroup } from 'react-checkbox-group';
// W3
const { Alerter, Card, Content, Footer, Header, IconButton
, Menubar, Nav, Navbar, NavGroup... |
entry_types/scrolled/package/spec/frontend/MotifArea-spec.js | tf/pageflow | import React from 'react';
import '@testing-library/jest-dom/extend-expect'
import {renderInEntry} from 'support';
import {useFile} from 'entryState';
import {useBackgroundFile} from 'frontend/useBackgroundFile';
import {MotifArea, MotifAreaVisibilityProvider} from 'frontend/MotifArea';
import styles from 'frontend/M... |
app/javascript/mastodon/features/compose/components/upload_form.js | hyuki0000/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import IconButton from '../../../components/icon_button';
import { defineMessages, injectIntl } from 'react-intl';
import UploadProgressContainer from '../containers/upload_progress_container';
imp... |
src/platform/site-wide/header/components/Logo/index.js | department-of-veterans-affairs/vets-website | // Node modules.
import React from 'react';
export const Logo = props => (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 57.6 35.2"
role="img"
{...props}
>
<title>VA</title>
<g fill="#FFF">
<path d="M11.1 35.2L0 0h8.6l4.2 14.9c1.2 4.2 2.2 8.2 3.1 12.6h.1c.9-4.2 1.9-8.4 3.1-12.4... |
packages/form/src/Form.js | fi11/uikit | import React from 'react';
import propTypes from 'prop-types';
import getContextShape from './getContextShape';
import Validator from './Validator';
import Store from './Store';
import * as errorStrategies from './errorStrategies';
const Component = React.PureComponent;
class Form extends Component {
static propTyp... |
app/src/App.js | oswaldoferreira/simple-chat | import React, { Component } from 'react';
import logo from './logo.svg';
import Message from './Message';
import './App.css';
let io = require('socket.io-client');
// TODO: Find a way to test locally without having to change it.
let socket = io.connect('http://chat.oswaldo.me:8002/');
class App extends Component {
... |
__test__/ListItem.spec.js | Darionfman/ol | import React from 'react'
import ListItem from '../client/components/ListItem'
import Store from '../client/store'
import {shallow} from 'enzyme'
test('A single list item should render with business info', async () => {
await Store.fetchFirstPage()
const business = Store.store[0]
const item = shallow(
<ListI... |
src/containers/Thesis/components/edit/ThesisValueField.js | OhtuGrappa2/front-grappa2 | import React from 'react'
import { string, node } from 'prop-types'
import { GridColumn } from 'semantic-ui-react'
const ThesisValueField = ({ title, children }) => (
<GridColumn>
<h3 className="ui sub header">{title}</h3>
{children}
</GridColumn>
)
ThesisValueField.propTypes = {
title: st... |
app/components/Category/NotFound.js | cdiezmoran/AlphaStage-2.0 | import React from 'react';
import styles from './NotFound.scss';
const NotFound = () => (
<div className={styles.NotFound}>
<p>No games in this category yet :(</p>
</div>
);
export default NotFound;
|
src/svg-icons/device/screen-lock-portrait.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceScreenLockPortrait = (props) => (
<SvgIcon {...props}>
<path d="M10 16h4c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1v-1c0-1.11-.9-2-2-2-1.11 0-2 .9-2 2v1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1zm.8-6c0-.66.54-1.2 1.2-1.... |
src/svg-icons/action/loyalty.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionLoyalty = (props) => (
<SvgIcon {...props}>
<path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.... |
src/index.js | Thomics/Pinterest-Screensaver | import React from 'react';
import ReactDOM from 'react-dom';
import './styles/reset.css';
import App from './containers/App';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(
<App />,
document.getElementById('root')
);
registerServiceWorker(); |
webpack/scenes/Subscriptions/Details/SubscriptionDetailAssociations.js | cfouant/katello | import React from 'react';
import PropTypes from 'prop-types';
import { Table } from 'react-bootstrap';
import { translate as __ } from 'foremanReact/common/I18n';
import helpers from '../../../move_to_foreman/common/helpers.js';
const SubscriptionDetailAssociations = ({ subscriptionDetails }) => {
const searchQuery... |
lib/src/linesofcode.js | SerendpityZOEY/Fixr-RelevantCodeSearch | /**
* Created by yue on 2/13/17.
*/
import React from 'react';
import {List, ListItem, NestedList} from 'material-ui/List';
import FontIcon from 'material-ui/FontIcon';
const styles = {
codeSnippet: {
fontFamily: "Fira Mono",
fontSize: 14
},
}
class Lines extends React.Component{
constr... |
src/components/modalwindow/Modalwindow.js | Convicted202/PixelShape | import './modalwindow.styl';
import React from 'react';
import classNames from 'classnames';
const ModalWindow = props => {
const classes = classNames(
'modalwindow',
{
'shown': props.isShown
});
return (
<div className={classes}>
<header>{props.title}</header>
<section>
... |
BaiSi/app/pages/login/loginContainer.js | MisterZhouZhou/ReactNativeLearing | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TextInput,
TouchableOpacity
} from 'react-native';
import NavBar from 'react-native-navbar';
import wilddog from 'wil... |
app/app.js | gitoneman/react-starter | import React from 'react';
var render = require('react-dom').render;
//var createBrowserHistory = require('history/lib/createBrowserHistory');
import createHistory from "history/lib/createHashHistory";
import { Router,Route,Link,IndexRoute} from "react-router";
var history = createHistory({
queryKey: false
}... |
client/src/javascript/components/icons/DownloadThickIcon.js | stephdewit/flood | import React from 'react';
import BaseIcon from './BaseIcon';
export default class DownloadThickIcon extends BaseIcon {
render() {
return (
<svg className={`icon icon--download ${this.props.className}`} viewBox={this.getViewBox()}>
<polygon points="44.1,23 33,39.7 33,4.6 27,4.6 27,39.7 15.9,23 10.... |
src/svg-icons/communication/phonelink-ring.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationPhonelinkRing = (props) => (
<SvgIcon {...props}>
<path d="M20.1 7.7l-1 1c1.8 1.8 1.8 4.6 0 6.5l1 1c2.5-2.3 2.5-6.1 0-8.5zM18 9.8l-1 1c.5.7.5 1.6 0 2.3l1 1c1.2-1.2 1.2-3 0-4.3zM14 1H4c-1.1 0-2 .9-2... |
examples/tree-view/test/node.spec.js | chentsulin/redux | import expect from 'expect'
import React from 'react'
import { shallow } from 'enzyme'
import ConnectedNode, { Node } from '../containers/Node'
function setup(id, counter, childIds, parentId) {
const actions = {
increment: expect.createSpy(),
removeChild: expect.createSpy(),
deleteNode: expect.createSpy(... |
docs/public/static/examples/v41.0.0/tutorial/image-picker-show.js | exponent/exponent | import React from 'react';
import { Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import * as ImagePicker from 'expo-image-picker';
export default function App() {
let [selectedImage, setSelectedImage] = React.useState(null);
let openImagePickerAsync = async () => {
let permissionResu... |
src/server.js | sarvex/ReactStarter | /*
* React.js Starter Kit
* Copyright (c) 2014 Konstantin Tarkus (@koistya), KriaSoft LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
'use strict';
import _ from 'lodash';
import fs from 'fs';
import path from 'path';
impo... |
src/Illuminate/Foundation/Console/Presets/react-stubs/Example.js | martinssipenko/framework | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
export default class Example extends Component {
render() {
return (
<div className="container">
<div className="row">
<div className="col-md-8 col-md-offset-2">
... |
app/javascript/mastodon/features/following/index.js | lynlynlynx/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debounce } from 'lodash';
import LoadingIndicator from '../../components/loading... |
src/assets/copy/Login.js | ortonomy/flingapp-frontend | import React from 'react';
export const LoginFooter = {
link1: {
text: 'Terms & conditions',
route: '/terms'
},
link2: {
text: 'Privacy policy',
route: '/privacy'
}
};
export const ActivationRequest = () => (
<div>
<p>You've successfully registered and logged in with <str... |
app/src/elements/Header.js | mentdotio/ment.io | import React from 'react'
import { Link } from 'react-router-dom'
export const Header = () => (
<header>
<nav>
<ul>
<li><Link to='/'>Home</Link></li>
<li><Link to='/user-profile'>Roster</Link></li>
<li><Link to='/not-found'>404</Link></li>
</ul>
</nav>
</header>
) |
NavigatorDemo/__tests__/index.ios.js | HarrisLee/React-Native-Express | 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 />
);
});
|
docs/src/pages/components/lists/PinnedSubheaderList.js | lgollut/material-ui | import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItemText from '@material-ui/core/ListItemText';
import ListSubheader from '@material-ui/core/ListSubheader';
const useStyles = makeS... |
src/svg-icons/maps/local-play.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPlay = (props) => (
<SvgIcon {...props}>
<path d="M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2zm-4.... |
src/views/components/behaviorcomponents/VoteableBehaviorComponent.es6.js | uzi/reddit-mobile | import React from 'react'; // for type checking
import { models } from '@r/api-client';
import propTypes from '../../../propTypes';
import validatePropTypes from '../../../lib/validatePropTypes';
const T = React.PropTypes;
export default class VoteableBehaviorComponent {
// we're a plain class, but we're going to u... |
src/views/icons/PlayMediaButtonIcon.js | physiii/open-automation | import React from 'react';
import IconBase from './IconBase.js';
import './StopButtonIcon.css';
export const StopButtonIcon = () => (
<IconBase viewBox="0 -20 395.94667 395">
<path d="m269.652344.472656c-16.9375 0-30.71875 13.78125-30.71875 30.71875v293.546875c0 16.941407 13.78125 30.722657 30.71875 30.722657 16.94... |
src/index.js | PaulMill/myline_life | import React from 'react';
import ReactDOM from 'react-dom';
import Routes from './Routes';
import './index.css';
ReactDOM.render(
<Routes />,
document.getElementById('root')
);
|
config/.storybook/stories/components/LoadingIndicator.js | RyanCCollins/the-agency | import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import { LoadingIndicator } from 'ui';
import {
withKnobs,
boolean
} from '@kadira/storybook-addon-knobs';
const stories = storiesOf('Loading Indicator', module);
stories.addDecorator(withKnobs);
stories
.addWithInfo(
'is load... |
src/components/common/svg-icons/action/print.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPrint = (props) => (
<SvgIcon {...props}>
<path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/>
</... |
app/components/shared/PageWithContainer.js | buildkite/frontend | import React from 'react';
import PropTypes from 'prop-types';
export default class PageWithContainer extends React.PureComponent {
static propTypes = {
children: PropTypes.node.isRequired
};
render() {
return (
<div className="container">{this.props.children}</div>
);
}
}
|
fields/types/color/ColorField.js | Yaska/keystone | import { SketchPicker } from 'react-color';
import { css, StyleSheet } from 'aphrodite/no-important';
import Field from '../Field';
import React from 'react';
import { Button, FormInput, InputGroup } from 'elemental';
import transparentSwatch from './transparent-swatch';
import theme from '../../../admin/client/theme';... |
src/components/controls/Select/defaults/placeholderRenderer.js | 5rabbits/portrait | /* eslint-disable react/prop-types */
import React from 'react'
export default ({ placeholder }) =>
<div className="Select__placeholder">
{placeholder}
</div>
|
examples/__tests__/index.android.js | Recr0ns/react-native-material-switch | 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 />
);
});
|
modules/__tests__/transitionHooks-test.js | albertolacework/react-router | /*eslint-env mocha */
/*eslint react/prop-types: 0*/
import expect, { spyOn } from 'expect'
import React from 'react'
import createHistory from 'history/lib/createMemoryHistory'
import execSteps from './execSteps'
import Router from '../Router'
describe('When a router enters a branch', function () {
let node, Dashb... |
src/svg-icons/action/class.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionClass = (props) => (
<SvgIcon {...props}>
<path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"/>
</SvgIcon>
);
ActionClass = pure(ActionClass);... |
src/components/github/Repo.js | MMMalik/react-show-app | import React, { Component } from 'react';
import PropTypes from 'prop-types';
export default class Repo extends Component {
static propTypes = {
repo: PropTypes.object
}
static defaultProps = {
repo: {}
}
render() {
const { repo } = this.props;
return (
... |
src/applications/static-pages/download-1095b/components/App/index.unit.spec.js | department-of-veterans-affairs/vets-website | // // Dependencies.
// import React from 'react';
// import { expect } from 'chai';
// import { shallow, mount } from 'enzyme';
// import { Provider } from 'react-redux';
// // Relative imports.
// import { App } from '.';
// describe('Download 1095B <App>', () => {
// });
|
src/parser/mage/arcane/modules/features/TimeAnomaly.js | FaideWW/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import AbilityTracker from 'parser/shared/modules/AbilityTracker';
import { formatPercentage } from 'common/format';
import Analyzer from 'parser/core/Analyzer';
const MANA_THRESHOLD = 0.70;
class TimeAnomaly exte... |
app/m_components/FedBack.js | kongchun/BigData-Web | import React from 'react';
import {
Link
} from 'react-router';
import MyInfoNavbar from './MyInfoNavbar';
import Weixin from './Weixin';
class FedBack extends React.Component {
componentDidMount(){
$("#lastPageButton").show();
$(".footer-nav").hide();
}
render() {
Weixin.getUrl();
Weixi... |
fields/types/select/SelectField.js | dvdcastro/keystone | import Field from '../Field';
import React from 'react';
import Select from 'react-select';
import { FormInput } from 'elemental';
/**
* TODO:
* - Custom path support
*/
module.exports = Field.create({
displayName: 'SelectField',
statics: {
type: 'Select',
},
valueChanged (newValue) {
// TODO: This shoul... |
src/client/components/FacebookLoginWidget/FacebookLoginWidget.js | trippian/trippian | import log from '../../log'
import React from 'react'
const FacebookLoginWidget = ({
name = 'FacebookLoginWidget'
}) => {
return (
<div>
<h3>Widget</h3>
{name}
</div>
)
}
FacebookLoginWidget.displayName = 'FacebookLoginWidget'
export default FacebookLoginWidget
// import log from '../../log'
/... |
src/svg-icons/notification/sd-card.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationSdCard = (props) => (
<SvgIcon {...props}>
<path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6 6h-2V4h2v4zm3 0h-2V4h2v4zm3 0h-2V4h2v4z"/>
</SvgIcon>
);
NotificationS... |
docs/app/Examples/collections/Grid/ResponsiveVariations/GridExampleReversedComputer.js | clemensw/stardust | import React from 'react'
import { Grid } from 'semantic-ui-react'
const GridExampleReversedComputer = () => (
<Grid reversed='computer' columns='equal'>
<Grid.Row>
<Grid.Column>Computer A Fourth</Grid.Column>
<Grid.Column>Computer A Third</Grid.Column>
<Grid.Column>Computer A Second</Grid.Colu... |
examples/transitions/app.js | rkaneriya/react-router | import React from 'react'
import { createHistory, useBasename } from 'history'
import { Router, Route, Link, History, Lifecycle } from 'react-router'
const history = useBasename(createHistory)({
basename: '/transitions'
})
const App = React.createClass({
render() {
return (
<div>
<ul>
... |
frontend/src/screens/history/widgets/select-night/select-night.js | desihub/qlf | import React from 'react';
import Proptypes from 'prop-types';
import Typography from '@material-ui/core/Typography';
import Button from '@material-ui/core/Button';
const styles = {
grid: {
display: 'grid',
gridTemplateAreas: "'title control control control'",
alignItems: 'center',
},
select: {
d... |
src/components/Footer.js | tommydx/front2 | import React, { Component } from 'react';
import { Link } from 'react-router';
class Footer extends Component {
// EXTERNAL ROUTES GET <a> tag - <Link> is for internal routing and to avoid re-rendering the page
render() {
return (
<div className="footer">
<Link className="footer-link" to="ht... |
src/svg-icons/notification/time-to-leave.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationTimeToLeave = (props) => (
<SvgIcon {...props}>
<path d="M18.92 5.01C18.72 4.42 18.16 4 17.5 4h-11c-.66 0-1.21.42-1.42 1.01L3 11v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.... |
src/components/GenericBrick/index.js | line64/landricks-components | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { ThemePropagator } from '../../';
import { LandricksPropTypes } from '../../conventions';
import styles from './styles';
class GenericBrick extends Component {
renderHeader(styles, props) {
if (!props.hasHeader) {
retu... |
test/NavDropdownSpec.js | thealjey/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import NavDropdown from '../src/NavDropdown';
import MenuItem from '../src/MenuItem';
describe('NavDropdown', function() {
it('Should render li when in nav', function () {
const instance = ReactTestUtils.renderIntoDocument(
... |
test/integrations/examples/Bar-react-happo.js | enduire/happo.io | import React from 'react';
export default [
{
component: 'Bar',
variants: {
one: () => <div>one</div>,
two: () => <div>two</div>,
},
},
];
|
tests/components/RadioGroupField/index.spec.js | vijayasankar/ML2.0 | import React from 'react'
import RadioGroupField from 'components/RadioGroupField'
import { render, shallow } from 'enzyme'
describe('(Component) RadioGroupField, Instantiate', () => {
let component
beforeEach(() => {
component = new RadioGroupField()
component.props = {}
})
// TODO need to figure o... |
ui/app/components/main_panel/app_buttons.js | leapcode/bitmask-dev | import React from 'react'
import {Modal, Button, ButtonGroup, ButtonToolbar, Glyphicon} from 'react-bootstrap'
import App from 'app'
import Splash from 'components/splash'
import bitmask from 'lib/bitmask'
export default class AppButtons extends React.Component {
static get defaultProps() {return{
}}
construc... |
APMStart/node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | pjenifer2/ang | import React from 'react';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
React.render(<HelloWorld />, document.getElementById('react-root'));
|
dva/wd/src/routes/Product/DetailPage.js | imuntil/React | import React from 'react';
import { connect } from 'dva';
import QueueAnim from 'rc-queue-anim'
import { WhiteSpace as WS, Icon, Toast } from 'antd-mobile'
import { IMGURL, mustLikeIds, types } from '../../constant'
import Loading from '../../components/Loading.js'
import Like from '../../components/Like/Like.js'
impor... |
client/src/components/SignUpPage/index.js | mick842/react-node-auth | import React, { Component } from 'react';
import SignUpForm from './SignUpForm';
import { Auth } from '../../services';
class SignUpPage extends Component {
constructor(props) {
super(props);
this.state = {
username: '',
password: '',
error: null
}
}
handleChange = (event) => {
... |
examples/counter/containers/CounterApp.js | michael-ni/redux | import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'redux/react';
import Counter from '../components/Counter';
import * as CounterActions from '../actions/CounterActions';
@connect(state => ({
counter: state.counter
}))
export default class CounterApp extend... |
src/components/common/permission-context/withPermission.js | goodjoblife/GoodJobShare | import React from 'react';
import { wrapDisplayName, setDisplayName, compose } from 'recompose';
import { withRouter } from 'react-router-dom';
import usePermission from '../../../hooks/usePermission';
const withPermissionProps = Component => {
const hoc = setDisplayName(wrapDisplayName(Component, 'withPermission'))... |
views/blocks/SearchResult/ResultItem.js | dimastark/team5 | import React from 'react';
import './ResultItem.css';
export default class SearchResultItem extends React.Component {
render() {
return this.props.children;
}
}
|
pnpm-offline/.pnpm-store-offline/1/registry.npmjs.org/redux-form/6.6.3/es/__tests__/Field.spec.js | JamieMason/npm-cache-benchmark | 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; };
var _createClass = function () { function defineProperties(ta... |
src/routes/index.js | hatton/BloomReact | import React from 'react'
import { Route, IndexRoute } from 'react-router'
import App from 'layouts/app';
import EditTab from 'views/EditTab';
import CollectionTab from 'views/CollectionTab';
//import PublishTab from 'views/PublishTab';
// NOTE: here we're making use of the `resolve.root` configuration
// option in we... |
app/components/children/dashboard-children/FormNode.js | asconwe/formulate | import React from 'react';
import { Link } from 'react-router-dom';
import axios from 'axios';
import DeleteForm from './formNode-children/DeleteForm';
import PublishForm from './formNode-children/PublishForm';
class FormNode extends React.Component {
constructor() {
super();
this.state = {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.