path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/components/PostDetail.js | ksco/reblog | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Header, Segment } from 'semantic-ui-react';
import marked from 'marked';
import getPostDetail from '../actions/post';
import getPostComments from '../actions/comments';
import { post } from '../selectors';
import Spinner from '.... |
src/components/Currency.js | KingKone/oversee | import React, { Component } from 'react';
import { ipcRenderer } from 'electron';
import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend } from 'recharts';
let data = [];
let lcup = 0;
class Currency extends React.Component {
render() {
return (
<div className="currency">
... |
docs/app/Examples/elements/Image/index.js | jcarbo/stardust | import React from 'react'
import Types from './Types'
import States from './States'
import Variations from './Variations'
import Groups from './Groups'
const ImageExamples = () => (
<div>
<Types />
<States />
<Variations />
<Groups />
</div>
)
export default ImageExamples
|
src/elements/Image/ImageGroup.js | shengnian/shengnian-ui-react | import cx from 'classnames'
import PropTypes from 'prop-types'
import React from 'react'
import {
childrenUtils,
customPropTypes,
getElementType,
getUnhandledProps,
META,
SUI,
} from '../../lib'
/**
* A group of images.
*/
function ImageGroup(props) {
const { children, className, content, size } = pro... |
packages/wix-style-react/src/Page/test/examples/Breadcrumbs.js | wix/wix-style-react | import React from 'react';
import { Breadcrumbs } from 'wix-style-react';
export default (
<Breadcrumbs
items={[1, 2, 3].map(i => ({ id: `${i}`, value: `#${i} item` }))}
activeId="3"
size="medium"
theme="onGrayBackground"
onClick={() => {}}
/>
);
|
src/index.js | shhaumb/react-redux-subapp | import React from 'react';
import PropTypes from 'prop-types';
import hoistStatics from 'hoist-non-react-statics';
import { subspace, namespaced } from 'redux-subspace';
import { subspaced } from 'redux-subspace-saga';
import { addReducer } from 'redux-transient';
import { subAppEnhancer } from './enhancer';
export {... |
Skins/VetoccitanT3/ReactSrc/node_modules/react-redux/src/hooks/useStore.js | ENG-SYSTEMS/Kob-Eye | import { useContext } from 'react'
import { ReactReduxContext } from '../components/Context'
import { useReduxContext as useDefaultReduxContext } from './useReduxContext'
/**
* Hook factory, which creates a `useStore` hook bound to a given context.
*
* @param {React.Context} [context=ReactReduxContext] Context pass... |
src/components/views/elements/AddressSelector.js | aperezdc/matrix-react-sdk | /*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2017 Vector Creations Ltd
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 applica... |
src/components/Button/Button.js | guilhermecvm/react-dribbble-components | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
const Button = styled.button`
padding: 5px 20px;
border-radius: 10px;
border: 0;
color: #ffffff;
text-align: left;
text-transform: uppercase;
font-size: 14px;
box-shadow: 0px 0px 20px -5px rgba(0, 0, 0, ... |
admin/client/App/shared/Portal.js | ratecity/keystone | /**
* Used by the Popout component and the Lightbox component of the fields for
* popouts. Renders a non-react DOM node.
*/
import React from 'react';
import ReactDOM from 'react-dom';
module.exports = React.createClass({
displayName: 'Portal',
portalElement: null, // eslint-disable-line react/sort-comp
compone... |
mobx-src/components/User.js | xiedidan/smart-territory-demo | import React from 'react'
import {observer} from 'mobx-react'
import _ from 'lodash'
import * as THREE from 'three'
import {Layout, Menu, Breadcrumb, Form, Input, Icon, Checkbox, Button, Row, Col} from 'antd'
import constants from '../utilities/constants'
const { SubMenu } = Menu
const { Header, Content, Sid... |
test/mapTree-test.js | jaredly/react-motion | import mapTree from '../src/mapTree';
import React from 'react';
describe('mapTree', () => {
it('should map numbers leaves correctly', () => {
const add1 = (_, a) => a + 1;
expect(mapTree(add1, 1)).toEqual(2);
expect(mapTree(add1, [])).toEqual([]);
expect(mapTree(add1, {})).toEqual({});
expect(ma... |
src/svg-icons/communication/chat.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationChat = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"/>
</SvgIcon>
);
Communicatio... |
src/scripts/components/button/button.component.js | pponugo/react-dev-ops | import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
class Button extends React.Component {
constructor(props) {
super(props);
this._onEvent = this._onEvent.bind(this);
}
_onEvent(e, eventName, args) {
this.props.onEvent(eventName, args);
... |
test/unit/components/RoutesSpec.js | lxanders/react-clientside-example | import React from 'react';
import { mount } from 'enzyme';
import { expect } from 'chai';
import { createStore, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import thunk from 'redux-thunk';
import reducers from '../../../src/reducers/index';
import App from '../../../src/components/App';
impo... |
client/src/components/User/Settings.js | hutchgrant/react-boilerplate | import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as actions from '../../actions/auth';
class Settings extends Component {
render() {
return (
<div>
<h2>Settings</h2>
<h5>Welcome {this.props.auth.username}</h5>
... |
src/containers/NotFound/NotFound.js | micooz/react-redux-universal-hot-example | import React from 'react';
export default function NotFound() {
return (
<div className="container">
<h1>Doh! 404!</h1>
<p>These are <em>not</em> the droids you are looking for!</p>
</div>
);
}
|
actor-apps/app-web/src/app/components/activity/UserProfile.react.js | gale320/actor-platform | import _ from 'lodash';
import React from 'react';
import ReactMixin from 'react-mixin';
import { IntlMixin, FormattedMessage } from 'react-intl';
import classnames from 'classnames';
import ContactActionCreators from 'actions/ContactActionCreators';
import DialogActionCreators from 'actions/DialogActionCreators';
im... |
information/blendle-frontend-react-source/app/modules/sectionsPage/components/PersonalPage/UpsellBanner/index.js | BramscoChill/BlendleParser | import React from 'react';
import PremiumBannerContainer from 'modules/item/containers/GetPremiumBannerContainer';
import CSS from './style.scss';
function UpsellBanner() {
return (
<div className={CSS.upsellBannerContainer}>
<PremiumBannerContainer
shouldCheckItemConditions={false}
shouldH... |
test/SplitButtonSpec.js | aparticka/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import SplitButton from '../src/SplitButton';
import MenuItem from '../src/MenuItem';
import Button from '../src/Button';
describe('SplitButton', function () {
let instance;
afterEach(function() {
if (instance && ReactTestUtils.i... |
src/svg-icons/maps/local-dining.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalDining = (props) => (
<SvgIcon {...props}>
<path d="M8.1 13.34l2.83-2.83L3.91 3.5c-1.56 1.56-1.56 4.09 0 5.66l4.19 4.18zm6.78-1.81c1.53.71 3.68.21 5.27-1.38 1.91-1.91 2.28-4.65.81-6.12-1.46-1.46-4.2-1.... |
step07o/src/index.js | panacloud/learn-react | import React from 'react';
import ReactDOM from 'react-dom';
import App from './containers/app/App';
import './index.css';
import store from './store'
import { Provider } from 'react-redux'
ReactDOM.render(
//Wraping up in Provider
<Provider store={store}>
<div>
<App/>
</div>
</Provider>
,
docu... |
app/components/2_Users/AuthManager.js | shug0/Awesomidi | // CORE
import React, { Component } from 'react';
var { browserHistory } = require('react-router');
// Components
import LoginBox from './Auth/LoginBox';
class AuthManager extends Component {
constructor(){
super();
this.handleTwitterAuth = this.handleTwitterAuth.bind(this);
}
componentWillUpdate(nextProps, n... |
scenes/change-account.js | APU-Flow/FlowApp | // change-account.js
// Flow
'use strict';
import React, { Component } from 'react';
import { StyleSheet, Text, Alert, View, TouchableHighlight } from 'react-native';
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
import ModalDropdown from 'react-native-modal-dropdown';
export defa... |
src/svg-icons/social/sentiment-dissatisfied.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialSentimentDissatisfied = (props) => (
<SvgIcon {...props}>
<circle cx="15.5" cy="9.5" r="1.5"/><circle cx="8.5" cy="9.5" r="1.5"/><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 1... |
lib/encoding/MultiBrowser.js | waynecraig/encoding-present | require('./sass/fullpage.sass');
import React, { Component } from 'react';
export default class Slide extends Component {
render() {
return (
<div className='fullpage'>
<h1>不同浏览器的区别</h1>
<p>待续...</p>
</div>
)
}
}
|
js/components/Header/4.js | YeisonGomez/RNAmanda |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Container, Header, Title, Content, Button, Icon, Left, Right, Body, Text } from 'native-base';
import { Actions } from 'react-native-router-flux';
import { actions } from 'react-native-navigation-redux-helpers';
import { openDra... |
imports/ui/NotFound.js | dandev237/short-lnk | /**
* Created by Daniel on 18/06/2017.
*/
import React from 'react';
import {Link} from 'react-router-dom';
export default () => {
return(
<div className="boxed-view">
<div className="boxed-view__box">
<h1>Page Not Found</h1>
<p>Hmmm, we're unable to find that ... |
src/js/components/settings/form/Profile.js | barumel/ultritium-radio-player | import React from 'react';
import { Form, FormGroup, FormControl, ControlLabel, InputGroup, Col, Button } from 'react-bootstrap';
export class SettingsFormProfile extends React.Component {
constructor() {
super();
}
render() {
const hidden = this.props.locked ? 'hidden' : '';
return(
<Form ho... |
src/js/components/catalog/app-catalog-item.js | rafaelkyrdan/flux-app | import React from 'react';
import AppStore from '../../stores/app-store';
import AppActions from '../../actions/app-actions';
import CartButton from '../cart/app-cart-button';
import StoreWatchMixin from '../../mixins/StoreWatchMixin';
import { Link } from 'react-router';
function getCatalogItem(props){
let item = Ap... |
src/components/common/svg-icons/device/add-alarm.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceAddAlarm = (props) => (
<SvgIcon {...props}>
<path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.... |
src/server.js | webmasterkai/boiler | import Express from 'express';
import React from 'react';
import ReactDOM from 'react-dom/server';
import config from './config';
import favicon from 'serve-favicon';
import compression from 'compression';
import httpProxy from 'http-proxy';
import path from 'path';
import createStore from './redux/create';
import ApiC... |
src/App.js | aquiladev/browniecoin | import React, { Component } from 'react';
import Wallet from './Wallet'
class App extends Component {
render() {
return (
<div className="App">
<Wallet />
</div>
);
}
}
export default App;
|
admin/client/App/shared/FlashMessages.js | frontyard/keystone | /**
* Render a few flash messages, e.g. errors, success messages, warnings,...
*
* Use like this:
* <FlashMessages
* messages={{
* error: [{
* title: 'There is a network problem',
* detail: 'Please try again later...',
* }],
* }}
* />
*
* Instead of error, it can also be hilight, info, ... |
src/routes/NotFound/NotFound.js | Xvakin/quiz | import React from 'react'
export default function NotFound() {
return (
<div className="container">
<h1>Doh! 404!</h1>
<p>These are <em>not</em> the droids you are looking for!</p>
</div>
)
}
|
pages/articles/client.js | hschlichter/react-redux-pages-demo | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import configureStore from '../../shared/store/clientstore';
import reducers from './reducers';
import Layout from './components/layout';
const store = configureStore(reducers, context.state);
if (typeof window !== '... |
client-src/components/category/list/compare/ComparePaneClearButton.js | minimus/final-task | import React from 'react'
import classNames from 'classnames'
import propTypes from 'prop-types'
export default function ComparePaneClearButton({ disabled, onClick }) {
const buttonClass = (disabled) ? 'disabled' : ''
return (
<button className={classNames(buttonClass, 'compare-clear-button')} onClick={onClick... |
frontend/react/index.js | kamyarg/payments-frontend |
import React from 'react';
import ReactDOM from 'react-dom';
import PaymentsInspectionComp from './PaymentsInspectionComp';
ReactDOM.render(
<PaymentsInspectionComp />,
document.getElementById('payment-div')
);
|
internals/templates/app.js | Frai/Events | /**
* app.js
*
* This is the entry file for the application, only setup and boilerplate
* code.
*/
// Needed for redux-saga es6 generator support
import 'babel-polyfill';
// Import all the third party stuff
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
impor... |
packages/react-jsx-highcharts/test/components/AxisProvider/index.spec.js | AlexMayants/react-jsx-highcharts | import React, { Component } from 'react';
import { mount } from 'enzyme';
import provideAxis from '../../../src/components/AxisProvider';
import { createMockChart, createMockAxis } from '../../test-utils';
const WrappedComponent = props => (
<div />
);
const AxisWrappedComponent = provideAxis(WrappedComponent);
des... |
app/javascript/mastodon/features/notifications/components/setting_toggle.js | SerCom-KC/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Toggle from 'react-toggle';
export default class SettingToggle extends React.PureComponent {
static propTypes = {
prefix: PropTypes.string,
settings: ImmutablePropTypes.map.isReq... |
client/modules/List/pages/ListDetailPage.js | jeojoe/emplist | import React, { Component } from 'react';
import { Link, withRouter } from 'react-router';
import moment from 'moment';
import callApi from '../../../util/apiCaller';
import AdminHeader from '../../Admin/components/AdminHeader';
import { LoaderWithText } from '../../App/components/Loader';
import s from './ListDetai... |
app/src/components/plugins/MenuItem/index.js | ouxu/NEUQ-OJ | /**
* Created by out_xu on 17/3/19.
*/
import React from 'react'
import { Icon, Menu, Tooltip } from 'antd'
import { Link } from 'react-router'
const MenuItem = {
normal: [
<Menu.Item key={'homepage'}>
<Link to='/homepage' className='showitem'>
<span className='nav-text'><Icon type='home' /> 首页</... |
pages/join.js | aunnnn/open-ideas | import React, { Component } from 'react';
import Router from 'next/router'
import { Router as CustomRouter } from '../routes'
import { connect } from 'react-redux';
import { graphql, gql, compose } from 'react-apollo'
import Head from 'next/head'
import { loggedIn } from '../lib/authActions'
import Page from '../lay... |
src/components/Radial.react.js | hypriot/kitematic | import React from 'react';
import classNames from 'classnames';
var Radial = React.createClass({
render: function () {
var percentage;
if ((this.props.progress !== null && this.props.progress !== undefined) && !this.props.spin && !this.props.error) {
percentage = (
<div className="percentage"><... |
components/__tests__/Tooltip-tests.js | hellobrian/carbon-components-react | import React from 'react';
import Icon from '../Icon';
import FloatingMenu from '../../internal/FloatingMenu';
import Tooltip from '../Tooltip';
import { mount } from 'enzyme';
describe('Tooltip', () => {
describe('Renders as expected with defaults', () => {
const wrapper = mount(
<Tooltip triggerText="Too... |
src/components/chart.js | frandm182/reactReduxWeather | import React, { Component } from 'react';
import { Sparklines, SparklinesLine, SparklinesReferenceLine } from 'react-sparklines';
import _ from 'lodash';
function average(data) {
return _.round(_.sum(data)/data.length);
}
export default (props) => {
return (
<div>
<Sparklines height={120} width={180} ... |
lib/Loading/stories/LoadingPane.story.js | folio-org/stripes-components | import React from 'react';
import Paneset from '../../Paneset';
import LoadingPane from '../LoadingPane';
export default () => (
<Paneset>
<LoadingPane paneTitle="Loading pane" />
</Paneset>
);
|
client/src/lib/i18n.js | andris9/mailtrain | 'use strict';
import React from 'react';
import * as ri18n from 'react-i18next';
import {I18nextProvider} from 'react-i18next';
import i18n from 'i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import mailtrainConfig from 'mailtrainConfig';
import moment from 'moment';
import {convertToFake... |
clients/packages/admin-client/src/intl/helpers/shallow-with-intl.js | nossas/bonde-client | //
// For reference see: https://github.com/yahoo/react-intl/wiki/Testing-with-React-Intl#enzyme
//
import React from 'react';
import { IntlProvider } from 'react-intl';
import { shallow } from 'enzyme';
import pt from '../../intl/locale-data/pt-BR';
const intlProvider = new IntlProvider({ locale: 'pt-BR', messages: p... |
src/BarGraphGroup/bar_graph_column.js | jrfferreira/react-cubedb | // @flow
// TODO remove lodash
import _map from 'lodash/map'
import React from 'react'
import BarGraph from '../BarGraph'
export default class BarGraphColumn extends React.Component {
constructor(props) {
super(props)
this.state = {
stretched: [],
search: []
}
}
onStretch = serie => ... |
src/components/MainPageWithNav.js | zeljkoX/e-learning | import React from 'react';
import ReactDOM from'react-dom';
import Header from './layout/Header';
import PageWithNav from './layout/PageWithNav';
import Breadcrumbs from 'react-breadcrumbs';
class MainPageWithNav extends React.Component {
render() {
let menuItems = [
{ route: 'studenti', text: 'Studenti'},
{... |
src/components/Header/Header.js | mjasinski5/dashboardWookiees | import React from 'react'
import { IndexLink, Link } from 'react-router'
import classes from './Header.scss'
export const Header = () => (
<div>
<h2>DashboardJS</h2>
<Link to='/'> Home </Link>
<Link to='/img'> ImgHome </Link>
</div>
)
export default Header
|
public/client/routes/users/containers/users.js | Concorda/concorda-dashboard | 'use strict'
import React from 'react'
import {connect} from 'react-redux'
import { pushPath } from 'redux-simple-router'
import _ from 'lodash'
// actions
import {getUsers, deleteUser, getUser, closeSession, disableUser, enableUser} from '../../../modules/user/actions/index'
import Panel from '../../components/pane... |
docs/src/components/index/Content.js | HsuTing/cat-components | 'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import radium from 'radium';
import Markdown from 'react-markdown';
import * as style from './style/index';
@radium
export default class Content extends React.Component {
static propTypes = {
name: PropTypes.string.isRequired,
tex... |
examples/04 Sortable/Simple/Container.js | pairyo/react-dnd | import React, { Component } from 'react';
import update from 'react/lib/update';
import Card from './Card';
import { DragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd/modules/backends/HTML5';
const style = {
width: 400
};
@DragDropContext(HTML5Backend)
export default class Container extends Co... |
demo/src/components/App/components/Examples/components/MultipleSections/MultipleSections.js | CoreFiling/react-autosuggest | import styles from './MultipleSections.less';
import theme from './theme.less';
import React, { Component } from 'react';
import isMobile from 'ismobilejs';
import Link from 'Link/Link';
import Autosuggest from 'Autosuggest';
import languages from './languages';
import { escapeRegexCharacters } from 'utils/utils';
co... |
app/components/Counter.js | lynks-p2p/lynks-client | // @flow
import React, { Component } from 'react';
import { Link } from 'react-router';
import styles from './Counter.css';
class Counter extends Component {
props: {
increment: () => void,
incrementIfOdd: () => void,
incrementAsync: () => void,
decrement: () => void,
counter: number
};
rend... |
app/javascript/mastodon/containers/status_container.js | ebihara99999/mastodon | import React from 'react';
import { connect } from 'react-redux';
import Status from '../components/status';
import { makeGetStatus } from '../selectors';
import {
replyCompose,
mentionCompose,
} from '../actions/compose';
import {
reblog,
favourite,
unreblog,
unfavourite,
} from '../actions/interactions';
... |
src/app/components/Layout.js | jordanco/drafter-frontend | import React, { Component } from 'react';
import '../../assets/css/normalize.css';
import '../../assets/css/webflow.css';
import '../../assets/css/drafter2.webflow.css';
import ActionSidebarMenu from '../components/menu/action-sidebar';
export default (props) => {
return (
<div className="master">
... |
src/views/mainPage.js | IllegalCreed/pwdsaver_app | /**
* @providesModule MainPage
*/
import React, { Component } from 'react';
import {
TouchableWithoutFeedback,
KeyboardAvoidingView,
TouchableOpacity,
SectionList,
ScrollView,
StyleSheet,
Dimensions,
TextInput,
Platform,
Button,
Modal,
Alert,
Image,
Text,
View
} from 'react-native';
import Crypto from ... |
src/components/frontPageDisplay.js | gordongordon/hom | import React from 'react'
import { Carousel, WhiteSpace, WingBlank } from 'antd-mobile';
export default class FrontPageDisplay extends React.Component {
state = {
data: ['', '', ''],
initialHeight: 200,
}
componentDidMount() {
// simulate img loading
setTimeout(() => {
this.setState({
... |
04/EW/trding/trding/src/components/notfound/NotFound.js | rgllm/uminho | import React from 'react';
import { Link } from 'react-router-dom';
import './NotFound.css';
const NotFound = () =>{
return(
<div className="NotFound">
<h1 clasName="NotFound-title">Page not found!</h1>
<Link to="/" className="NotFound-link">Go to homepage</Link>
</div>
);
}
export default Not... |
test/integration/image-component/base-path/pages/hidden-parent.js | zeit/next.js | import Image from 'next/image'
import React from 'react'
const Page = () => {
return (
<div>
<p>Hello World</p>
<div style={{ visibility: 'hidden' }}>
<Image
id="hidden-image"
src="/docs/test.jpg"
width="400"
height="400"
></Image>
</div>
... |
app/containers/HomePage/index.js | litdevelopers/tinder | /*
* HomePage
*
* This is the first thing users see of our App, at the '/' 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 it and remove
* the ... |
src/component/Account.js | BristolPound/cyclos-mobile-3-TownPound | import React from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { View, ListView, TouchableHighlight } from 'react-native'
import DefaultText from './DefaultText'
import Colors from '@Colors/colors'
import { logout } from '../store/reducer/login'
import { updateStatus }... |
src/components/Forms/CheckboxOrRadio.js | josedigital/koala-app | import React from 'react'
const CheckboxOrRadio = (props) => {
return (
<div className="formElement">
<label className="form-label">{props.title}</label>
<div className="checkbox-group">
{props.options.map(opt => {
return (
<label key={opt} className="form-label ... |
client/app/components/common/Avatar.js | Zuehlke/poinz | import React from 'react';
import PropTypes from 'prop-types';
import avatarIcons, {SPECIAL} from '../../assets/avatars';
import {StyledAvatar} from './_styled';
const Avatar = ({user, isOwn, shaded, onClick}) => (
<StyledAvatar
className="avatar"
src={getImageSource(user)}
isOwn={isOwn}
shaded={sh... |
src/shared/components/timeline/ViewCount.js | sbekti/path-web-client | import React from 'react'
import ReactDOM from 'react-dom'
import { Link } from 'react-router'
import Cookies from 'js-cookie'
import request from 'superagent'
class ViewCount extends React.Component {
constructor(props) {
super(props)
this.state = {
expanded: false
}
this.handleViewClick = ... |
src/web/client/src/components/shared/individual-search.js | devmynd/cloud-access-manager | import React from 'react'
import TypeAheadInput from './type-ahead-input'
import MessagesContainer from './messages-container'
import graphqlApi from '../../graphql-api'
export default class IndividualSearch extends React.Component {
query = async (text, callback) => {
const query = `{ individuals(fuzzySearch:"$... |
test/components/searchbar.spec.js | ongmin/cylinder-app | /* global describe it */
// import { expect } from 'chai'
// import { shallow } from 'enzyme'
// import React from 'react'
// import Searchbar from '../app/components/Searchbar'
describe('<Searchbar />', () => {
it('should search Youtube for videos', () => {})
it('should list search results with the screenshot and... |
imports/ui/components/CreditNotes/ListCreditNotes/ListCreditNotes.js | haraneesh/mydev | import React from 'react';
import { Meteor } from 'meteor/meteor';
import PropTypes from 'prop-types';
import {
Button, Row, Table, Col, Panel, Glyphicon,
} from 'react-bootstrap';
import { toast } from 'react-toastify';
import { getFormattedMoney, getDayWithoutTime } from '../../../../modules/helpers';
import './Li... |
site/src/components/DemoBox.js | apisandipas/elemental | import React from 'react';
import classnames from 'classnames';
import E from '../../../src/constants';
const ALIGN_TRANSFORM = {
'center': 'center',
'left': 'flex-start',
'right': 'flex-end',
}
var DemoBox = React.createClass({
propTypes: {
align: React.PropTypes.oneOf(['center', 'left', 'right']),
children:... |
src/client/app/components/app-root.js | LINKIWI/apache-auth | import Favicon from 'react-favicon';
import React from 'react';
const AppRoot = ({children}) => (
<div className="app-root">
<Favicon
animated={false}
url={['/static/img/favicon.png']}
/>
{children}
</div>
);
export default AppRoot;
|
src/containers/fbpage.js | alexcurtis/react-fbpage | 'use strict';
import React from 'react';
import { connect } from 'react-redux';
import Page from '../components/page';
import {loadPage} from '../actions';
import defaultTheme from '../themes/default';
@connect(state => ({
loading: state.page.loading,
page: state.page.attributes,
feed: state.page.feed
}))... |
src/__mocks__/react-native.js | jimthedev/snowflake | /* eslint-disable react/no-multi-comp */
/**
* @see http://www.schibsted.pl/2015/10/testing-react-native-components-with-jest/
*/
import React from 'react';
const ReactNative = React;
ReactNative.StyleSheet = {
create: function create(styles) {
return styles;
}
};
class View extends React.Component ... |
src/components/Footer/Footer.js | jshin47/ireactforyou | /**
* 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 withStyles from 'isomorp... |
src/components/video_list_item.js | fzoozai/redux-stephenGrider | import React from 'react';
const VideoListItem = ({ video, onVideoSelect }) => {
const imageUrl = video.snippet.thumbnails.default.url;
return (
<li onClick={() => onVideoSelect(video)} className="list-group-item">
<div className="video-list media">
<div className="media-left">
... |
source/generator-apparena-pattern/generators/app/templates/index.js | apparena/patterns | import React from 'react';
import PropTypes from 'prop-types';
import {ReactComponent} from 'apparena-patterns-react';
import cx from 'classnames';
import styles from './component.scss';
export default class <%= patternName %> extends ReactComponent {
render()
{
return (
<div>
</di... |
src/views/HotspotSelector.js | learnfwd/lfa-printview-hotspot-editor | import React, { Component } from 'react';
import { connect } from 'react-redux';
import Select from 'react-select';
import { Button } from 'react-bootstrap';
import { selectedHotspotChange, createHotspot, deleteHotspot } from '../actions/UIActions';
import styles from './HotspotSelector.css';
class HotspotSelector ex... |
app/javascript/mastodon/features/list_editor/components/search.js | honpya/taketodon | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { defineMessages, injectIntl } from 'react-intl';
import { fetchListSuggestions, clearListSuggestions, changeListSuggestions } from '../../../actions/lists';
import classNames from 'classnames';
const messages ... |
docs/src/app/components/pages/components/Card/ExampleControlled.js | hwo411/material-ui | import React from 'react';
import {Card, CardActions, CardHeader, CardMedia, CardTitle, CardText} from 'material-ui/Card';
import FlatButton from 'material-ui/FlatButton';
import Toggle from 'material-ui/Toggle';
export default class CardExampleControlled extends React.Component {
constructor(props) {
super(pro... |
__tests__/index.ios.js | teamfa/react-native-starter-app | import 'react-native';
import React from 'react';
import Index from '../index.ios.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
src/workflows/openfoam/tutorials/components/steps/Introduction/index.js | Kitware/HPCCloud | import React from 'react';
import DocumentationHTML from '../../../../../generic/components/steps/DocumentationHTML';
import staticContent from './content.html';
export default (props) => <DocumentationHTML staticContent={staticContent} />;
|
dashboard/app/components/LoginMfaForm/LoginMfaForm.js | tlisonbee/cerberus-management-service | import React from 'react'
import { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { reduxForm, touch } from 'redux-form'
import { finalizeMfaLogin } from '../../actions/authenticationActions'
import MfaDeviceSelect from '../MfaDeviceSelect/MfaDeviceSelect'
impor... |
test/unit/beExpandable.spec.js | ryym/react-expander | import React from 'react';
import {
renderIntoDocument,
findAllInRenderedTree,
findRenderedComponentWithType as findWithType,
findRenderedDOMComponentWithClass as findWithClassName,
scryRenderedDOMComponentsWithClass as scryWithClassName,
isDOMComponent,
Simulate
} from 'react-addons-test-utils';
import a... |
src/components/Main.js | fayfei/gallery-by-react | require('normalize.css/normalize.css');
require('styles/main.scss');
import React from 'react';
import ReactDOM from 'react-dom';
//获取图片相关的数据
let imageDatas = require('../data/imageDatas.json');
//利用自执行函数,将图片名信息转成图片URL路径信息
imageDatas = (imageDatasArr => {
for (var i = 0; i < imageDatasArr.length; i++) {
... |
examples/huge-apps/components/GlobalNav.js | joeyates/react-router | import React from 'react';
import { Link } from 'react-router';
const styles = {};
class GlobalNav extends React.Component {
static defaultProps = {
user: {
id: 1,
name: 'Ryan Florence'
}
};
constructor (props, context) {
super(props, context);
this.logOut = this.logOut.bind(this);... |
lib/ErrorModal/ErrorModal.js | folio-org/stripes-components | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Button from '../Button';
import Modal from '../Modal';
import ModalFooter from '../ModalFooter';
const ErrorModal = ({
ariaLabel,
bodyTag: Element,
open,
content,
label,
buttonLabel,
onCl... |
src/client/components/ui/slider/Slider.js | JulienPradet/quizzALJP | import React from 'react'
import Error from '../error/Error'
export default class Slider extends React.Component {
render() {
const activeSlide = this.props.children.length > this.props.activeIndex
? this.props.children[activeIndex]
: <Error>Wrong index displayed</Error>
return (
... |
app/components/link1.js | varunagg45/webpack-react-sample-project | import React from 'react';
export default React.createClass({
getInitialState: function() {
return {
'page': 'This is from Link 1'
};
},
render: function() {
return (
<div>{this.state.page}</div>
);
}
});
|
test/client/components/Auth/LoginPageTests.js | andela-jmuturi/docman-react-redux | import React from 'react';
import { shallow, mount } from 'enzyme';
import { expect } from 'chai';
import sinon from 'sinon';
import { CardTitle } from 'material-ui/Card';
import LoginPage from '../../../../client/src/components/Auth/LoginPage';
import { getContexts, shallowWithContext } from '../utils';
describe('L... |
src/svg-icons/action/important-devices.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionImportantDevices = (props) => (
<SvgIcon {...props}>
<path d="M23 11.01L18 11c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-9c0-.55-.45-.99-1-.99zM23 20h-5v-7h5v7zM20 2H2C.89 2 0 2.89 0 4v12c0 1.1.... |
client/src/components/app.js | kat09kat09/GigRTC | import React from 'react';
import { Component,PropTypes } from 'react';
import SideBar from './sidebar';
import Header from './header';
import MyRawTheme from '../../public/css/giggTheme';
import ThemeManager from 'material-ui/lib/styles/theme-manager';
import ThemeDecorator from 'material-ui/lib/styles/theme-decorator... |
packages/material-ui-icons/src/InsertDriveFile.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let InsertDriveFile = props =>
<SvgIcon {...props}>
<path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z" />
</SvgIcon>;
InsertDriveFile = pure(InsertDri... |
frontend/src/System/Backup/BackupsConnector.js | lidarr/Lidarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import * as commandNames from 'Commands/commandNames';
import { executeCommand } from 'Store/Actions/commandActions';
import { deleteBackup, fetchBackups } from... |
examples/counter/containers/App.js | joshblack/redux | import React, { Component } from 'react';
import CounterApp from './CounterApp';
import { createRedux } from 'redux';
import { Provider } from 'redux/react';
import * as stores from '../stores';
const redux = createRedux(stores);
export default class App extends Component {
render() {
return (
<Provider r... |
test/utils/CustomPropTypesSpec.js | roderickwang/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import CustomPropTypes from '../../src/utils/CustomPropTypes';
import {shouldWarn} from '../helpers';
function isChainableAndUndefinedOK(validatorUnderTest) {
it('Should validate OK with undefined or null values', function() {
asse... |
client/src/containers/drived_gate/DrivedGate.js | thewizardplusplus/vk-group-stats | import React from 'react'
import {fetchLogin} from '../../actions/login'
import {connect} from 'react-redux'
import StatefulGate from '../../components/stateful_gate/StatefulGate'
function mapStateToProps(state) {
return {
state: state.login.state,
open: state.login.isLogged,
}
}
function mapDispatchToPro... |
NavigationReact/sample/isomorphic/index.js | grahammendick/navigation | import React from 'react';
import ReactDOM from 'react-dom';
import { NavigationHandler } from 'navigation-react';
import getStateNavigator from './getStateNavigator';
import App from './App';
var stateNavigator = getStateNavigator();
registerControllers(stateNavigator);
stateNavigator.start();
ReactDOM.hydrate(
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.