path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/container/navigator/header.js | PangPangPangPangPang/react-blog | /**
* Created by wangyefeng on 2017-03-31 11:26
*/
import React from 'react'
import { hashHistory } from 'react-router'
import './header.css'
import NormalButton from '../../compontent/normal_button'
import Logo from '../../resource/svg/diamond.svg'
class Header extends React.Component {
constructor(props) {
s... |
blueocean-material-icons/src/js/components/svg-icons/image/hdr-strong.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageHdrStrong = (props) => (
<SvgIcon {...props}>
<path d="M17 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zM5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/>
</SvgIcon>
);
... |
src/containers/Home.js | pjkarlik/Radial | import React from 'react';
import { withRouter } from 'react-router';
import { resolve } from '../styles';
import SiteStyles from '../styles/Site.less';
import RadialNav from '../components/RadialNav';
import RadialStyles from '../components/RadialNav.less';
class Home extends React.Component {
static displayName =... |
src/App.js | SpencerCornish/gong-web | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h1 className="App-title">Welco... |
example/src/screens/types/LightBox.js | inalist/react-native-navigation | import React from 'react';
import {StyleSheet, View, Text, Dimensions, Button} from 'react-native';
class Lightbox extends React.Component {
render() {
return (
<View style={styles.container}>
<View style={{flex: 8}}>
<Text style={styles.title}>{this.props.title}</Text>
<Text s... |
app/components/Toggle/index.js | Dmitry-N-Medvedev/motor-collection | /**
*
* LocaleToggle
*
*/
import React from 'react';
import Select from './Select';
import ToggleOption from '../ToggleOption';
function Toggle(props) {
let content = (<option>--</option>);
// If we have items, render them
if (props.values) {
content = props.values.map((value) => (
<ToggleOption key... |
imports/api/interests/interests.js | howlround/worldtheatremap | // Meteor
import { TAPi18n } from 'meteor/tap:i18n';
// Utilities
import React from 'react';
import ReactSelect from 'react-select';
import { FormattedMessage } from 'react-intl';
import t from 'tcomb-form';
import Checkboxes from '../../ui/components/Checkboxes.jsx';
class InterestsCollection extends TAPi18n.Collect... |
demo-docs-website/src/theme/DocItemFooter/index.js | dimsemenov/PhotoSwipe | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import clsx from 'clsx';
import LastUpdated from '@theme/LastUpdated';
import EditThisPage from '@theme/... |
src/svg-icons/notification/airline-seat-legroom-extra.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAirlineSeatLegroomExtra = (props) => (
<SvgIcon {...props}>
<path d="M4 12V3H2v9c0 2.76 2.24 5 5 5h6v-2H7c-1.66 0-3-1.34-3-3zm18.83 5.24c-.38-.72-1.29-.97-2.03-.63l-1.09.5-3.41-6.98c-.34-.68-1.03-1.... |
server/sonar-web/src/main/js/apps/web-api/components/Params.js | lbndev/sonarqube | /*
* SonarQube
* Copyright (C) 2009-2017 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, o... |
entry_types/scrolled/package/src/frontend/inlineEditing/TextPlaceholder.js | codevise/pageflow | import React from 'react';
import styles from './TextPlaceholder.module.css';
export function TextPlaceholder({text, visible}) {
if (!text || !visible) {
return null;
}
return (
<div className={styles.placeholder}>
<div>{text}</div>
</div>
);
}
|
editor/components/ButtonGroups.js | VishalRohra/chroma-tone | import React from 'react'
import Toolbar from './Toolbar'
export default class ButtonGroups extends React.Component {
render() {
return (
<Toolbar className={this.props.className}>
{['left', 'middle', 'right'].map( position =>
<div key={position} className='toolbar-group'>
{ t... |
src/server/frontend/Html.js | VigneshRavichandran02/3io | /* @flow */
/* eslint-disable react/no-danger */
import React from 'react';
const GoogleAnalytics = ({ id }) => (
<script
dangerouslySetInnerHTML={{ __html: `
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.cr... |
src/common/containers/Profile.js | strekmann/samklang | import React from 'react';
import { Grid, Row, Col } from 'react-bootstrap';
import { connect } from 'react-redux';
import Immutable from 'immutable';
class Profile extends React.Component {
render() {
const user = this.props.users.get(this.props.user.get('id'));
return (
<Grid>
... |
src/routes/index.js | corydolphin/kanban-github | import React from 'react'
import { Route, IndexRoute, Redirect } from 'react-router'
// NOTE: here we're making use of the `resolve.root` configuration
// option in webpack, which allows us to specify import paths as if
// they were from the root of the ~/src directory. This makes it
// very easy to navigate to files ... |
src/Parser/Core/Modules/Items/Legion/Legendaries/SephuzsSecret.js | enragednuke/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import ITEMS from 'common/ITEMS';
import { formatPercentage } from 'common/format';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
const PASSIVE_HASTE = 0.02;
const ACTIVE_HASTE = 0.25;
/*
* Sephuz... |
Skins/VetoccitanT3/ReactSrc/node_modules/react-awesome-slider/src/core/bullets.js | MAN-IN-WAN/Kob-Eye | import React from 'react';
import PropTypes from 'prop-types';
import { getClassName } from '../helpers/components';
export default class Bullets extends React.Component {
static propTypes = {
cssModule: PropTypes.object,
rootElement: PropTypes.string.isRequired,
media: PropTypes.array,
onClick: Prop... |
src/components/Footer.js | elamperti/OpenWebScrobbler | import React from 'react';
import { Trans } from 'react-i18next';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faTwitter, faFacebook, faGithub } from '@fortawesome/free-brands-svg-icons';
import './Footer.css';
function Footer() {
return (
<footer>
<div className="container ... |
src/with-feature-toggles.js | paralleldrive/react-feature-toggles | import React from 'react';
import { FeatureToggles } from './feature-toggles';
export const withFeatureToggles = ({ features } = {}) => Component => props => (
<FeatureToggles features={features}>
<Component {...props} />
</FeatureToggles>
);
|
src/propTypes/PointPropType.js | dingbat/react-native-mock | /**
* https://github.com/facebook/react-native/blob/master/Libraries/StyleSheet/PointPropType.js
*/
import React from 'react';
const { PropTypes } = React;
const PointPropType = PropTypes.shape({
x: PropTypes.number,
y: PropTypes.number,
});
module.exports = PointPropType;
|
app/components/__tests__/App_test.js | ivanthedeployer/todo | import React from 'react'
import { shallow } from 'enzyme'
import { expect } from 'chai'
import App from '../App'
describe('App', () => {
it('renders', () => {
const component = shallow(<App />)
expect(component.find('h1').text()).to.equal("Test Application")
})
})
|
src/shared/components/HistoricTime/index.js | CharlesMangwa/Chloe | /* @flow */
import React from 'react'
import { Text, View } from 'react-native'
import { getPeriodColor, getPeriodName } from '@helpers/periods'
import Icon from '@components/Icon'
import styles from './styles'
type Props = {
value: 'preHistory' | 'antiquity' | 'middleAge' | 'modernTimes' | 'contemporaryTimes',
p... |
src/js/components/App.js | nathanbrennan/redux-todo | import React from 'react'
import Footer from './Footer'
import AddTodo from '../containers/AddTodo'
import VisibleTodolist from '../containers/VisibleTodoList'
const App = () => (
<div>
<AddTodo />
<VisibleTodolist />
<Footer />
</div>
)
export default App
|
packages/react/src/components/Text/__tests__/Text-test.js | carbon-design-system/carbon-components | /**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import { render, screen } from '@testing-library/react';
import React from 'react';
import { TextDirection, Text } from '../';
describe('Tex... |
packages/material-ui-icons/src/PermDataSetting.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let PermDataSetting = props =>
<SvgIcon {...props}>
<path d="M18.99 11.5c.34 0 .67.03 1 .07L20 0 0 20h11.56c-.04-.33-.07-.66-.07-1 0-4.14 3.36-7.5 7.5-7.5zm3.71 7.99c.02-.16.04-.32.04-.49 0-.17-.01-.33-.04-.4... |
src/server/createSSR.js | jcoreio/crater | import React from 'react'
import makeStore from '../universal/redux/makeStore'
import {match as _match} from 'react-router'
import Html from './Html'
import {push} from 'react-router-redux'
import {renderToStaticMarkup} from 'react-dom-stream/server'
import fs from 'fs'
import path from 'path'
import {join} from 'path'... |
app/components/Player/PlayerControls.js | Nurasael/WeWatch | import React from 'react'
import styles from './PlayerControls.css'
const PlayerControls = (props) => {
const {seekValue, handleSeekChange, prepareTestVideo, togglePause, duration, showTimer} = props
return (
<div className={styles.component}>
<input type="range" min="0" max={duration} value={seekValue} ... |
client/vehicle-finder-spa/src/containers/messages/all-message-threads.js | Del7a/vehicle-finder | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { requestAllMessageThreads, changeCurrentMessageThread } from '../../actions/messages/';
import { getUserProfile } from '../../actions/user/';
import MessageThreadListComponent from '../..... |
modules/dreamview/frontend/src/components/common/PortalModal.js | ApolloAuto/apollo | import 'styles/Modal.scss';
import React from 'react';
import ReactDOM from 'react-dom';
class Modal extends React.Component {
constructor(props) {
super(props);
this.setOkButtonRef = (element) => {
this.okButton = element;
};
}
componentDidMount() {
// .focus() has browser restrictions ... |
src/components/Header.js | jamescchu/jameschu-v5 | import React from 'react'
import Link from 'gatsby-link'
import styled from 'styled-components'
import { rhythm } from '../utils/typography'
import { media } from '../utils/media'
const Header = styled.header`
width: ${rhythm(2)};
margin: ${rhythm(1 / 2)} ${rhythm(1)};
position: initial;
${media.desktop`
p... |
packages/react-scripts/template/src/App.js | dpoineau/create-react-app | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
... |
src/client/js/Layout.js | JMJustas/todolist | /**
* Layout for the whole page
*/
import React from 'react';
import EntryService from './services/EntryService';
import Header from './Header';
import TodosApp from './components/TodosApp';
export default class Layout extends React.Component {
constructor(props) {
super(props);
}
render() {
return (... |
src/components/CategoryCard/CategoryCard.js | hologram-io/docs | import React from 'react'
import {Link} from '../'
class CategoryCard extends React.Component {
constructor(props) {
super(props);
}
render() {
const {
header = "",
title = "",
image = "",
blurb = "",
cta = "",
ctaLink = ""
} = this.props;
return (
<d... |
client/modules/Post/__tests__/components/PostList.spec.js | BingeTrackr/BingeTrackr | import React from 'react';
import test from 'ava';
import { shallow } from 'enzyme';
import PostList from '../../components/PostList';
const posts = [
{ name: 'Prashant', title: 'Hello Mern', slug: 'hello-mern', cuid: 'f34gb2bh24b24b2', content: "All cats meow 'mern!'" },
{ name: 'Mayank', title: 'Hi Mern', slug: ... |
src/component/Dashboard.js | hustlrb/yjbAdmin | /**
* Created by yangyang on 2017/9/11.
*/
import React from 'react'
import {connect} from 'react-redux'
import {withRouter} from 'react-router-dom'
import { Button } from 'antd'
import {configAction, configSelector} from '../util/config'
class Dashboard extends React.Component {
constructor(props) {
super(pro... |
packages/react/src/components/atoms/buttons/Button/index.js | massgov/mayflower | /**
* Button module.
* @module @massds/mayflower-react/Button
*/
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
const Button = (button) => {
const buttonClasses = classNames({
ma__button: true,
[`ma__button--${button.usage}`]: button.usage,
[`ma__bu... |
src/svg-icons/notification/no-encryption.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationNoEncryption = (props) => (
<SvgIcon {...props}>
<path d="M21 21.78L4.22 5 3 6.22l2.04 2.04C4.42 8.6 4 9.25 4 10v10c0 1.1.9 2 2 2h12c.23 0 .45-.05.66-.12L19.78 23 21 21.78zM8.9 6c0-1.71 1.39-3.1 3.1... |
__tests__/ActiveJob-test.js | kbariotis/async-jobs-ui | jest.unmock('../resources/jsx/components/ActiveJob');
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import ActiveJob from '../resources/jsx/components/ActiveJob';
describe('ActiveJob Component', () => {
let job = {
id: 1,
label: 'A long runnin... |
client/util/react-intl-test-helper.js | eantler/simmeme-client | /**
* Components using the react-intl module require access to the intl context.
* This is not available when mounting single components in Enzyme.
* These helper functions aim to address that and wrap a valid,
* English-locale intl context around them.
*/
import React from 'react';
import { IntlProvider, intlSha... |
src/layouts/CoreLayout/CoreLayout.js | TriPSs/react-esc-example | import React from 'react'
import { Route, Switch } from 'react-router'
import 'styles/core.scss'
import Header from 'components/Header'
import Home from 'routes/Home'
import Counter from 'routes/Counter'
import Async from 'routes/Async'
import classes from './CoreLayout.scss'
export const CoreLayout = () => (
<div... |
renderer/components/Channels/ChannelsViewButtons.js | LN-Zap/zap-desktop | import React from 'react'
import PropTypes from 'prop-types'
import { useIntl } from 'react-intl'
import { SwitchButton } from 'components/UI'
import LayoutCards from 'components/Icon/LayoutCards'
import LayoutList from 'components/Icon/LayoutList'
import { CHANNEL_LIST_VIEW_MODE_SUMMARY, CHANNEL_LIST_VIEW_MODE_CARD } ... |
docs/app/Examples/elements/Image/States/index.js | ben174/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const ImageStatesExamples = () => (
<ExampleSection title='States'>
<ComponentExample
title='Hidden'
description='An ... |
test/ButtonGroupSpec.js | zanjs/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ButtonGroup from '../src/ButtonGroup';
import Button from '../src/Button';
import { shouldWarn } from './helpers';
describe('ButtonGroup', function () {
it('Should output a button group', function () {
let instance = ReactTe... |
browser/components/relationships/relationships-single-bubble.component.js | smanwaring/relationship-visualizer | import React, { Component } from 'react';
import { Link } from 'react-router';
import { connect } from 'react-redux';
import Popover, { PopoverAnimationVertical } from 'material-ui/Popover';
import Menu from 'material-ui/Menu';
import MenuItem from 'material-ui/MenuItem';
import AddActivityForm from '../forms/add-activ... |
fixtures/attribute-behavior/src/index.js | nhunzaker/react | import './index.css';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById('root'));
|
tests/routes/Login/components/Login.spec.js | willthefirst/book-buddy | // import React from 'react'
// import { bindActionCreators } from 'redux'
// import { Login } from 'routes/Login/components/Login'
// import { shallow } from 'enzyme'
//
// describe('(Component) Login', () => {
// let _props, _spies, _wrapper
// beforeEach(() => {
// _spies = {}
// _props = {
// ...b... |
client/src/pages/Routes/Routes.js | patferguson/solitaire-react | import React, { Component } from 'react';
import { Router, Route, IndexRoute, browserHistory } from 'react-router'
import App from '../App'
import NotFound from '../NotFound'
import Home from '../Home'
import About from '../About'
import Testing from '../Testing'
class Routes extends Component {
render() {
retu... |
src/components/Common/AddressInput.spec.js | oraclesorg/ico-wizard | import React from 'react'
import { AddressInput } from './AddressInput'
import { TEXT_FIELDS, VALIDATION_MESSAGES, VALIDATION_TYPES } from '../../utils/constants'
import renderer from 'react-test-renderer'
import Adapter from 'enzyme-adapter-react-15'
import { configure, mount } from 'enzyme'
configure({ adapter: new ... |
app/jsx/external_apps/components/AppDetails.js | venturehive/canvas-lms | /*
* Copyright (C) 2014 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas 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, version 3 of the License.
*
* Canvas is distribut... |
js/Search.js | aramay/complete-intro-to-react-v2 | import React from 'react'
import ShowCard from './ShowCard'
import Header from './Header'
import { connect } from 'react-redux'
const { arrayOf, shape, string } = React.PropTypes
// import preload from '../public/data.json'
const Search = React.createClass({
propTypes: {
shows: arrayOf(shape({
title: strin... |
app/index.js | fullPistol/React-demo | import React from 'react';
import {render} from 'react-dom';
import App from './js/containers/App';
import './css/reset.css'
import './css/index.less';
render(
<App />,
document.getElementById('root')
); |
src/svg-icons/image/photo-size-select-small.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePhotoSizeSelectSmall = (props) => (
<SvgIcon {...props}>
<path d="M23 15h-2v2h2v-2zm0-4h-2v2h2v-2zm0 8h-2v2c1 0 2-1 2-2zM15 3h-2v2h2V3zm8 4h-2v2h2V7zm-2-4v2h2c0-1-1-2-2-2zM3 21h8v-6H1v4c0 1.1.9 2 2 2zM3 7H... |
packages/ui-toolkit/src/styleguide/tabs.js | geek/joyent-portal | import React from 'react';
import PropTypes from 'prop-types';
import Styled from 'react-styleguidist/lib/rsg-components/Styled';
import cx from 'classnames';
export const styles = ({
space,
color,
fontFamily,
fontSize,
buttonTextTransform
}) => ({
button: {
padding: [[space[1], 0]],
fontFamily: fo... |
test/test_helper.js | quebez/react_todolist | import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import... |
src/components/error-screen.js | gitpoint/git-point | import React, { Component } from 'react';
import { colors, fonts, normalize } from 'config';
import { t } from 'utils';
import styled from 'styled-components';
const ViewWrapper = styled.View`
align-items: center;
align-content: center;
height: 100%;
justify-content: center;
`;
const TextStyled = styled.Text`... |
src/component/Template.js | NHAAHNA/hms | import React, { Component } from 'react';
import '../containers/App.css';
export default class Template extends Component{
render(){
return(
<div className="container">
<div className="row">
<div className="col-md-12 twelveDiv">
<h2>12 </h2>
... |
src/components/Bottom/Bottom.js | Zoomdata/nhtsa-dashboard-2.2 | import styles from './Bottom.css';
import React from 'react';
import image from '../../images/slot-bottom.png'
const Bottom = () => {
return (
<img
className={styles.root}
width="120" height="3.5"
src={image}
/>
)
};
export default Bottom; |
src/index.js | yfruan/react-simple | import React from 'react';
import ReactDom from 'react-dom';
import App from 'app';
ReactDom.render(
<App />,
document.getElementById('content')
);
|
examples/redirect-using-index/app.js | okcoker/react-router | import React from 'react';
import { Router, Route, IndexRoute, Link } from 'react-router';
var App = React.createClass({
render() {
return (
<div>
{this.props.children}
</div>
);
}
});
var Index = React.createClass({
render () {
return (
<div>
<h1>You should not se... |
src/svg-icons/action/perm-phone-msg.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPermPhoneMsg = (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.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.2... |
client/src/javascript/components/icons/Ratio.js | jfurrow/flood | import React from 'react';
import BaseIcon from './BaseIcon';
export default class Ratio extends BaseIcon {
render() {
return (
<svg className={`icon icon--ratio ${this.props.className}`} viewBox={this.getViewBox()}>
<path d="M54.57,15.76a28.56,28.56,0,1,0-10.45,39A28.56,28.56,0,0,0,54.57,15.76ZM9... |
src/svg-icons/editor/format-paint.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatPaint = (props) => (
<SvgIcon {...props}>
<path d="M18 4V3c0-.55-.45-1-1-1H5c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6h1v4H9v11c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-9h8V4h-3z"/>
</SvgIco... |
public/jspm_packages/npm/react-router@2.0.0/modules/Redirect.js | nayashooter/ES6_React-Bootstrap | /* */
"format cjs";
import React from 'react'
import invariant from 'invariant'
import { createRouteFromReactElement } from './RouteUtils'
import { formatPattern } from './PatternUtils'
import { falsy } from './PropTypes'
const { string, object } = React.PropTypes
/**
* A <Redirect> is used to declare another URL p... |
src/svg-icons/file/cloud-off.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let FileCloudOff = (props) => (
<SvgIcon {...props}>
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-... |
packages/react-dom/src/server/ReactPartialRenderer.js | anushreesubramani/react | /**
* Copyright (c) 2013-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.
*
* @flow
*/
import type {ReactElement} from 'shared/ReactElementType';
import React from 'react';
import emptyFunction from 'fbjs/lib/e... |
node_modules/antd/es/input-number/index.js | prodigalyijun/demo-by-antd | import _extends from 'babel-runtime/helpers/extends';
import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possib... |
docs/src/app/components/pages/components/TextField/ExampleSimple.js | tan-jerene/material-ui | import React from 'react';
import TextField from 'material-ui/TextField';
const TextFieldExampleSimple = () => (
<div>
<TextField
hintText="Hint Text"
/><br />
<br />
<TextField
hintText="The hint text can be as long as you want, it will wrap."
/><br />
<TextField
id="text-f... |
src/CitySearchPanel.js | cqqccqc/city-picker | import React, { Component } from 'react';
import { List } from 'immutable';
import './CitySearchPanel.css';
const classnames = require('classnames');
class CitySearchPanel extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<div c... |
src/components/DevIcon.js | abdulhannanali/github-organization-repos | import React from 'react';
import classnames from 'classnames';
const DevIcon = ({ language, colored, wikiLink }) => {
if (!language) {
throw new Error('`language` option is required for `DevIcon` component');
}
const devIconClasses = getDevIcon(language, colored);
let iTag = (<i className={devIconClass... |
wrappers/html.js | dominictracey/dominictracey.com | import React from 'react'
module.exports = React.createClass({
propTypes () {
return {
router: React.PropTypes.object,
}
},
render () {
const post = this.props.route.page.data
return (
<div className="markdown">
<h1 dangerouslySetInnerHTML={{ __html: post.title }} />
<... |
src/js/pages/RegisterPage.js | nekuno/client | import { SOCIAL_NETWORKS_NAMES, FACEBOOK_SCOPE } from '../constants/Constants';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import FacebookButton from '../components/ui/FacebookButton';
import translate from '../i18n/Translate';
import connectToStores from '../utils/connectToStores';
i... |
packages/mineral-ui-icons/src/IconInvertColorsOff.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 IconInvertColorsOff(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...ic... |
client/ui/atoms/card.story.js | LestaD/InstaClone | /* eslint-disable react/prop-types */
import React from 'react'
import { storiesOf } from '@storybook/react'
import { Card } from './card'
storiesOf('ui/atoms', module)
.addWithJSX('Card', () => (
<Card>Simple content of card</Card>
))
|
app/routes.js | oeb25/colio | import React from 'react';
import { Route } from 'react-router';
import LandingContainer from './containers/LandingContainer';
import RoomContainer from './containers/RoomContainer';
import CreateRoom from './components/CreateRoom';
const routes = (
<Route>
<Route path="/" component={LandingContainer}/>
<Rou... |
tests/layouts/CoreLayout.spec.js | akossebestyen/getrecd-client-redux | import React from 'react'
import TestUtils from 'react-addons-test-utils'
import CoreLayout from 'layouts/CoreLayout/CoreLayout'
function shallowRender (component) {
const renderer = TestUtils.createRenderer()
renderer.render(component)
return renderer.getRenderOutput()
}
function shallowRenderWithProps (props... |
components/summary.js | dvzrd/gatsby-utool.io | import React from 'react';
import { prune } from 'underscore.string';
import { fixLinks } from 'utils';
const style = {
summary: {
display: 'block',
position: 'relative',
margin: '0 auto',
color: '#555'
}
};
class Summary extends React.Component {
summary(body) {
const split = body.split('<hr>')... |
src/svg-icons/av/add-to-queue.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvAddToQueue = (props) => (
<SvgIcon {...props}>
<path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12zm-5-7v2h-3v3h-2v-3H8v-2h3V7h2v3h3z"/>
... |
pages/api/toolbar.js | cherniavskii/material-ui | import React from 'react';
import withRoot from 'docs/src/modules/components/withRoot';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import markdown from './toolbar.md';
function Page() {
return <MarkdownDocs markdown={markdown} />;
}
export default withRoot(Page);
|
lib/Components/Current/Current.js | francylang/weathrly | import React from 'react';
import './Current.css';
const Current = (props) => {
return (
<div className={`mobileCard ${props.colors}`}>
<div className="topCard">
<h1 className="city">{props.weather.location}</h1>
<h2 className="currentTemp">
{props.weather.current... |
src/frontend/screens/Video/index.js | resummed/resummed | import React from 'react';
/**
* Video by pexels.com:
* https://videos.pexels.com/videos/birds-flying-over-industrial-area-569
*/
const Video = () => (
<div>
<video src={require('url-loader?limit=100000000!./video.mp4')} autoPlay loop />
</div>
);
export default Video;
|
js/react/workspace.js | CANTUS-Project/vitrail | // -*- coding: utf-8 -*-
// ------------------------------------------------------------------------------------------------
// Program Name: vitrail
// Program Description: HTML/CSS/JavaScript user agent for the Cantus API.
//
// Filename: js/react/workspaces.js
// Purpose: Th... |
app/routes.js | FermORG/FermionJS | import React from 'react';
import { Switch, Route } from 'react-router';
import App from './containers/App';
import HomePage from './containers/HomePage';
import CorePage from './containers/CorePage';
export default () => (
<App>
<Switch>
<Route path="/core" component={CorePage} />
<Route path="/" co... |
src/render-react.js | abramz/gulp-react-render | /*! Gulp Render React | MIT License */
import gutil from 'gulp-util';
import through from 'through2';
import React from 'react';
import ReactDOMServer from 'react-dom/server';
/**
* Requires a file containing a React component and create an instance of it
* @param {String} filePath file path to the React component... |
test/containers/CounterPage.spc.js | tomv564/electron-git-buddy | import { expect } from 'chai';
import React from 'react';
import {
renderIntoDocument,
scryRenderedDOMComponentsWithTag,
findRenderedDOMComponentWithClass,
Simulate
} from 'react-addons-test-utils';
import { Provider } from 'react-redux';
import CounterPage from '../../app/containers/CounterPage';
import config... |
src/clincoded/static/libs/bootstrap/popover.js | ClinGen/clincoded | "use strict";
import React from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
// Display a popover that shows descriptive text content until the user dismisses it.
// The typical format looks like:
//
// <PopOverComponent {...this.props}>
// // Render JSX...
// </PopOverComponent>... |
8-css-inline/src/App.js | mariusz-malinowski/tutorial-react | import React, { Component } from 'react';
import initialState from './data';
import TodoList from './TodoList';
import TodoDetails from './TodoDetails';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import reducer from './reducer';
import createHistory from 'history/createBrowserHistory';... |
app/setup.js | JohnKim/react-native-boilerplate | /**
*
* @flow
*/
import React, { Component } from 'react';
import { APP_ID, SERVER_URL } from 's5-env';
import { FacebookSDK } from 's5-util';
import Parse from 'parse/react-native';
import Relay from 'react-relay';
import { Provider } from 'react-redux';
import configureStore from './store/configureStore';
/* Ap... |
js/BaseComponents/InfoBlock.js | telldus/telldus-live-mobile-v3 | /**
* Copyright 2016-present Telldus Technologies AB.
*
* This file is part of the Telldus Live! app.
*
* Telldus Live! app is free : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
*... |
src/app/client.js | lmcjt37/kulor-reactify | import 'react-toolbox/lib/commons.scss';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App.js';
ReactDOM.render(<App />, document.getElementById('app'));
|
src/Flags/Nigeria.js | runjak/css-flags | // @flow
import React from 'react';
import LinearFlag from './LinearFlag';
import gradient from '../utils/gradient';
const green = '#008850';
const white = '#FFFFFF';
export default function Nigeria() {
return (
<LinearFlag
gradient={`to right, ${gradient([green, white, green])}`}
/>
);
}
|
src/components/Assets/Arrow.js | LifeSourceUA/lifesource.ua | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import svg from 'lib/svg';
@svg({
width: 8,
height: 14
})
export default class Arrow extends Component {
static propTypes = {
color: PropTypes.string.isRequired
};
render() {
const { color } = this.props;... |
popup/src/scripts/components/friends/LiveFriendVideoReplaysList.js | CaliAlec/ChromeIGStory | import React, { Component } from 'react';
import Toolbar from '@material-ui/core/Toolbar';
import Tooltip from '@material-ui/core/Tooltip';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItemText from '@material-ui/core/ListItemText';
import ListItemAvatar from ... |
app/components/widget-list.js | svtizg/svtizg.github.io | import React from 'react';
const WidgetList = React.createClass({
render: function() {
return (
<ul className="widget-list">
<li>Сообщение от пользователя 1</li>
<li>Сообщение от пользователя 2</li>
<li>Сообщение от пользователя 3</li>
</ul>
);
}
});
export default Widg... |
app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js | Ryanaka/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { EmojiPicker as EmojiPickerAsync } from '../../ui/util/async-components';
import Overlay from 'react-overlays/lib/Overlay';
import classNames from 'classnames';
import Immuta... |
client/src/components/side_menu_button/SideMenuButton.js | thewizardplusplus/vk-group-stats | import React from 'react'
import IconicButton from '../iconic_button/IconicButton'
export default class SideMenuButton extends React.Component {
// this name required by the AppBar component for a correct styles processing
static muiName = 'IconButton'
static propTypes = {
iconStyle: React.PropTypes.object,
... |
packages/enzyme-adapter-react-helper/src/ifReact.js | airbnb/enzyme | import React from 'react';
import { intersects } from 'semver';
export default function ifReact(range, yes, no) {
if (typeof yes !== 'function') { throw new TypeError('"yes" must be a function'); }
if (typeof no !== 'function') { throw new TypeError('"no" must be a function'); }
return intersects(range, React.ve... |
index.android.js | wellnine/maelstorm | import "./bin/index";
// /**
// * 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 maelstorm extends Compone... |
src/svg-icons/action/settings-input-component.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsInputComponent = (props) => (
<SvgIcon {...props}>
<path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2.... |
src/components/common/NavBarLeftButton.js | jinqiupeter/mtsr | import React from 'react';
import {StyleSheet, Platform, View, Text, TouchableOpacity} from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
import {COLOR} from '../../config';
export default ({icon, text, children, onPress, containerStyle, iconStyle, textStyle}) => {
if (children) {
re... |
src/chapters/04-porazdelitve-verjetnosti/01-funkcija-gostote/index.js | medja/ovs-prirocnik | import React from 'react';
import { createChapter } from 'components/chapter';
import Equation from 'components/equation';
const title = 'Funkcija gostote';
function Title(props) {
return (
<span>
{ props.title }{' '}
<Equation math="f(x)" />
</span>
);
}
function Cha... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.