path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
step7-unittest/app/js/components/Main.js | jintoppy/react-training | import React from 'react';
import Profile from './Profile';
import {Link} from 'react-router';
class Main extends React.Component {
constructor(props) {
super(props);
this.state = {
name: "guest"
};
}
render() {
return (
<div className="main-conta... |
utilities/warning/render-function-return-contents-lack-display-name.js | salesforce/design-system-react | /* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */
/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */
/* eslint-disable import/no-mutable-exports */
import React from 'react';
// This function will deliver an error message to the browser console when all of the props p... |
index.windows.js | jiriKuba/Calculatic | import React from 'react';
import {AppRegistry} from 'react-native';
import Root from './src/root';
AppRegistry.registerComponent('calculatic', () => Root) |
local-cli/templates/HelloWorld/App.js | jevakallio/react-native | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
View
} from 'react-native';
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' +
'Cmd+D or shake for dev menu',
and... |
src/js/components/page/index.js | Arlefreak/arlefreakClient | import PropTypes from 'prop-types';
import React from 'react';
import { Helmet } from 'react-helmet';
import Loading from '../loading';
import Id from '../id';
const Page = ({
id,
title,
isFetching,
children,
className,
meta_url,
meta_title,
meta_description,
meta_preview,
meta_audio,
}) => {
le... |
src/templates/tags.js | zccz14/blog | import React from 'react'
import PropTypes from 'prop-types'
import { graphql } from 'gatsby'
import SEO from '../components/seo'
import Layout from '../components/layout'
import Post from '../components/post'
import Navigation from '../components/navigation'
import '../styles/layout.css'
const Tags = ({
data,
pa... |
component/NavLink.js | Lucifier129/react-imvc | import React from 'react'
import classnames from 'classnames'
import connect from '../hoc/connect'
import Link from './Link'
const withLocation = connect(({ state }) => {
return {
location: state.location
}
})
export default withLocation(NavLink)
function NavLink({
isActive: getIsActive,
location,
clas... |
webapp/src/components/ActionMenu.js | gcallah/Indra | import React, { Component } from 'react';
import ListGroup from 'react-bootstrap/ListGroup';
import axios from 'axios';
import autoBind from 'react-autobind';
import PageLoader from './PageLoader';
import PopulationGraph from './PopulationGraph';
import ScatterPlot from './ScatterPlot';
import Debugger from './Debugger... |
src/components/MainPage/MainPage.js | ggdiam/storia | import React, { Component } from 'react';
import styles from './MainPage.css';
import withStyles from '../../decorators/withStyles';
import Link from '../Link';
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
import dataClient from '../../core/DataClient';
import cachedDataClient from '../../core/CachedDat... |
imports/ui/components/resident-details/accounts/transaction/transaction-mc.js | gagpmr/app-met | import React from 'react';
import * as Styles from '/imports/modules/styles.js';
import { UpdateResident } from '/imports/api/residents/methods.js';
export class TransactionMc extends React.Component {
constructor(props) {
super(props);
}
removeBill(e) {
e.preventDefault();
var resid = e.current... |
node_modules/react-bootstrap/es/PagerItem.js | NickingMeSpace/questionnaire | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
demo/component/Sankey.js | thoqbk/recharts | import React, { Component } from 'react';
import { Sankey, Tooltip } from 'recharts';
import _ from 'lodash';
import DemoSankeyLink from './DemoSankeyLink';
import DemoSankeyNode from './DemoSankeyNode';
const data0 = {
nodes: [
{ name: 'Agricultural waste' },
{ name: 'Bio-conversion' },
{ name: 'Liquid'... |
public/js/entry.js | 2cats/webserial | import React from 'react'
import Root from './Root'
import ReactDOM from 'react-dom'
ReactDOM.render(
<Root/>,document.getElementById('root')
); |
docs/src/app/components/pages/components/List/ExampleSimple.js | pomerantsev/material-ui | import React from 'react';
import MobileTearSheet from '../../../MobileTearSheet';
import {List, ListItem} from 'material-ui/List';
import ContentInbox from 'material-ui/svg-icons/content/inbox';
import ActionGrade from 'material-ui/svg-icons/action/grade';
import ContentSend from 'material-ui/svg-icons/content/send';
... |
app/server/index.js | ShandyClub/shandy-club | import 'regenerator-runtime/runtime'
import express from 'express'
import path from 'path'
import httpProxy from 'http-proxy'
import bodyParser from 'body-parser'
import compression from 'compression'
import React from 'react'
import { renderToString } from 'react-dom/server'
import { Provider } from 'react-redux'
impo... |
app/components/Sidebar.js | chehitskenniexd/Archiver | import React, { Component } from 'react';
import { Link, hashHistory } from 'react-router';
import { connect } from 'react-redux';
import styles from './Sidebar.css';
import Project_List from './Project_List';
import { fetchUserProjects } from '../reducers/projects_list';
import { logUserOut } from '../reducers/login';... |
src/docs/examples/RegistrationForm/ExampleRegistrationForm.js | dryzhkov/ps-react-dr | import React from 'react';
import RegistrationForm from 'ps-react/RegistrationForm';
/** Registration from with email and password inputs */
export default class ExampleRegistrationForm extends React.Component {
onSubmit = (user) => {
console.log(user);
}
render() {
return <RegistrationForm
... |
src/routes/UIElement/dropOption/index.js | yunqiangwu/kmadmin | import React from 'react'
import { DropOption } from 'components'
import { Table, Row, Col, Card, message } from 'antd'
const DropOptionPage = () => (<div className="content-inner">
<Row gutter={32}>
<Col lg={8} md={12}>
<Card title="默认">
<DropOption menuOptions={[{ key: '1', name: '编辑' }, { key: '... |
packages/reactor-kitchensink/src/examples/Tabs/TabBar/TabBar.js | dbuhrman/extjs-reactor | import React, { Component } from 'react';
import { TabBar, Tab, Panel, Container } from '@extjs/ext-react';
export default class TabBarExample extends Component {
state = {
activeTab: "download"
}
render() {
const { activeTab } = this.state;
return (
<Container layout... |
Libraries/Modal/Modal.js | formatlos/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/svg-icons/social/notifications.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialNotifications = (props) => (
<SvgIcon {...props}>
<path d="M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 ... |
app/app/components/Dashboard/ProgramLogo.js | lycha/masters-thesis | import React from 'react';
class ProgramLogo extends React.Component {
constructor(props) {
super(props);
this.displayName = 'ProgramLogo';
}
render() {
return (
<div className="col-lg-4 col-md-4 col-sm-4 mb">
<div className="darkblue-panel pn">
... |
src/svg-icons/places/child-friendly.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesChildFriendly = (props) => (
<SvgIcon {...props}>
<path d="M13 2v8h8c0-4.42-3.58-8-8-8zm6.32 13.89C20.37 14.54 21 12.84 21 11H6.44l-.95-2H2v2h2.22s1.89 4.07 2.12 4.42c-1.1.59-1.84 1.75-1.84 3.08C4.5 20.43... |
dev/test-studio/parts/tools/test-intent-tool.js | sanity-io/sanity | import React from 'react'
import {route, withRouterHOC} from '@sanity/base/router'
export default {
router: route('/:type/:id'),
canHandleIntent(intentName, params) {
return (intentName === 'edit' && params.id) || (intentName === 'create' && params.type)
},
getIntentState(intentName, params) {
return {... |
components/game-listing/component.js | kalle-manninen/veikkaaja | import React, { Component } from 'react';
import { View, FlatList, Text } from 'react-native';
import PropTypes from 'prop-types';
import { Game } from '../game';
import { styles } from './style';
class GameListing extends Component {
constructor(props) {
super(props);
this.state = {
refresh: this.pr... |
app/components/instagram/HashTagPicsContainer.js | alexko13/block-and-frame | import React from 'react';
import HashTagPic from './HashTagPicComponent';
const HashTagPicsContainer = (props) => {
return (
<div>
<p>
<i className="icon small instagram"></i>Tag your grams for this Spread with {props.hashtag} <i className="icon small arrow circle down"></i>
</p>
{pro... |
src/components/Link/Link.js | kuao775/mandragora | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-... |
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentSimplifyTypeArgs/__tests__/fixtures/DefaultPropsInferred.js | ylu1317/flow | // @flow
import React from 'react';
class MyComponent extends React.Component<*, Props> {
static defaultProps = {};
defaultProps: T;
static props: T;
static state: T;
a: T;
b = 5;
c: T = 5;
method() {}
}
const expression = () =>
class extends React.Component<*, Props> {
static defaultProps = {... |
app/components/SecondScene.js | ethan605/react-native-zero | /**
* @providesModule ZeroProj.Components.SecondScene
*/
/* eslint-disable no-unused-vars */
import React from 'react';
/* eslint-enable no-unused-vars */
import { StyleSheet, View } from 'react-native';
import { Actions } from 'react-native-router-flux';
import Button from 'react-native-button';
// Utils
import Fo... |
app/components/Toolbar.js | nantaphop/redd | import React from 'react'
import AppBar from 'material-ui/AppBar'
import Toolbar from 'material-ui/Toolbar'
import styled from 'styled-components'
const _AppBar = styled(AppBar)`
margin-bottom: 2px;
`
export default (props) => {
return (
<_AppBar position="static" color="white" elevation={2} square>
... |
src/index.js | jiaolongchao/gallery-Picture | import 'core-js/fn/object/assign';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/Main';
// Render the main component into the dom
ReactDOM.render(<App />, document.getElementById('app'));
|
gadget-system-teamwork/src/components/users/LoginForm.js | TeodorDimitrov89/JS-Web-Teamwork-2017 | import React from 'react'
import Input from '../common/forms/Input'
const LoginForm = (props) => (
<div className='container'>
<form>
<div className='error'>{props.error}</div>
<Input
type='email'
name='email'
value={props.user.email}
placeholder='E-mail'
onChan... |
src/CarouselCaption.js | dozoisch/react-bootstrap | import classNames from 'classnames';
import React from 'react';
import elementType from 'react-prop-types/lib/elementType';
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
const propTypes = {
componentClass: elementType,
};
const defaultProps = {
componentClass: 'div',
};
class Caro... |
src/scripts/views/components/avatar.js | DBozz/IronPong | import React from 'react'
import ACTIONS from '../../actions.js'
import STORE from '../../store.js'
var Avatar = React.createClass({
render: function(){
return(<div className = 'avatar-wrapper'>
</div>)
}
})
export default Avatar |
actor-apps/app-web/src/app/components/modals/invite-user/ContactItem.react.js | ruikong/actor-platform | import React from 'react';
import { PureRenderMixin } from 'react/addons';
import AvatarItem from 'components/common/AvatarItem.react';
var ContactItem = React.createClass({
displayName: 'ContactItem',
propTypes: {
contact: React.PropTypes.object,
onSelect: React.PropTypes.func
},
mixins: [PureRende... |
js/customer/HaircutHistoryItem.js | BarberHour/barber-hour | import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
Image,
} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialIcons';
import HaircutDetails from './HaircutDetails';
import Touchable from '../common/Touchable';
export default class HaircutHistoryItem extends Comp... |
src/docs/examples/ProgressBar/Example10Percent.js | wsherman67/UBA | import React from 'react';
import ProgressBar from 'ps-react/ProgressBar';
/** 10% progress */
export default function Example10Percent() {
return <ProgressBar percent={10} width={150} />
}
|
src/components/Switch/demo/basic/index.js | lebra/lebra-components | import React, { Component } from 'react';
import Switch from '../../index';
import { render } from 'react-dom';
import './index.less';
export default class SwitchDemo extends Component{
handleChange = (e) => {
alert("切换")
}
render() {
return (
<div className="switch-demo">
... |
src/client/components/message/chatMessageShortcut.js | uuchat/uuchat | import React, { Component } from 'react';
import { Modal, Input } from 'antd';
import '../../static/css/shortcut.css';
class ChatMessageShortcut extends Component{
constructor(){
super();
this.state={
isSetShow: false
};
}
setShortcut = () => {
this.toggleSet(tru... |
app/containers/Preschool/Preschool.js | klpdotorg/tada-frontend | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import isEmpty from 'lodash.isempty';
import get from 'lodash.get';
import {
getBoundariesEntities,
getLanguages,
getInstitutionCategories,
getManagements,
openTeachers,
toggleClassModal,
} ... |
app/javascript/mastodon/features/account_gallery/components/media_item.js | codl/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import Permalink from '../../../components/permalink';
export default class MediaItem extends ImmutablePureComponent {
static propTypes = {
media: Immutable... |
src/NavItem.js | simonliubo/react-ui | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import SafeAnchor from './SafeAnchor';
const NavItem = React.createClass({
mixins: [BootstrapMixin],
propTypes: {
linkId: React.PropTypes.string,
onSelect: React.PropTypes.func,
active: React... |
fixtures/packaging/systemjs-builder/prod/input.js | maxschmeling/react | import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(
React.createElement('h1', null, 'Hello World!'),
document.getElementById('container')
);
|
js/Player/Players.js | olegk101/test | import React from 'react'
import { connect } from 'react-redux'
// import io from 'socket.io-client'
import Radium, { StyleRoot } from 'radium'
import style from '../style/liveplayer'
class Players extends React.Component {
constructor(props) {
super(props)
this.state = {
playing: false,
song:... |
app/components/AudioPlayer.js | jrhalchak/BeatsPM | import React, { Component } from 'react';
import styles from './AudioPlayer.css';
export default class AudioPlayer extends Component {
handleRangeChange(e) {
this.props.timeChange(e.target.value / e.target.max);
}
render() {
const {
toggleAudio,
pauseAudio,
isPlaying,
audioSrc,
... |
12-route-to-modal-gallery/components/Gallery/Gallery.js | nodeyu/jason-react-router-demos-v4 | import React from 'react';
import { Link } from 'react-router-dom';
import IMAGES from '../../images/images';
import Thumbnail from '../Thumbnail/Thumbnail';
class Gallery extends React.Component {
render() {
return (
<div>
<h2>Gallery</h2>
{
... |
BUILD/js/components_js/product-card.js | kevincaicedo/MyStore-Front-end | import React from 'react'
export default class CardProduct extends React.Component {
render(){
return <div className="col-sm-4 col-lg-4 col-md-4 card-product">
<div className="thumbnail">
<img src={this.props.urlimg} alt="" />
<div clas... |
src/svg-icons/content/add-box.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentAddBox = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/>
</SvgIcon>
);
ContentAddBox = pu... |
src/index.js | amsb/storybook_styled-components_example | import 'core-js/es6/symbol';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
client/src/components/Listing/ListingsContainer.js | wolnewitz/raptor-ads | import React, { Component } from 'react';
import { Container, Search } from 'semantic-ui-react';
class ListingsContainer extends Component {
constructor(props) {
super(props);
}
handleSearchChange(e) {
// dispatch controlled input update searchValue
}
render() {
<Container>
<Search
... |
client/share_trader/js/components/share_trader.js | bigchaindb/bigchaindb-examples | import React from 'react';
import { Navbar, Row, Col, Button } from 'react-bootstrap/lib';
import AccountList from '../../../lib/js/react/components/account_list';
import AccountDetail from '../../../lib/js/react/components/account_detail';
import Assets from './assets';
import AssetMatrix from './asset_matrix';
imp... |
docs/app/Examples/modules/Dropdown/Variations/DropdownExampleMenuDirection.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import { Dropdown } from 'semantic-ui-react'
const DropdownExampleMenuDirection = () => (
<Dropdown text='Menu' floating labeled button className='icon'>
{/* <i class="dropdown icon"></i> */}
<Dropdown.Menu>
<Dropdown.Item>
<i className='left dropdown icon'></i>
... |
examples/wrapper/index.js | sskyy/react-lego | import React from 'react'
import ReactDom from 'react-dom'
import { wrap } from '@cicada/react-lego'
import Case from '../Case'
import Card from './Card'
const Root = Card.Root.extend`
border: 1px dashed black;
`
const Text = ({children}) => {
return <div>{children.map(child => {
if (/^name:/.test(child) ) ... |
src/index.js | vikramarka/contacts | import React from 'react';
import ReactDOM from 'react-dom';
import {BrowserRouter} from 'react-router-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<BrowserRouter><App /></BrowserRouter>,
document.getElementById('root')
);
|
src/index.js | tasking/firebase-react-paginated | // react
import React, { Component } from 'react';
// utils
import getRef from './utils/getFirebaseRef';
import getDisplayName from './utils/getComponentDisplayName';
import getItems from './utils/getSnapshotItems';
const withFirebasePages = (firebase) => {
const ref = getRef(firebase);
return (options) => {
... |
test/integration/Table/MultiSelectTable.js | mmrtnz/material-ui | import React from 'react';
import {
Table,
TableBody,
TableHeader,
TableHeaderColumn,
TableRow,
TableRowColumn,
} from 'src/Table';
const tableData = [
{
name: 'John Smith',
selected: true,
},
{
name: 'Randal White',
selected: true,
},
{
name: 'Olivier',
},
];
function Tabl... |
client/src/components/AlbumsGrid.js | HoussamOtarid/fb-photos-downloader | import React from 'react';
import _ from 'lodash';
import Album from './Album';
import Pagination from '../components/Pagination';
import Spinner from 'react-spinner-material';
export default props => {
const { albums, paging } = props;
if (_.isEmpty(albums)) {
return (
<div className="spinner-... |
examples/with-jsxstyle/src/server.js | jaredpalmer/react-production-starter | import { cache } from 'jsxstyle';
import App from './App';
import React from 'react';
import { StaticRouter } from 'react-router-dom';
import express from 'express';
import { renderToString } from 'react-dom/server';
const assets = require(process.env.RAZZLE_ASSETS_MANIFEST);
const server = express();
server
.disa... |
test/test_helper.js | Ridou/ReactTutorials | 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/svg-icons/device/battery-charging-60.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBatteryCharging60 = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V11h3.87L13 7v4h4V5.33C17 4.6 16.4 4 15.67 4z"/><path d="M13 12.5h2L11 20v-5.5H9l1... |
modules/RouteUtils.js | joeyates/react-router | import React from 'react'
import warning from 'warning'
function isValidChild(object) {
return object == null || React.isValidElement(object)
}
export function isReactChildren(object) {
return isValidChild(object) || (Array.isArray(object) && object.every(isValidChild))
}
function checkPropTypes(componentName, p... |
app/containers/NotFoundPage/index.js | tzibur/site | /**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a neccessity for you then you can refactor i... |
test/test_helper.js | PhyrionX/ReactJS2 | 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/App/routes.js | Cloudoki/hackforgood-paar |
import React from 'react'
import { Route, Switch } from 'react-router'
import requireAuth from 'containers/Auth'
import Login from 'containers/Auth/Login'
import HomePage from 'containers/HomePage'
import Filter from 'containers/Filter'
import Protected from 'components/Protected'
import NotFound from '../NotFound'
... |
src/skeletons/SkeletonGroup.js | Bandwidth/shared-components | import React from 'react';
import PulseGroup from 'skeletons/PulseGroup';
import createArray from 'extensions/createArray';
const SkeletonGroup = ({ count = 1, children, ...rest }) => (
<React.Fragment>
{createArray(count).map(rowIdx => (
<PulseGroup {...rest} key={rowIdx}>
{children}
</Pulse... |
examples/todomvc/src/Root/modules/Todo/UI.js | homkai/deef | import React from 'react';
import Header from './components/Header';
import Main from './components/Main';
import './style.less';
export default () => <div className="todo-app">
<Header />
<Main />
</div>; |
src/parser/mage/arcane/modules/features/RuleOfThrees.js | sMteX/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import { formatPercentage } from 'common/format';
import AbilityTracker from 'parser/shared/modules/AbilityTracker';
import Analyzer from 'parser/core/Analyzer';
const debug = false;
class RuleOfThrees extends Ana... |
src/interface/report/Results/Timeline/Cooldowns.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import Abilities from 'parser/core/modules/Abilities';
import './Cooldowns.scss';
import Lane from './Lane';
class Cooldowns extends React.PureComponent {
static propTypes = {
start: PropTypes.number.isRequired,
end: PropTypes.number.isRequired... |
wp-content/plugins/download-monitor/assets/blocks/src/components/DownloadInput/index.js | mandino/www.bloggingshakespeare.com | const {Component} = wp.element;
import apiFetch from '@wordpress/api-fetch';
import React from 'react';
import Select from 'react-select';
export default class DownloadInput extends Component {
constructor( props ) {
super( props );
this.state = { downloads: [] };
}
componentDidMount() {
apiFetch( { url: d... |
share/components/LogIn/LogIn.js | caojs/password-manager-server | import React from 'react';
import classNames from 'classnames';
import { Field } from 'redux-form/immutable';
import { Link } from 'react-router';
import FaUser from 'react-icons/lib/fa/user';
import FaLock from 'react-icons/lib/fa/lock';
import Button from '../Common/Button';
import ErrorMessages from '../Common/Error... |
fields/types/select/SelectField.js | andrewlinfoot/keystone | import Field from '../Field';
import React from 'react';
import Select from 'react-select';
import { FormInput } from '../../../admin/client/App/elemental';
/**
* TODO:
* - Custom path support
*/
module.exports = Field.create({
displayName: 'SelectField',
statics: {
type: 'Select',
},
valueChanged (newValu... |
app/components/NowPlaying.js | robcalcroft/edison | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import {
Button,
Image,
Modal,
StyleSheet,
TouchableHighlight,
View,
} from 'react-native';
import Slider from 'react-native-slider';
import Text from './Text';
import TouchableIcon from './TouchableIc... |
src/home/root.component.js | joeldenning/single-spa-examples | import React from 'react';
import Technology from './technology.component.js';
import Walkthroughs from './walkthroughs.component.js';
import {getBorder, showFrameworkObservable} from 'src/common/colored-border.js';
export default class HomeRoot extends React.Component {
constructor() {
super();
this.state =... |
src/js/components/privKey/PrivKeyBox.js | safexio/safexweb | import React from 'react';
var PrivKeyImport = require('./PrivKeyImport');
var PrivKeyTable = require('./PrivKeyTable');
var privKeyActions = require('actions/privKeyActions');
var PrivKeyBox = React.createClass({
_generateNewKeypair: function() {
privKeyActions.addPrivKey();
},
render: function() {
v... |
src/stories/2017-12-15-cretan-sunsets.js | danpersa/remindmetolive-react | import React from 'react';
import PostImageResp from '../components/story/PostImageResp';
import TwoPostImageResp from '../components/story/TwoPostImageResp';
import StoryPage from '../components/story/StoryPage';
import StoryTextBlock from '../components/story/StoryTextBlock';
import StoryImages from '../components/st... |
imports/ui/pages/profile.js | irvinlim/free4all | import { Meteor } from 'meteor/meteor';
import React from 'react';
import ProfileComponent from '../containers/profile/profile';
export class Profile extends React.Component {
render() {
return (
<div id="page-profile" className="page-container profile" style={{ overflow: "hidden" }}>
<div classNa... |
src/components/user/auth/login/Login.js | huyhoangtb/reactjs | /**
* Created by Peter Hoang Nguyen on 3/31/2017.
*/
import * as css from './stylesheet.scss';
import React from 'react'
import {Field, reduxForm} from 'redux-form'
import InputText from 'components/forms/elements/input-text';
import CheckBox from 'components/forms/elements/check-box';
import AuthPanel from 'compo... |
public/products/src/components/UI.js | dolchi21/open-prices | import React from 'react'
export function List(props){
return <div {...props} className="list-group"></div>
}
export function ListItem(props){
return <div {...props} className="list-group-item"></div>
}
|
components/ui/dropdown/dropdown.js | bannik/hole | import React from 'react';
import ReactDOM from 'react-dom';
class Dropdown extends React.Component{
constructor(props){
super(props);
let selectedItem = props.selectedItem ? props.selectedItem : null;
this.state = {
active: false,
items: [],
selectedItem: selectedItem,
hconte... |
web/src/js/components/Search/ErrorBoundarySearchResults.js | gladly-team/tab | import React from 'react'
import logger from 'js/utils/logger'
import { getUrlParameters } from 'js/utils/utils'
import SearchResultErrorMessage from 'js/components/Search/SearchResultErrorMessage'
class ErrorBoundary extends React.Component {
constructor(props) {
super(props)
this.state = { hasError: false ... |
Study/Udemy Docker and Kubernetes/Section09/deployment-09-finished/frontend/src/components/UI/Card.js | tarsoqueiroz/Docker | import React from 'react';
import './Card.css';
function Card(props) {
return <div className='card'>{props.children}</div>;
}
export default Card;
|
docs/app/Examples/elements/Button/Types/ButtonExampleLabeled.js | mohammed88/Semantic-UI-React | import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleLabeled = () => (
<div>
<Button
content='Like'
icon='heart'
label={{ as: 'a', basic: true, content: '2,048' }}
labelPosition='right'
/>
<Button
content='Like'
icon='heart'
la... |
src/svg-icons/editor/short-text.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorShortText = (props) => (
<SvgIcon {...props}>
<path d="M4 9h16v2H4zm0 4h10v2H4z"/>
</SvgIcon>
);
EditorShortText = pure(EditorShortText);
EditorShortText.displayName = 'EditorShortText';
EditorShortText... |
src/redux/utils/createDevToolsWindow.js | mleonard87/merknera-ui | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import DevTools from '../../containers/DevToolsWindow';
export default function createDevToolsWindow (store) {
const win = window.open(
null,
'redux-devtools', // give it a name so it reuses the same window
... |
app/client/modules/App/__tests__/Components/Footer.spec.js | nittmurugan/finddriver | import React from 'react';
import test from 'ava';
import { shallow } from 'enzyme';
import { Footer } from '../../components/Footer/Footer';
test('renders the footer properly', t => {
const wrapper = shallow(
<Footer />
);
t.is(wrapper.find('p').length, 2);
t.is(wrapper.find('p').first().text(), '© 2016 ... |
src/components/loading/LoadingHome/LoadingHome.js | CtrHellenicStudies/Commentary | import React from 'react';
const LoadingHome = () => (
<div className="loading home">
<div className="loading-mock home-filler home-filler-header" />
<div className="content primary">
<section className="header cover fullscreen parallax">
<div
className="container v-align-transform wow fadeIn"
da... |
es/components/MediaList/Row.js | welovekpop/uwave-web-welovekpop.club | import _jsx from "@babel/runtime/helpers/builtin/jsx";
import _assertThisInitialized from "@babel/runtime/helpers/builtin/assertThisInitialized";
import _inheritsLoose from "@babel/runtime/helpers/builtin/inheritsLoose";
import cx from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import ... |
fields/components/columns/IdColumn.js | suryagh/keystone | import React from 'react';
import ItemsTableCell from '../../../admin/client/components/ItemsTable/ItemsTableCell';
import ItemsTableValue from '../../../admin/client/components/ItemsTable/ItemsTableValue';
var IdColumn = React.createClass({
displayName: 'IdColumn',
propTypes: {
col: React.PropTypes.object,
data... |
src/components/App.js | franciskim722/crypy | import React from 'react';
import PropTypes from 'prop-types';
import { Switch, NavLink, Route } from 'react-router-dom';
import LandingPage from '../containers/Landing/LandingPage';
import RegisterPage from '../containers/Auth/RegisterPage';
import HomePage from '../containers/Home/HomePage';
import LoginPage from '.... |
app/containers/Steps/Thanks/index.js | nypl-spacetime/where | /* global __CONFIG__ */
import React from 'react'
import { connect } from 'react-redux'
import { createSelector } from 'reselect'
import Button from 'components/Button'
import Flex from 'components/Flex'
import {
selectLoggedIn
} from 'containers/App/selectors'
import { TextStep, Animal, TimerBarContainer, Timer... |
js/components/list/basic-list.js | soltrinox/MarketAuth.ReactNative |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Header, Title, Content, Button, Icon, List, ListItem, Text } from 'native-base';
import styles from './styles';
const {
replaceAt,
} = actions;
clas... |
local-cli/templates/HelloNavigation/views/chat/ChatListScreen.js | Maxwell2022/react-native | 'use strict';
import React, { Component } from 'react';
import {
ActivityIndicator,
Image,
ListView,
Platform,
StyleSheet,
View,
} from 'react-native';
import ListItem from '../../components/ListItem';
import Backend from '../../lib/Backend';
export default class ChatListScreen extends Component {
stat... |
js/src/dapps/dappreg.js | jesuscript/parity | // Copyright 2015, 2016 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity 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 3 of the License, or
// (at your option) any la... |
react-app/src/components/Results.js | tanykim/swimmers-history | import React, { Component } from 'react';
import scrollToComponent from 'react-scroll-to-component';
import Countries from '../data/countries.json';
class ResultsComponent extends Component {
scroll() {
//scroll to the result when a swimmer is selected
scrollToComponent(this.refs.results, {
offset: 0,... |
src/modules/items/containers/ItemEmbedContainer/ItemEmbedContainer.js | CtrHellenicStudies/Commentary | import React from 'react';
import PropTypes from 'prop-types';
import { compose } from 'react-apollo';
import _ from 'underscore';
import ItemEmbed from '../../components/ItemEmbed';
import itemDetailQuery from '../../graphql/queries/detail';
class ItemEmbedContainer extends React.Component {
render() {
let item ... |
frontend-admin/src/pendingNum/index.js | OptimusCrime/youkok2 | import React from 'react';
import ReactDOM from 'react-dom';
import { fetchAdminPendingNumRest } from "./api";
export const run = () => {
// This is lazy
fetchAdminPendingNumRest()
.then(response => response.json())
.then(response => {
ReactDOM.render((
`${response.num}`
), document.... |
src/PilotPhase.js | qiubit/wason-selection-parallel | import _ from 'lodash';
import React, { Component } from 'react';
import { Button } from 'react-bootstrap';
import Markdown from 'react-markdown';
import './PilotPhase.css';
import SelectionExercise from './SelectionExercise';
class PilotPhase extends Component {
constructor(props) {
super(props);
const exp... |
shared/containers/Common/ContentContainer.js | kizzlebot/music_dev | import React from 'react';
import {NavLeft, NavRight} from '../../components/Common/Content';
export default class ContentContainer extends React.Component{
render(){
return (
<section className={'content'}>
<NavLeft {...this.props} />
<div className={'content__middle'}>
{this.p... |
src/components/posts_new.js | monsteronfire/redux-learning-blog | import React from 'react';
import { Field, reduxForm } from 'redux-form';
import { Link } from 'react-router-dom';
import { connect } from 'react-redux';
import { createPost } from '../actions';
class PostsNew extends React.Component {
renderField(field) {
const className = `form-group ${field.meta.touched && fi... |
client/modules/core/components/options_dropdown/options_dropdown.js | bompi88/grand-view | // //////////////////////////////////////////////////////////////////////////////
// Document Table Dropdown Component
// //////////////////////////////////////////////////////////////////////////////
//
// Copyright 2015 Concept
//
// Licensed under the Apache License, Version 2.0 (the 'License');
// you may not use t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.