path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/components/Dashboard/Analytics/choose_exercise.js | gperl27/liftr-v2 | import React, { Component } from 'react';
class ChooseExercise extends Component {
handleSelectExercise(e){
const name = e.target.value;
if(name !== "default"){
this.props.fetchExercise({name});
}
}
render() {
if(!this.props.exercises){
return <div>Loading...</div>;
}
const... |
third_party/prometheus_ui/base/web/ui/node_modules/reactstrap/src/Jumbotron.js | GoogleCloudPlatform/prometheus-engine | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { mapToCssModules, tagPropType } from './utils';
const propTypes = {
tag: tagPropType,
fluid: PropTypes.bool,
className: PropTypes.string,
cssModule: PropTypes.object,
};
const defaultProps = {
tag: 'd... |
client/components/basic/UserStatus.js | Sing-Li/Rocket.Chat | import React from 'react';
import { Box } from '@rocket.chat/fuselage';
const Base = (props) => <Box size='x12' borderRadius='full' flexShrink={0} {...props}/>;
export const Busy = () => <Base bg='danger-500'/>;
export const Away = () => <Base bg='warning-600'/>;
export const Online = () => <Base bg='success-500'/>;
... |
packages/node_modules/@webex/react-component-badge/src/index.js | ciscospark/react-ciscospark | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './styles.css';
const propTypes = {
children: PropTypes.node.isRequired,
tooltip: PropTypes.node
};
const defaultProps = {
tooltip: false
};
/**
* Badge is supplemental, non-clickable compon... |
src/svg-icons/device/signal-wifi-3-bar.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalWifi3Bar = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M12.01 21.49L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l11.63 14.49.01.01.01-.01z"/><path d="M3.53 10.95l8.46 10.54.0... |
src/svg-icons/action/open-in-browser.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionOpenInBrowser = (props) => (
<SvgIcon {...props}>
<path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6l-4 4h3v6h2v-6h3l-4-4z"/>
</SvgIcon>
);
... |
src/templates/tags.js | liron-navon/liron-navon.github.io | import React from 'react'
import Helmet from 'react-helmet'
import { Link, graphql } from 'gatsby'
import Layout from '../components/Layout'
class TagRoute extends React.Component {
render() {
const posts = this.props.data.allMarkdownRemark.edges
const postLinks = posts.map(post => (
<li key={post.node... |
app/javascript/mastodon/features/follow_requests/components/account_authorize.js | RobertRence/Mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Permalink from '../../../components/permalink';
import Avatar from '../../../components/avatar';
import DisplayName from '../../../components/display_name';
import IconButton from '../../../... |
src/pages/install/InstallPage.js | Synchro-TEC/site-apollo-11 | import React from 'react';
import {PrismCode} from 'react-prism';
const InstallPage = (props) => {
return (
<div className='dm-content'>
<h4 className='sv-title'>Install</h4>
<p> Apollo-11 is in development and not published yet.</p>
<div className='dm-code-container'>
<pre className='l... |
src/routes/system/Admin/index.js | daizhen256/i5xwxdoctor-web | import React from 'react'
import PropTypes from 'prop-types'
import {routerRedux} from 'dva/router'
import {connect} from 'dva'
import AdminList from './List'
import AdminSearch from './Search'
import AdminModal from './ModalForm'
import {checkPower} from '../../../utils'
import {ADD, UPDATE, DELETE} from '../../../con... |
src/index.js | rajababu3/aframe-constellation-menu | import 'aframe';
import 'aframe-animation-component';
import 'aframe-particle-system-component';
import 'aframe-layout-component';
import 'aframe-event-set-component';
import 'babel-polyfill';
import {Entity, Scene} from 'aframe-react';
import React from 'react';
import ReactDOM from 'react-dom';
import UserList from '... |
docs/src/app/components/pages/components/Snackbar/Page.js | skarnecki/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import SnackbarReadmeText from './README';
import SnackbarExampleSimple from './... |
app/javascript/mastodon/features/domain_blocks/index.js | pointlessone/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debou... |
example/src/Comp1.js | someok/someok-lazilyload | /*
* Created by wjx on 2017/4/18.
*/
import React from 'react';
export default () => {
return (
<div>
comp 1
</div>
);
};
|
tests/api-react/user/1-User.js | w01fgang/keystone-test-project | import Domify from 'react-domify';
import React from 'react';
import api from '../../../client/lib/api';
import styles from '../../../client/lib/styles';
const Test = React.createClass({
displayName: 'Create User',
getInitialState () {
return {
action: 'Start Test',
data: {
name: '',
email: '',
... |
examples/js/cell-edit/custom-cell-edit-table.js | rolandsusans/react-bootstrap-table | /* eslint max-len: 0 */
/* eslint no-alert: 0 */
/* eslint guard-for-in: 0 */
/* eslint no-unused-vars: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
const currencies = [ 'USD', 'GBP', 'EUR' ];
const regions = [ 'North', 'South', 'East... |
src/components/Bulk/BulkCreateView/BulkCreateView.js | City-of-Helsinki/helerm-ui | import React from 'react';
import PropTypes from 'prop-types';
import { Link, withRouter, Prompt } from 'react-router-dom';
import {
cloneDeep,
endsWith,
every,
filter,
find,
includes,
isArray,
isEmpty,
isEqual,
isString,
keys,
mapKeys,
merge,
pickBy,
slice,
some,
startsWith,
trim,
... |
front_end/front_end_app/src/client/auth/logout.react.js | carlodicelico/horizon | import Component from '../components/component.react';
import React from 'react';
export default class Logout extends Component {
static propTypes = {
actions: React.PropTypes.object.isRequired,
msg: React.PropTypes.object.isRequired
}
render() {
const {actions, msg} = this.props;
return (
... |
src/mixins/DataHelpersMixin.js | beni55/react-widgets | 'use strict';
import React from 'react';
import warning from'react/lib/warning';
import propTypes from '../util/propTypes';
import * as dataHelpers from '../util/dataHelpers';
export default {
propTypes: {
valueField: React.PropTypes.string,
textField: propTypes.accessor
},
componentWillMount(){
w... |
src/svg-icons/hardware/keyboard-arrow-right.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareKeyboardArrowRight = (props) => (
<SvgIcon {...props}>
<path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/>
</SvgIcon>
);
HardwareKeyboardArrowRight = pure(HardwareKeyboardArrowRight);
Hardwar... |
js/components/profile/education.js | baskoropn/kerjain |
import React, { Component } from 'react';
import { Image, StatusBar, TouchableOpacity } from "react-native";
import { Container, Content, Card, CardItem, Text, View, Body, List, ListItem, Icon, Right, Button, Label } from 'native-base';
import styles from './styles';
const datas = [
{
instituteName: 'Binus U... |
node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js | browncs4sg/website | import React from 'react';
import { render } from 'react-dom';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
render(<HelloWorld />, document.getElementById('react-root'));
|
src/parser/shared/modules/items/bfa/dungeons/LingeringSporepods.js | sMteX/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import ITEMS from 'common/ITEMS';
import Analyzer from 'parser/core/Analyzer';
import ItemStatistic from 'interface/statistics/ItemStatistic';
import BoringItemValueText from 'interface/statistics/components/BoringItemValueText';
import ItemDamageDone from... |
app/components/Listitem.js | codeforsanjose/trash-pickup-portal | import React from 'react'
import { render } from 'react-dom'
export default React.createClass({
handleClick(event){
const obj={
"name": event.target.innerHTML,
"index": this.props.index
};
this.props.update(obj);
},
render() {
return (
<li onClick={this.handleClick} key={this.pro... |
fields/types/email/EmailColumn.js | stosorio/keystone | import React from 'react';
import ItemsTableCell from '../../../admin/src/components/ItemsTableCell';
import ItemsTableValue from '../../../admin/src/components/ItemsTableValue';
var EmailColumn = React.createClass({
displayName: 'EmailColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.obje... |
app/common/title.js | Right-Men/Ironman | /**
* Created by fandongyang on 2016/11/28.
*/
'use strict';
import React, { Component } from 'react';
import {
View,
Text,
Image,
StyleSheet,
TouchableOpacity,
Dimensions
} from 'react-native';
const {Width} = Dimensions.get('window')
export default class Title extends React.Component {
... |
app/components/Showcase/index.js | juanda99/arasaac-frontend | /**
*
* Showcase
*
*/
import React from 'react'
import PropTypes from 'prop-types'
import { FormattedMessage } from 'react-intl'
import FullWidthSection from 'components/FullWidthSection'
import { IMAGES_URL, PICTOGRAMS_URL } from 'services/config'
import H2 from 'components/H2'
import messages from './messages'
impor... |
scegratoo/public/scripts/services/treenode.js | despairblue/scegratoo3 | require('./project')
require('./moveables')
require('./x3d')
const {
FileReader
} = window
import angular from 'angular'
import React from 'react'
import {
eq,
flatten,
mergeAll,
complement,
pipe,
filter,
map,
prop,
toLower,
mapObjIndexed
} from 'ramda'
import TreeNodeAttributeList from './treen... |
src/js/views/Details/Details.js | TheoZimm/SaltyDashboard | import React from 'react';
import Box from 'grommet/components/Box';
import Header from '../../components/Header/';
import ProjectDetails from '../../components/ProjectDetails/';
import axios from 'axios';
class Details extends React.Component {
constructor(props) {
super(props);
this.state = {
... |
src/client/container/quizz/QuizzCreator.js | JulienPradet/quizzALJP | import React from 'react'
import { Map } from 'immutable'
import QuizzForm from './QuizzForm'
import ImportQuizzForm from './ImportQuizzForm'
import ExportQuizzForm from './ExportQuizzForm'
import QuizzCreatorManager from './QuizzCreatorManager'
export default class QuizzCreator extends React.Component {
constructor... |
node_modules/bs-recipes/recipes/webpack.react-hot-loader/app/js/main.js | thuongho/dream-machine | import React from 'react';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
React.render(<HelloWorld />, document.getElementById('react-root'));
|
src/VariantProvider.js | a-type/studs | import React from 'react';
import PropTypes from 'prop-types';
import { CONTEXT_KEY, contextType } from './connectVariants';
import _ from 'lodash';
export default class VariantProvider extends React.Component {
static propTypes = {
variants: PropTypes.oneOfType([
PropTypes.string,
PropTypes.arrayOf(... |
analysis/demonhunterhavoc/src/modules/talents/MasterOfTheGlaives.js | anom0ly/WoWAnalyzer | import SPELLS from 'common/SPELLS';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import Events from 'parser/core/Events';
import STATISTIC_ORDER from 'parser/ui/STATISTIC_ORDER';
import TalentStatisticBox from 'parser/ui/TalentStatisticBox';
import React from 'react';
/**
* Example Report: https:... |
app/javascript/mastodon/features/reblogs/index.js | mimumemo/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from '../../components/loading_indicator';
import { fetchReblogs ... |
src/examples/4/Counter.js | low-ghost/react-rx-elm-architecture | import React from 'react';
import { render } from 'react-dom';
import R from 'ramda';
import { dispatch, createReducer } from './startApp';
// type alias Model = Int
// init : Int -> Model
export const init = R.identity;
//type Action = Increment | Decrement
const INCREMENT = 'INCREMENT';
const DECREMENT = 'DECREMENT... |
website/src/components/juniper.js | explosion/spaCy | import React from 'react'
import PropTypes from 'prop-types'
import CodeMirror from 'codemirror'
import python from 'codemirror/mode/python/python' // eslint-disable-line no-unused-vars
import { Widget } from '@phosphor/widgets'
import { Kernel, ServerConnection } from '@jupyterlab/services'
import { OutputArea, Output... |
actor-apps/app-web/src/app/utils/require-auth.js | fengshao0907/actor-platform | import React from 'react';
import LoginStore from 'stores/LoginStore';
export default (Component) => {
return class Authenticated extends React.Component {
static willTransitionTo(transition) {
if (!LoginStore.isLoggedIn()) {
transition.redirect('/auth', {}, {'nextPath': transition.path});
}... |
app/user/profile/ProfileSkillList.js | sagnikm95/internship-portal | import React from 'react';
import Axios from 'axios';
import PropTypes from 'prop-types';
import { Divider } from 'semantic-ui-react';
import Auth from '../../auth/modules/Auth';
import User from '../../auth/modules/User';
import ProfileSkillListItem from './ProfileSkillListItem';
import EditableProfileSkillListItem fr... |
app/javascript/mastodon/components/display_name.js | primenumber/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { autoPlayGif } from 'mastodon/initial_state';
export default class DisplayName extends React.PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,
oth... |
src/components/image/img.js | awaseem/Jam | import React from 'react';
import ReactDom from 'react-dom';
import anime from 'animejs';
import styles from '../../css/skeleton.css';
class Img extends React.Component {
constructor(props) {
super(props);
this.loaded = this.loaded.bind(this);
}
loaded() {
anime({
targets: ReactDom.findDOMNode... |
src/desktop/apps/auction/components/layout/auction_info/AuctionInfoMobile.js | kanaabe/force | import * as appActions from 'desktop/apps/auction/actions/app'
import InfoIcon from '../../../../../components/main_layout/public/icons/info-2.svg'
import PropTypes from 'prop-types'
import React from 'react'
import Registration from './Registration'
import block from 'bem-cn-lite'
import { connect } from 'react-redux'... |
tests/Rules-isUrl-spec.js | RMSAuto/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/parser/druid/balance/modules/features/Checklist/Module.js | FaideWW/WoWAnalyzer | import React from 'react';
import BaseModule from 'parser/shared/modules/features/Checklist2/Module';
import CastEfficiency from 'parser/shared/modules/CastEfficiency';
import Combatants from 'parser/shared/modules/Combatants';
import PreparationRuleAnalyzer from 'parser/shared/modules/features/Checklist2/PreparationR... |
test/test_helper.js | josebigio/PodCast | 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/ContactBox.js | nm-t/STS | import React from 'react';
import InfoBox from './InfoBox';
const ContactBox = ({open, onRequestClose}) => (
<InfoBox title="Contact" open={open} onRequestClose={onRequestClose}>
<h3>Problem owner</h3>
Dr. Tibor Schuster: <a href="mailto:tibor.schuster@mcri.edu.au">tibor.schuster@mcri.edu.au</a>
<h3>Dev... |
node_modules/rc-animate/es/Animate.js | scaulfield01/HallHorn | import _extends from 'babel-runtime/helpers/extends';
import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possib... |
js/components/CSLoadingView.js | kilimondjaro/react-native-couchsurfing-app | // @flow
import React from 'react';
import {
View,
Image,
StyleSheet,
} from 'react-native';
function CSLoadingView() {
return (
<View style={styles.container}>
<Image source={require('./img/logo.png')} />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignIte... |
src/observer.js | ConrabOpto/komx-react | import React, { Component } from 'react';
import ko from 'knockout';
const reactiveMixin = {
componentWillMount() {
const initialName = this.displayName
|| this.name
|| (this.constructor && (this.constructor.displayName || this.constructor.name))
|| "<component>";
... |
stories/components/profile/index.js | NestorSegura/operationcode_frontend | import React from 'react';
import { storiesOf } from '@storybook/react';
import Profile from 'scenes/home/profile/profile';
// import blocJpg from '../../asset/bloc.jpg';
storiesOf('scenes/home/profile', module)
.add('Not Verified', () => <Profile />)
.add('Verified', () => <Profile verified />);
|
packages/icons/src/dv/Azure.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function DvAzure(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M28.313 25.94c1.725 0 3.018 1.15 3.018 2.876 0 1.725-1.293 3.018-2.875 3.018-1.293 0-2.3-.718-2.731-1.725H8.619C4.45 30.11 1 26.803 1 22.491c0-4.313 3.... |
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/State.js | TiddoLangerak/flow | // @flow
import React from 'react';
class MyComponent extends React.Component {
props: Props;
state: State = {};
defaultProps: T;
static props: T;
static state: T;
a: T;
b = 5;
c: T = 5;
method() {}
}
const expression = () =>
class extends React.Component {
props: Props;
state: State = {... |
src/components/RoutineDetails.js | snsavage/timer-react | import React from 'react';
import PropTypes from 'prop-types';
import { Segment, Icon } from 'semantic-ui-react';
const RoutineDetails = ({routine}) => {
const { description, link } = routine;
const privacy = (
<p>
Privacy Setting: { routine.public ? "Public" : "Private" }
</p>
);
... |
modules/core/examples/mars-tencent/index.android.js | Caijiacheng/react-native-mars | /**
* @flow
*/
'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
} from 'react-native';
import MarsNavigator from './MarsNavigator';
class App extends Component {
render() {
return (
<MarsNavigator />
)
}
}
AppRegistry.registerComponent('example', () => App); |
src/svg-icons/action/offline-pin.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionOfflinePin = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm5 16H7v-2h10v2zm-6.7-4L7 10.7l1.4-1.4 1.9 1.9 5.3-5.3L17 7.3 10.3 14z"/>
</SvgIcon>
... |
src/components/Root.js | danpersa/remindmetolive-react | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import ScrollToTop from './ScrollToTop';
import App from './App';
import GoogleAnalytics from './GoogleAnalytics';
import { Router } from 'react-router-dom';
export default class Root extends Component... |
examples/huge-apps/routes/Course/routes/Assignments/components/Assignments.js | apoco/react-router | import React from 'react';
class Assignments extends React.Component {
render () {
return (
<div>
<h3>Assignments</h3>
{this.props.children || <p>Choose an assignment from the sidebar.</p>}
</div>
);
}
}
export default Assignments;
|
docs/src/CollapsiblesPage.js | jsbranco/react-materialize | import React from 'react';
import Row from '../../src/Row';
import Col from '../../src/Col';
import ReactPlayground from './ReactPlayground';
import PropTable from './PropTable';
import store from './store';
import Samples from './Samples';
import collapsible from '../../examples/Collapsible';
class CollapsiblesPage e... |
website/modules/examples/PreventingTransitions.js | d-oliveros/react-router | import React from 'react'
import {
BrowserRouter as Router,
Route,
Link,
Prompt
} from 'react-router-dom'
const PreventingTransitionsExample = () => (
<Router>
<div>
<ul>
<li><Link to="/">Form</Link></li>
<li><Link to="/one">One</Link></li>
<li><Link to="/two">Two</Link></li... |
src/BootstrapMixin.js | jakubsikora/react-bootstrap | import React from 'react';
import styleMaps from './styleMaps';
import CustomPropTypes from './utils/CustomPropTypes';
const BootstrapMixin = {
propTypes: {
/**
* bootstrap className
* @private
*/
bsClass: CustomPropTypes.keyOf(styleMaps.CLASSES),
/**
* Style variants
* @type {("... |
app/components/Header/index.js | josh-butler/react-bp-demo | import React from 'react';
import { FormattedMessage } from 'react-intl';
import A from './A';
import Img from './Img';
import NavBar from './NavBar';
import HeaderLink from './HeaderLink';
import Banner from './banner.jpg';
import messages from './messages';
class Header extends React.Component { // eslint-disable-l... |
src/pages/ssp.js | codenetwork/CodeNetwork.co | import React from 'react'
import Layout from '../components/layout'
import styled from 'styled-components'
import RulesContainer from '../components/rulesContainer'
const Container = styled(RulesContainer)`
.terminology {
display: flex;
div {
margin-right: 2rem;
}
}
`
const RulesPage = () => (
... |
app/components/SimilarProductsDialog.js | Byte-Code/lm-digitalstore | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { fromJS, List, Map } from 'immutable';
import Dialog from 'material-ui/Dialog';
import Slick from 'react-slick';
import glamorous from 'glamorous';
import SimilarProductBadg... |
ui/src/components/identity/login/index.js | TransSponsor/trans-sponsor | import FullLogo from 'icons/full_logo';
import PropTypes from 'prop-types';
import React from 'react';
import withField from 'hocs/with_field';
import { Field } from 'redux-form';
import { PrimaryButton } from 'components/shared/buttons';
import { InlineErrorNotification } from 'components/shared/inline_notifications';... |
packages/playground/stories/Tether.story.js | appearhere/bloom | import React from 'react';
import { storiesOf } from '@storybook/react';
import {
Tether,
TETHER_VERTICAL_ATTACHMENTS,
TETHER_HORIZONTAL_ATTACHMENTS
} from '@appearhere/bloom';
const tetherStories = storiesOf('Tether', module)
.add('Tether left top', () => (
<div
style={{
marginTop: '10rem',
... |
src/components/Friends-star-v2.js | CodingJoker/h5-platform | /*
* @Author: jumorzhu@tecent.com
* @Date: 2016-12-05 17:39:57
* @Last Modified by: jumorzhu
* @Last Modified time: 2016-12-15 18:40:56
*/
'use strict';
require('normalize.css/normalize.css');
require('styles/App.scss');
require('styles/friendstarv2.scss');
import ImagePreview from './mlib/image-preview.js';
impo... |
component/navigation.js | jstogether/jstogether | import React from 'react'
import Component from './component';
import AppActions from '../action/app';
export default class Navigation extends Component {
/**
*
*/
render () {
return (
<div className='navigation'>
<span onClick={this.onNavigate('projects')}>{'Projects'}</span>
<span onClick={this.o... |
src/Viewport/ViewportOrientation.js | jaredlunde/react-cake | import React from 'react'
import PropTypes from 'prop-types'
import {setOrientation} from '../ImageStat'
import {win, winScreen} from './statics'
import ViewportSize from './ViewportSize'
/**
<ViewportOrientation>
{
({width, height, aspect, orientation, screenOrientation}) => (
<Row
bg='translucen... |
src/components/TodoFilter.js | FrozenTear7/student-life-organizer | import React from 'react'
const TodoFilter = ({ filter, onTodoShowAllClick, onTodoShowHighPriorityClick, onTodoShowLowPriorityClick }) => {
return (
<div className='container'>
<button
onClick={() => onTodoShowAllClick()}
className='btn btn-info btn-sm'
... |
examples/IconPrefixesInput.js | 15lyfromsaturn/react-materialize | import React from 'react';
import Input from '../src/Input';
import Row from '../src/Row';
import Icon from '../src/Icon';
export default
<Row>
<Input s={6} label="First Name" validate><Icon>account_circle</Icon></Input>
<Input s={6} label="Telephone" validate type='tel'><Icon>phone</Icon></Input>
</Row>;
|
docs/src/examples/modules/Modal/Content/ModalExampleContentImage.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Button, Image, Modal } from 'semantic-ui-react'
function ModalExampleContentImage() {
const [open, setOpen] = React.useState(false)
return (
<Modal
onClose={() => setOpen(false)}
onOpen={() => setOpen(true)}
open={open}
trigger={<Button>Show Modal</Bu... |
src/Table.js | BespokeInsights/react-bootstrap | import React from 'react';
import classNames from 'classnames';
const Table = React.createClass({
propTypes: {
striped: React.PropTypes.bool,
bordered: React.PropTypes.bool,
condensed: React.PropTypes.bool,
hover: React.PropTypes.bool,
responsive: React.PropTypes.bool
},
getDefaultProps() {
... |
src/components/App.js | jlekas/Site | import '../assets/stylesheets/base.scss';
import React, { Component } from 'react';
import PageContainer from './PageContainer.js';
import Navbar from './Navbar.js';
import Contact from './Contact.js';
class App extends Component {
render() {
var img = "https://upload.wikimedia.org/wikipedia/commons/1/13/CMU_Ham... |
src/compontents/Title.js | karki011/karki011.github.io | import React from 'react';
const Title = () => (
<div>
<h1 className="title-container__title">Weather Finders</h1>
<p className="title-container__subtitle">Find out temperature, conditions and more...</p>
</div>
);
export default Title; |
app/components/DraggableView/index.js | Thinkmill/react-conf-app | // @flow
import React, { Component } from 'react';
import { Animated, PanResponder } from 'react-native';
const SWIPE_THRESHOLD = 80;
export default class DraggableView extends Component {
props: {
allowX: boolean,
allowY: boolean,
onMove?: () => mixed,
onRelease: () => mixed,
children?: Array<R... |
src/svg-icons/communication/contact-phone.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationContactPhone = (props) => (
<SvgIcon {...props}>
<path d="M22 3H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-... |
examples/huge-apps/components/App.js | tikotzky/react-router | import React from 'react';
import Dashboard from './Dashboard';
import GlobalNav from './GlobalNav';
class App extends React.Component {
//static loadProps (params, cb) {
//console.log('App');
//cb(null, { courses: COURSES });
//}
render () {
//var { courses } = this.props;
var courses = COURSE... |
src/components/GoogleAnalytics.js | danpersa/remindmetolive-react | import React from 'react';
import PropTypes from 'prop-types';
import ReactGA from 'react-ga';
import { isDevelopment } from '../isomorphicVars';
class GoogleAnalytics extends React.Component {
componentDidMount() {
if (isDevelopment) {
return;
}
ReactGA.initialize('UA-65302999-1', {
debug: ... |
src/client/components/username.js | cheminfo/grm | 'use strict';
import React from 'react';
import agent from 'superagent';
export default React.createClass({
render() {
return (
<h2>
Hello {this.props.name} !
</h2>
);
}
});
|
test/regressions/site/src/index.js | und3fined/material-ui | // @flow weak
import { AppContainer } from 'react-hot-loader';
import RedBox from 'redbox-react';
import React from 'react';
import { render } from 'react-dom';
import webFont from 'webfontloader';
import App from './App';
const rootEl = document.getElementById('app');
function renderTree() {
render(
<AppConta... |
docs/app/Examples/collections/Form/States/FormExampleFieldDisabled.js | shengnian/shengnian-ui-react | import React from 'react'
import { Form } from 'shengnian-ui-react'
const FormExampleFieldDisabled = () => (
<Form>
<Form.Group widths='equal'>
<Form.Input label='First name' placeholder='Disabled' disabled />
<Form.Input label='Last name' placeholder='Disabled' disabled />
</Form.Group>
</Form... |
app/javascript/mastodon/features/notifications/components/grant_permission_button.js | im-in-space/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
export default class GrantPermissionButton extends React.PureComponent {
static propTypes = {
onClick: PropTypes.func.isRequired,
};
render () {
return (
<button className='text-btn colum... |
src/client/index.js | jmicmoore/merit-badge-university | import React from 'react';
import ReactDOM from 'react-dom';
import Routes from './routes';
import { Provider } from 'react-redux';
import store from './store';
renderApp(Routes);
function renderApp(Component) {
ReactDOM.render(
<Provider store={store}>
<Component/>
</Provider>,
... |
src/app/components/OneBlockCanvas.js | lubosz/tetris.js | /**
* Created by bmonkey on 8/31/15.
*/
import React from 'react';
import {nu} from '../logic';
import {drawPiece} from '../renderer';
class OneBlockCanvas extends React.Component {
constructor(props) {
super(props);
this.dy = 0;
this.dx = 0;
this.piece = null;
}
component... |
node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | clitrader/angular_quickstart | import React from 'react';
import { render } from 'react-dom';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
render(<HelloWorld />, document.getElementById('react-root'));
|
app/javascript/mastodon/components/autosuggest_hashtag.js | Kirishima21/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ShortNumber from 'mastodon/components/short_number';
import { FormattedMessage } from 'react-intl';
export default class AutosuggestHashtag extends React.PureComponent {
static propTypes = {
tag: PropTypes.shape({
name: PropTypes.string... |
src/Root.js | bryanmartin82/react-starter | import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { Router, Route, browserHistory} from 'react-router';
import HelloWorld from 'routes/HelloWorld/Component';
import './styles/base.scss';
export default class RootContainer extends Component {
render() {
const { store } = th... |
src/Table.js | carlosvega20/r-table | /* @flow */
import React from 'react'
import * as _ from 'lodash'
export type Data = [{[key: string]: number}]
export type Props = { data: Data }
const _uniqueKeys = (values: Data) => {
return _.union(...values.map(elm => Object.keys(elm)))
}
export default (props: Props) => {
return <table {..._.omit(props,... |
actor-apps/app-web/src/app/components/sidebar/ContactsSection.react.js | jiguoling/actor-platform | import _ from 'lodash';
import React from 'react';
import { Styles, RaisedButton } from 'material-ui';
import ActorTheme from 'constants/ActorTheme';
import ContactStore from 'stores/ContactStore';
import ContactActionCreators from 'actions/ContactActionCreators';
import AddContactStore from 'stores/AddContactStore'... |
src/components/Circle/Circle.js | Zoomdata/nhtsa-dashboard | import flowRight from 'lodash.flowright';
import React, { Component } from 'react';
import { observer, inject } from 'mobx-react';
class Circle extends Component {
render() {
const { store } = this.props;
const filterStatus = store.chartFilters.get('filterStatus');
return (
<div
className={... |
src/svg-icons/device/access-alarm.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceAccessAlarm = (props) => (
<SvgIcon {...props}>
<path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-... |
src/svg-icons/action/lock-open.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionLockOpen = (props) => (
<SvgIcon {...props}>
<path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 ... |
src/routes.js | thingswesaid/seed | import React from 'react';
import {IndexRoute, Route} from 'react-router';
import {
App,
NotFound,
Bean,
} from 'containers';
export default () => {
return (
<Route path="/" component={App}>
<IndexRoute component={Bean}/>
<Route path="*" component={NotFound} status={404} />
</Route>... |
src/Sections/ContactForm/index.js | rosudrag/PortofolioKasia | import React from 'react';
const ContactForm = (props) => {
return (
<div className="active-section" id="contact">
<section className="section-block">
<h4 className="title">Contact Information</h4>
<div className="row">
<div className="col-md-12">... |
modules/IndexLink.js | limarc/react-router | import React from 'react'
import Link from './Link'
const IndexLink = React.createClass({
render() {
return <Link {...this.props} onlyActiveOnIndex={true} />
}
})
export default IndexLink
|
docs/app/Examples/elements/Input/Variations/InputExampleIconProps.js | koenvg/Semantic-UI-React | import React from 'react'
import { Input } from 'semantic-ui-react'
const InputExampleIconProps = () => (
<Input
icon={{ name: 'search', circular: true, link: true }}
placeholder='Search...'
/>
)
export default InputExampleIconProps
|
app/components/P/P.js | stephencorwin/stephencorwin.me | import React from 'react';
import PropTypes from 'prop-types';
export const P = ({ children, className, ...props }) => (
<p className={className} {...props}>
{children}
</p>
);
P.propTypes = {
className: PropTypes.string,
children: PropTypes.node
};
P.defaultProps = {
className: '',
children: undefined
};
e... |
docs/components/Docs/Container/index.js | nfl/react-storybook | import PropTypes from 'prop-types';
import React from 'react';
import Nav from '../Nav';
import NavDropdown from '../Nav/dropdown';
import Content from '../Content';
import './style.css';
const getEditUrl = (selectedSectionId, selectedItemId) => {
const gitHubRepoUrl = 'https://github.com/storybooks/storybook';
co... |
app/javascript/mastodon/components/intersection_observer_article.js | h3zjp/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import scheduleIdleTask from '../features/ui/util/schedule_idle_task';
import getRectFromEntry from '../features/ui/util/get_rect_from_entry';
import { is } from 'immutable';
// Diff these props in the "rendered" state
const updateOnPropsForRendered = ['id... |
src/routes/RetailersMap/components/MapHeader/MapHeader.js | TheModevShop/craft-app | import React from 'react';
import Fuse from 'fuse.js';
import GetDistributorString from 'utility/GetDistributorString';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import {addEvent} from 'utility/ga.js';
import _ from 'lodash';
import Tappable from 'react-tappable';
import './map-header.les... |
codemods/react-codemod/transforms/__testfixtures__/class-flow2.input.js | rosswarren/atom-codemod | /* code taken from https://github.com/reactjs/react-router/blob/master/modules/IndexRoute.js */
/* @flow */
import React from 'react'
import warning from './routerWarning'
import invariant from 'invariant'
import { createRouteFromReactElement } from './RouteUtils'
import { component, components, falsy } from './Intern... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.