path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
stories/DatePicker/ExampleControlledRtl.js | nirhart/wix-style-react | import React from 'react';
import {DatePicker} from 'wix-style-react';
import moment from 'moment';
class ControlledDatePicker extends React.Component {
constructor(params) {
super(params);
this.state = {
value: moment()
};
}
render() {
return (
<DatePicker
value={this.state... |
examples/pinterest/app.js | joeyates/react-router | import React from 'react';
import { Router, Route, IndexRoute, Link } from 'react-router';
var PICTURES = [
{ id: 0, src: 'http://placekitten.com/601/601' },
{ id: 1, src: 'http://placekitten.com/610/610' },
{ id: 2, src: 'http://placekitten.com/620/620' }
];
var Modal = React.createClass({
styles: {
posi... |
src/main/scripts/modules/sea-siege/react/components/link.js | twuni/sea-siege | import React from 'react';
import _ from 'lodash';
import {Link} from 'react-router';
import Component from './component';
const {func, object, string} = React.PropTypes;
class LinkComponent extends Component {
static get className() {
return 'link component';
}
static get propTypes() {
return Compon... |
Examples/simple-fcm-client/index.ios.js | riyaz942/react-native-fcm | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import App from "./app/App";
export default class SimpleFcmClient extends Component {
render() {
return (... |
src/svg-icons/editor/format-quote.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatQuote = (props) => (
<SvgIcon {...props}>
<path d="M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z"/>
</SvgIcon>
);
EditorFormatQuote = pure(EditorFormatQuote);
EditorFormatQuote.displayName = 'EditorFor... |
src/components/App.js | yosiat/gc-flags-viz | import React from 'react'
import { connect } from 'react-redux'
@connect(s => s)
export default class App extends React.Component {
render() {
return <h1>Hello {this.props.counter.counter}</h1>
}
}
|
fixtures/nesting/src/modern/App.js | tomocchino/react | import React from 'react';
import {useState, Suspense} from 'react';
import {BrowserRouter, Switch, Route} from 'react-router-dom';
import HomePage from './HomePage';
import AboutPage from './AboutPage';
import ThemeContext from './shared/ThemeContext';
export default function App() {
const [theme, setTheme] = useS... |
src/components/side-bar/index.js | chenchenyuyu/zhihuDaily-react | import React from 'react';
import { Link } from 'react-router-dom';
import { connect } from 'react-redux';
import CYComponent from '../base/index';
import { toggleSidebar } from '../../redux/actions/index';
import './style.less';
import Img from '../list-default/images/chenyu.png';
// 模拟侧边栏的数据
const sideRes = [
{ na... |
src/client/js/SourceRoute.js | mlinderm/myseq.js | /**
* @flow
*/
'use strict';
import React from 'react';
import { Route, Redirect } from 'react-router-dom';
const renderMergedProps = (component, source, ...rest) => {
const finalProps = Object.assign({ source: source }, ...rest);
return (
React.createElement(component, finalProps)
);
}
const SourceRoute... |
src/components/tag-cloud.js | Lokiedu/libertysoil-site | /*
This file is a part of libertysoil.org website
Copyright (C) 2015 Loki Education (Social Enterprise)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, o... |
assets/javascripts/kitten/components/form/input/textarea-auto-resize/stories.js | KissKissBankBank/kitten | import React from 'react'
import { TextareaAutoResize } from './index'
import { action } from '@storybook/addon-actions'
import { DocsPage } from 'storybook/docs-page'
export default {
component: TextareaAutoResize,
title: 'Form/Input/TextareaAutoResize',
decorators: [
story => (
<div className="story-... |
app/containers/SalesData/index.js | RichAbrahams/electron-project | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import * as actions from './actions';
import * as selectors from './selectors';
import SectionHeader from '../../components/SectionHeader';
class SalesData extends Component {
render... |
src/modules/Search/SearchResults.js | Semantic-Org/Semantic-UI-React | import cx from 'clsx'
import PropTypes from 'prop-types'
import React from 'react'
import { childrenUtils, customPropTypes, getElementType, getUnhandledProps } from '../../lib'
function SearchResults(props) {
const { children, className, content } = props
const classes = cx('results transition', className)
cons... |
js/jqwidgets/demos/react/app/menu/xmlmenu/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxMenu from '../../../jqwidgets-react/react_jqxmenu.js';
class App extends React.Component {
render() {
let source =
{
datatype: 'xml',
datafields: [
{ name: 'CompanyName', ... |
src/components/UserForm/index.js | hwclass/propelled | // Libraries
import React from 'react';
import ReactDOM from 'react-dom';
import uuid from 'uuid';
// Components
import Form from 'grommet/components/Form';
import Header from 'grommet/components/Header';
import Heading from 'grommet/components/Heading';
import FormFields from 'grommet/components/FormFields';
import F... |
examples/ExamplesHomeScreen.js | stackscz/re-app | import React from 'react';
import Markdown from 're-app-examples/Markdown';
export default class ExamplesHomeScreen extends React.Component {
render() {
return (
<div className="container-fluid">
<Markdown content={require('!!raw!./README.md')} />
</div>
);
}
}
|
ui/src/views/gateways/GatewayDetails.js | jcampanell-cablelabs/lora-app-server | import React, { Component } from 'react';
import moment from "moment";
import { Map, Marker, TileLayer } from 'react-leaflet';
import { Bar } from "react-chartjs";
import GatewayStore from "../../stores/GatewayStore";
class GatewayStats extends Component {
constructor() {
super();
this.state = {
pe... |
fields/components/columns/ArrayColumn.js | danielmahon/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var ArrayColumn = React.createClass({
displayName: 'ArrayColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.object,
},
renderValue () {
... |
docs-ui/components/pageHeading.stories.js | mvaled/sentry | import React from 'react';
import {storiesOf} from '@storybook/react';
import {withInfo} from '@storybook/addon-info';
import PageHeading from 'app/components/pageHeading';
storiesOf('UI|PageHeading', module).add(
'default',
withInfo(
'Every page should have a header, and the header should be made with this.'... |
src/components/heading/index.js | adrienlozano/stephaniewebsite | import React from 'react';
import Typography from '~/components/typography';
import styled from 'styled-components';
const Heading = ({className, component="h1", ...rest}) => (
<Typography className={className} component={component} {...rest}></Typography>
)
const StyledHeading = styled(Heading)`
font-family:... |
app/containers/HomePage.js | pavelkomiagin/npmr | // @flow
import React, { Component } from 'react';
import Home from '../components/Home';
export default class HomePage extends Component {
render() {
return (
<Home />
);
}
}
|
src/front/app/features/main/navigation/index.js | travel-and-help/start-kit | import React from 'react';
import NavigationItem from './NavigationItem';
const navigationItemData = [
'challenges',
'awards',
'updates',
'profile'
];
export default () => (
<div className="navigation" >
{navigationItemData.map((link, index) => (
<NavigationItem
l... |
Native/Learn_ListView/index.ios.js | renxlWin/React-Native_Demo | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class Learn_ListView extends Component {
render() {
return (
<View style={styles.cont... |
src/svg-icons/editor/mode-comment.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorModeComment = (props) => (
<SvgIcon {...props}>
<path d="M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18z"/>
</SvgIcon>
);
EditorModeComment = pure(EditorModeComment);
Edito... |
actor-apps/app-web/src/app/components/ToolbarSection.react.js | yaoliyc/actor-platform | import React from 'react';
import ReactMixin from 'react-mixin';
import { IntlMixin } from 'react-intl';
import classnames from 'classnames';
import ActivityActionCreators from 'actions/ActivityActionCreators';
import DialogStore from 'stores/DialogStore';
import ActivityStore from 'stores/ActivityStore';
//import A... |
src/components/homepage.js | melissa-c/Comms | 'use strict'
import React from 'react'
import ReactDOM from 'react-dom'
import {Router, Route} from 'react-router'
import HomePageBtn from './homePageBtn'
import Header from './header'
import CommentPage from './commentPage'
function parentAccess () {
console.log ('grant parent access')
}
function goToAskPage(){
... |
project/react-hooks-ant4-ts/src/__test__/component/apimock/index.js | FFF-team/generator-earth | import React from 'react';
import request from './request';
class Index extends React.Component {
constructor(props) {
super(props);
this.state = {
addressList: []
}
}
componentDidMount() {
request.get('url')
.then((res) => {
if (res.rCode === 0) {
this.setState({
... |
app/index.js | mersocarlin/auction-app | import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import Root from './containers/root';
import 'jquery';
import 'bootstrap/dist/js/bootstrap';
import 'bootstrap/dist/css/bootstrap.css';
import './styles/app.scss';
const createHashHistory = require('history/lib/createHashHistory'... |
src/Collapse.js | roadmanfong/react-bootstrap | import React from 'react';
import Transition from './Transition';
import domUtils from './utils/domUtils';
import createChainedFunction from './utils/createChainedFunction';
let capitalize = str => str[0].toUpperCase() + str.substr(1);
// reading a dimension prop will cause the browser to recalculate,
// which will l... |
local-cli/templates/HelloNavigation/views/chat/ChatListScreen.js | jasonnoahchoi/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... |
frontend/src/pages/sys-admin/admin-logs/logs-nav.js | miurahr/seahub | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from '@reach/router';
import { siteRoot, gettext } from '../../../utils/constants';
const propTypes = {
currentItem: PropTypes.string.isRequired
};
class LogsNav extends React.Component {
constructor(props) {
super(props);
thi... |
app/javascript/mastodon/components/permalink.js | pfm-eyesightjp/mastodon | import React from 'react';
import PropTypes from 'prop-types';
export default class Permalink extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,
};
static propTypes = {
className: PropTypes.string,
href: PropTypes.string.isRequired,
to: PropTypes.string.isRequired,
... |
examples/todomvc/containers/App.js | akofman/redux | import React from 'react';
import TodoApp from './TodoApp';
import { createRedux } from 'redux';
import { Provider } from 'redux/react';
import * as stores from '../stores';
const redux = createRedux(stores);
export default class App {
render() {
return (
<Provider redux={redux}>
{() => <TodoApp /... |
_course_exercises/my-app/src/index.js | David-Castelli/react-testing | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
frontend/src/components/CategoriesContainer.js | kiok46/Readable | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import './Categories.css';
import {connect} from 'react-redux';
import * as actions from '../actions';
import FlatButton from 'material-ui/FlatButton';
import Dialog from 'material-ui/Dialog';
import {Card, CardActions, CardTitle} from 'mat... |
src/components/Footer.js | nunoblue/ts-react | import React, { Component } from 'react';
class Footer extends Component {
render() {
return (
<footer id="footer">
<div className="mui-container-fluid">
<br />
Made with by <a href="https://github.com/salgum1114/sgoh-blog" target="_blank... |
app/components/Loading.js | mayitbe-ZH/init-react-native-project |
import React from 'react';
import {
StyleSheet,
Dimensions,
View,
Text,
Modal,
ActivityIndicator
} from 'react-native';
const SIZES = ['small', 'large'];
const propTypes = {
visible: React.PropTypes.bool,
color: React.PropTypes.string,
size: React.PropTypes.oneOf(SIZES),
overlayColor: React.PropT... |
src/templates/not-found-template.js | hb-gatsby/gatsby-starter-lumen | // @flow strict
import React from 'react';
import Sidebar from '../components/Sidebar';
import Layout from '../components/Layout';
import Page from '../components/Page';
import { useSiteMetadata } from '../hooks';
const NotFoundTemplate = () => {
const { title, subtitle } = useSiteMetadata();
return (
<Layout... |
packages/demo/stories/progress.js | zzarcon/skatepark.js | import React from 'react';
import {
storiesOf
} from '@kadira/storybook';
import SKProgress from 'skateparkjs-progress';
import options from './defaultStoryOptions';
let animatedInterval;
storiesOf('Progress', module)
.addWithInfo('Using default options', () => {
const onClick = () => {
const progress =... |
client/src/app/components/Error.js | lefnire/jobpig | import React from 'react';
import _ from 'lodash';
export default class Error extends React.Component {
render(){
let {error} = this.props;
if (!error) return null;
let err = _.get(error, 'json.message')
|| _.get(error, 'response.statusText')
|| (error.toString && error.toString())
|| "... |
src/svg-icons/editor/format-clear.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorFormatClear = (props) => (
<SvgIcon {...props}>
<path d="M3.27 5L2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21 18 19.73 3.55 5.27 3.27 5zM6 5v.18L8.82 8h2.4l-.72 1.68 2.1 2.1L14.21 8H20V5H6z"/>
</SvgIcon... |
src/containers/Profile/Content.js | JustPeople/app | import React from 'react'
import { connect } from 'react-redux'
import { Carousel } from 'antd'
import styled from 'styled-components'
import * as Selectors from '../../selectors'
import * as DataService from '../../services/data'
var Div = styled.div`
& .ant-carousel {
.slick-slide {
text-ali... |
src/components/Chip/Chip.js | sk-iv/iva-app | import React from 'react';
import type { Element, Node } from 'react';
import classNames from 'classnames';
import keycode from 'keycode';
import {Times} from '../SvgIcon';
import Avatar from '../Avatar/Avatar';
if(process.env.WEBPACK) require('./Chip.css');
export type Props = {
/**
* Avatar element.
*/
a... |
src/svg-icons/editor/border-color.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderColor = (props) => (
<SvgIcon {...props}>
<path d="M17.75 7L14 3.25l-10 10V17h3.75l10-10zm2.96-2.96c.39-.39.39-1.02 0-1.41L18.37.29c-.39-.39-1.02-.39-1.41 0L15 2.25 18.75 6l1.96-1.96z"/><path fillOp... |
src/svg-icons/image/looks.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageLooks = (props) => (
<SvgIcon {...props}>
<path d="M12 10c-3.86 0-7 3.14-7 7h2c0-2.76 2.24-5 5-5s5 2.24 5 5h2c0-3.86-3.14-7-7-7zm0-4C5.93 6 1 10.93 1 17h2c0-4.96 4.04-9 9-9s9 4.04 9 9h2c0-6.07-4.93-11-11-1... |
frontend/src/Components/Page/PageConnector.js | lidarr/Lidarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import { createSelector } from 'reselect';
import { saveDimensions, setIsSidebarVisible } from 'Store/Actions/appActions';
import { fetchArtist } from 'Stor... |
src/svg-icons/alert/warning.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AlertWarning = (props) => (
<SvgIcon {...props}>
<path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/>
</SvgIcon>
);
AlertWarning = pure(AlertWarning);
AlertWarning.displayName = 'AlertWarning';
Aler... |
.storybook/config.js | intwarehq/react-dates | import React from 'react';
import moment from 'moment';
import { configure, addDecorator, setAddon } from '@kadira/storybook';
import infoAddon from '@kadira/react-storybook-addon-info';
import { setOptions } from '@kadira/storybook-addon-options';
import '../css/styles.scss';
addDecorator((story) => {
moment.locale... |
src/components/ImageFieldPreview/index.js | iris-dni/iris-frontend | import React from 'react';
import styles from './image-field-preview.scss';
import Image from 'components/Image';
import RemovableItem from 'components/RemovableItem';
import getImageUrl from 'helpers/getImageUrl';
const getImageSource = (image) => getImageUrl(image) || image.preview;
const removeImageFromArray = (im... |
webapp/app/components/Navbar/index.js | EIP-SAM/SAM-Solution-Node-js | //
// Navbar
//
import React from 'react';
import { Navbar, Nav, NavItem, Image, Glyphicon, NavDropdown, MenuItem } from 'react-bootstrap';
import { LinkContainer } from 'react-router-bootstrap';
import Logo from 'components/Navbar/logo_sam_solution.png';
import styles from 'components/Navbar/styles.css';
/* eslint-d... |
blueprints/smart/files/__root__/containers/__name__.js | joyvuu-dave/comeals-ui-react | import React from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
type Props = {
}
export class <%= pascalEntityName %> extends React.Component {
props: Props;
render() {
return (
<div></div>
)
}
}
const mapStateToProps = (state) => {
return {}
}
const ... |
node_modules/semantic-ui-react/dist/es/views/Item/ItemContent.js | mowbell/clickdelivery-fed-test | import _extends from 'babel-runtime/helpers/extends';
import _isNil from 'lodash/isNil';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { customPropTypes, getElementType, getUnhandledProps, META, SUI, useVerticalAlignProp } from '../../lib';
import ItemHeader from '... |
src/components/handlers/MainHandler.js | cpsubrian/redis-explorer | import React from 'react'
import autobind from 'autobind-decorator'
import connectToStores from 'alt/utils/connectToStores'
import hostsStore from '../../stores/hostsStore'
import hostsActions from '../../actions/hostsActions'
import {RouteHandler} from 'react-router'
import mui from 'material-ui'
import Header from '.... |
src/svg-icons/maps/local-printshop.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPrintshop = (props) => (
<SvgIcon {...props}>
<path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"... |
docs/app/Examples/elements/Image/Variations/ImageExampleSize.js | clemensw/stardust | import React from 'react'
import { Divider, Image } from 'semantic-ui-react'
const src = '/assets/images/wireframe/image.png'
const ImageExampleSize = () => (
<div>
<Image src={src} size='mini' />
<Divider hidden />
<Image src={src} size='tiny' />
<Divider hidden />
<Image src={src} size='small'... |
components/LevelIcon.stories.js | cofacts/rumors-site | import React from 'react';
import LevelIcon from './LevelIcon';
import { withKnobs, number } from '@storybook/addon-knobs';
export default {
title: 'LevelIcon',
component: 'LevelIcon',
decorators: [withKnobs],
};
export const AllLevels = () => (
<div
style={{
display: 'grid',
gridTemplateColum... |
src/interface/statistics/components/DistanceRadar/Ring.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
const Ring = ({ innerRef, size, color, style, ...others }) => (
<div
style={{
position: 'absolute',
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
width: size,
height: size,
border: `2px solid $... |
packages/react-scripts/fixtures/kitchensink/src/features/webpack/LinkedModules.js | ontruck/create-react-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import './assets/style.css';
import { test, version } from 'test-integrity';
export default () => {
const ... |
src/components/StreetView.js | nickooms/racing-webgl2 | import React from 'react';
import PropTypes from 'prop-types';
import StreetSVG from './StreetSVG';
import StreetCard from './StreetCard';
const StreetView = (props) => {
const { street, city, plots, buildings, roadObjects, roadSegments } = props;
return (
<div style={{ flexDirection: 'row', display: 'flex', a... |
src/js/entry.js | Sandalf/electron-react-template | require('../styles/main.css');
'use strict';
import React from 'react';
import ReactDOM from "react-dom";
ReactDOM.render(
<div><b>Hello Electron!</b></div>,
document.getElementById("root")
);
|
src/client/react/admin/views/FeedView/FeedSummary.js | bwyap/ptc-amazing-g-race | import React from 'react';
import PropTypes from 'prop-types';
import autobind from 'core-decorators/es/autobind';
import FormInput from '../../../../../../lib/react/components/forms/FormInput';
import FeedFilter from './FeedFilter';
import Search from '../../components/Search';
import '../../scss/components/_summary-... |
src/server.js | kennethtruong/pagrader | 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... |
node_modules/react-bootstrap/es/FormGroup.js | acalabano/get-committed | 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 ... |
cheesecakes/plugins/content-manager/admin/src/components/Search/index.js | strapi/strapi-examples | /*
*
* Search
*
*/
import React from 'react';
import { isEmpty, upperFirst } from 'lodash';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Logo from 'assets/images/icon_filter_blue.svg';
import styles from './styles.scss';
const WAIT = 400;
class Search extends React.Compo... |
src/plot/voronoi.js | Apercu/react-vis | import React from 'react';
import PropTypes from 'prop-types';
import {voronoi} from 'd3-voronoi';
const NOOP = f => f;
function Voronoi({
className,
extent,
nodes,
onBlur,
onClick,
onMouseUp,
onMouseDown,
onHover,
polygonStyle,
style,
x,
y
}) {
// Create a voronoi with each node center poin... |
src/interface/report/Results/DegradedExperience.js | anom0ly/WoWAnalyzer | import AlertDanger from 'interface/AlertDanger';
import ModuleError from 'parser/core/ModuleError';
import PropTypes from 'prop-types';
import React from 'react';
const toTitleCase = (s) => s.substr(0, 1).toUpperCase() + s.substr(1);
class DegradedExperience extends React.Component {
static propTypes = {
disabl... |
Realization/frontend/czechidm-core/src/content/scheduler/LongRunningTaskContent.js | bcvsolutions/CzechIdMng | import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
//
import * as Basic from '../../components/basic';
import { LongRunningTaskManager, SchedulerManager, DataManager } from '../../redux';
import LongRunningTaskDetail from './LongRunningTaskDetail';
const manager = new... |
examples/03 - Basic auth/vendor/requireAuth.js | Kureev/browserify-react-live | import React from 'react';
import auth from './auth';
export default (Component) => {
return class Authenticated extends React.Component {
static willTransitionTo(transition) {
if (!auth.loggedIn()) {
transition.redirect('/login', {}, {
'nextPath': transition.path,
});
}
... |
src/modules/Dropdown/DropdownDivider.js | aabustamante/Semantic-UI-React | import cx from 'classnames'
import PropTypes from 'prop-types'
import React from 'react'
import {
customPropTypes,
getElementType,
getUnhandledProps,
META,
} from '../../lib'
/**
* A dropdown menu can contain dividers to separate related content.
*/
function DropdownDivider(props) {
const { className } = ... |
src/components/Root.js | helton/learning-redux | import React from 'react'
import { Provider } from '../lib/react-redux'
import { BrowserRouter as Router, Route } from 'react-router-dom'
import App from './App'
const Root = ({ store }) =>
<Provider store={store}>
<Router>
<Route path='/:filter?' component={App} />
</Router>
</Provider>
export defa... |
lavalab/html/node_modules/react-bootstrap/es/ModalBody.js | LavaLabUSC/usclavalab.org | 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 ... |
src/routes/app.js | yyjazsf/react-study | import React from 'react'
import NProgress from 'nprogress'
import PropTypes from 'prop-types'
import { connect } from 'dva'
import { withRouter } from 'dva/router'
import style from './app.less'
let lastHref
const App = ({
children,
loading,
}) => {
const href = window.location.href
if (lastHref !== href)... |
App/node_modules/react-native/local-cli/templates/HelloNavigation/views/welcome/WelcomeScreen.js | Dagers/React-Native-Differential-Updater | 'use strict';
import React, { Component } from 'react';
import {
Image,
Platform,
StyleSheet,
} from 'react-native';
import ListItem from '../../components/ListItem';
import WelcomeText from './WelcomeText';
export default class WelcomeScreen extends Component {
static navigationOptions = {
title: 'Welc... |
node_modules/react-bootstrap/es/MediaHeading.js | vietvd88/developer-crawler | 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 ... |
src/containers/Home/Home.js | hldzlk/wuhao | import React, { Component } from 'react';
import { Link } from 'react-router';
import { CounterButton, GithubButton } from 'components';
import config from '../../config';
import Helmet from 'react-helmet';
export default class Home extends Component {
render() {
const styles = require('./Home.scss');
// req... |
jenkins-design-language/src/js/components/material-ui/svg-icons/av/art-track.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const AvArtTrack = (props) => (
<SvgIcon {...props}>
<path d="M22 13h-8v-2h8v2zm0-6h-8v2h8V7zm-8 10h8v-2h-8v2zm-2-8v6c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2zm-1.5 6l-2.25-3-1.75 2.26-1.25-1.51L3.5 15h7z"/>
</SvgIcon>
);
... |
js/scenes/Onboarding/VideoOnboarding/PushToMatchingGameButton.js | FurtherMyFuture/FutureMobile | /**
* @flow
*/
import React from 'react'
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
type Props = {
onPress: () => void,
testID: string
}
export function PushToMatchingGameButton(props: Props): React.Element<any> {
return (
<View style={styles.container}>
<TouchableOpaci... |
Libraries/Modal/Modal.js | thotegowda/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/action/open-with.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionOpenWith = (props) => (
<SvgIcon {...props}>
<path d="M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z"/>
</SvgIcon>
);
ActionOpenWith = pure(Act... |
src/front-end/js/components/modals/Test2Modal.js | aleksey-gonchar/challenge-zenbrook | import React from 'react'
import { Modal, Button, Well } from 'react-bootstrap'
let { Header, Body, Title, Footer } = Modal
export default class LoginModal extends React.Component {
static propTypes = {
modal: React.PropTypes.object.isRequired,
actions: React.PropTypes.object.isRequired
}
constructor (... |
frontend/src/index.js | AmericanRedCross/OpenMapKitServer | import React from 'react';
import ReactDOM from 'react-dom';
import { Router } from "react-router-dom";
import { Provider } from "react-redux";
import createHistory from "history/createHashHistory";
import "bootstrap/dist/css/bootstrap.css";
import "bootstrap/dist/css/bootstrap-theme.css";
import '@blueprintjs/core/li... |
src/components/post/post_data/deep_copy_objects.js | refinedjs/refinedjs-blog | import React from 'react';
module.exports = function () {
const obj = '{ name: \'\', dob: \'\', planet: \'Krypton\' }';
return (
<div>
<p>
Let's say you had object <code>{obj}</code>. You want to modify the values to create a new Kryptonian,
but you want to keep the original state o... |
front/src/index.js | muhammad-awan/financial-news | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();
|
website/src/components/CustomLayout.js | wix/react-native-navigation | import React from 'react';
import DocPage from '@theme/DocPage';
import StandWithUkraine from '@site/src/components/StandWithUkraine';
export default function CustomLayout(props) {
return (
<>
<StandWithUkraine />
<DocPage {...props} />
</>
);
}
|
android/source/view/author.js | cloudfavorites/favorites | import React, { Component } from 'react';
import {
View,
Text,
Switch,
Alert,
TouchableHighlight
} from 'react-native';
import moment from 'moment';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import PureRenderMixin from 'react-addons-pure-render-mixin';
import * as Aut... |
client/src/components/SpiralCal.js | commandzpdx/habit-calendar | import React, { Component } from 'react';
import classNames from 'classnames';
import './SpiralCal.css';
export default class SpiralCal extends Component {
constructor(props) {
super(props);
this.state = {
circles: [],
};
this.onClickDayCircle = this.onClickDayCircle.bind(this);
this.crea... |
src/index.js | bigcakes/food-recall-data | import React from 'react';
import { render } from 'react-dom';
import { Redirect, hashHistory, Router, Route, IndexRoute } from "react-router";
import App from './App';
import EmptySearch from './components/EmptySearch';
import RecallList from './components/RecallList';
import Recall from './components/Recall';
import... |
server/sonar-web/src/main/js/components/shared/severity-icon.js | joansmith/sonarqube | /*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License... |
app/javascript/mastodon/features/ui/index.js | increments/mastodon | import classNames from 'classnames';
import React from 'react';
import NotificationsContainer from './containers/notifications_container';
import PropTypes from 'prop-types';
import LoadingBarContainer from './containers/loading_bar_container';
import TabsBar from './components/tabs_bar';
import AlertBarContainer from ... |
src/routes/Home/components/HomeView.js | rwade628/react-redux-starter-kit | import React from 'react'
import DuckImage from '../assets/Duck.jpg'
import './HomeView.scss'
export const HomeView = () => (
<div>
<h4>Welcome!</h4>
<img
alt='This is a duck, because Redux!'
className='duck'
src={DuckImage} />
</div>
)
export default HomeView
|
text-dream/webapp/src/components/bodies/MagnitudesBodyComponent.js | PAIR-code/interpretability | /**
* @license
* Copyright 2018 Google LLC. All Rights Reserved.
* 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 a... |
src/svg-icons/hardware/phone-iphone.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwarePhoneIphone = (props) => (
<SvgIcon {...props}>
<path d="M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1zm-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1... |
src-client/modules/generator/containers/GeneratorBriefPanel/index.js | ipselon/structor | /*
* Copyright 2017 Alexander Pustovalov
*
* 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 applicable law or a... |
test/integration/basic/pages/hmr/counter.js | nelak/next.js | import React from 'react'
export default class Counter extends React.Component {
state = { count: 0 }
incr () {
const { count } = this.state
this.setState({ count: count + 1 })
}
render () {
return (
<div>
<p>COUNT: {this.state.count}</p>
<button onClick={() => this.incr()}>... |
src/parser/druid/feral/modules/features/EnergyDetails.js | fyruna/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import Panel from 'interface/others/Panel';
import ResourceBreakdown from 'parser/shared/modules/resourcetracker/ResourceBreakdown';
import EnergyTracker from './EnergyTracker';
class EnergyDetails extends Analyzer {
static dependencies = {
... |
app/javascript/mastodon/features/notifications/components/notification.js | honpya/taketodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import StatusContainer from '../../../containers/status_container';
import AccountContainer from '../../../containers/account_container';
import { FormattedMessage } from 'react-intl';
import Perma... |
src/parser/shared/modules/items/bfa/dungeons/LustrousGoldenPlumage.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import ITEMS from 'common/ITEMS';
import { formatPercentage, formatNumber } from 'common/format';
import { calculateSecondaryStatDefault } from 'common/stats';
import ItemStatistic from 'interface/statistics/ItemStatistic';
import BoringItemValueText from ... |
docs/app/Examples/elements/Step/Groups/StepExampleGroups.js | vageeshb/Semantic-UI-React | import React from 'react'
import { Icon, Step } from 'semantic-ui-react'
const steps = [
{ icon: 'truck', title: 'Shipping', description: 'Choose your shipping options' },
{ active: true, icon: 'payment', title: 'Billing', description: 'Enter billing information' },
{ disabled: true, icon: 'info', title: 'Confir... |
public/js/app/queryTools/components/Queries.js | fendy3002/QzQueryTools | import React from 'react';
import lo from 'lodash';
import sa from 'superagent';
import {Treebeard} from 'react-treebeard';
class Elem extends React.Component {
constructor(props) {
super(props);
var {config, request} = this.props;
var cursorRef = null;
var queryToNode = queryToNodeHan... |
src/server.js | Skoli-Code/DerangeonsLaChambre | /**
* 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 'babel-polyfill';
import path from 'path';
import e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.