path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
examples-react/app/components/tables.js | zcoding/dashboard | import React from 'react'
export default class Tables extends React.Component {
constructor(props) {
super(props)
}
render() {
return (
<div className="grid padding">
<div className="u-sm-8">
<div className="panel panel-primary">
<div className="panel-header">Table i... |
frontend/app/components/Repairs/CommentView.js | sabbir044/AutoRepair | import React from 'react';
import PropTypes from 'prop-types';
import { Button, Modal, FormGroup, FormControl, ControlLabel, Panel } from 'react-bootstrap';
export default function CommentView(props) {
return (
<Modal show={props.showModal} onHide={props.onModalHide} bsSize="large">
<Modal.Header closeButt... |
example/examples/ZIndexMarkers.js | ali-alamine/react-native-maps | import React from 'react';
import {
Dimensions,
StyleSheet,
Text,
View,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.733858;
const LONGITUDE = -122.446549;
const MARKERS_LATITUDE_DE... |
packages/react-scripts/fixtures/kitchensink/src/features/webpack/ImageInclusion.js | bttf/create-react-app | /**
* 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.
*/
import Rea... |
packages/idyll-template-projects/templates/multipage/template/components/custom-d3-component.js | idyll-lang/idyll | import React from 'react';
import D3Component from 'idyll-d3-component';
import * as d3 from 'd3';
const size = 600;
class CustomD3Component extends D3Component {
initialize(node, props) {
const svg = (this.svg = d3.select(node).append('svg'));
svg
.attr('viewBox', `0 0 ${size} ${size}`)
.style(... |
source/server/head.js | Pro-YY/universal-web-kit | import React from 'react'
import ReactDOM from 'react-dom/server'
import Helmet from 'react-helmet'
export function initHead(args) {
const { title, description, style, script } = args
// NOTE: server rendered css will be removed and changed by client after ssr, see client.js
let helmet = ReactDOM.renderToString(... |
fields/types/location/LocationFilter.js | Ftonso/keystone | import React from 'react';
import { FormField, FormInput, FormRow, SegmentedControl } from 'elemental';
const TOGGLE_OPTIONS = [
{ label: 'Matches', value: false },
{ label: 'Does NOT Match', value: true },
];
function getDefaultValue () {
return {
inverted: TOGGLE_OPTIONS[0].value,
street: undefined,
city:... |
app/src/index.js | DaveGee/words | import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
import './index.css'
ReactDOM.render(
<App />,
document.getElementById('root')
) |
src/views/NotFoundView/NotFoundView.js | aredmon/new-plotting-dashboard | import React from 'react';
import { Link } from 'react-router';
export class NotFoundView extends React.Component {
render () {
return (
<div className='container text-center'>
<h1>Aw Snap!</h1>
<p>Something went wrong...where were you trying to go?</p>
<hr />
<Link to='/'>B... |
ajax/libs/react-instantsearch/5.0.1/Dom.js | sashberd/cdnjs | /*! ReactInstantSearch 5.0.1 | © Algolia, inc. | https://community.algolia.com/react-instantsearch */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
... |
src/components/organisms/PostForm/index.stories.js | DimensionLab/narc | import React from 'react'
import { storiesOf } from '@storybook/react'
import { PostForm } from 'containers'
storiesOf('PostForm', module)
.add('default', () => (
<PostForm />
))
|
packages/cf-component-modal/src/ModalClose.js | mdno/mdno.github.io | import React from 'react';
import PropTypes from 'prop-types';
import Icon from 'cf-component-icon';
class ModalClose extends React.Component {
render() {
return (
<span className="cf-modal__close" onClick={this.props.onClick}>
<Icon type="close" label={this.props.label} size="2x" />
</span>
... |
Study/Udemy Docker and Kubernetes/Section05/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;
|
actor-apps/app-web/src/app/components/modals/Contacts.react.js | liruqi/actor-platform | //
// Deprecated
//
import _ from 'lodash';
import React from 'react';
import { PureRenderMixin } from 'react/addons';
import ContactActionCreators from 'actions/ContactActionCreators';
import DialogActionCreators from 'actions/DialogActionCreators';
import ContactStore from 'stores/ContactStore';
import Modal from... |
app/components/FoodCell.js | EleTeam/Shop-React-Native | /**
* ShopReactNative
*
* @author Tony Wong
* @date 2016-08-13
* @email 908601756@qq.com
* @copyright Copyright © 2016 EleTeam
* @license The MIT License (MIT)
*/
import React from 'react';
import {
StyleSheet,
TouchableOpacity,
View,
Text,
Image,
} from 'react-native';
import Common from ... |
versions/2-react/2-variable/client/src/index.js | hamczu/techsummit-web2016 | import React from 'react'
import { render } from 'react-dom'
import App from './App'
render(<App/>, document.getElementById('root')) |
web_client/src/index.js | nikGayko/Messenger | import React from 'react';
import ReactDOM from 'react-dom';
import './styles/index.css';
import App from './components/App.jsx';
import * as firebase from 'firebase';
//inintial firebase config
var config = {
apiKey: "AIzaSyA-6uja5L0oGUza6K4JIG14Pq57Ak9GNZA",
authDomain: "messenger-7b700.firebaseapp.com",
... |
fields/types/date/DateColumn.js | lojack/keystone | import React from 'react';
import moment from 'moment';
import ItemsTableCell from '../../../admin/src/components/ItemsTableCell';
import ItemsTableValue from '../../../admin/src/components/ItemsTableValue';
var DateColumn = React.createClass({
displayName: 'DateColumn',
propTypes: {
col: React.PropTypes.object,
... |
src/svg-icons/image/gradient.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageGradient = (props) => (
<SvgIcon {...props}>
<path d="M11 9h2v2h-2zm-2 2h2v2H9zm4 0h2v2h-2zm2-2h2v2h-2zM7 9h2v2H7zm12-6H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 18H7v-2h2v2z... |
webapp/app/components/MigrationHistory/Create/index.js | EIP-SAM/SAM-Solution-Node-js | //
// Migration History Create component
//
import React from 'react';
import {
Modal,
Form,
Col,
Alert,
} from 'react-bootstrap';
import StatusSelect from 'containers/MigrationHistory/Create/StatusSelect';
import UserSelect from 'containers/MigrationHistory/Create/UserSelect';
import ImageSelect from 'contain... |
examples/huge-apps/routes/Course/components/Dashboard.js | jwaltonmedia/react-router | import React from 'react'
class Dashboard extends React.Component {
render() {
return (
<div>
<h3>Course Dashboard</h3>
</div>
)
}
}
export default Dashboard
|
frontend/pages/dashboard/index.js | ecmadao/hacknical |
import 'babel-polyfill'
import React from 'react'
import ReactDOM from 'react-dom'
import createHistory from 'history/createBrowserHistory'
import AppContainer from './AppContainer'
import AppStore from './redux/store'
import routes from './routes'
const history = createHistory()
const renderApp = (id, props = {}) =... |
packages/mineral-ui-icons/src/IconColorize.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconColorize(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconProps... |
components/AddTodoForm.js | lipp/next-todos | import React from 'react'
export default ({addTodo, setAllCompleted, setAllValue, toggleSetAllValue}) => (
<form action='javascript:' onSubmit={({target: {title}}) => {
addTodo(title.value)
title.value = ''
}} >
<input type='checkbox' onClick={() => {
setAllCompleted(setAllValue)
toggleSetA... |
frontend/src/screens/camera-log/camera-log.js | desihub/qlf | import React from 'react';
import PropTypes from 'prop-types';
import Terminal from '../../components/terminal/terminal';
import Paper from '@material-ui/core/Paper';
const styles = {
close: {
float: 'right',
cursor: 'pointer',
},
main: {
width: 'calc(100vw - 64px)',
margin: '16px',
padding: ... |
src/js/components/ViewMoreViewLess/index.js | grommet/grommet-cms-boilerplate | /* @flow */
import React from 'react';
import Box from 'grommet/components/Box';
import DownIcon from 'grommet/components/icons/base/Down';
import UpIcon from 'grommet/components/icons/base/Up';
import Button from 'grommet/components/Button';
export default function ViewMoreViewLess(props: {
children: React$Element<... |
assets/js/index.js | mlapierre/Winds | import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { syncHistoryWithStore, routerReducer } from 'react-router-redux'
import { createStore, combineReducers, applyMiddleware, compose } from 'redux'
import { browserHistory, Router, Route, IndexRoute, IndexRedirect } ... |
docs/pages/api-docs/toggle-button-group.js | lgollut/material-ui | import React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown';
const pageFilename = 'api/toggle-button-group';
const requireRaw = require.context('!raw-loader!./', false, /\/toggle-button-group\.md$/);
export defa... |
src/modules/components/Select/index.js | ruebel/synth-react-redux | import React from 'react';
import PropTypes from 'prop-types';
import ReactSelect from 'react-select';
import styled from 'styled-components';
import H3 from '../typography/H3';
const Wrapper = styled.div`
.Select-arrow {
border-width: 8px 6px 1.5px;
}
.Select-arrow-zone {
padding-right: 1.8rem;
}
... |
src/parser/warlock/destruction/modules/azerite/ChaosShards.js | fyruna/WoWAnalyzer | import React from 'react';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import Events from 'parser/core/Events';
import calculateBonusAzeriteDamage from 'parser/core/calculateBonusAzeriteDamage';
import StatTracker from 'parser/shared/modules/StatTracker';
import SPELLS from 'common/SPELLS';
impo... |
src/index.js | bgoldman/todomvc-react | import React from 'react';
import { render } from 'react-dom';
import App from './components/app';
render(<App />, document.getElementById('app'));
|
index.ios.js | tarun29061990/react-native-weather | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
class weather extends Component {
render() {
return (
<View style={styles.container}>
<Text ... |
client/modules/Layouts/AppLayout/__tests__/Components/Footer.spec.js | sharvit/my-blog-react | 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, 1);
});
|
app/components/Cell.js | nihgwu/react-native-sudoku | 'use strict';
import React, { Component } from 'react';
import {
LayoutAnimation,
StyleSheet,
Animated,
Platform,
View,
Text,
} from 'react-native';
import {
CellSize,
BorderWidth,
} from './GlobalStyle';
import Touchable from './Touchable';
class Cell extends Component {
state = {
number: thi... |
frontend/src/Components/Form/FormGroup.js | Radarr/Radarr | import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { map } from 'Helpers/elementChildren';
import { sizes } from 'Helpers/Props';
import styles from './FormGroup.css';
function FormGroup(props) {
const {
className,
children,
size,
advancedSettin... |
utils/AnimatedSVGState/index.js | codesinghanoop/react-native-d3multiline-chart | import React, { Component } from 'react';
import omit from 'lodash/omit';
/**
* Problem: Some props cannot be animated through setNativeProps
* Solution: Use state for those and use setNativeProps for the rest
*/
function createState(props, keys) {
return keys.reduce((acc, key) => {
const value = props[key];... |
src/svg-icons/social/domain.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialDomain = (props) => (
<SvgIcon {...props}>
<path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v... |
backoffice/src/main.js | sebprunier/necmergitur | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, IndexRoute } from 'react-router';
import createHistory from 'history/lib/createHashHistory';
import HopitauxPage from './pages/hopitaux';
import HopitalPage from './pages/hopital';
import PostesMedicauxAvancesPage from './pages/poste... |
src/components/DashboardHome.react.js | danesparza/Dashboard | import React, { Component } from 'react';
import * as Sentry from '@sentry/browser';
// The components
import DateTimeDisplay from './DateTimeDisplay.react';
import WeatherDisplay from './WeatherDisplay.react';
import CalendarDisplay from './CalendarDisplay.react';
import NewsDisplay from './NewsDisplay.react';
impor... |
src/Parser/Hunter/Shared/Modules/Items/TheApexPredatorsClaw.js | hasseboulen/WoWAnalyzer | import React from 'react';
import ITEMS from 'common/ITEMS';
import SPELLS from 'common/SPELLS';
import PETS from 'common/PETS';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import getDamageBonus from 'Parser/Hunter/Shared/Modules/getDamageBonus';
import CorePet... |
app/javascript/mastodon/features/compose/components/upload_button.js | primenumber/mastodon | import React from 'react';
import IconButton from '../../../components/icon_button';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 're... |
src/svg-icons/action/find-in-page.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFindInPage = (props) => (
<SvgIcon {...props}>
<path d="M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5... |
src/pages/about/articles/index.js | jcmnunes/josenunesxyz | import React from 'react';
import List from '../../../components/List';
import Heading from '../../../styles/Heading';
import articlesData from '../../../content/articles';
const CoursesIndex = () => {
return (
<>
<Heading>
Recent articles I{' '}
<span role="img" aria-label="heart-eyes-em... |
src/routes/toolJsonEditor/index.js | goldylucks/adamgoldman.me | import React from 'react'
import ToolJsonEditor from './ToolJsonEditor'
const title = 'Brain Hacking Automation Tools Generator'
async function action({ path }) {
return {
chunks: ['toolEditor'],
title,
path,
description: 'Create a brain tool',
component: <ToolJsonEditor />,
}
}
export defau... |
src/app/components/icons/GithubIcon.js | skratchdot/web-audio-api-archive | /*eslint max-len:0 */
import React from 'react';
import SvgIcon from 'material-ui/SvgIcon';
const GithubIcon = (props) => (
<SvgIcon {...props} viewBox="0 0 16 16">
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1... |
scripts/pages/home.js | zupzup/reactgym | 'use strict';
import React from 'react';
import List from '../components/List';
import TrainingStore from '../stores/TrainingStore.js';
import SimpleHeaderMixin from '../mixins/SimpleHeaderMixin';
import AppState from '../stores/AppState';
let Home = React.createClass({
contextTypes: {
router: React.PropT... |
move/src-react/javascripts/index.js | mortzmortz/kolder | import '../styles/styles.scss';
/**
* https://github.com/babel/babel/tree/master/packages/babel-preset-env include only the polyfills and
* transforms needed for the browsers we specified in kolder.config.js
*/
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import Demo from '... |
src/library/tabs/components/Tab.js | zdizzle6717/react-redux-arc | 'use strict';
import React from 'react';
export default class Tab extends React.Component {
constructor() {
super();
this.state = {}
}
componentDidMount() {
// let elem = ReactDOM.findDOMNode(this);
// let childForm = elem.getElementsByTagName('form');
// console.log(childForm[0]);
}
render() {
re... |
internals/templates/containers/App/index.js | PokerGuy/react-boilerplate | /**
*
* App.react.js
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If... |
app/javascript/mastodon/features/audio/index.js | Kirishima21/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import { formatTime } from 'mastodon/features/video';
import Icon from 'mastodon/components/icon';
import classNames from 'classnames';
import { throttle } from 'lodash';
import { getPointerPosition, ... |
client/components/NotFound/NotFound.js | gusaiani/react-moodboard | import React, { Component } from 'react';
class NotFound extends Component {
render() {
return (
<section>
<h2 ref="title">404. Not found.</h2>
<p>
<img src="http://i.imgur.com/ooWW6.gif" />
</p>
<p><a href="/">Go to index</a></p>
</section>
);
}
}
exp... |
src/Button/Button.js | resmio/mantecao | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { darken } from 'polished'
import { colors } from '../variables'
import { media } from '../utils/style'
const getHoverColor = props => {
return props.hollow ? props.color : darken(0.1, props.color)
}
const St... |
frontend/src/components/dialog/set-org-user-contact-email.js | miurahr/seahub | import React from 'react';
import PropTypes from 'prop-types';
import { Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
import { gettext } from '../../utils/constants';
import { seafileAPI } from '../../utils/seafile-api';
import { Utils } from '../../utils/utils';
const propTypes = {
orgID: PropType... |
app/routes.js | jpsierens/budget | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/App';
import BudgetsContainer from './containers/BudgetsContainer';
import About from './components/About';
import BudgetDetailContainer from './containers/BudgetDetailContainer';
export default (
<Route path="/... |
js/app.js | brainly/datacontest | import React from 'react';
import ReactDOM from 'react-dom';
import SlideList from './components/slideList.js';
function start() {
ReactDOM.render(
<SlideList/>,
document.getElementById('app')
);
}
start();
|
docs/app/Examples/elements/Segment/Groups/SegmentExamplePiledSegments.js | aabustamante/Semantic-UI-React | import React from 'react'
import { Segment } from 'semantic-ui-react'
const SegmentExamplePiledSegments = () => (
<Segment.Group piled>
<Segment>Top</Segment>
<Segment>Middle</Segment>
<Segment>Bottom</Segment>
</Segment.Group>
)
export default SegmentExamplePiledSegments
|
src/index.js | Peterrkang/Locals | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import reducers from './reducers';
import { Router, browserHistory } from 'react-router';
import routes from './routes';
import reduxThunk from 'redux-thunk';
import... |
src/svg-icons/editor/show-chart.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorShowChart = (props) => (
<SvgIcon {...props}>
<path d="M3.5 18.49l6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"/>
</SvgIcon>
);
EditorShowChart = pure(EditorShowChart);
EditorShowChart.displayNa... |
app/javascript/mastodon/components/dropdown_menu.js | ambition-vietnam/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import IconButton from './icon_button';
import Overlay from 'react-overlays/lib/Overlay';
import Motion from '../features/ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
imp... |
src/svg-icons/maps/local-printshop.js | mtsandeep/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"... |
app/javascript/flavours/glitch/components/media_attachments.js | glitch-soc/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { MediaGallery, Video, Audio } from 'flavours/glitch/util/async-components';
import Bundle from 'flavours/glitch/features... |
client/modules/core/routes.js | bompi88/grand-view | // //////////////////////////////////////////////////////////////////////////////
// Client Routes
// //////////////////////////////////////////////////////////////////////////////
//
// Copyright 2015 Concept
//
// Licensed under the Apache License, Version 2.0 (the 'License');
// you may not use this file except in c... |
.storybook/config.js | joshblack/carbon-components-react | import React from 'react';
import { configure, addDecorator } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import { withOptions } from '@storybook/addon-options';
import { configureActions } from '@storybook/addon-actions';
// import { checkA11y } from 'storybook-addon-a11y';
import Contai... |
src/svg-icons/device/storage.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceStorage = (props) => (
<SvgIcon {...props}>
<path d="M2 20h20v-4H2v4zm2-3h2v2H4v-2zM2 4v4h20V4H2zm4 3H4V5h2v2zm-4 7h20v-4H2v4zm2-3h2v2H4v-2z"/>
</SvgIcon>
);
DeviceStorage = pure(DeviceStorage);
DeviceS... |
docs/src/pages/demos/progress/LinearQuery.js | cherniavskii/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
import { LinearProgress } from 'material-ui/Progress';
const styles = {
root: {
flexGrow: 1,
},
};
function LinearQuery(props) {
const { classes } = props;
return (
<div className={classes.r... |
src/pages/home/page.js | mhgbrown/typography-karaoke | import React from 'react';
import ReactDom from 'react-dom';
import { Link } from 'react-router';
import _ from 'lodash';
import client from '../../common/store/Contentful';
import marked from 'marked';
import styles from "./style.css";
export default class HomePage extends React.Component {
constructor(props) {
... |
src/icons/Calculator.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class Calculator extends React.Component {
render() {
if(this.props.bare) {
return <g>
<path d="M400,32H112c-8.8,0-16,7.2-16,16v416c0,8.8,7.2,16,16,16h288c8.8,0,16-7.2,16-16V48C416,39.2,408.8,32,400,32z M144,208h32... |
docs/app/Examples/elements/List/Content/ListExampleIcon.js | ben174/Semantic-UI-React | import React from 'react'
import { Icon, List } from 'semantic-ui-react'
const ListExampleIcon = () => (
<List>
<List.Item as='a'>
<Icon name='help' />
<List.Content>
<List.Header>Floated Icon</List.Header>
<List.Description>
This text will always have a left margin to make ... |
2.Practice/app.js | hiren2728/ReactDemo | import React from 'react';
import ReactDom from 'react-dom';
import Welcome from './src/Welcome'
class App extends React.Component{
render(){
return <Welcome message = "Hello World"/>
}
}
ReactDom.render(
<App/>,
document.getElementById("app")
); |
app/components/PublicRoute/PublicRoute.js | sunnymis/Swoleciety | import React from 'react';
import { Route, Redirect } from 'react-router-dom';
require('./PublicRoute.scss');
const PublicRoute = ({ component: Component, user, ...rest }) => {
return (
<Route
{...rest}
render={props => user ? <Redirect to="/" /> : <Component user={user} {...props} />}
/>
);
}... |
src/components/SvgIcon/SvgIcon.js | sk-iv/iva-app | import React from 'react';
import type { Node } from 'react';
import classNames from 'classnames';
if(process.env.WEBPACK) require('./SvgIcon.css');
export type Props = {
/**
* Elements passed into the SVG Icon.
*/
children: Node,
/**
* @ignore
*/
className?: string,
/**
* Provides a human-re... |
app/components/ListTitle/index.js | Thinkmill/react-conf-app | // @flow
import React from 'react';
import { PixelRatio, Text, View } from 'react-native';
import theme from '../../theme';
type Props = {
bordered?: boolean,
text: string,
};
export default function ListTitle({ bordered, text }: Props) {
const styles = {
text: {
color: theme.color.text,
fontSi... |
tests/Rules-isAlphanumeric-spec.js | bitgaming/formsy-react | import React from 'react';
import TestUtils from 'react-addons-test-utils';
import Formsy from './..';
import { InputFactory } from './utils/TestInput';
const TestInput = InputFactory({
render() {
return <input value={this.getValue()} readOnly/>;
}
});
const TestForm = React.createClass({
render() {
re... |
src/containers/search_bar.js | LianaBuss/react-weather | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { fetchWeather } from '../actions/index';
class SearchBar extends Component {
constructor(props) {
super(props);
this.state = { term: ''};
this.onInputChange = this.onInputC... |
src/static/app.js | AdrienAgnel/testDjangoApp | import React from 'react';
import { connect } from 'react-redux';
import { push } from 'react-router-redux';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import * as _ from 'lodash';
import { authLogoutAndRedirect } from './actions/auth';
import './styles/main.scss';
class App extends Reac... |
src/components/post-listing/item-post-card.js | Clip-sub/CSClient-RN | /**
* @flow
*/
'use strict';
import React from 'react';
import { Image, TouchableOpacity, Platform, Share, Text } from 'react-native';
import { Body, Button, Card, CardItem, Icon, Left, View } from 'native-base';
import HTMLView from 'react-native-htmlview';
import HTMLParser from 'fast-html-parser';
import he from '... |
src/front-end/js/containers/RouterContainer.js | aleksey-gonchar/challenge-zenbrook | /* global __CLIENT__, RESPONSE */
import React from 'react'
import { Router } from 'react-router'
import * as AppActions from '../actions/AppActions.js'
export default class RouterContainer extends React.Component {
static requireAuth (store) {
var appStore = store
return (nextState, transition) => {
... |
f2e/src/js/compoents/app/mock.js | NyaaFinder/nyaacat | // 一个组件是一个模块,自己带有自己的样式
import React from 'react';
import AppActions from'../../actions/AppActions';
import AppStore from'../../stores/AppStore';
import Socket from 'socket.io-client';
import Dialog from '../dialog/dialog.jsx';
import Login from '../dialog/login.jsx';
import Foot from '../foot/foot.jsx';
import Head fro... |
src/index.js | sashasushko/moira-front | // @flow
import React from 'react';
import ReactDOM from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import { BrowserRouter } from 'react-router-dom';
import Api from './Api/MoiraAPI';
import App from './App';
import { ApiProvider } from './Api/MoiraApiInjection';
import config from './config';
imp... |
modules/IndexLink.js | calebmichaelsanchez/react-router | import React from 'react'
import Link from './Link'
const IndexLink = React.createClass({
render() {
return <Link {...this.props} onlyActiveOnIndex={true} />
}
})
export default IndexLink
|
chapter-12/express_server/src/pages/CounterPage.js | mocheng/react-and-redux | import React from 'react';
import {view as Counter, stateKey, reducer} from '../components/Counter';
const page = () => {
return (
<div>
<div>Counter</div>
<Counter value={0} />
</div>
);
};
const initState = () => Promise.resolve(100);
export {page, reducer, initState, stateKey};
|
ui/src/containers/Visualisations/TemplateStreamUserEngagementLeaderboard/Viewer.js | LearningLocker/learninglocker | import React from 'react';
import PropTypes from 'prop-types';
import SourceResults from 'ui/containers/VisualiseResults/SourceResults';
import BarChartResults from 'ui/containers/VisualiseResults/BarChartResults';
/**
* @param {string} props.visualisationId
* @param {boolean} props.showSourceView
*/
const Viewer =... |
examples/src/tag-props.js | madox2/react-tagcloud | import React from 'react'
import { TagCloud } from 'react-tagcloud'
const data = [
{ value: 'jQuery', count: 25 },
{ value: 'MongoDB', count: 18 },
{ value: 'JavaScript', count: 38 },
{
value: 'React',
count: 30,
// props below will be passed to tag component
props: {
title: 'React is awe... |
client/src/components/Admin/Users/List/index.js | dotkom/super-duper-fiesta | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Fuse from 'fuse.js';
import { CAN_VOTE } from 'common/auth/permissions';
import { adminToggleCanVote } from 'features/user/actionCreators';
import ReactTable from 'react-table';
import 'react-table/react-table.c... |
app/components/HomeSignUpRib/index.js | audoralc/pyxis | /**
*
* HomeSignUpRib
*
*/
import React from 'react';
import ReactPlaceholder from 'react-placeholder';
import glamorous from 'glamorous';
const SubButton = glamorous.button ( {
background: '#017B63',
color: '#f6edeb',
border: '2px solid #f6edeb',
textDecoration: 'none',
padding: '.25em .5em',
fontS... |
client/views/admin/integrations/edit/HistoryItem.js | VoiSmart/Rocket.Chat | import { Button, Icon, Box, Accordion, Field, FieldGroup } from '@rocket.chat/fuselage';
import { useMutableCallback } from '@rocket.chat/fuselage-hooks';
import React from 'react';
import { integrations as eventList } from '../../../../../app/integrations/lib/rocketchat';
import { useMethod } from '../../../../contex... |
App/Containers/TalkDetailScreen.js | infinitered/ChainReactApp | import React from 'react'
import { BackHandler, ScrollView, Text, View, Image, TouchableOpacity } from 'react-native'
import PurpleGradient from '../Components/PurpleGradient'
import TalkInfo from '../Components/TalkInfo'
import SocialMediaButton from '../Components/SocialMediaButton'
import { NavigationActions } from ... |
components/Label/stories.js | insane-ux/rebulma | // @flow
import React from 'react'
import { storiesOf } from '@kadira/storybook'
import Label from './'
storiesOf('Label', module)
.add('default', () => (
<Label>Default Label</Label>
))
.add('small', () => (
<Label className="is-small">Small Label</Label>
))
.add('large', () => (
<Label classNa... |
src/svg-icons/av/library-books.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvLibraryBooks = (props) => (
<SvgIcon {...props}>
<path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9H9V9h10v2zm-4 4H9v-2h6v2zm4-8H9V5h1... |
src/app/common/UserInterface/components/Icon.js | toxzilla/app | import React from 'react';
import shallowCompare from 'react-addons-shallow-compare';
import {classNames} from 'react-dom-stylesheet';
export default class Icon extends React.Component {
static displayName = 'Icon'
static propTypes = {
iconName: React.PropTypes.string.isRequired,
className: React.PropTyp... |
src/components/WorkHistory/index.js | nzchicken/cv | import React from 'react'
import styled from 'styled-components'
import { format } from 'date-fns'
const Container = styled.div`
position: relative;
padding-left: 0.5em;
`
const Bar = styled.div`
position: absolute;
left: -48px;
top: 0;
width: 12px;
height: 100%;
background-color: #9eb5ff;
border-ra... |
test/development/basic-basepath/next-dynamic/components/hello-context.js | JeromeFitz/next.js | import React from 'react'
import PropTypes from 'prop-types'
export default class extends React.Component {
static contextTypes = {
data: PropTypes.object,
}
render() {
const { data } = this.context
return <div>{data.title}</div>
}
}
|
examples/gatsby/src/pages/about.js | lgollut/material-ui | import React from 'react';
import Container from '@material-ui/core/Container';
import Typography from '@material-ui/core/Typography';
import Box from '@material-ui/core/Box';
import ProTip from '../components/ProTip';
import Link from '../components/Link';
import Copyright from '../components/Copyright';
export defau... |
app/common/components/OverlayPortal/index.js | Kaniwani/KW-Frontend | import React from 'react';
import { createPortal } from 'react-dom';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { white } from 'common/styles/colors';
import IconButton from 'common/components/IconButton';
// NOTE: this is more of a reference as to how ReactDOM.createPortal() ... |
src/js/Scroller/Scroll.js | AlejandroHerr/fotoxjs | /* global SyntheticMouseEvent */
// @flow
import React from 'react';
type ScrollProps = {
position: number,
styles: { [key: string]: string },
width: number,
onMouseDown: (e: SyntheticMouseEvent) => void,
};
const Scroll = ({ position, styles, width, onMouseDown }: ScrollProps) => (
<div className={styles.s... |
src/parser/shared/modules/spells/bfa/azeritetraits/UnstableCatalyst.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import { formatPercentage } from 'common/format';
import { calculateAzeriteEffects } from 'common/stats';
import AzeritePowerStatistic from 'interface/statistics/AzeritePowerStatistic';
import BoringSpellValueText from 'interface/statistics/components/Bori... |
client/src/core-components/table.js | opensupports/opensupports | import React from 'react';
import _ from 'lodash';
import classNames from 'classnames';
import Pagination from 'core-components/pagination';
import Icon from 'core-components/icon';
import Loading from 'core-components/loading';
class Table extends React.Component {
static propTypes = {
headers: React.Pro... |
src/components/common/svg-icons/image/hdr-weak.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageHdrWeak = (props) => (
<SvgIcon {...props}>
<path d="M5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm12-2c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm0 10c-2.21 0-4-1.79-4-4s1.79-4 4-4 4... |
examples/counter/containers/App.js | xgrommx/redux-act | import React, { Component } from 'react';
import CounterApp from './CounterApp';
import { createStore, applyMiddleware, combineReducers, compose } from 'redux';
import { devTools, persistState } from 'redux-devtools';
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
import thunk from 'redux-... |
django/webcode/webcode/frontend/node_modules/react-bootstrap/es/ToggleButton.js | OpenKGB/webcode | 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.