path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
client/components/layout/nav.js | LIYINGZHEN/meteor-react-redux-base | import React from 'react';
import {Link} from 'react-router';
export default (props) => (
<nav className="navbar navbar-default navbar-fixed-top">
<div className="container">
<div className="navbar-header">
<button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="coll... |
examples/ErrorMessage.js | jaredpalmer/formik | import React from 'react';
import { Formik, Field, Form, ErrorMessage } from 'formik';
import * as Yup from 'yup';
import { Debug } from './Debug';
// While you can use any validation library (or write you own), Formik
// comes with special support for Yup by @jquense. It has a builder API like
// React PropTypes / Ha... |
webclient/userProfile/changePassword.js | souravDutta123/Cognitive-Assistant | import React from 'react';
class ChangePassword extends React.Component {
constructor()
{
super();
this.state={
drawerMenu: [],
}
}
componentDidMount()
{
}
render() {
const style={
textAlign: 'center',
};
return(
<div><h1 style={style}>ChangePassword :/</h1></div>
... |
src/svg-icons/notification/airline-seat-recline-normal.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAirlineSeatReclineNormal = (props) => (
<SvgIcon {...props}>
<path d="M7.59 5.41c-.78-.78-.78-2.05 0-2.83.78-.78 2.05-.78 2.83 0 .78.78.78 2.05 0 2.83-.79.79-2.05.79-2.83 0zM6 16V7H4v9c0 2.76 2.24 5... |
packages/wix-style-react/src/GenericModalLayout/GenericModalLayout.js | wix/wix-style-react | import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import styles from './GenericModalLayout.scss';
export default class GenericModalLayout extends React.PureComponent {
render() {
const { dataHook, fullscreen, header, content, footer } = this.props;
const con... |
src/components/ForgotPassword/ForgotPasswordForm.js | folio-org/stripes-core | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Field, Form } from 'react-final-form';
import { FormattedMessage } from 'react-intl';
import {
TextField,
Button,
Headline,
Row,
Col,
} from '@folio/stripes-components';
import OrganizationLogo from '../OrganizationLogo';... |
src/index.js | jonathanweiss/pixelboard | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, hashHistory } from 'react-router';
import App from './app.jsx';
import Clock from './apps/clock.jsx';
import FreeText from './apps/freetext.jsx';
import RandomPixels from './apps/random.jsx';
import Draw from './apps/draw.jsx';
Reac... |
code/schritte/redux/7-redux-complete-app/src/main.js | st-he/react-workshop | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import { composeWithDevTools } from 'redux-devtools-extension';
import Layout from './components/Layout';
import { rootReducer } f... |
packages/react/src/components/organisms/HeaderSlim/index.js | massgov/mayflower | /**
* HeaderSlim module.
* @module @massds/mayflower-react/HeaderSlim
* @requires module:@massds/mayflower-assets/scss/03-organisms/header-slim
*/
import React from 'react';
import PropTypes from 'prop-types';
const HeaderSlim = ({
skipNav,
siteLogo,
mainNav,
utilityNav
}) => (
<div className="ma__header... |
app/packs/src/admin/converter/AdminApp.js | ComPlat/chemotion_ELN | import React, { Component } from 'react';
import { Button } from 'react-bootstrap';
import ConverterApi from '../../components/fetchers/ConverterFetcher';
import ProfileNewModal from './create/ProfileNewModal';
import ProfileList from './list/ProfileList';
import ProfileEdit from './edit/ProfileEdit';
import ProfileCr... |
src/boilerplate-layout/components/layout/elements/loading.js | joropeza/react-fullscreen-app-boilerplate | import React from 'react';
const Loading = () => (
<div>
<p className="center" style={{ marginTop: 100, opacity: 0.5 }}>
<i className="fa fa-cog fa-spin fa-5x" />
</p>
</div>
);
export default Loading;
|
src/routes/Counter/components/Counter.js | wookiecookie87/lunch_group_creator_with_reactjs | import React from 'react'
import PropTypes from 'prop-types'
export const Counter = ({ counter, increment, doubleAsync }) => (
<div style={{ margin: '0 auto' }} >
<h2>Counter: {counter}</h2>
<button className='btn btn-primary' onClick={increment}>
Increment
</button>
{' '}
<button className... |
test/routes/home.spec.js | rafaelfbs/rmodel | /* eslint-env node, mocha */
const expect = (require('chai')).expect
import React from 'react'
import { render } from 'enzyme'
describe('Home route', function () {
it('should show a route content', function () {
return System.import('routes/home').then((Home) => {
Home = Home.default
const wrapper =... |
js/components/common/AddLocationModal.js | a-omsk/Vegreact | import React from 'react';
import Modal from 'react-modal';
import AddLocationForm from './AddLocationForm';
const modalStyle = {
overlay: {
zIndex: 10,
},
content: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
h... |
src/svg-icons/social/sentiment-satisfied.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialSentimentSatisfied = (props) => (
<SvgIcon {...props}>
<circle cx="15.5" cy="9.5" r="1.5"/><circle cx="8.5" cy="9.5" r="1.5"/><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S1... |
src/svg-icons/av/fiber-dvr.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvFiberDvr = (props) => (
<SvgIcon {...props}>
<path d="M17.5 10.5h2v1h-2zm-13 0h2v3h-2zM21 3H3c-1.11 0-2 .89-2 2v14c0 1.1.89 2 2 2h18c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zM8 13.5c0 .85-.65 1.5-1.5 1.5H3V9h3.5c.8... |
app/components/ConArticle.js | Toreant/monster_web | /**
* Created by apache on 15-11-14.
*/
import React from 'react';
import ConList from './ConList';
class ConArticle extends React.Component {
constructor(props) {
super(props);
}
render() {
let Result;
if(this.props.params.domain !== undefined) {
Result = (
... |
src/common/components/ErrorMessage.js | algernon/mad-tooter | // @flow
/* The Mad Tooter -- A Mastodon client
* Copyright (C) 2017 Gergely Nagy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your o... |
packages/react-router-dom/modules/__tests__/Link-test.js | goblortikus/react-router | import expect from 'expect'
import React from 'react'
import ReactDOM from 'react-dom'
import MemoryRouter from 'react-router/MemoryRouter'
import HashRouter from '../HashRouter'
import Link from '../Link'
describe('A <Link>', () => {
it('accepts a location "to" prop', () => {
const location = {
pathname: ... |
plugins/Files/js/components/unlockwarning.js | NebulousLabs/New-Sia-UI | import PropTypes from 'prop-types'
import React from 'react'
const UnlockWarning = ({ onClick }) => (
<div className='allowance-dialog unlock-warning'>
<h1 className='unlock-warning-head'>
Your wallet must be unlocked and synchronized to buy storage.
</h1>
<div className='allowance-buttons'>
... |
src/app/components/forms/inputs/XEditable.js | backpackcoder/world-in-flames | import React from 'react'
import 'X-editable/dist/bootstrap3-editable/js/bootstrap-editable.js'
import _ from 'lodash'
export default class XEditable extends React.Component {
componentDidMount() {
this.xEditable()
}
componentDidUpdate() {
this.xEditable()
}
xEditable = ()=> {
const element = ... |
src/svg-icons/social/sentiment-very-satisfied.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialSentimentVerySatisfied = (props) => (
<SvgIcon {...props}>
<path d="M11.99 2C6.47 2 2 6.47 2 12s4.47 10 9.99 10S22 17.53 22 12 17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm1... |
packages/component/src/SendBox/Assets/MicrophoneIcon.js | billba/botchat | import React from 'react';
const MicrophoneIcon = () => (
<svg height={28} viewBox="0 0 34.75 46" width={28}>
<path
className="a"
d="M29.75,23v6.36a7,7,0,0,1-.56,2.78,7.16,7.16,0,0,1-3.8,3.8,7,7,0,0,1-2.78.56H18.5v2.25H23V41H11.75v-2.25h4.5V36.5h-4.11a7,7,0,0,1-2.78-.56,7.16,7.16,0,0,1-3.8-3.8,7,7,0,... |
src/views/containers/pages/error_page/error_page.js | michaelBenin/react-ssr-spa | import React from 'react';
import PropTypes from 'prop-types';
import Footer from './../../../components/footer/footer';
function ErrorPage({ env, componentInfo, err }) {
const isDevelopment = env === 'development';
if (isDevelopment) {
console.error(err); // eslint-disable-line no-console
console.error(e... |
packages/material-ui-icons/src/FeaturedPlayList.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let FeaturedPlayList = props =>
<SvgIcon {...props}>
<path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 8H3V9h9v2zm0-4H3V5h9v2z" />
</SvgIcon>;
FeaturedPlayList = pure... |
react-ui/src/components/UpdateEmail/UpdateEmail.js | hokustalkshow/find-popular | import React, { Component } from 'react';
import ErrorAlert from '../ErrorAlert/ErrorAlert';
import SpinnerOnly from '../Spinner/SpinnerOnly';
class UpdateEmail extends Component {
constructor(props) {
super(props);
this.state = {
showEmailForm: false,
newEmail: '',
}
}
displayEmailForm = () => {
th... |
app/js/components/PITApp.js | makeing/PIT.react | import React from 'react';
import ProjectList from './Project/ProjectList';
import ProjectStore from '../stores/ProjectStore';
function getProjectState() {
return {
allProjects: ProjectStore.getAll()
};
}
export default class PITApp extends React.Component {
constructor(props) {
super(prop... |
src/js/components/nodes/NodesToolbar/NodesToolbarForm.js | knowncitizen/tripleo-ui | /**
* Copyright 2017 Red Hat Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
local-cli/templates/HelloWorld/__tests__/index.android.js | DanielMSchmidt/react-native | 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 />
);
});
|
tests/lib/rules/vars-on-top.js | bbondy/eslint | /**
* @fileoverview Tests for vars-on-top rule.
* @author Danny Fritz
* @author Gyandeep Singh
* @copyright 2014 Danny Fritz. All rights reserved.
* @copyright 2014 Gyandeep Singh. All rights reserved.
*/
"use strict";
//------------------------------------------------------------------------------
// Requiremen... |
src/components/Clock.js | LBNL-UCB-STI/beam-viz | /*
* A stateless css-clock component
* Props: time (in seconds)
*/
import React from 'react';
import './Clock.scss';
const getHoursAngle = (time_in_seconds) => {
const time_in_hours = time_in_seconds / (60 * 60);
return time_in_hours * (360 / 12);
}
const getMinutesAngle = (time_in_seconds) => {
const time... |
client/src/components/plugins/mention-highlighter.js | shamb0t/orbit | // Based on https://github.com/banyan/react-emoji
import React from 'react';
import assign from 'object-assign';
let MentionHighlighter = () => {
return {
highlight(srcText, highlightText, options = {}) {
if(typeof srcText !== 'string') return srcText;
if(!srcText || !highlightText) return srcText;
... |
fields/types/geopoint/GeoPointColumn.js | xyzteam2016/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var GeoPointColumn = React.createClass({
displayName: 'GeoPointColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.object,
},
renderValue... |
client/admin/import/ImportHistoryPage.stories.js | Sing-Li/Rocket.Chat | import React from 'react';
import ImportHistoryPage from './ImportHistoryPage';
export default {
title: 'admin/import/ImportHistoryPage',
component: ImportHistoryPage,
};
export const _default = () => <ImportHistoryPage />;
|
src/layouts/Header.js | dash-/netjumpio-tabs-web | ///
// Dependencies
///
import React, { Component } from 'react';
import TabSetsLogo from '../elements/TabSetsLogo';
import ProfilePanelButton from '../profile/ProfilePanelButton';
///
// View
///
class Header extends Component {
render() {
return (
<div className="app-header-container dark-theme">
<div ... |
docs/src/app/components/pages/components/Paper/ExampleSimple.js | pradel/material-ui | import React from 'react';
import Paper from 'material-ui/Paper';
const style = {
height: 100,
width: 100,
margin: 20,
textAlign: 'center',
display: 'inline-block',
};
const PaperExampleSimple = () => (
<div>
<Paper style={style} zDepth={1} />
<Paper style={style} zDepth={2} />
<Paper style={s... |
examples/lists-and-named-requests/src/components/BooksList.js | jmeas/resourceful-redux | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { getStatus, getResources } from 'redux-resource';
class BooksList extends Component {
render() {
const { state } = this.props;
const searchStatus = getStatus(
state,
'books.requests.readUserBooks.status',
... |
docs/src/app/components/pages/components/DropDownMenu/ExampleLongMenu.js | tan-jerene/material-ui | import React from 'react';
import DropDownMenu from 'material-ui/DropDownMenu';
import MenuItem from 'material-ui/MenuItem';
const items = [];
for (let i = 0; i < 100; i++ ) {
items.push(<MenuItem value={i} key={i} primaryText={`Item ${i}`} />);
}
export default class DropDownMenuLongMenuExample extends React.Compo... |
app/components/Home.js | SumoCreations/SumoCreationsWeb | import React from 'react';
import { Parse } from 'parse';
export default class Home extends React.Component {
handleSSO() {
Parse.FacebookUtils.logIn(null, {
success: function(user) {
if (!user.existed()) {
alert("User signed up and logged in through Facebook!");
} else {
... |
client/test/containers/CounterPage.spec.js | zex713/crypto-test | import { expect } from 'chai';
import React from 'react';
import { mount } from 'enzyme';
import { Provider } from 'react-redux';
import CounterPage from '../../app/containers/CounterPage';
import configureStore from '../../app/store/configureStore';
function setup(initialState) {
const store = configureStore(initi... |
actor-apps/app-web/src/app/components/common/Fold.React.js | Rogerlin2013/actor-platform | /* eslint-disable */
import React from 'react';
import classnames from 'classnames';
class Fold extends React.Component {
static PropTypes = {
icon: React.PropTypes.string,
iconClassName: React.PropTypes.string,
title: React.PropTypes.string.isRequired
};
state = {
isOpen: false
};
construc... |
src/components/Button.js | OpenCollective/frontend | import React from 'react';
import PropTypes from 'prop-types';
import colors from '../constants/colors';
import { Router } from '../server/pages';
import HashLink from 'react-scrollchor';
const star = '/static/images/icons/star.svg';
const icons = {
star,
};
class Button extends React.Component {
static propType... |
src/server.js | mdonthireddy/js_exp | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import 'babel-core/polyfill';
import path from 'path';
import express from 'express';
import React from 'react';
import ReactDOM from 'react-dom/server';
import Router from './routes';
import Html from './components/Html';
const server = global.... |
packages/material-ui-icons/src/LabelOutline.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let LabelOutline = props =>
<SvgIcon {...props}>
<path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16zM16 17H5V7h11l3.55... |
packages/react-ui-components/src/_lib/storyUtils.js | grebaldi/PackageFactory.Guevara | import React from 'react';
import PropTypes from 'prop-types';
/**
* The StoryWrapper is a simple component which can be used to wrap stories
* of the react-storybook lib.
*/
export const StoryWrapper = ({children, ...rest}) => (
<div
style={{background: '#000', padding: '1rem', position: 'relative'}}
... |
src/utils/filters.js | halo-design/halo-optimus | import React from 'react'
const listHasItem = (list, key, val) => {
let hasIt = false
list.map(item => {
if (item[key] === val) {
hasIt = true
}
})
return hasIt
}
export const checkBtnList = (menu, btnList, noDivider) => {
const ableBtn = []
const divider = <span className='ant-divider' />
... |
src/DayColumn.js | intljusticemission/react-big-calendar | import PropTypes from 'prop-types'
import React from 'react'
import { findDOMNode } from 'react-dom'
import clsx from 'clsx'
import Selection, { getBoundsForNode, isEvent } from './Selection'
import * as dates from './utils/dates'
import * as TimeSlotUtils from './utils/TimeSlots'
import { isSelected } from './utils/s... |
js/components/blankPage/index.js | phamngoclinh/PetOnline_vs2 |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { AppRegistry, View, TextInput, ScrollView, Dimensions, AsyncStorage } from 'react-native';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Header, Title, Content, Text, Button, Icon, List, List... |
pnpm-offline/.pnpm-store-offline/1/registry.npmjs.org/react-bootstrap/0.31.0/es/NavbarCollapse.js | JamieMason/npm-cache-benchmark | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
src/Popover.js | mxc/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import CustomPropTypes from './utils/CustomPropTypes';
const Popover = React.createClass({
mixins: [ BootstrapMixin ],
propTypes: {
/**
* An html id attribute, necessary for accessibility
... |
fields/components/columns/ArrayColumn.js | Yaska/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var ArrayColumn = React.createClass({
displayName: 'ArrayColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.object,
},
renderValue () {
... |
packages/extra/src/LinearGradient.js | finnfiddle/number-picture | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import get from 'lodash.get';
import gradients from '../node_modules/uigradients/gradients.json';
import { types } from '@potion/util';
const GRADIENTS_HASH = gradients.reduce((acc, g) => ({
...acc,
[g.name.toLowerCase()]: g.colors,
}),... |
samples/apollo-client/src/index.js | johnberzy-bazinga/FSharp.Data.GraphQL | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import QueryRunner from './QueryRunner';
ReactDOM.render(<QueryRunner />, document.getElementById('root'));
|
examples/with-algolia-react-instantsearch/components/head.js | flybayer/next.js | import NextHead from 'next/head'
import { string } from 'prop-types'
import React from 'react'
const defaultDescription = ''
const defaultOGURL = ''
const defaultOGImage = ''
export const Head = (props) => (
<NextHead>
<meta charSet="UTF-8" />
<title>{props.title || ''}</title>
<meta
name="descrip... |
packages/ringcentral-widgets-docs/src/app/pages/Components/SlideMenu/Demo.js | ringcentral/ringcentral-js-widget | import React from 'react';
// eslint-disable-next-line
import SlideMenu from 'ringcentral-widgets/components/SlideMenu';
const props = {};
/**
* A example of `SlideMenu`
*/
const SlideMenuDemo = () => <SlideMenu {...props} />;
export default SlideMenuDemo;
|
src/components/Footer/Footer.js | kuao775/mandragora | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import withStyles from 'isom... |
packages/mineral-ui-icons/src/IconNextWeek.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 IconNextWeek(props: IconProps) {
const iconProps = {
rtl: true,
...props
};
return (
<Icon {...iconProps}... |
examples/todos-flow/src/components/TodoList.js | bvasko/redux | // @flow
import React from 'react'
import Todo from './Todo'
import type { Todos, Id } from '../types'
export type Props = {
todos: Todos,
onTodoClick: (id: Id) => void
};
const TodoList = ({ todos, onTodoClick }: Props) => (
<ul>
{todos.map(todo =>
<Todo
key={todo.id}
{...todo}
... |
src/components/MessageDialog/MessageDialog.js | austinknight/ui-components | import React from 'react';
import styled from 'styled-components';
import Modal from '../Modal'
import ButtonBar from '../ButtonBar';
import {
colors,
fontSizes,
typography,
renderThemeIfPresentOrDefault,
} from '../styles';
const Title = styled.div`
width: 100%;
color: ${renderThemeIfPresentOrDefault({ ... |
20200300-js-spa-react-node-sql/client/src/components/UIHelpModal.js | DamienFremont/blog | import React from 'react';
import { FormattedMessage } from 'react-intl';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faCheck } from '@fortawesome/free-solid-svg-icons';
import { Button, Modal, ModalFooter } from 'reactstrap';
const UIHelpModal = (props) => {
const settingsName = pr... |
src/parser/shaman/elemental/modules/talents/MasterOfTheElements.js | sMteX/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import StatisticBox, { STATISTIC_ORDER } from 'interface/others/StatisticBox';
import { formatNumber, formatPercentage } from 'common/format';
import SpellIcon from 'common/SpellIcon';
import SPELLS from 'common/SPELLS';
import calculateEffectiveD... |
client/modules/Post/__tests__/components/PostListItem.spec.js | acguanacaste/liomysSalvini | import React from 'react';
import test from 'ava';
import sinon from 'sinon';
import PostListItem from '../../components/PostListItem/PostListItem';
import { mountWithIntl, shallowWithIntl } from '../../../../util/react-intl-test-helper';
const post = { name: 'Prashant', title: 'Hello Mern', slug: 'hello-mern', cuid: ... |
frontend/test/app/containers/RetirePage-test.js | dannycoates/testpilot | import React from 'react';
import { expect } from 'chai';
import sinon from 'sinon';
import { shallow, mount } from 'enzyme';
import RetirePage from '../../../src/app/containers/RetirePage';
describe('app/containers/RetirePage', () => {
let props, subject;
beforeEach(function() {
props = {
hasAddon: tr... |
node_modules/react-router/es6/RouteUtils.js | jvstrpv/reactredux_2 | 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; };
import React from 'react';
function isValidChild(object) {
... |
Libraries/Text/Text.js | rickbeerendonk/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.
*
* @provides... |
App/Components/LandmarkList.js | quickresolve/CycleTheBay | "use strict";
import React, { Component } from 'react';
import {
StyleSheet,
Text,
TouchableOpacity,
ScrollView,
Image,
TabBarIOS,
AlertIOS,
ListView,
View,
AppActions,
navigator
} from 'react-native';
import Trail from './Trail'
import Main from './Main'
import Weather from './Weather'
import L... |
packages/ringcentral-widgets/components/MultiCallAnswerButton/index.js | u9520107/ringcentral-js-widget | import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import AnswerIcon from '../../assets/images/Answer.svg';
import HoldIcon from '../../assets/images/Hold.svg';
import EndIcon from '../../assets/images/End.svg';
import CircleButton from '../CircleButton';
import style... |
src/svg-icons/av/movie.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvMovie = (props) => (
<SvgIcon {...props}>
<path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/>
</SvgIcon>
);
AvMovie = pure(AvMovie);
Av... |
src/svg-icons/navigation/subdirectory-arrow-right.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationSubdirectoryArrowRight = (props) => (
<SvgIcon {...props}>
<path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"/>
</SvgIcon>
);
NavigationSubdirectoryArrowRight = pure(Navigat... |
imports/ui/components/Transition/Slide.js | ShinyLeee/meteor-album-app | import PropTypes from 'prop-types';
import React from 'react';
import CSSTransition from 'react-transition-group/CSSTransition';
const SlideTransition = ({ children, ...props }) => (
<CSSTransition
{...props}
classNames="slide"
timeout={300}
appear
>
{children}
</CSSTransition>
);
SlideTrans... |
packages/ringcentral-widgets/components/CopyToClipboard/index.js | ringcentral/ringcentral-js-widget | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { Button } from '../Button';
import styles from './styles.scss';
import i18n from './i18n';
class CopyToClipboard extends Component {
executeCopy() {
this.copyTextArea.focus();
this.copyT... |
node_modules/react-dnd/examples/_dustbin-interesting/index.js | asm-products/notello | 'use strict';
import React from 'react';
import Container from './Container';
const DustbinSorted = React.createClass({
render() {
return (
<div>
<Container />
<hr />
<p>
Several different dustbins can handle several types of items. Note that the last dustbin is special: ... |
static/src/components/StatsPanel.js | Firazenics/finalreckoningbot | // @flow
import React from 'react';
import numeral from 'numeral';
import * as StatsActions from '../actions/StatsActions';
import Constants from '../Constants';
const BOTTOM_PADDING = 8;
const StatsRow = ({icon, label, value}) => {
return (
<div className="stats-row">
<img src={icon} />
<div class... |
2021/src/components/Typography/Text.js | sjamcsclub/jamhacks.ca | import React from 'react';
import styled from 'styled-components';
import { media } from '../../utils/media';
const Text = styled.p`
color: ${(props) =>
props.dark
? props.theme.colors.text.dark.text
: props.theme.colors.text.light.text};
&::selection {
background: ${(props) =>
props.dark... |
app/js/components/LoadingIndicator.js | niksoc/srmconnect | import React from 'react';
const LoadingIndicator = ()=>(<p>loading...</p>);
export default LoadingIndicator;
|
packages/icons/src/dv/Fortran.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function DvFortran(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M7.314 38.048h2.954c1.637 0 3.246-.925 3.246-3.224V13.176c0-2.912-.97-3.224-3.987-3.224H7.5V6h33.186v14.362h-3.87c0-3.431-.392-5.939-1.373-7.81-1.08-... |
src/server.js | wework/react-redux-universal-hot-example | import Express from 'express';
import React from 'react';
import Location from 'react-router/lib/Location';
import config from './config';
import favicon from 'serve-favicon';
import compression from 'compression';
import httpProxy from 'http-proxy';
import path from 'path';
import createStore from './redux/create';
im... |
react_version/src/AppHeader/AppHeader.js | maju435/drozdz | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import './AppHeader.css';
import { Link } from 'react-router-dom';
class AppHeader extends Component {
render() {
return (
<header className="App-header">
<nav className="main-nav">
<div className="main-nav-left... |
src/components/metadata/MetaArray.js | ashmaroli/jekyll-admin | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Sortable from 'sortablejs';
import _ from 'underscore';
import MetaArrayItem from './MetaArrayItem';
export class MetaArray extends Component {
sortableGroupDecorator(component) {
const { moveArrayItem, namePrefix } = this.pro... |
components/list/ListItemActions.js | KerenChandran/react-toolbox | import React from 'react';
import style from './style';
import ListItemAction from './ListItemAction';
const ListItemActions = ({type, children}) => {
const validChildren = React.Children.toArray(children).filter(c => (
React.isValidElement(c)
));
return (
<span className={style[type]}>
{validChil... |
src/js/components/PasswordInput.js | kylebyerly-hp/grommet | // (C) Copyright 2014 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 Button from './Button';
import ViewIcon from './icons/base/View';
import Intl fro... |
react-fundamental/src/components/LifeCycle.js | zhangfaliang/learnReact | import React, { Component } from 'react';
class LifeCycle extends Component {
static defaultProps = {
value: '开始渲染'
}
componentWillReceiveProps(nextProps){
console.log('componentWillReceiveProps');
this.setState({
value: nextProps.value
});
}
/**
* diff 数据对比
* 对比完成,如果数据没有差异,不... |
index.ios.js | t4sk/react-native-todo | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class Todo extends Component {
render() {
return (
<View style={styles.container}>
... |
template/src/Component.js | nkbt/cf-react-component-template | import React from 'react';
export const {{package.global}} = () =>
<div>{{package.name}}</div>;
|
docs/src/app/components/pages/customization/Styles.js | IsenrichO/mui-with-arrows | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../CodeExample';
import MarkdownElement from '../../MarkdownElement';
import stylesText from './styles.md';
import stylesOverridingInlineText from './styles-overriding-inline.md';
import StylesOverridingInlineExample from ... |
src/layouts/Header/containers/HeaderContainer.js | dkanas/timelog | import React from 'react'
import { connect } from 'react-redux'
import pick from 'lodash/pick'
import { logout } from 'store/sessionModule'
import Header from '../components/Header'
const Connect = connect(
state => pick(state.session, ['user', 'isAuthenticated']),
{ logout }
)
const HeaderContainer = ({ isAuthen... |
example-swift/ReactNativeEventBridgeSwift/ReactNative/index.ios.js | maicki/react-native-event-bridge | /**
* @flow
*/
import React from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Button,
Alert,
EmitterSubscription,
} from 'react-native';
import EventBridge from 'react-native-event-bridge';
export default class ReactNativeEventBridgeSwift extends React.Component {
_eventSubscription: ?Emit... |
app/components/Header/index.js | juanda99/arasaac-frontend | /**
*
* Header
*
*/
import React from 'react'
import PropTypes from 'prop-types'
import AppBar from 'material-ui/AppBar'
import styles from './styles'
import Title from './Title'
import UserMenu from './UserMenu'
import GuestMenu from './GuestMenu'
const Header = (props) => {
const handleTouchTapLeftIconButton =... |
src/server.js | GustavPersson/tvattstuga | import path from 'path';
import morgan from 'morgan';
import express from 'express';
import compression from 'compression';
import helmet from 'helmet';
import hpp from 'hpp';
import favicon from 'serve-favicon';
import React from 'react';
import { renderToString } from 'react-dom/server';
import { Provider } from 'rea... |
src/Row.js | omerts/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import CustomPropTypes from './utils/CustomPropTypes';
const Row = React.createClass({
propTypes: {
/**
* You can use a custom element for this component
*/
componentClass: CustomPropTypes.elementType
},
getDefaultProps() {
re... |
src/svg-icons/hardware/laptop-mac.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareLaptopMac = (props) => (
<SvgIcon {...props}>
<path d="M20 18c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2H0c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2h-4zM4 5h16v11H4V5zm8 14c-.55 0... |
src/public/js/logs.js | TooAngel/democratic-collaboration | import React from 'react';
/**
* Logs class
**/
export class Logs extends React.Component { // eslint-disable-line no-unused-vars
/**
* contructor - The constructor
*
* @param {object} props - The properties
* @return {void}
**/
constructor(props) {
super(props);
this.state = {
dataF... |
src/components/file/upload.js | abbr/ShowPreper | import React from 'react'
import ReactDOM from 'react-dom'
module.exports = class Importer extends React.Component {
click = () => {
let domEle = ReactDOM.findDOMNode(this)
domEle.value = null
domEle.click()
}
onChange = e => {
let file = e.target.files[0]
// TODO validate file mime type
... |
react-dixie-memory-considerate-loading/src/components/SwitchWithLabel/index.js | GoogleChromeLabs/adaptive-loading | /*
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
src/svg-icons/image/wb-sunny.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageWbSunny = (props) => (
<SvgIcon {...props}>
<path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7... |
app/features/notifications/Notify/index.js | Kaniwani/KW-Frontend | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createPortal } from 'react-dom';
import { CSSTransition, TransitionGroup } from 'react-transition-group';
import { POSITIONS } from '../constants';
import actions from '../actions';
import Notification from '... |
app/components/LoadingIndicator/index.js | chaintng/react-boilerplate | import React from 'react';
import Circle from './Circle';
import Wrapper from './Wrapper';
const LoadingIndicator = () => (
<Wrapper>
<Circle />
<Circle rotate={30} delay={-1.1} />
<Circle rotate={60} delay={-1} />
<Circle rotate={90} delay={-0.9} />
<Circle rotate={120} delay={-0.8} />
<Cir... |
src/components/Account/OAuthLogin/OAuthLogin.container.js | shayc/cboard | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
import { login } from '../Login/Login.actions';
import messages from './OAuthLogin.messages';
import { getUser } from '../../App/App.selectors';
imp... |
src/layouts/BaseLayout/BaseLayout.spec.js | diMosellaAtWork/GeoWeb-FrontEnd | import React from 'react';
import BaseLayout from './BaseLayout';
import { shallow, mount } from 'enzyme';
import { Container } from 'reactstrap';
import { Provider } from 'react-redux';
const STORE = {
getState: () => ({ notifications: [] }),
subscribe: () => null,
dispatch: () => null
};
describe('(Layout) Ba... |
src/components/Buttons/Switch.js | instacart/Snacks | import React from 'react'
import PropTypes from 'prop-types'
import RadioCheckboxBase from '../../base/RadioCheckboxBase'
import colors from '../../styles/colors'
import ZeroSvg from '../../assets/zero.svg'
import OneSvg from '../../assets/one.svg'
const SWITCH_WIDTH = 36
const STYLES = {
background: {
borderRa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.