path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
node_modules/react-facebook/utils/tester.js | Prash88/my-wedding | import TestUtils from 'react-addons-test-utils';
import React from 'react';
const jsdom = require('jsdom');
function renderComponent(react, props) {
global.document = jsdom.jsdom('<!DOCTYPE html><head><script></script></head><html><body></body></html>');
global.window = document.defaultView;
global.navigator = ... |
html.js | ANich/writing | import React from 'react'
import DocumentTitle from 'react-document-title'
import { prefixLink } from 'gatsby-helpers'
const BUILD_TIME = new Date().getTime()
module.exports = React.createClass({
displayName: 'HTML',
propTypes: {
body: React.PropTypes.string,
},
render() {
const {body,... |
FourtyTwo.Client/src/index.js | valorl/FourtyTwo | // CSS
import 'bootstrap-css-only';
import '../style/style.scss';
// END CSS
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, browserHistory } from 'react-router';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux... |
acceptance/src/fixtures/GenericApplication.js | Autodesk/hig | import React from 'react';
import { css } from "emotion";
import { MultiCheckbox } from './MultiCheckbox';
const styles = {
};
const GenericApplication = (props) => {
return (
<div className={css(styles)}>
Generic Application Test
</div>
)
}
export default GenericApplication;
|
site/pages/HomePage.js | ntdb/react-dnd | import React from 'react';
import Header from '../components/Header';
import PageBody from '../components/PageBody';
import StaticHTMLBlock from '../components/StaticHTMLBlock';
import IndexHTML from '../../docs/index.md';
export default class HomePage {
render() {
return (
<div>
<Header showCover ... |
src/value-types/combobox.js | bogdanbiv/TokenFilter | // @flow
/* eslint no-console: "off" */
import React from 'react'
import BasicAutocomplete from '../basic-autocomplete'
export default function ComboboxValue({
value,
onChange,
category,
}: {
value: any,
onChange: Function,
category: TokenFilterCategoryDescritor,
}) {
if (!category.getItems) {
cons... |
node_modules/enzyme/src/Utils.js | bburnett-cpf/react-intro | /* eslint no-use-before-define:0 */
import isEqual from 'lodash/isEqual';
import React from 'react';
import is from 'object-is';
import uuid from 'uuid';
import entries from 'object.entries';
import assign from 'object.assign';
import functionName from 'function.prototype.name';
import {
isDOMComponent,
findDOMNode... |
src/routes/home/index.js | thepechinator/pp-test-heroku | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Home from './Home';
impo... |
actor-apps/app-web/src/app/components/Main.react.js | v2tmobile/actor-platform | import React from 'react';
import requireAuth from 'utils/require-auth';
import VisibilityActionCreators from '../actions/VisibilityActionCreators';
import FaviconActionCreators from 'actions/FaviconActionCreators';
import FaviconStore from 'stores/FaviconStore';
import ActivitySection from 'components/ActivitySecti... |
example/react-bootstrap/src/index.js | supostat/react-confirm | import React from 'react'
import { render } from 'react-dom'
import App from './containers/App'
render(
<App />,
document.getElementById('root')
);
|
docs/src/examples/collections/Table/Variations/TableExampleSelectableRow.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Table } from 'semantic-ui-react'
const TableExampleSelectableRow = () => (
<Table celled selectable>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Name</Table.HeaderCell>
<Table.HeaderCell>Status</Table.HeaderCell>
<Table.HeaderCell>Notes</Table.Hea... |
jenkins-design-language/src/js/components/material-ui/svg-icons/communication/business.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const CommunicationBusiness = (props) => (
<SvgIcon {...props}>
<path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h... |
node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | nep0muck/cavita-bremen | 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'));
|
app/config/route.js | yiyinsong/react-native-example-jdh | import React, { Component } from 'react';
import {
TouchableOpacity,
Image,
Text,
View,
DeviceEventEmitter
} from 'react-native';
import HomeScreen from '../screens/index';
import LoginScreen from '../screens/login';
import FindPasswordScreen from '../screens/findPassword';
import SellerGoodsSc... |
src/svg-icons/action/camera-enhance.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionCameraEnhance = (props) => (
<SvgIcon {...props}>
<path d="M9 3L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2h-3.17L15 3H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.2... |
src/screens/TeamDetails.js | mariovalney/mariovalney-app | import React, { Component } from 'react';
import { View, ActivityIndicator } from 'react-native';
import TeamDetails from './../components/TeamDetails';
import teamsApi from '../api/TeamsApi';
class TeamDetailsScreen extends Component {
constructor(props) {
super(props);
this.state = {
loading: true,
... |
src/svg-icons/places/child-friendly.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesChildFriendly = (props) => (
<SvgIcon {...props}>
<path d="M13 2v8h8c0-4.42-3.58-8-8-8zm6.32 13.89C20.37 14.54 21 12.84 21 11H6.44l-.95-2H2v2h2.22s1.89 4.07 2.12 4.42c-1.1.59-1.84 1.75-1.84 3.08C4.5 20.43... |
lib/ui/components/Mocks/Mocks.js | 500tech/bdsm | import React from 'react';
import Frame from 'ui/components/common/Frame';
import Editor from 'ui/components/Mocks/Editor';
import MocksSidebar from 'ui/components/Mocks/Sidebar/MocksSidebar';
import GroupView from 'ui/components/Mocks/GroupView';
import API from 'api';
import { Group } from 'api/models/group';
import ... |
app/javascript/components/Filters/FilterPopover/component.js | thecartercenter/elmo | import React from 'react';
import PropTypes from 'prop-types';
import Popover from 'react-bootstrap/Popover';
import FilterPopoverButtons from './FilterPopoverButtons/component';
class FilterPopover extends React.Component {
static propTypes = {
children: PropTypes.node.isRequired,
onSubmit: PropTypes.func.i... |
src/containers/board/boardList.js | motion123/mbookmakerUI | /**
* Created by tomihei on 17/03/24.
*/
import React from 'react'
import { connect } from 'react-redux'
import BoardList from '../../components/const/boardList'
import * as boardList from '../../actions/boardList'
function mapStateToProps(state) {
return {
isFetching: state.boardList.isFetching,
boardList... |
src/index.js | kmark1625/Game-of-Life | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
stories/ToggleSwitch/ExampleStandard.js | skyiea/wix-style-react | import React from 'react';
import ToggleSwitch from 'wix-style-react/ToggleSwitch';
const style = {
display: 'inline-block',
padding: '0 25px 0 5px',
lineHeight: '10px'
};
export default () =>
<div>
<div style={style}>Default not checked<br/><br/><ToggleSwitch/></div>
<div style={style}>Default checke... |
frontend/routes.js | rkovacevic/hapijs-starter | import React from 'react'
import {IndexRoute, Route} from 'react-router'
import App from './views/app'
import Home from './views/home'
import About from './views/about'
import Register from './views/register'
import Login from './views/login'
import NotFound from './views/notFound'
import ServerError from './views/ser... |
src/components/Form.js | doug2k1/webpack-generator | // @flow
import React from 'react'
import objPath from 'object-path'
import type { ConfigData } from '../types/ConfigData.type'
import FormInput from './FormInput'
type State = ConfigData
type Props = {
data: ConfigData,
onChange: State => void
}
type FormInputEvent = {
name: string,
value?: string | boolean... |
website/irulez/src/components/admin_menu/fields/DimmerActionTypeField.js | deklungel/iRulez | import React, { Component } from 'react';
import ValueService from './../ValueService';
import SelectionField from './SelectionField';
class ActionTypeField extends Component {
valueService = new ValueService();
state = { options: [] };
componentDidMount() {
this.getData();
}
getData() {
... |
src/components/Item.js | dialob/dialob-fill-ui | /**
* Copyright 2016 ReSys OÜ
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in... |
gatsby-strapi-tutorial/cms/plugins/content-type-builder/admin/src/components/List/index.js | strapi/strapi-examples | /**
*
* List
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { map } from 'lodash';
import Button from 'components/Button';
import styles from './styles.scss';
class List extends React.Component { // eslint-disable-line react/prefer-stateless-function
render() {
const title = this.pr... |
app/javascript/mastodon/components/loading_indicator.js | increments/mastodon | import React from 'react';
import { FormattedMessage } from 'react-intl';
const LoadingIndicator = () => (
<div className='loading-indicator'>
<div className='loading-indicator__figure' />
<FormattedMessage id='loading_indicator.label' defaultMessage='Loading...' />
</div>
);
export default LoadingIndicat... |
src/parser/monk/mistweaver/modules/features/Checklist/Component.js | sMteX/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import ResourceLink from 'common/ResourceLink';
import RESOURCE_TYPES from 'game/RESOURCE_TYPES';
import { TooltipElement } from 'common/Tooltip';
import Checklist from 'parser/s... |
src/svg-icons/action/assessment.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAssessment = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/>
</SvgIcon>
);
ActionA... |
packages/containers/src/PieChartButton/PieChartButton.connect.js | Talend/ui | import React from 'react';
import PropTypes from 'prop-types';
import Immutable from 'immutable';
import omit from 'lodash/omit';
import { cmfConnect, Inject } from '@talend/react-cmf';
import PieChart from '@talend/react-components/lib/PieChart';
export const DEFAULT_STATE = new Immutable.Map({});
export function Co... |
src/browser/window/index.js | xcambar/octodo | import React from 'react';
import { render } from 'react-dom';
import Root from 'app/containers/Root';
chrome.runtime.getBackgroundPage(background => {
render(
<Root store={background.store} />,
document.getElementById('root')
);
});
|
packages/core/src/icons/components/CreditCard.js | iCHEF/gypcrete | import React from 'react';
export default function SvgCreditCard(props) {
return (
<svg
width="1em"
height="1em"
viewBox="0 0 1000 1000"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M218.8 375v-31.2c... |
node_modules/react-router/es/Router.js | rralian/steckball-react | 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) { var target = {... |
src/components/flows/common/StepTitle/StepTitle.js | TulevaEE/onboarding-client | import React from 'react';
import { PropTypes as Types } from 'prop-types';
import classNames from 'classnames';
import './StepTitle.scss';
const StepTitle = ({ children, number, active, completed }) => (
<div className="tv-step">
<div
className={classNames('tv-step__title', 'mb-4', {
'tv-step__ti... |
src/Result.js | beaudavenport/regex-cafe | import React from 'react';
import toppings from './toppings';
class Result extends React.Component {
constructor(props) {
super(props);
}
render() {
let result = this.props.resultString.split('').slice().reverse().map((topping, index, theArray) => {
let negativeIndex = theArray.length - index;
... |
examples/js/column-filter/text-filter.js | pvoznyuk/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
products.push({
id: id,
... |
docs/src/app/components/ComponentDoc.js | pradel/material-ui | import React from 'react';
import {ClearFix} from 'material-ui';
import ComponentInfo from './ComponentInfo';
import typography from 'styles/typography';
const ComponentDoc = React.createClass({
propTypes: {
children: React.PropTypes.node,
componentInfo: React.PropTypes.array.isRequired,
desc: React.Pro... |
node_modules/enzyme/src/version.js | sauceSquatch/we_are_razorfish_experience | import React from 'react';
export const VERSION = React.version;
export const REACT013 = VERSION.slice(0, 4) === '0.13';
export const REACT014 = VERSION.slice(0, 4) === '0.14';
export const REACT15 = VERSION.slice(0, 3) === '15.';
|
src/app/Header.js | nkbt/esnext-quickstart | import React from 'react';
import styles from './Header.css';
const Header = () =>
<header className={styles.header}>
<a className={styles.logo} href="/">Logo</a>
</header>;
export default Header;
|
app/components/Register.js | sedooe/cevirgec | /* Copyright (c) 2016 Kod Gemisi Ltd.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import React, { Component } from 'react';
import DocumentTitle from 'react-d... |
src/components/tasks/modal/restartModal/steps/SubtaskInfo.js | golemfactory/golem-electron | import React from 'react';
import PropTypes from 'prop-types';
const SubtaskInformation = ({ item }) => {
const num = item?.subtask_ids.length || 0;
const denum = item?.subtasks_count || 0;
return (
<div>
<span>
Restarting selected subtask{num > 1 ? 's' : ''}:
<br/>
<b>Subtask amount: {num +'/'+ ... |
docs/src/app/components/pages/components/Menu/ExampleIcons.js | hwo411/material-ui | import React from 'react';
import Paper from 'material-ui/Paper';
import Menu from 'material-ui/Menu';
import MenuItem from 'material-ui/MenuItem';
import RemoveRedEye from 'material-ui/svg-icons/image/remove-red-eye';
import PersonAdd from 'material-ui/svg-icons/social/person-add';
import ContentLink from 'material-ui... |
packages/netlify-cms-default-exports/src/index.js | netlify/netlify-cms | // eslint-disable-next-line @emotion/no-vanilla
import css from '@emotion/css';
import {
withEmotionCache,
CacheProvider,
ThemeContext,
jsx,
Global,
keyframes,
ClassNames,
} from '@emotion/core';
import EmotionStyled from '@emotion/styled';
import Immutable from 'immutable';
import ImmutablePropTypes from... |
src/ButtonInput.js | adampickeral/react-bootstrap | import React from 'react';
import Button from './Button';
import FormGroup from './FormGroup';
import InputBase from './InputBase';
import childrenValueValidation from './utils/childrenValueInputValidation';
class ButtonInput extends InputBase {
renderFormGroup(children) {
let {bsStyle, value, ...other} = this.p... |
modules/Link.js | neebz/react-router | import React from 'react'
import warning from 'warning'
const { bool, object, string, func } = React.PropTypes
function isLeftClickEvent(event) {
return event.button === 0
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey)
}
function isEmptyObject(obj... |
src/layouts/components/Projects.js | ArghTeam/argh.team | import React from 'react'
import styled from 'styled-components'
import PropTypes from 'prop-types'
const Header = () =>
<div></div>
Header.PropTypes = {
}
export default Header
|
pootle/static/js/admin/components/UserForm.js | garthylou/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.
*/
'use strict';
import React from 'react';
import { FormEl... |
gbe/resources/assets/js/app.js | DemocracyApps/GBE | require('babelify/polyfill');
import React from 'react';
import Site from './components/Site';
var dispatcher = require('./common/BudgetAppDispatcher');
var ActionTypes = require('./constants/ActionTypes');
var idGenerator = require('./common/IdGenerator');
var apiActions = require('./common/ApiActions');
/*
* Sinc... |
examples/huge-apps/routes/Course/routes/Assignments/routes/Assignment/components/Assignment.js | joeyates/react-router | import React from 'react';
class Assignment extends React.Component {
render () {
var { courseId, assignmentId } = this.props.params;
var { title, body } = COURSES[courseId].assignments[assignmentId]
return (
<div>
<h4>{title}</h4>
<p>{body}</p>
</div>
);
}
}
export d... |
src/TabContainer.js | Wolox/react-native-renavigate | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { BackAndroid } from 'react-native';
import RootScene from './RootScene';
import { actionCreators as navigationActions } from './actions';
class TabContainer extends Component {
componentDidMount() {
if (this.props.isActive... |
src/utils/devtools.js | ueno-llc/starter-kit | import React from 'react';
/* eslint global-require: 0 */
if (process.env.NODE_ENV !== 'production') {
// You are free to add any dev tools needed here.
// They are required on runtime, so deps can be added in devDeps as needed.
const DevTools = require('mobx-react-devtools').default;
const GridOverlay = requ... |
tests/baselines/reference/tsxNotUsingApparentTypeOfSFC.js | RyanCavanaugh/TypeScript | //// [tsxNotUsingApparentTypeOfSFC.tsx]
/// <reference path="/.lib/react16.d.ts" />
import React from 'react';
function test<P>(wrappedProps: P) {
let MySFC = function(props: P) {
return <>hello</>;
};
class MyComponent extends React.Component<P> {
render() {
return <>hello</>... |
stories/Hashtag/SimpleHashtagEditor/index.js | dagopert/draft-js-plugins | import React, { Component } from 'react';
import Editor, { createEditorStateWithText } from 'draft-js-plugins-editor';
import createHashtagPlugin from 'draft-js-hashtag-plugin';
import editorStyles from './editorStyles.css';
const hashtagPlugin = createHashtagPlugin();
const plugins = [hashtagPlugin];
const text = `#T... |
node_modules/react-router/es6/RoutingContext.js | mbestwick/medication-search | import React from 'react';
import RouterContext from './RouterContext';
import warning from './routerWarning';
var RoutingContext = React.createClass({
displayName: 'RoutingContext',
componentWillMount: function componentWillMount() {
process.env.NODE_ENV !== 'production' ? warning(false, '`RoutingContext` has... |
app/containers/LanguageProvider/index.js | castlemilk/nutry-web | /*
*
* LanguageProvider
*
* this component connects the redux state language locale to the
* IntlProvider component and i18n messages (loaded from `app/translations`)
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { IntlProvider } from 'reac... |
src/clincoded/static/libs/render_classification_animal_only_tag.js | ClinGen/clincoded | 'use strict';
import React from 'react';
/**
* Method to determate if 'Animal Modal Only' tag to be displayed given the provisional classification
* Applicable to: GCI Classification Matrix, GCI Evaluation Summary
* @param {object} provisional - The given provisional classification
*/
export function renderAnimal... |
src/components/layout.js | openregister/specification | import React from 'react';
import PropTypes from 'prop-types';
import { StaticQuery, graphql } from 'gatsby';
import 'prismjs/themes/prism.css';
const Layout = ({children}) => (
<StaticQuery
query={graphql`
query LayoutQuery {
core: coreToml {
title
}
}`}
render={() => {... |
src/pages/sponsors/index.js | ChicagoJS/chicagojs.org | import React from 'react'
import { graphql } from 'gatsby'
import Layout from '../../components/Layout'
import { isValidUrl, getCloudinaryImage } from '../../utils'
import './sponsors.css'
const getImageUrl = companyName => {
return isValidUrl(companyName) ? companyName : getCloudinaryImage(`2018Sponsors/${companyNa... |
react-fundamentals-es6/lessons/02-render/main.js | 3mundi/React-Bible | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById('app'));
|
node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | danhphan1307/innovation | 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'));
|
app/javascript/mastodon/features/report/thanks.js | glitch-soc/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
import Button from 'mastodon/components/button';
import { connect } from 'react-redux';
import {
unfollowAccount,
muteAccount,
blockAccount,
} f... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/ComputedProperties.js | lolaent/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(prefix) {
return [
{ id: 1, [`${prefi... |
src/pages/portfolio/index.js | tannerfiscus/tannerfisc.us | import React from 'react';
import { Helmet } from 'react-helmet';
import { graphql, StaticQuery } from 'gatsby';
import Layout from '../../components/Layout';
import LinkTransition from '../../components/LinkTransition';
import PreviewCompatibleImage from '../../components/PreviewCompatibleImage'
import styles from '... |
app/components/Similar.js | kongchun/BigData-Web | import React from 'react';
import {
Link
} from 'react-router';
import ArticleObjStore from '../stores/ArticleObjStore';
import ArticleObjActions from '../actions/ArticleObjActions';
class Similar extends React.Component {
constructor(props) {
super(props);
this.state = ArticleObjStore.getState();
this.onChan... |
src/js/components/Footer.js | nicksp/react-geo-weather | import React from 'react';
export default function Footer(props) {
return (
<footer className="footer">
<div className="container">© <a href="https://github.com/nicksp" className="link">Nick S. Plekhanov</a>, 2016.
<a href="http://www.danvierich.de/weather/" className="link">Simple Weather Icons</a... |
src/Components/modules/BackChanges.js | nockgish/gish | // modules/Backchanges.js
import React from 'react'
import render from 'react-dom'
class BackChanges extends React.Component {
constructor(props) {
super(props);
this.state = {
shouldChangeBackground: true
};
}
componentDidMount() {
if(this.state.shouldChangeBackground){
this.setSta... |
docs/src/pages/components/skeleton/Variants.js | lgollut/material-ui | import React from 'react';
import Skeleton from '@material-ui/lab/Skeleton';
export default function Variants() {
return (
<div>
<Skeleton variant="text" />
<Skeleton variant="circle" width={40} height={40} />
<Skeleton variant="rect" width={210} height={118} />
</div>
);
}
|
wrappers/json.js | machikoyasuda/la-gos | import React from 'react'
import Helmet from 'react-helmet'
import { config } from 'config'
module.exports = React.createClass({
propTypes () {
return {
route: React.PropTypes.object,
}
},
render () {
const data = this.props.route.page.data
return (
<div>
<Helmet
tit... |
app_old/containers/RepoListItem/index.js | daicas/react-boilerplate-examp | /**
* RepoListItem
*
* Lists the name and the issue count of a repository
*/
import React from 'react';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { FormattedNumber } from 'react-intl';
import { makeSelectCurrentUser } from 'containers/App/selectors';
import... |
src/svg-icons/content/remove-circle.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentRemoveCircle = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z"/>
</SvgIcon>
);
ContentRemoveCircle = pure(ContentRemoveCir... |
src/App.js | ScholtenSeb/react-hot-boilerplate | import React, { Component } from 'react';
export default class App extends Component {
render() {
return (
<h1>Hello, world.</h1>
);
}
}
|
examples/with-sentry-simple/pages/server/test3.js | BlancheXu/test | import React from 'react'
const Test3 = () => <h1>Server Test 3</h1>
Test3.getInitialProps = () => {
const doAsyncWork = () => Promise.reject(new Error('Server Test 3'))
doAsyncWork()
return {}
}
export default Test3
|
client/src/components/Explorer/ExplorerItem.js | iansprice/wagtail | import PropTypes from 'prop-types';
import React from 'react';
import { ADMIN_URLS, STRINGS } from '../../config/wagtailConfig';
import Icon from '../../components/Icon/Icon';
import Button from '../../components/Button/Button';
import PublicationStatus from '../../components/PublicationStatus/PublicationStatus';
// ... |
admin/client/components/Portal.js | mikaoelitiana/keystone | import React from 'react';
import ReactDOM from 'react-dom';
module.exports = React.createClass({
displayName: 'Portal',
portalElement: null,
componentDidMount () {
let el = document.createElement('div');
document.body.appendChild(el);
this.portalElement = el;
this.componentDidUpdate();
},
componentWillUn... |
docs/src/app/components/pages/components/FlatButton/ExampleIcon.js | lawrence-yu/material-ui | import React from 'react';
import FlatButton from 'material-ui/FlatButton';
import FontIcon from 'material-ui/FontIcon';
import ActionAndroid from 'material-ui/svg-icons/action/android';
import {fullWhite} from 'material-ui/styles/colors';
const style = {
margin: 12,
};
const FlatButtonExampleIcon = () => (
<div>... |
app/js/containers/dashboard.js | timcmiller/portfolio | import React from 'react';
import ReactDOM from 'react-dom';
import PortfolioBody from './../components/body/body';
import PortfolioHeader from './../components/header/header';
import PortfolioFooter from './../components/footer/footer';
export default React.createClass({
render() {
return (
<section>
... |
app/components/Notifications/index.js | abakusbackup/abacash-client | // @flow
import React, { Component } from 'react';
import { connect } from 'react-redux';
import NotificationSystem from 'react-notification-system';
type Props = {
notification: Object
};
class Notifications extends Component {
componentWillReceiveProps = (nextProps) => {
const { notification } = nextProp... |
js/customer/HaircutDetails.js | BarberHour/barber-hour | import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
StatusBar,
Image,
ScrollView,
TouchableNativeFeedback,
Switch,
Alert,
Platform,
ActivityIndicator
} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialIcons';
import { connect } from 'react-redux';
i... |
src/docs/components/NumberInputDoc.js | grommet/grommet-docs | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import NumberInput from 'grommet/components/NumberInput';
import Form from 'grommet/components/Form';
import FormField from 'grommet/components/FormField';
import DocsArticle from '../../components/DocsArticl... |
src/renderer/components/MapFilter/ReportView/ReportView.stories.js | digidem/ecuador-map-editor | // @flow
import React from 'react'
import { action } from '@storybook/addon-actions'
// import { linkTo } from '@storybook/addon-links'
import ReportView from './ReportView'
import { SavingDialog, PageNavigator } from './ReportViewContent'
import type { PresetWithFields } from '../types'
const exampleObservations = ... |
hero-world/src/component/tercero/Tercero.js | jesuscuesta/course-react | import React, { Component } from 'react';
import batman from './../../img/batman.jpg';
import wonder from './../../img/wonder.jpg';
// Al componente Tercero, le pasamos otros dos componentes, "Header" y "Hero", y le asignamos los valores.
class Tercero extends Component {
render () {
return (
<Container ti... |
node_modules/react-bootstrap/es/BreadcrumbItem.js | jkahrs595/website | 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/esm/components/feedback/icon-list/components/item.js | KissKissBankBank/kitten | import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["icon", "iconProps", "children"];
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { pxToRem } from '../../../../helpers/utils/typography';
impor... |
pootle/static/js/auth/components/AccountInactive.js | mail-apps/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.
*/
'use strict';
import React from 'react';
import { PureRen... |
src/components/App.js | teamstrobe/mancreact-client | import React, { Component } from 'react';
import ls from 'local-storage';
import qs from 'query-string';
import Header from './Header';
import EventScreen from './EventScreen';
import HomeScreen from './HomeScreen';
import Footer from './Footer';
import { Router, Route } from 'react-router-dom';
import browserHistory... |
gatsby-strapi-tutorial/cms/plugins/content-type-builder/admin/src/InjectedComponents/ContentManager/EditViewLink.js | strapi/strapi-examples | /**
*
* EditViewLink
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import NavLink from 'components/NavLink';
// Create link from content-type-builder to content-manager
function EditViewLink(props) {
// Retrieve URL from props
const base = `${props.getContentTypeBuilderBaseUrl()}${props.... |
Libraries/CustomComponents/Navigator/Navigator.js | jaggs6/react-native | /**
* Copyright (c) 2013-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.
*
* Facebook,... |
app/components/settings.js | mario2904/ICOM5016-Project | import React, { Component } from 'react';
import {Form, Grid, Icon,Input, Image, Segment,
Item, Menu, Divider, Header, Button } from 'semantic-ui-react'
export default class Settings extends Component {
submit (event) {
event.preventDefault();
// If successful, go to prof page
browserHistory.push('... |
example/src/Demo.js | MatisLepik/react-spotlight | import React from 'react';
import Spotlight from '../../dist/index';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
export default class Demo extends React.Component {
constructor(props) {
super(props);
this.start = this.start.bind(this);
this.state = {
playing: false,
... |
src/svg-icons/navigation/chevron-left.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationChevronLeft = (props) => (
<SvgIcon {...props}>
<path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/>
</SvgIcon>
);
NavigationChevronLeft = pure(NavigationChevronLeft);
NavigationChevronLeft.dis... |
src/js/components/Footer.js | kylebyerly-hp/grommet | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import classnames from 'classnames';
import Box from './Box';
import SkipLinkAnchor from './SkipLinkAnchor';
import Props from '../utils/P... |
lib/SortButton.js | eddyson-de/react-grid | import React from 'react';
import PropTypes from 'prop-types';
import { ASCENDING, DESCENDING } from './constants';
const SortButton = (props) => {
const { onClick, sort } = props;
const content = sort === ASCENDING ? '↓' : (sort === DESCENDING ? '↑' : '⇅');
return <button onClick={onClick}>{content}</butt... |
app/js/components/Breadcrumb/Breadcrumb.js | jagatjeevan/dakiya | import React from 'react';
import { Route, Link } from 'react-router-dom';
import { Breadcrumb, BreadcrumbItem } from 'reactstrap';
import routes from '../../routes';
const findRouteName = url => routes[url];
const getPaths = (pathname) => {
const paths = ['/'];
if (pathname === '/') return paths;
pathname.sp... |
src/components/common/Dropdown/Dropdown.js | harpreetkhalsagtbit/url-manager | import React from 'react';
import PropTypes from 'prop-types'; // ES6
import $ from 'jquery';
const Dropdown = ({label, options}) => {
let _onClick = function(id, misc, event) {
$(".contextMenu").toggleClass("hide")
$(".modal").toggleClass("is-active")
}
$(document).on('click', function(e) {
if (!$(e.ta... |
src/components/Html.js | ACPK/react-starter-kit | /**
* 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 PropTypes from 'prop-... |
public/js/components/ConsultationExamination.js | Vabrins/CadernetaDoIdoso | import React from 'react';
import $ from 'jquery';
import { Link } from 'react-router-dom';
const initialState = {
date_2_11_e:'', hour_2_11_e:'', place_2_11_e:'', query_exam_2_11_e:''
};
class ConsultationExamination extends React.Component {
constructor (props) {
super(props);
this.state = initialSt... |
docs/src/app/components/pages/components/Popover/ExampleAnimation.js | andrejunges/material-ui | import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import {Popover, PopoverAnimationVertical} from 'material-ui/Popover';
import Menu from 'material-ui/Menu';
import MenuItem from 'material-ui/MenuItem';
export default class PopoverExampleAnimation extends React.Component {
constructor(... |
docs/src/components/Homepage/UsedBy/index.js | rhalff/storybook | import PropTypes from 'prop-types';
import React from 'react';
import Link from 'gatsby-link';
import './style.css';
export const UsedByBg = ({ color, style }) => (
<div className="used-by-bg" style={style}>
<svg
width="100%"
height="100%"
preserveAspectRatio="none"
viewBox="0 0 1440 380"... |
src/app/screens/App/shared/Layout/components/Layout.js | docgecko/react-alt-firebase-starter | /*! React Alt Firebase Starter */
import './Layout.less';
import React from 'react';
import { RouteHandler } from 'react-router';
import Header from '../../Header/components/Header';
import Footer from '../../Footer/components/Footer';
export default class Guest extends React.Component {
render() {
return (
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.