path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
actor-apps/app-web/src/app/components/ToolbarSection.react.js | chieryw/actor-platform | import React from 'react';
import DialogStore from 'stores/DialogStore';
import ActivityActionCreators from 'actions/ActivityActionCreators';
//import AvatarItem from 'components/common/AvatarItem.react';
var getStateFromStores = () => {
return {dialogInfo: null};
};
class ToolbarSection extends React.Component ... |
tests/routes/Home/components/HomeView.spec.js | jhardin293/colorize | import React from 'react'
import { HomeView } from 'routes/Home/components/HomeView'
import { render } from 'enzyme'
describe('(View) Home', () => {
let _component
beforeEach(() => {
_component = render(<HomeView />)
})
it('Renders a welcome message', () => {
const welcome = _component.find('h4')
... |
src/layouts/CoreLayout/CoreLayout.js | howlowck/train-faces | import React from 'react'
import Header from '../../components/Header'
import { Layout } from 'antd'
import './CoreLayout.scss'
import '../../styles/core.scss'
const { Content, Footer } = Layout
export const CoreLayout = ({ children }) => (
<Layout className='layout'>
<Header />
<Content style={{ padding: '... |
app/javascript/mastodon/containers/account_container.js | nonoz/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { makeGetAccount } from '../selectors';
import Account from '../components/account';
import {
followAccount,
unfollowAccount,
blockAccount,
unblockAccount,
muteAc... |
src/components/Weui/grid/grid.js | ynu/res-track-wxe | /**
* Created by n7best
*/
import React from 'react';
import classNames from 'classnames';
import GridIcon from './grid_icon';
import GridLabel from './grid_label';
export default class Grid extends React.Component {
static propTypes = {
label: React.PropTypes.string,
icon: React.PropTypes.any
... |
desktop/apps/auction2/test/components.js | dblock/force | require('babel-core/register')
require('coffee-script/register')
import * as actions from '../actions'
import auctions from '../reducers'
import ArtistFilter from '../components/artist_filter'
import AuctionGridArtwork from '../components/auction_grid_artwork'
import AuctionListArtwork from '../components/auction_list_... |
app/components/Home.js | munir7/react | import React from 'react';
class Home extends React.Component {
render() {
return (
<h2 className="text-center">
Search by Github Username Above
</h2>
)
}
};
export default Home;
|
src/SplitButton.js | kwnccc/react-bootstrap | /* eslint react/prop-types: [2, {ignore: "bsSize"}] */
/* BootstrapMixin contains `bsSize` type validation */
import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import DropdownStateMixin from './DropdownStateMixin';
import Button from './Button';
import Butto... |
src/components/Keyword.js | Bynno/politicheck-app | import React from 'react';
export default React.createClass({
getInitialState() {
return {
collapsed: true
};
},
toggleCollapse() {
console.log('Toggle collapse', this.state.collapsed);
this.setState({
collapsed: !this.state.collapsed
});
},
renderVotes() {
return this.p... |
assets/jqwidgets/demos/react/app/numberinput/righttoleftlayout/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxNumberInput from '../../../jqwidgets-react/react_jqxnumberinput.js';
class App extends React.Component {
render() {
return (
<div id='jqxWidget' style={{ fontSize: 13, fontFamily: 'Verdana', float: 'left' }}>
... |
src/components/PokemonPreview.js | rafaelkyrdan/relay-app | import React from 'react'
import Relay from 'react-relay'
import { Link } from 'react-router'
import classes from './PokemonPreview.css'
class PokemonPreview extends React.Component {
static propTypes = {
pokemon: React.PropTypes.object,
router: React.PropTypes.object,
}
render () {
return (
... |
src/components/Form/Checklist.js | ilxanlar/cathode | import React from 'react';
import styled from 'styled-components';
import Grid from '../Layout/Grid';
import { checklist as propTypes } from '../../helpers/propTypes';
const ChecklistRaw = ({ children, gridColumnProps, gridRowProps }) => (
<Grid.Row {...gridRowProps}>
{
React.Children.map(children, child =... |
packages/@vega/communicator-system/src/components/views/CommentBodyInput.js | VegaPublish/vega-studio | //@flow
import React from 'react'
import schema from 'part:@lyra/base/schema'
import EditDocumentField from '@vega/components/EditDocumentField'
const commentType = schema.get('comment')
type Props = {
comment: {
_id: string,
body: Array<*>
},
onChange: Function,
patchChannel: Object
}
export defaul... |
src/App/App.js | romellogood/react-stylus-reactrouter-boilerplate | import React from 'react';
import styles from './App.styl';
export default class App extends React.Component {
render() {
return (
<div className={styles.App}>
<h1>App Home</h1>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
<li><a href=... |
mysite/ctms/frontend/src/AddManually.js | cjlee112/socraticqs2 | import React from 'react';
import Cookie from 'js-cookie';
import {NavLink} from 'react-router-dom';
export class AddManually extends React.Component {
render() {
return (
<div>
<main className="card__content">
<form action={window.location} method="POST">
<input type="hid... |
src/javascripts/base.react.js | him0/nem-invoice | import React from 'react';
import { render } from 'react-dom'
import { BrowserRouter, Route, Switch } from 'react-router-dom'
import { Textfield } from 'react-mdl';
import InvoicesIndex from './views/invoices/index';
import InvoicesNew from './views/invoices/new';
import InvoicesShow from './views/invoices/show';
exp... |
src/components/Settings/Speech/Speech.container.js | shayc/cboard | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import debounce from 'lodash/debounce';
import { injectIntl } from 'react-intl';
import {
speak,
cancelSpeech,
changeVoice,
changePitch,
changeRate
} from '../../../providers/SpeechProvider/Sp... |
docs/app/Examples/views/Feed/Variations/FeedExampleSizeSmall.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import { Feed, Header } from 'semantic-ui-react'
const FeedExampleSizeSmall = () => (
<Feed size='small'>
<Header as='h4'>Followers Activity</Header>
<Feed.Event>
<Feed.Content>
<Feed.Summary>
<a>Elliot Fu</a> added <a>Jenny Hess</a> as a friend
</Fe... |
src/DropdownButton.js | Sipree/react-bootstrap | import React from 'react';
import Dropdown from './Dropdown';
import omit from 'lodash-compat/object/omit';
import pick from 'lodash-compat/object/pick';
import Button from './Button';
class DropdownButton extends React.Component {
render() {
let { bsStyle, bsSize, disabled, className, menuStyle, open } = this.... |
examples/websdk-samples/LayerReactNativeSample/src/ui/announcements/MessageList.js | layerhq/layer-js-sampleapps | import React, { Component } from 'react';
import {
StyleSheet,
View,
Text,
ListView,
TouchableOpacity
} from 'react-native';
import MessageListItem from './MessageListItem';
import Icon from 'react-native-vector-icons/FontAwesome';
export default class MessageList extends Component {
constructor(props) ... |
imports/ui/components/fields/Fields.js | hwillson/file-metadata-manager | import React from 'react';
import { _ } from 'meteor/underscore';
import { css, StyleSheet } from 'aphrodite';
import Loading from '../loading/Loading';
import Field from './Field';
import UtilityStyles from '../../styles/utility';
let styles;
const Fields = ({ fieldsReady, fields }) => {
let content;
if (!field... |
app/javascript/mastodon/features/community_timeline/index.js | dwango/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import ColumnHeader fro... |
src/components/Countdown.js | greg5green/isrobhomeyet | import React from 'react';
import CountdownNumber from './CountdownNumber';
import {isHereNow, timeRemaining} from '../services/status';
class Countdown extends React.Component {
constructor(props) {
super(props);
this.state = { timeRemaining: timeRemaining() };
}
componentDidMount() {
this.update... |
GankDemo/index.ios.js | MisterZhouZhou/ReactNativeLearing | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {AppRegistry,} from 'react-native';
import StartView from './jscore/StartView'
export default class GankDemo extends Component {
render() {
return (
<StartView />
);
... |
src/components/modules/learn/life-cycle/humans/list.js | xavier-besson/react-playground | import React from 'react';
import LearnLifeCycleHumansItem from './item';
import Immutable from 'immutable';
/**
* @class LearnLifeCycleHumansList
* @extends React.Component
*/
class LearnLifeCycleHumansList extends React.Component {
/**
* Range of validators that can be used to make sure the data you receive ... |
app/javascript/mastodon/features/standalone/community_timeline/index.js | unarist/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import StatusListContainer from '../../ui/containers/status_list_container';
import { expandCommunityTimeline } from '../../../actions/timelines';
import Column from '../../../components/column';
import ColumnHeader fr... |
src/index.js | octoblu/store-octoblu | import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { browserHistory } from 'react-router'
import { syncHistoryWithStore, routerReducer } from 'react-router-redux'
import { applyMiddleware, createStore, compose } from 'redux'
import thunkMiddleware from 'redux-thun... |
app/javascript/spec/miq-alert-set-form/miq-alert-set-form.spec.js | ManageIQ/manageiq-ui-classic | import React from 'react';
import fetchMock from 'fetch-mock';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import MiqAlertSetForm from '../../components/miq-alert-set-form/index';
import '../helpers/miqFlashLater';
import '../helpers/sprintf';
import '../helpers/miqSparkle';
import '../helper... |
src/parser/warrior/protection/CHANGELOG.js | FaideWW/WoWAnalyzer | // import React from 'react';
export default [
];
|
ui/src/components/AlbumList.js | damianmoore/photo-manager | import React from 'react'
import styled from '@emotion/styled'
import Thumbnails from './Thumbnails'
import useInfiniteScroll from './InfiniteScroll'
const Container = styled('div')`
height: 100%;
overflow-y: auto;
`
const AlbumList = ({
photoSections,
refetchPhotos,
refetchPhotoList,
refetchAlbumList,
... |
example/examples/PolygonCreator.js | jiaminglu/react-native-maps | import React from 'react';
import {
StyleSheet,
View,
Text,
Dimensions,
TouchableOpacity,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 31.23295;
const LONGITUDE = 121.3822;
const LAT... |
src/components/WorkerListItem.js | Ricky-Nz/knocknock-web | import React from 'react';
import Relay from 'react-relay';
import { ListItem } from 'material-ui/List';
import Avatar from 'material-ui/Avatar';
import { UpdateWorkerMutation, DeleteWorkerMutation } from '../mutations';
const WorkerListItem = ({worker, onClick}) => (
<ListItem leftAvatar={<Avatar src={worker.avatarU... |
node_modules/recharts/demo/component/Rectangle.js | SerendpityZOEY/Fixr-RelevantCodeSearch | import React, { Component } from 'react';
import { Surface, Rectangle } from 'recharts';
class RectangleDemo extends Component {
state = {
x: 50,
y: 50,
width: 80,
height: 100,
};
changeSize() {
this.setState({
x: Math.random() * 50,
y: Math.random() * 50,
width: Math.rando... |
src/components/Posts.js | angeloocana/angeloocana | import React from 'react';
import PropTypes from 'prop-types';
import Link from './Link';
import PostList from './PostList';
import BtnLink from './BtnLink';
import H2 from './H2';
import { FormattedMessage } from 'react-intl';
const Posts = (props) => {
const btnMorePosts = props.showBtnMorePosts
? (
<For... |
app/toolbars/TopBar.js | stanfordv/curriculum1 | import React from 'react';
import AddNode from './AddNode';
import AddLink from './AddLink';
export default class extends React.Component {
render() {
return (
<div className="toolBar toolBar--top">
<div className="row">
<div className="col-xs-4">
<AddNode addNode={this.props.... |
app/containers/PomodoroPage.js | liveyourheart/woke-electron | import React, { Component } from 'react';
import Home from '../components/Home';
import NavBar from '../components/common/navbar';
import Timer from '../components/timer/timer'
export default class PomodoroPage extends Component {
render() {
return (
<div>
<Timer progress={90}/>
</div>
)... |
aiohttp_admin/static/react-admin/js/utils/fields.js | jettify/aiohttp_admin | import React from 'react';
import { ShowField } from '../components/Fields/ShowField';
export function getFields(fields) {
return Object.keys(fields).map(function(key, index) {
return (
<ShowField
key={index}
source={fields[key].name}
/>
);
});
}
|
actor-apps/app-web/src/app/components/common/Banner.react.js | VikingDen/actor-platform | import React from 'react';
import BannerActionCreators from 'actions/BannerActionCreators';
class Banner extends React.Component {
constructor(props) {
super(props);
if (window.localStorage.getItem('banner_jump') === null) {
BannerActionCreators.show();
}
}
onClose = () => {
BannerActionC... |
src/js/react/container/Root.js | koluch/db-scheme | // @flow
import React from 'react'
import {connect} from 'react-redux'
import type {Dispatch} from 'redux'
import cn from 'bem-cn'
import type {TTableShape} from '~/types/TTableShape'
import type {TLinkShape} from '~/types/TLinkShape'
import type {TSchemeState, TTableState, TSelected, TDndTarget, TTco} from '~/types/T... |
js/components/Sidebar.js | magalhini/firstaidgit | /*jshint esnext:true */
import React from 'react';
import SVGIcon from './../utils/SVG';
let Sidebar = React.createClass({
render() {
return (
<div className="sidebar-wrapper">
<a className="nb" href="https://github.com/magalhini/firstaidgit">
<SVGIcon class=... |
docs/app/Examples/modules/Progress/States/ProgressExampleSuccess.js | aabustamante/Semantic-UI-React | import React from 'react'
import { Progress } from 'semantic-ui-react'
const ProgressExampleSuccess = () => (
<Progress percent={100} success>
The progress was successful
</Progress>
)
export default ProgressExampleSuccess
|
node_modules/react-bootstrap/ie8/server.js | gitoneman/react-home | import React from 'react';
import express from 'express';
import path from 'path';
import webpack from 'webpack';
import webpackMiddleware from 'webpack-dev-middleware';
import webpackConfigBuilder from '../webpack/webpack.config';
const development = process.env.NODE_ENV !== 'production';
let app = express();
if (de... |
docs/app/Examples/collections/Menu/Types/MenuExampleAttached.js | clemensw/stardust | import React from 'react'
import { Dropdown, Icon, Menu, Segment } from 'semantic-ui-react'
// TODO: Update <Search> usage after its will be implemented
const MenuExampleAttached = () => {
return (
<div>
<Menu attached='top'>
<Dropdown as={Menu.Item} icon='wrench' simple>
<Dropdown.Menu>... |
actor-apps/app-web/src/app/components/common/Banner.react.js | hzy87email/actor-platform | import React from 'react';
import BannerActionCreators from 'actions/BannerActionCreators';
class Banner extends React.Component {
constructor(props) {
super(props);
if (window.localStorage.getItem('banner_jump') === null) {
BannerActionCreators.show();
}
}
onClose = () => {
BannerActionC... |
node_modules/material-ui/src/utils/children.js | aykutyaman/meteor1.3-react-flowrouter-demo | import React from 'react';
import createFragment from 'react-addons-create-fragment';
export default {
create(fragments) {
let newFragments = {};
let validChildrenCount = 0;
let firstKey;
//Only create non-empty key fragments
for (let key in fragments) {
const currentChild = fragments[key... |
react-ui/src/components/contact/CalendarComponent/TimePeriod.js | MaGuangChen/resume-maguangchen | import React from 'react';
import { connect } from 'react-redux';
import * as actions from '../../../actions/actions';
const TimePeriod = (props) => {
const { month, date, dispatch } = props;
const today = `${month}月
${date.date()}日`;
const changeHour = (e) => {
const hour = e.target.value;
... |
src/client/me/index.react.js | jirastom/react-learnig | import Component from '../components/component.react';
import DocumentTitle from 'react-document-title';
import Logout from '../auth/logout.react';
import React from 'react';
import requireAuth from '../auth/requireauth.react';
import {format} from '../intl/store';
@requireAuth
export default class Index extends Compo... |
Examples/ForTest/src/components/SQLiteDemo.js | ksti/react-native-utils | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableOpacity,
ListView
} from 'react-native';
var SQLite = require('react-native-sqlite-storage');
SQLite.DEBUG(true);
SQL... |
src/SquaresBanner/index.js | dave-worley/zenlab | import React from 'react';
import Canvas from '../PaperCanvas';
import { Shape, Point, Color, Size } from 'paper';
import './styles.css';
let animation = (scope) => {
const { view } = scope;
let bounds = view.size;
let randn = () => Math.random();
let color = () => new Color(randn(), 0, 0);
let randint = (ma... |
js/views/newChallenge/ItemSelectView.js | SamyZ/BoomApp | import React from 'react';
import {
View,
Text,
TouchableOpacity,
} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import itemSelectStyles from '../../styles/newChallenge/itemSelectStyles';
const propTypes = {
label: React.PropTypes.string,
style: React.PropTypes.objec... |
src/Input.js | egauci/react-bootstrap | import React from 'react';
import InputBase from './InputBase';
import * as FormControls from './FormControls';
import deprecationWarning from './utils/deprecationWarning';
class Input extends InputBase {
render() {
if (this.props.type === 'static') {
deprecationWarning('Input type=static', 'FormControls.S... |
src/components/Quiz/Question.spec.js | SirWinn3r/gauche-ou-droite-client | import chai, { expect } from 'chai'
import chaiEnzyme from 'chai-enzyme'
import React from 'react'
import { shallow } from 'enzyme'
import sinon from 'sinon'
import Question from './Question'
chai.use(chaiEnzyme())
describe('<Question />', () => {
const apiUrl = 'api-url'
const congressman = {
name: 'congres... |
src/client/components/input/drag-and-drop.js | bookbrainz/bookbrainz-site | /*
* Copyright (C) 2016 Max Prettyjohns
*
* This program is free software; 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 2 of the License, or
* (at your option) any later version.
*
* This program is d... |
frontend/src/javascripts/utils/EventUtil.js | funaota/notee | import React from 'react';
import assign from 'object-assign';
var EventEmitter = require('events').EventEmitter;
var EventUtil = assign({}, EventEmitter.prototype, {
emitChange: function(change_event) {
this.emit(change_event);
},
addChangeListener: function(change_event, callback) {
thi... |
tests/helpers/intl-enzyme-test-helper.js | korabh/quran.com-frontend |
/**
* Based on: https://gist.github.com/mirague/c05f4da0d781a9b339b501f1d5d33c37/
*
* 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 ... |
src/Parser/DeathKnight/Unholy/Modules/Items/ColdHeartEfficiency.js | hasseboulen/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import ITEMS from 'common/ITEMS';
import { formatPercentage } from 'common/format';
import Wrapper from 'common/Wrapper';
import Analyzer from 'Parser/Core/Analyzer';
impo... |
src/profesor/components/ProgramiLista.js | zeljkoX/e-learning | import React from 'react';
import {State, History} from 'react-router';
import { Menu, Mixins, Styles } from 'material-ui';
import Content from '../../components/layout/Content';
import ContentHeader from '../../components/layout/ContentHeader';
import Tabela from '../../components/Tabela';
class ProgramiLista extends... |
examples/samples/phone.js | andreaValenzi/react-native-swiper | import React from 'react'
import { StyleSheet, Text, View, Image } from 'react-native'
import Swiper from '../swiper.dist'
const styles = StyleSheet.create({
wrapper: {
// backgroundColor: '#f00'
},
slide: {
flex: 1,
backgroundColor: 'transparent'
},
image: {
flex: 1
}
})
export default ... |
admin/client/App/screens/List/components/Filtering/ListFiltersAddForm.js | jstockwin/keystone | import React from 'react';
import { findDOMNode } from 'react-dom';
import Popout from '../../../../shared/Popout';
import { Filters } from 'FieldTypes';
var ListFiltersAddForm = React.createClass({
propTypes: {
field: React.PropTypes.object.isRequired,
maxHeight: React.PropTypes.number,
onApply: React.PropTyp... |
packages/web/examples/ssr/pages/_document.js | appbaseio/reactivesearch | import React from 'react';
import Document, { Head, Main, NextScript } from 'next/document';
import { renderToString } from 'react-dom/server';
export default class MyDocument extends Document {
static getInitialProps({ renderPage }) {
// for emotion-js
const page = renderPage();
const styles = renderToString(p... |
app/javascript/mastodon/features/compose/containers/warning_container.js | ambition-vietnam/mastodon | import React from 'react';
import { connect } from 'react-redux';
import Warning from '../components/warning';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { me } from '../../../initial_state';
const APPROX_HASHTAG_RE = /(?:^|[^\/\)\w])#(\w*[a-zA-Z·]\w*)/i;
const mapStateT... |
src/components/file-list/file-list-item.js | Storj/metadisk-gui | import React from 'react';
import FileIcon from 'components/file-list/file-icon';
const FileListItem = (props) => {
function handleClick(event) {
event.preventDefault();
props.fileSelectAction(props.hash, props.mimetype, props.filename);
}
return (
<tr>
<td>
<FileIcon mimetype={props.... |
test/SplitButtonSpec.js | sheep902/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', () => {
const simple = (
<SplitButton title='Title' id='test-id'>
<MenuItem>Ite... |
client/modules/RootWiki/components/WikiDataFormForm/WikiDataFormForm.js | XuHaoJun/tiamat | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { Container, Col, Row } from 'react-grid-system';
import exampleData from '../../../Wiki/components/WikiDataForm/HearthStoneSchema.json';
import WikiDataForm from '../../../Wiki/components/WikiDataForm';
impor... |
src/website/app/demos/Dropdown/Dropdown/examples/rtl.js | mineral-ui/mineral-ui | /* @flow */
import styled from '@emotion/styled';
import React from 'react';
import Button from '../../../../../../library/Button';
import Dropdown from '../../../../../../library/Dropdown';
import { pxToEm } from '../../../../../../library/styles';
import { ThemeProvider } from '../../../../../../library/themes';
impo... |
src/components/NewToDo.js | RedGeekPanda/reactive-todos | import React from 'react';
import {ENTER} from '../constants/KeyboardKeys';
import './NewToDo.css';
export default class NewToDo extends React.Component {
render() {
return (
<div className="NewToDo">
<input className="NewToDo" type="text"
placeholder="What needs to be done?"
onKeyDown=... |
src/components/NoMatch.js | yyssc/sanhu | import React from 'react';
export default class NoMatch extends React.Component {
render() {
return (
<div>404, 你要请求的内容未找到...</div>
);
}
};
|
modules/Plan.js | SomethingSexy/react-planner | import PropTypes from 'prop-types';
import React from 'react';
const style = {
height: '100%',
width: '100%',
backgroundColor: 'white',
textAlign: 'center',
color: 'inherit',
cursor: 'pointer'
};
const Plan = ({ plan, highlightedPlan, onSelectPlan, onOpenPlan, render }) => {
let localStyle =... |
src/scripts/utils/requireAuth.js | poldracklab/crn_app | // dependencies ----------------------------------------------------
import React from 'react';
import userStore from '../user/user.store.js';
// require auth ----------------------------------------------------
var requireAuth = (Component, role) => {
return class Authenticated extends React.Component {
... |
src/renderer/ui/components/modals/UpdateModal.js | petuhovskiy/Google-Play-Music-Desktop-Player-UNOFFICIAL- | import React, { Component } from 'react';
import Dialog from './ThemedDialog';
import FlatButton from 'material-ui/FlatButton';
export default class UpdateModal extends Component {
constructor(...args) {
super(...args);
this.state = {
open: false,
};
}
componentDidMount() {
Emitter.on('up... |
packages/crisimus-react/src/index.js | Prefinem/crisimus | import 'babel-polyfill';
import App from './components/App';
import { Provider } from 'react-redux';
import React from 'react';
import { render } from 'react-dom';
import { store } from './store';
render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('app')
);
|
App/Containers/ListviewGridExample.js | oreofish/v2exClient | // @flow
import React from 'react'
import { View, Text, ListView } from 'react-native'
import { connect } from 'react-redux'
// For empty lists
import AlertMessage from '../Components/AlertMessage'
// Styles
import styles from './Styles/ListviewGridExampleStyle'
class ListviewGridExample extends React.Component {
... |
src/containers/Home/Home.js | xaevir/brasiliausa | import React, { Component } from 'react';
export default class Home extends Component {
render() {
const styles = require('./Home.scss');
return (
<div className={styles.home + ' container'}>
<div className="header">
<img src={require('./home-page-banner.png')} />
</div>
... |
app/javascript/mastodon/features/compose/components/action_bar.js | masto-donte-com-br/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
import { defineMessages, injectIntl } from 'react-intl';
const messages = defineMessages({
edit_profile: { id: 'a... |
modules/admin/client/components/Admin.component.js | Trustroots/trustroots | import React from 'react';
import AdminHeader from './AdminHeader.component.js';
import bmoDancing from '../images/bmo-dancing.gif';
export default function Admin() {
return (
<>
<AdminHeader />
<div className="container container-spacer">
<p>
<img src={bmoDancing} alt="" width="200... |
lib/PasswordStrength/tests/password-strength-test.js | folio-org/stripes-components | import React from 'react';
import { describe, beforeEach, it } from 'mocha';
import { expect } from 'chai';
import { Field } from 'redux-form';
import { Row, Col } from '../../LayoutGrid/index';
import TestForm from '../../../tests/TestForm';
import PasswordStrength from '../PasswordStrength';
import PasswordStrengthI... |
node_modules/eslint-config-airbnb/test/test-react-order.js | xtreemze/TAXi | import test from 'tape';
import { CLIEngine } from 'eslint';
import eslintrc from '../';
import reactRules from '../rules/react';
import reactA11yRules from '../rules/react-a11y';
const cli = new CLIEngine({
useEslintrc: false,
baseConfig: eslintrc,
// This rule fails when executing on text.
rules: { indent: ... |
src/components/common/mediaPicker/MediaPickerResultsContainer.js | mitmedialab/MediaCloud-Web-Tools | import PropTypes from 'prop-types';
import React from 'react';
import { injectIntl } from 'react-intl';
import { connect } from 'react-redux';
import { toggleMedia, selectMedia, selectMediaPickerQueryArgs, resetMediaPickerQueryArgs, resetMediaPickerSources, resetMediaPickerCollections, resetMetadataShortlist } from '..... |
src/js/components/input/autocomplete/input_autocomplete_values.js | working-minds/realizejs | import React, { Component } from 'react';
import PropTypes from '../../../prop_types';
import $ from 'jquery';
import {} from '../../../components';
export default class InputAutocompleteValues extends Component {
static propTypes = {
id: PropTypes.string,
name: PropTypes.string,
multiple: PropTypes.boo... |
Libraries/Modal/Modal.js | browniefed/react-native | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
src/list/__tests__/ListItem.js | kosiakMD/react-native-elements | import React from 'react';
import { Text } from 'react-native';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import ListItem from '../ListItem';
describe('ListItem component', () => {
it('should render without issues', () => {
const component = shallow(<ListItem />);
expect(compone... |
__tests__/index.android.js | connectordb/connectordb-android | import 'react-native';
import React from 'react';
import Index from '../index.android.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
src/index.js | HurricaneJames/react-action-tabs | import React from 'react';
import App from './App';
React.render(<App />, document.getElementById('root'));
|
app/router/persons-route.js | KleeGroup/focus-demo-app | import React from 'react';
import PersonDetailView from '../views/person/detail';
const route = [
{
path: 'persons/:id',
component: (props) => (<PersonDetailView id={parseInt(props.params.id)} {...props}/>)
}
];
export default route;
|
src/svg-icons/device/signal-wifi-1-bar.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalWifi1Bar = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/><path d="M6.67 14.86L12 21.49v.01... |
app/src/components/signUp/SignUp.spec.js | joedunu/react-redux-example | import React from 'react'
import {shallow} from 'enzyme'
import {shallowToJson} from 'enzyme-to-json'
import configureMockStore from 'redux-mock-store'
import SignUP from './SignUP'
describe('User Registration Form', () => {
const mockStore = configureMockStore([])
let store
let combinedReducersState = {
fo... |
examples/async/index.js | przeor/redux | import 'babel-core/polyfill';
import React from 'react';
import Root from './containers/Root';
React.render(
<Root />,
document.getElementById('root')
);
|
src/Components/App.js | NickGlenn/React-Project | import React, { Component } from 'react';
export default class App extends Component {
render () {
return (
<div className='app'>
<h1 className='app__greeting'>
Example Application
</h1>
{this.props.children}
</div>
);
}
}
|
app/components/ItemMercado.js | cosio55/app-informacion-bitso | import React, { Component } from 'react';
import styles from './ItemMercado.css';
class ItemMercado extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div className={styles.itemMercado}>
<div className={styles.nombre}>
<p>{this.props.nombre}</p>
... |
client/pages/examples/threejs/graphing/elements/oscilloscope.js | fdesjardins/webgl | import React from 'react'
import * as THREE from 'three'
import threeOrbitControls from 'three-orbit-controls'
import { createAxes, createLineGraph, createLabel } from '../utils'
const WHITE = 0xffffff
const BLACK = 0x000000
const init = ({ state }) => {
const canvas = document.getElementById('oscilloscope')
le... |
docs/lib/Home/index.js | video-react/video-react | import React from 'react';
import { PrismCode } from 'react-prism';
import { Button, Container, Row, Col, Jumbotron } from 'reactstrap';
import { Link } from 'react-router';
import BasicExample from '../examples/import-basic';
const importBasic = require('!!raw-loader!../examples/import-basic');
export default () => ... |
tests/components/Header/Header.spec.js | townmi/bis | import React from 'react'
import { Header } from 'components/Header/Header'
import classes from 'components/Header/Header.scss'
import { IndexLink, Link } from 'react-router'
import { shallow } from 'enzyme'
describe('(Component) Header', () => {
let _wrapper
beforeEach(() => {
_wrapper = shallow(<Header />)
... |
resources/js/Admin/components/Form/CheckboxOptionsField.js | DoSomething/northstar | /** @jsx jsx */
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { jsx, css } from '@emotion/react';
import CheckboxInput from '../../../components/FormInput/CheckboxInput';
import CheckIcon from '../../../components/artifacts/CheckIcon/CheckIcon';
const Chec... |
src/Components/TopBar.js | thipokKub/ReQoot-FrontEnd | import React from 'react';
import styled from 'styled-components';
// import PropTypes from 'prop-types';
const TopBarStyled = styled.div`
width: 100vw;
height: ${(props) => props.height}px;
position: sticky;
background-color: #FFF;
display: flex;
align-items: center;
button {
disp... |
examples/redirect-using-index/app.js | cgrossde/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... |
pootle/static/js/admin/components/SearchBox.js | r-o-b-b-i-e/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import React from 'react';
import _ from 'underscore';
c... |
features/fixtures/rn-monorepo/xyz/App.js | bugsnag/bugsnag-android-gradle-plugin | /**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React from 'react';
import {
SafeAreaView,
StyleSheet,
ScrollView,
View,
Text,
StatusBar,
} from 'react-native';
import {
Header,
LearnMoreLinks,
Colors,
DebugInstructions,
R... |
js/jqwidgets/jqwidgets-react/react_jqxlistmenu.js | luissancheza/sice | /*
jQWidgets v5.3.2 (2017-Sep)
Copyright (c) 2011-2017 jQWidgets.
License: http://jqwidgets.com/license/
*/
import React from 'react';
const JQXLite = window.JQXLite;
export const jqx = window.jqx;
export default class JqxListMenu extends React.Component {
componentDidMount() {
let options = this.manageA... |
kitsune/sumo/static/sumo/js/tests/crashidtests.js | NewPresident1/kitsune | import {default as mochaJsdom, rerequire} from 'mocha-jsdom';
import {expect} from 'chai';
import React from 'react';
import mochaK from './fixtures/mochaK.js';
import mochaJquery from './fixtures/mochaJquery.js';
import mochaGettext from './fixtures/mochaGettext.js';
import mochaMarky from './fixtures/mochaMarky.js';... |
src/mui/input/BooleanInput.js | azureReact/AzureReact | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Toggle from 'material-ui/Toggle';
import FieldTitle from '../../util/FieldTitle';
const styles = {
block: {
margin: '1rem 0',
maxWidth: 250,
},
label: {
color: 'rgba(0, 0, 0, 0.298039)',
},
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.