path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
App/Client/node_modules/react-router/modules/Lifecycle.js | qianyuchang/React-Chat | import warning from './routerWarning'
import React from 'react'
import invariant from 'invariant'
const { object } = React.PropTypes
/**
* The Lifecycle mixin adds the routerWillLeave lifecycle method to a
* component that may be used to cancel a transition or prompt the user
* for confirmation.
*
* On standard ... |
src/svg-icons/editor/format-strikethrough.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatStrikethrough = (props) => (
<SvgIcon {...props}>
<path d="M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"/>
</SvgIcon>
);
EditorFormatStrikethrough = pure(EditorFormatStrikethrough);
Edit... |
src/pages/Navbar/PageSelector.js | Hellenic/fractalysis | import React from 'react';
import { withRouter } from 'react-router-dom';
import { Dropdown } from 'semantic-ui-react';
import TextIcon from '../../components/TextIcon/TextIcon';
import routes from '../../routes';
const DROPDOWN_MENU = [
{ icon: 'edit', title: 'Editor', to: process.env.PUBLIC_URL + '/' },
{ icon: ... |
src/svg-icons/action/swap-horiz.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSwapHoriz = (props) => (
<SvgIcon {...props}>
<path d="M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z"/>
</SvgIcon>
);
ActionSwapHoriz = pure(ActionSwapHoriz);
ActionSwapHoriz.d... |
src/Main/Suggestion.js | enragednuke/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import UpArrow from 'Icons/UpArrow';
import ISSUE_IMPORTANCE from 'Parser/Core/ISSUE_IMPORTANCE';
import Icon from 'common/Icon';
import Wrapper from 'common/Wrapper';
function getIssueImportance(importance) {
switch (importance) {
case ISSUE_IMPO... |
app/javascript/mastodon/features/ui/components/column_link.js | mecab/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Link from 'react-router/lib/Link';
const ColumnLink = ({ icon, text, to, href, method, hideOnMobile }) => {
if (href) {
return (
<a href={href} className={`column-link ${hideOnMobile ? 'hidden-on-mobile' : ''}`} data-method={method}>
... |
src/routes/admin/setting/index.js | luanlv/comhoavang | /**
* 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';
const title = 'Setting';
e... |
src/components/indexPage.js | jonkemp/universal-react-todo-app | import React from 'react';
import TodoForm from './todoForm';
export default function() {
return (
<div>
<h3>TODO List</h3>
<TodoForm />
</div>
);
}
|
src/svg-icons/image/camera.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCamera = (props) => (
<SvgIcon {...props}>
<path d="M9.4 10.5l4.77-8.26C13.47 2.09 12.75 2 12 2c-2.4 0-4.6.85-6.32 2.25l3.66 6.35.06-.1zM21.54 9c-.92-2.92-3.15-5.26-6-6.34L11.88 9h9.66zm.26 1h-7.49l.29.5 4... |
_src/routes.js | apedyashev/react-universal-jobs-aggregator | import React from 'react';
import {Route, Switch} from 'react-router';
import {
App,
NotFound,
UserPage,
RepoPage,
HomePage
} from 'containers';
export default () => {
const routes = (
<Switch>
<Route exact path="/" component={HomePage} />
<Route path="/:login" component={UserPage} />
... |
client/containers/users/register.js | LIYINGZHEN/meteor-react-redux-base | import React from 'react';
import {useDeps} from 'react-simple-di';
import {composeAll, withTracker} from 'react-komposer-plus';
import Register from '../../components/users/register';
export default composeAll(
useDeps()
)(Register);
|
src/svg-icons/notification/phone-missed.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationPhoneMissed = (props) => (
<SvgIcon {...props}>
<path d="M6.5 5.5L12 11l7-7-1-1-6 6-4.5-4.5H11V3H5v6h1.5V5.5zm17.21 11.17C20.66 13.78 16.54 12 12 12 7.46 12 3.34 13.78.29 16.67c-.18.18-.29.43-.29.71... |
src/app/components/Navbar.js | cgrossde/Pullover | import React from 'react'
import { Link } from 'react-router'
import { connect } from 'react-redux'
import { hideWindow } from '../nw/Window'
import './Navbar.scss'
class Navbar extends React.Component {
render() {
const icon = (this.props.status === 'ONLINE') ? 'signal' : 'flash'
const iconClass = 'glyphic... |
src/components/Footer/Footer.js | ShanzayA/wd-aqua | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React, { Component } from 'react';
import withStyle... |
docs/components/example/example.js | t1m0n/air-datepicker | import React from 'react';
import PropTypes from 'prop-types';
import css from './example.module.scss';
function Example({children, titleId} = {}) {
return (
<div className={css.el}>
{children}
</div>
);
}
function DoubleSection({children}) {
return <div className={css.doubleS... |
app/containers/NotFoundPage/index.js | yoohan-dex/myBlog | /**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a neccessity for you then you can refactor i... |
src/components/header.js | christineoo/reddit-gallery | import React, { Component } from 'react';
import AppBar from 'react-toolbox/lib/app_bar';
export default class Header extends Component {
render() {
return (
<AppBar fixed flat>
<span>Reddit Gallery</span>
</AppBar>
)
}
}
|
node_modules/react-bootstrap/es/Radio.js | Chen-Hailin/iTCM.github.io | 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 ... |
example/App/Container/app.js | brh55/react-native-masonry | /*
React-Native-Masonry Demo
https://github.com/brh55/react-native-masonry
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
ScrollView,
View,
TouchableHighlight,
Image,
Slider
} from 'react-native';
import FastImage from 'react-native-fast-image';
import Masonry from 're... |
src/svg-icons/notification/phone-locked.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationPhoneLocked = (props) => (
<SvgIcon {...props}>
<path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.59l2.2-2.21c.28-.26.36-.65.25-1C8.7 6.45 8.5 5... |
client/src/components/pages/component-samples.js | hah-nan/papabear2 | import React, { Component } from 'react';
import PricingTable from '../sales/pricing-table';
import SocialMediaBar from '../sales/social-media-bar';
import Rotator from '../sales/rotator';
const bronzeFeatures = ['Really cool', 'Pretty cheap', 'Awesome'];
const silverFeatures = ['A couple features', 'Pretty neat'];
c... |
lib/carbon-fields/vendor/htmlburger/carbon-fields/assets/js/fields/components/association/list-item.js | boquiabierto/wherever-content | /**
* The external dependencies.
*/
import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { withHandlers } from 'recompose';
/**
* The internal dependencies.
*/
import { preventDefault } from 'lib/helpers';
/**
* Render an item that can be associated.
*
* @param {O... |
packages/material-ui-icons/src/Transform.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let Transform = props =>
<SvgIcon {...props}>
<path d="M22 18v-2H8V4h2L7 1 4 4h2v2H2v2h4v8c0 1.1.9 2 2 2h8v2h-2l3 3 3-3h-2v-2h4zM10 8h6v6h2V8c0-1.1-.9-2-2-2h-6v2z" />
</SvgIcon>;
Transform = pure(Transform... |
packages/icons/src/md/communication/StayCurrentLandscape.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdStayCurrentLandscape(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M2.02 14c0-2.21 1.77-4 3.98-4h36c2.21 0 4 1.79 4 4v20c0 2.21-1.79 4-4 4H6c-2.21 0-4-1.79-4-4l.02-20zM38 14H10v20h28V14z" />
</IconBa... |
examples/with-pretty-url-routing/pages/greeting.js | arunoda/next.js | import React from 'react'
import PropTypes from 'prop-types'
import {Link} from 'next-url-prettifier'
import {Router} from '../routes'
export default class GreetingPage extends React.Component {
static getInitialProps ({query: {lang, name}}) {
return {lang, name}
}
renderSwitchLanguageLink () {
const {l... |
packages/react-router-website/modules/components/Logo.js | goblortikus/react-router | import React from 'react'
import { Block, Row } from 'jsxstyle'
import { DARK_GRAY } from '../Theme'
import LogoImage from '../logo.png'
const Logo = ({ size = 230, shadow = true }) => (
<Row
background={DARK_GRAY}
width={size+'px'}
height={size+'px'}
alignItems="center"
justifyContent="center"
... |
assets/components/Routes.js | dflm25/codeigniteres.club | // Dependencies
import React from 'react';
import { Route, Switch } from 'react-router-dom';
// Container
import Home from '../components/Home';
import Page404 from '../components/Page404';
const Routes = () =>
<Switch>
<Route exact path="/channel" component={Home} />
<Route exact path="/channel/:name" component... |
public/js/cat_source/es6/components/footer/CattoolFooter.js | riccio82/MateCat | import React from 'react'
import _ from 'lodash'
import CatToolStore from '../../stores/CatToolStore'
import CattoolConstants from '../../constants/CatToolConstants'
const transformStats = (stats) => {
let reviewWordsSecondPass
let a_perc_2nd_formatted
let a_perc_2nd
const t_perc = stats.TRANSLATED_PERC
le... |
src/svg-icons/places/rv-hookup.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesRvHookup = (props) => (
<SvgIcon {...props}>
<path d="M20 17v-6c0-1.1-.9-2-2-2H7V7l-3 3 3 3v-2h4v3H4v3c0 1.1.9 2 2 2h2c0 1.66 1.34 3 3 3s3-1.34 3-3h8v-2h-2zm-9 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1... |
react/src/components/accordions/SprkAccordion.stories.js | sparkdesignsystem/spark-design-system | import React from 'react';
import SprkAccordion from './SprkAccordion';
import SprkAccordionItem from './components/SprkAccordionItem/SprkAccordionItem';
import { markdownDocumentationLinkBuilder } from '../../../../storybook-utilities/markdownDocumentationLinkBuilder';
export default {
title: 'Components/Accordion'... |
src/Parser/Paladin/Holy/Modules/Traits/JusticeThroughSacrifice.js | hasseboulen/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';
import Analyzer from 'Parser/Core/Analyzer';
import calculateEffectiveHealingStacked from 'Parser/Core/calculateEffective... |
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Details/Resources.js | Minoli/carbon-apimgt | /*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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/li... |
blueocean-material-icons/src/js/components/svg-icons/image/photo.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImagePhoto = (props) => (
<SvgIcon {...props}>
<path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/>
</SvgIcon>
);
ImagePhoto.displayName = 'ImagePhoto';
ImagePho... |
App/Components/AlertMessage.story.js | GulfCoastCodeCamp/CodeCampApp | import React from 'react'
import { storiesOf } from '@storybook/react-native'
import AlertMessage from './AlertMessage'
storiesOf('AlertMessage')
.add('Default', () => (
<AlertMessage
title='ALERT ALERT'
/>
))
.add('Hidden', () => (
<AlertMessage
title='ALERT ALERT'
show={false}
... |
src/js/components/Page.js | athill/wimf | import React from 'react';
import { Alert, Col, Grid, Row } from 'react-bootstrap';
import { connect } from 'react-redux';
import { Router, Route } from 'react-router-dom';
import AppNavbar from './AppNavbar';
import history from '../history';
import Login from './pages/login';
import Items from './pages/items';
impor... |
src/pages/index.js | hbuchel/heather-buchel.com | import React from 'react';
import { Link, graphql } from 'gatsby';
import Helmet from 'react-helmet';
import { css } from '@emotion/core';
import Bio from '../components/Bio';
import Layout from '../components/Layout';
import LogoLarge from '../components/LogoLarge';
import Container from '../components/Container';
im... |
src/svg-icons/action/view-array.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionViewArray = (props) => (
<SvgIcon {...props}>
<path d="M4 18h3V5H4v13zM18 5v13h3V5h-3zM8 18h9V5H8v13z"/>
</SvgIcon>
);
ActionViewArray = pure(ActionViewArray);
ActionViewArray.displayName = 'ActionViewA... |
docs/src/app/components/pages/components/IconButton/ExampleComplex.js | matthewoates/material-ui | import React from 'react';
import FontIcon from 'material-ui/FontIcon';
import IconButton from 'material-ui/IconButton';
import ActionHome from 'material-ui/svg-icons/action/home';
const IconButtonExampleComplex = () => (
<div>
<IconButton tooltip="Font Icon">
<FontIcon className="muidocs-icon-action-home"... |
step4-router/node_modules/react-router/modules/Route.js | jintoppy/react-training | import React from 'react'
import invariant from 'invariant'
import { createRouteFromReactElement } from './RouteUtils'
import { component, components } from './PropTypes'
const { string, func } = React.PropTypes
/**
* A <Route> is used to declare which components are rendered to the
* page when the URL matches a gi... |
lib/items.js | gs-akhan/react-native-select | import React, { Component } from 'react';
import {
Dimensions,
StyleSheet,
View,
ScrollView,
TouchableWithoutFeedback,
Text,
Easing,
Animated,
} from 'react-native';
const AnimatedScrollView = Animated.createAnimatedComponent(ScrollView);
const window = Dimensions.get('window');
const styles = StyleSh... |
src/app/modules/introduction/slides/Me.js | lili668668/lili668668.github.io | import React from 'react'
import classnames from 'classnames'
import { withStyles } from '@material-ui/core/styles'
import { useTranslation } from 'react-i18next/hooks'
import Typography from '@material-ui/core/Typography'
import Grid from '@material-ui/core/Grid'
import Title from '../components/Title'
import info fro... |
src/svg-icons/editor/border-right.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderRight = (props) => (
<SvgIcon {...props}>
<path d="M7 21h2v-2H7v2zM3 5h2V3H3v2zm4 0h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2v-2H3v2zm8 0h2v-2h-2v2zm-8-8h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm8 8h2v-2h-2v2zm4-4h... |
packages/enzyme-adapter-react-16.2/src/ReactSixteenTwoAdapter.js | airbnb/enzyme | /* eslint no-use-before-define: 0 */
import React from 'react';
import ReactDOM from 'react-dom';
// eslint-disable-next-line import/no-unresolved
import ReactDOMServer from 'react-dom/server';
// eslint-disable-next-line import/no-unresolved
import ShallowRenderer from 'react-test-renderer/shallow';
// eslint-disable-... |
docs/src/app/components/pages/components/RaisedButton/ExampleSimple.js | spiermar/material-ui | import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
const style = {
margin: 12,
};
const RaisedButtonExampleSimple = () => (
<div>
<RaisedButton label="Default" style={style} />
<RaisedButton label="Primary" primary={true} style={style} />
<RaisedButton label="Secondary" se... |
src/base-editor.js | ABASystems/react-object-table | import PropTypes from 'prop-types'
import React from 'react'
function validate(value, props) {
return {
valid: true,
cleanedValue: value,
}
}
class BaseEditor extends React.Component {
static propTypes = {
editReplace: PropTypes.any,
value: PropTypes.any,
abort: PropTypes.func,
update: P... |
packages/Modal/Content/story.js | ancestorcloud/trace-ui | import React from 'react'
import Modal from './index'
import { storiesOf, action } from '@kadira/storybook'
const Container = ({ children }) => (
<div
style={{ maxWidth: '350px', border: 'dashed 1px pink', height: '500px' }}
>
{children}
</div>
)
const actions = {
onRequestClose: action('close'),
on... |
examples/todomvc/src/components/TodoTextInput.js | 4Catalyzer/found-relay | import keycode from 'keycode';
import PropTypes from 'prop-types';
import React from 'react';
const propTypes = {
commitOnBlur: PropTypes.bool,
initialValue: PropTypes.string,
onCancel: PropTypes.func,
onDelete: PropTypes.func,
onSave: PropTypes.func.isRequired,
placeholder: PropTypes.string,
className: ... |
definitions/npm/styled-components_v2.x.x/flow_v0.75.x-v0.103.x/test_styled-components_v2.x.x.js | flowtype/flow-typed | // @flow
import {renderToString} from 'react-dom/server'
import styled, {
ThemeProvider,
withTheme,
keyframes,
ServerStyleSheet,
StyleSheetManager
} from 'styled-components'
import React from 'react'
import type {
Theme,
Interpolation,
ReactComponentFunctional,
ReactComponentFunctionalUndefinedDefault... |
src/components/Page.js | jasongforbes/dorian-js | import React from 'react';
const Page = function render(props) {
const page = props.getPage(props.page);
return (
<div
className="page content-card"
dangerouslySetInnerHTML={{ __html: page.body }} // eslint-disable-line react/no-danger
/>
);
};
Page.propTypes = {
page: React.PropTypes.stri... |
demo/demolist/Demo4.js | tinper-bee/bee-tabs | /**
*
* @title 位置
* @description tab页签头的位置,可以在['top','bottom','left','right']中选择。当页签宽度超过容器宽度时,可以左右、上下滑动,容纳更多标签。
*
*/
import React, { Component } from 'react';
import Select from "bee-select";
import Tabs from '../../src';
const {TabPane} = Tabs;
const {Option} = Select;
class Demo4 extends Component {
const... |
src/components/SummonerSpellCard/SummonerSpellCard.js | dragoncodes/dragon-lol | import React from 'react'
import { connect } from 'react-redux'
import { RiotApi } from 'riot-api'
import { RiotActions } from 'store/riot'
class SummonerSpellCard extends React.Component {
static propTypes:{
summonerSpellId: React.PropTypes.number.isRequired,
summonerSpellImages: React.PropTypes.o... |
examples/async/index.js | clessg/redux | import 'babel-core/polyfill';
import React from 'react';
import Root from './containers/Root';
React.render(
<Root />,
document.getElementById('root')
);
|
index.ios.js | drmas/FireChat | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
} from 'react-native';
import App from './App'
AppRegistry.registerComponent('Firechat', () => App);
|
app/Root.js | vasanthk/redux-blog-example | /* eslint-env browser */
/* global process */
import React from 'react';
import { Router } from 'react-router';
import { Provider } from 'react-redux';
import cookie from './utils/cookie';
import routes from './routes';
import { routerStateChange } from './actions/router';
import { createRedux } from './utils/redux';
... |
src/components/ProgressIndicator/ProgressIndicator-test.js | jzhang300/carbon-components-react | import React from 'react';
import { ProgressIndicator, ProgressStep } from '../ProgressIndicator';
import { shallow, mount } from 'enzyme';
describe('ProgressIndicator', () => {
describe('Renders as expected', () => {
const progress = (
<ProgressIndicator className="some-class" currentIndex={3}>
<P... |
src/store/routes.js | vescogma/web-duel | import React from 'react';
import { IndexRoute, Route } from 'react-router';
import App from 'containers/app';
import Game from 'modules/game/components/Game';
export default (
<Route path="/" component={ App }>
<IndexRoute component={ Game } />
<Route path="game" component={ Game } />
</Route>
); |
docs/src/NavMain.js | egauci/react-bootstrap | import React from 'react';
import { Link } from 'react-router';
import Navbar from '../../src/Navbar';
import Nav from '../../src/Nav';
const NAV_LINKS = {
'introduction': {
link: '/introduction.html',
title: 'Introduction'
},
'getting-started': {
link: '/getting-started.html',
title: 'Getting st... |
src--/components/AppLogin/AppLogin.js | wqzwh/react-phone | import React from 'react';
require('./AppLogin.css');
class AppLogin extends React.Component{
render(){
return (
<div className="login">
<nav className="nav">
<div className="nav-container">
<a href="/"><span className="nav-back"></span></a>
<p className="nav-title">登录</p>
</div>
<... |
src/Heading/Heading.stories.js | boldr/boldr-ui | import React from 'react';
import { storiesOf } from '@storybook/react';
import Heading from './Heading';
export default storiesOf('Headings', module)
.add('semantic headers', () =>
<div>
<Heading.H1>Heading H1</Heading.H1>
<Heading.H2>Heading H2</Heading.H2>
<Heading.H3>Heading H3</Heading.H3... |
rojak-ui-web/src/app/candidate/Candidates.js | rawgni/rojak | import React from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import SimpleList from '../kit/SimpleList'
import { fetchCandidates } from '../candidate/actions'
class Candidates extends React.Component {
static propTypes = {
candidates: React.PropTypes.object,
fetchCandid... |
src/mixins/controllable.js | subjectix/material-ui | import React from 'react';
export default {
propTypes: {
onChange: React.PropTypes.func,
value: React.PropTypes.oneOfType([
React.PropTypes.string,
React.PropTypes.array,
]),
valueLink: React.PropTypes.shape({
value: React.PropTypes.string.isRequired,
requestChange: React.Pro... |
app/components/Header.js | animalphase/bramble | // @flow
import React, { Component } from 'react';
import { connect } from 'react-redux';
import stateReturn from '../store/state-return.js';
import fileOpen from '../actions/fileOpen.js';
class Header extends React.Component {
constructor(props) {
super(props);
this.saveProject = this.saveProject.bind(this... |
react/pages/single.js | Seanskiver/b2b_application | import React from 'react';
import $ from 'jquery';
class single extends React.Component {
render() {
return (
<div>
<div class="single-page main-grid-border">
<div class="container">
<div class="product-desc">
<div class="col-md-7 product-view">
<h2>Lorem Ipsu... |
boxroom/archive/backup-js-bling-2018-04-28/boxroom/archive/js-surface-2018-01-27/boxroom/archive/2017-10-23-before-redesign/src/main/js-surface-react-native.js | js-works/js-surface | import adaptReactLikeRenderEngine from './adaption/adaptReactLikeRenderEngine';
import React from 'react';
import ReactNative from 'react-native';
const {
createElement,
defineComponent,
defineClassComponent,
defineFunctionalComponent,
defineStandardComponent,
isElement,
isRenderable,
... |
enrolment-ui/src/modules/Projects/components/PTUserDetails.js | overture-stack/enrolment | import React from 'react';
import { connect } from 'react-redux';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const NoProjectUsers = props => {
return (
<div className="inner">
<div className="row">
<div className="col-md-12">
<h2>Currently No Users ... |
7.0.3/examples/syncValidation/dist/bundle.js | erikras/redux-form-docs | !function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__e... |
music-monster/src/index.js | mcocoba/react-test | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
<App />, document.getElementById('root')
)
|
src/components/about.js | GenFirst/todo-react-app | import React, { Component } from 'react';
import { Col, Grid, Row, Panel, Image } from 'react-bootstrap';
class About extends Component {
render() {
return (
<div>
<Grid>
<Row>
<Col xs={12} mdOffset={2}>
Application is created by:
</Col>
... |
node_modules/recharts/demo/component/CustomLineDot.js | SerendpityZOEY/Fixr-RelevantCodeSearch | import React from 'react';
export default React.createClass({
render() {
const { cx, cy, stroke, payload } = this.props;
if (cx !== +cx || cy !== +cy) { return null; }
if (payload.value > 250) {
return (
<svg x={cx - 10} y={cy - 10} width={20} height={20} fill="red" viewBox="0 0 1024 1024... |
src/svg-icons/av/play-circle-outline.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvPlayCircleOutline = (props) => (
<SvgIcon {...props}>
<path d="M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 ... |
src/containers/Charts/reactVis/charts/streamGraph.js | EncontrAR/backoffice | import React, { Component } from 'react';
import {stack as d3Stack, stackOffsetWiggle} from 'd3-shape';
import {range, transpose} from 'd3-array';
import {
XYPlot,
makeWidthFlexible,
AreaSeries
} from 'react-vis';
import Button from '../../../../components/uielements/button';
const FlexibleXYPlot = makeWidthFle... |
packages/reactor-tests/src/tests/rel/RelMenu.js | dbuhrman/extjs-reactor | import React from 'react';
import { Container, Button, Menu, MenuItem } from '@extjs/ext-react';
export default function RelMenu() {
return (
<Container>
<div>This tests that the menu config is automatically set when a Menu appears inside a Button. The test should verify that the button has a m... |
src/components/Notifications.js | MouseZero/nightlife-frontend | import React from 'react'
import { connect } from 'react-redux'
import PropTypes from 'prop-types'
const Notification = ({type, text}) => {
return (
<div className={'notification ' + type}>
{text}
</div>
)
}
Notification.propTypes = {
type: PropTypes.string,
text: PropTypes.string
}
const mapSt... |
ui/src/components/customers/index.js | jollopre/mps | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import List from './list';
import Pages from './pages';
import Search from './search';
export default class Customers extends Component {
render() {
const { list } = this.props;
return (
<div>
<div className="row">
<div clas... |
src/App.js | smbell/website | import React, { Component } from 'react';
import Header from './components/header/Header';
import Content from './components/content/Content';
import './App.css';
class App extends Component {
render() {
return (
<div>
<Header />
<Content />
</div>
);
}
}
export default App;
|
test/regressions/tests/Menu/SimpleMenuList.js | lgollut/material-ui | import React from 'react';
import Paper from '@material-ui/core/Paper';
import MenuList from '@material-ui/core/MenuList';
import MenuItem from '@material-ui/core/MenuItem';
export default function SimpleMenuList() {
return (
<Paper elevation={8}>
<MenuList>
<MenuItem>Profile</MenuItem>
<Me... |
src/Slider/Slider.spec.js | mtsandeep/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import {spy} from 'sinon';
import keycode from 'keycode';
import Slider from './Slider';
import getMuiTheme from '../styles/getMuiTheme';
describe('<Slider />', () => {
const muiTheme = getMuiTheme();
con... |
src/svg-icons/action/bug-report.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionBugReport = (props) => (
<SvgIcon {...props}>
<path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7... |
src/esm/components/graphics/icons/mastercard-icon/index.js | KissKissBankBank/kitten | import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["className"];
import React from 'react';
import classNames from 'classnames';
export var MasterCardIcon = function MasterCardIcon(_ref) {
var classNa... |
docs/Documentation/AutoCompletePage.js | reactivers/react-mcw | /**
* Created by muratguney on 29/03/2017.
*/
import React from 'react';
import {Card, CardHeader,AutoComplete,Table, TableRow, TableHeaderColumn, TableHeader, TableRowColumn, TableBody} from '../../lib';
import Highlight from 'react-highlight.js'
const data = [
{text: "Ankara", value: "ankara"},
{text: "Ada... |
client/components/Header.spec.js | Pennsy/todolist | import React from 'react'
import { createRenderer } from 'react-test-renderer/shallow';
import Header from './Header'
import TodoTextInput from './TodoTextInput'
const setup = () => {
const props = {
addTodo: jest.fn()
}
const renderer = createRenderer();
renderer.render(<Header {...props} />)
const ou... |
src/app/Layout/index.js | Kikobeats/react-boilerplatinum | import React from 'react'
export default function Layout ({ children }) {
return (
<article className='mw5 mw7-ns mt6 center bg-light-gray pa3 ph5-ns'>
<section className='f5 tc lh-copy'>
<h1>Hello, world!</h1>
{children}
</section>
</article>
)
}
|
examples/huge-apps/routes/Course/routes/Assignments/routes/Assignment/components/Assignment.js | kenwheeler/react-router | import React from 'react';
class Assignment extends React.Component {
//static loadProps (params, cb) {
//cb(null, {
//assignment: COURSES[params.courseId].assignments[params.assignmentId]
//});
//}
render () {
//var { title, body } = this.props.assignment;
var { courseId, assignmentId } ... |
cm19/ReactJS/your-first-react-app-exercises-master/exercise-11/complete/Page.js | Brandon-J-Campbell/codemash | import React from 'react';
import styles from './Page.css';
export default function Page({ children }) {
return (
<div className={styles.page}>
<div className={styles.content}>{children}</div>
</div>
);
}
|
components/AtomiesSidebar.js | die-antwort/atomies | 'use babel';
import React from 'react';
import {connect} from 'react-redux';
import sidebarActions from '../actions/sidebar';
import Profile from '../components/Profile';
class AtomiesSidebar extends React.Component {
render() {
return (
<span className="atomies-sidebar">
<h1>Chat</h1>
is... |
tests/components/Counter/Counter.spec.js | hajiwon1023/react-webpack-redux | import React from 'react'
import { bindActionCreators } from 'redux'
import { Counter } from 'components/Counter/Counter'
import { shallow } from 'enzyme'
describe('(Component) Counter', () => {
let _props, _spies, _wrapper
beforeEach(() => {
_spies = {}
_props = {
counter: 5,
...bindActionCre... |
src/nChildren.js | sdjidjev/prop-types | import React from 'react';
import { node } from 'prop-types';
import wrapValidator from './helpers/wrapValidator';
export default function nChildren(n, propType = node) {
if (typeof n !== 'number' || isNaN(n) || n < 0) {
throw new TypeError('a non-negative number is required');
}
const validator = function ... |
src/parser/druid/balance/CHANGELOG.js | sMteX/WoWAnalyzer | import React from 'react';
import { Gebuz, Abelito75 } from 'CONTRIBUTORS';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
export default [
{
date: new Date('2019-4-30'),
changes: 'Added High Noon and Power of the Moon azerite pieces to the statistics tab.',
contributors: ... |
docs/app/Examples/elements/Label/Types/LabelExampleAttached.js | ben174/Semantic-UI-React | import React from 'react'
import { Grid, Image, Label, Segment } from 'semantic-ui-react'
const LabelExampleAttached = () => (
<Grid columns={3}>
<Grid.Row>
<Grid.Column>
<Segment padded>
<Label attached='top'>HTML</Label>
<Image src='http://semantic-ui.com/images/wireframe/para... |
examples/Modal.js | react-materialize/react-materialize | import React from 'react';
import Modal from '../src/Modal';
import Button from '../src/Button';
export default
<Modal
header='Modal Header'
trigger={<Button>MODAL</Button>}>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad ... |
app/component/container.js | togayther/react-stock | import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import classNames from 'classnames';
import { Link } from 'react-router';
import { default as Sidebar } from 'react-sidebar';
import Panel from '../component/panel';
import * as SidebarConfig from '../config/... |
components/tooltip/check-props.js | salesforce/design-system-react | /* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */
/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
/* eslint-disable import/no-mutable-exports */
import React from 'react';
import deprecatedProperty from '../../utilities/warning/deprecated-property';
import deprecate... |
Welcome_BackUp.js | mawansui/ForTests | 'use strict';
import React from 'react';
import {
StyleSheet,
View,
Text,
Image,
Component,
ScrollView,
ListView,
RefreshControl,
AlertIOS,
TouchableHighlight
} from 'react-native';
var styles = StyleSheet.create({
description: {
fontSize: 20,
textAlign: 'center',
color: '#FFFFFF'
... |
examples/builder/FormBuilder.js | nikitka/react-redux-form | import React from 'react';
import {
Field,
Control,
Form,
actions,
track,
} from 'react-redux-form';
import { connect } from 'react-redux';
import uniqueId from 'lodash/uniqueId';
import get from 'lodash/get';
const controlMap = {
text: <input type="text" />
};
const createField = () => ({
id: uniqueId(... |
example/TouchExample/index.android.js | Raizlabs/react-native-touch-sensor | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
View,
Text,
Button
} from 'react-native';
import Touch from 'react-native-touch-sensor'
export default class TouchExample extends Component {
... |
packages/my-joy-instances/src/components/navigation/__tests__/menu.spec.js | geek/joyent-portal | import React from 'react';
import renderer from 'react-test-renderer';
import 'jest-styled-components';
import Menu from '../menu';
import Theme from '@mocks/theme';
it('renders <Menu /> without throwing', () => {
expect(
renderer
.create(
<Theme>
<Menu />
</Theme>
)
... |
app/components/LoadingIndicator/index.js | andresol/homepage | 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/entypo/AddUser.js | cox-auto-kc/react-entypo | import React from 'react';
import EntypoIcon from '../EntypoIcon';
const iconClass = 'entypo-svgicon entypo--AddUser';
let EntypoAddUser = (props) => (
<EntypoIcon propClass={iconClass} {...props}>
<path d="M15.989,19.129C16,17,13.803,15.74,11.672,14.822c-2.123-0.914-2.801-1.684-2.801-3.334c0-0.989,0.648-... |
src/MenuItem.js | insionng/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import SafeAnchor from './SafeAnchor';
const MenuItem = React.createClass({
propTypes: {
header: React.PropTypes.bool,
divider: React.PropTypes.bool,
href: React.PropTypes.string,
title: React.PropTypes.string,
target: ... |
src/components/NavBar.js | kbeathanabhotla/react-safari | import React from 'react';
class NavBar extends React.Component {
render() {
return (
<nav className="navbar navbar-default">
<div className="container-fluid">
<div className="navbar-header">
<button type="button" className="navbar-toggle collapsed" data-toggle="collapse" dat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.