path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/app/components/player/duration-panel.js | feedm3/unhypem-frontend | /**
* @author Fabian Dietenberger
*/
'use strict';
import React from 'react';
import songDispatcher from '../../dispatcher/song-dispatcher';
class DurationLabel extends React.Component {
constructor(props) {
super(props);
this.state = {
duration: 0,
position: 0
}... |
src/components/Navlink.js | vinhnglx/Dzone-news | import React from 'react';
import { Link } from 'react-router';
class NavLink extends React.Component {
render() {
return <Link {...this.props} activeClassName="active" />
}
}
export default NavLink;
|
admin/client/App/screens/List/index.js | andrewlinfoot/keystone | /**
* The list view is a paginated table of all items in the list. It can show a
* variety of information about the individual items in columns.
*/
import React from 'react';
// import { findDOMNode } from 'react-dom'; // TODO re-implement focus when ready
import numeral from 'numeral';
import { connect } from 'rea... |
docs/src/app/components/pages/components/Drawer/ExampleUndocked.js | verdan/material-ui | import React from 'react';
import Drawer from 'material-ui/Drawer';
import MenuItem from 'material-ui/MenuItem';
import RaisedButton from 'material-ui/RaisedButton';
export default class DrawerUndockedExample extends React.Component {
constructor(props) {
super(props);
this.state = {open: false};
}
han... |
test/integration/css-fixtures/bad-custom-configuration-arr-1/pages/_app.js | zeit/next.js | import React from 'react'
import App from 'next/app'
import '../styles/global.css'
class MyApp extends App {
render() {
const { Component, pageProps } = this.props
return <Component {...pageProps} />
}
}
export default MyApp
|
src/components/MainNav/MainNav.js | thanhiro/tuha-ui-tpl | /* @flow */
import React from 'react';
import {IndexLink, Link} from 'react-router';
import {FormattedMessage} from 'react-intl';
import classes from './MainNav.scss';
import SelectionBar from './SelectionBar';
type Props = {
locale: string
}
let width = 50;
let naviItems = [
{path: '', transKey: 'home_title'},
... |
modules/dreamview/frontend/src/components/StatusBar/TrafficLightIndicator.js | ycool/apollo | import React from 'react';
const ColorCodeMapping = {
GREEN: 'rgba(79, 198, 105, 0.8)',
YELLOW: 'rgba(239, 255, 0, 0.8)',
RED: 'rgba(180, 49, 49, 0.8)',
BLACK: 'rgba(30, 30, 30, 0.8)',
UNKNOWN: 'rgba(30, 30, 30, 0.8)',
'': null,
};
export default class TrafficLightIndicator extends React.PureComponent {
... |
src/library/searchSuggestions/index.js | zdizzle6717/react-redux-arc | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import classNames from 'classnames';
import {Input} from '../../library/validations';
import {scrollUp, scrollDown} from '../utilities/scrollHelpers';
export default function(Service, method) {
let _keyChart = {
9: 'tab',
13: 'enter',
2... |
packages/react-vis/src/plot/xy-plot.js | uber-common/react-vis | // Copyright (c) 2016 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify... |
src/Select.js | MattMcFarland/react-select | import React from 'react';
import ReactDOM from 'react-dom';
import Input from 'react-input-autosize';
import classNames from 'classnames';
import stripDiacritics from './utils/stripDiacritics';
import Async from './Async';
import Option from './Option';
import Value from './Value';
const Select = React.createClass(... |
docs/app/Examples/views/Comment/Content/CommentExampleMetadata.js | vageeshb/Semantic-UI-React | import React from 'react'
import { Comment, Icon } from 'semantic-ui-react'
const CommentExampleMetadata = () => (
<Comment.Group>
<Comment>
<Comment.Avatar as='a' src='http://semantic-ui.com/images/avatar/small/stevie.jpg' />
<Comment.Content>
<Comment.Author>Stevie Feliciano</Comment.Author... |
src/components/ToDoItem.js | riandree/react-todo | import React from 'react';
import PropTypes from 'prop-types';
export const ToDoItem = (props) => {
const onChecked = () => props.checked(props.id);
const onDelete = () => props.deleteItem(props.id);
return (
<section className={ props.isChecked ? "item done" : "item"} >
<h3>{ props.hea... |
src/view/components/Script/index.js | airtoxin/AnyScript | import React from 'react';
import { Button } from 're-bulma';
import Input from '../Input';
import CodeScript from './CodeScript';
import UrlScript from './UrlScript';
import common from '../common.css';
export default ({ id, type, value, urlRegExp, onChange, onChangeUrlRegExp, onDelete }) => {
let ScriptComponent =... |
electron-app/src/core/navbar/NavBarComponent.js | deankevorkian/reddit-running-feed | /* @flow */
import React from 'react';
import {NavItem, Nav, Tab} from 'react-bootstrap';
import {LinkContainer} from 'react-router-bootstrap';
import MediaQuery from 'react-responsive';
import './NavBarComponent.css';
type Props = {
subreddits: string[]
};
type State = {
key: number
};
export default class NavB... |
src/pages/index.js | barrierandco/barrierandco | import React from 'react'
import Link from 'gatsby-link'
import styled from 'styled-components'
import CallToAction from '../components/cta'
import Cell from '../components/cell'
import Clarification from '../components/clarification'
import Download from '../components/download'
import Footer from '../components/foot... |
assets/javascripts/kitten/karl/pages/homepage/engagements-carousel/index.js | KissKissBankBank/kitten | import React from 'react'
import styled from 'styled-components'
import {
Container,
EngagementCardWithImage,
Carousel,
GUTTER,
pxToRem,
mediaQueries,
ScreenConfig,
} from 'kitten'
const engagementsData = [
{
bgImage: 'https://source.unsplash.com/random/200x120?kitten,1',
children: 'Autoproduct... |
src/client.js | timrcoulson/react-seed | /**
* THIS IS THE ENTRY POINT FOR THE CLIENT, JUST LIKE server.js IS THE ENTRY POINT FOR THE SERVER.
*/
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import createStore from './store/create';
import ApiClient from './helpers/ApiClient';
import io from 'socket.io-client';
import... |
packages/material-ui/src/BottomNavigation/BottomNavigationAction.js | cherniavskii/material-ui | // @inheritedComponent ButtonBase
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';
import ButtonBase from '../ButtonBase';
export const styles = theme => ({
root: {
transition: theme.transitions.create(['color', 'p... |
src/components/Header/Header.js | 3a-classic/score | import React from 'react'
import { IndexLink, Link } from 'react-router'
import classes from './Header.scss'
export const Header = () => (
<div>
<h1>React Redux Starter Kit</h1>
<IndexLink to='/' activeClassName={classes.activeRoute}>
Home
</IndexLink>
{' · '}
<Link to='/counter'... |
src/components/icons/LinkIcon.js | InsideSalesOfficial/insidesales-components | import React from 'react';
const LinkIcon = props => (
<svg {...props.size || { width: '24px', height: '24px' }} {...props} viewBox="0 0 24 24">
{props.title && <title>{props.title}</title>}
<path d="M0 0h24v24H0z" fill="none" />
<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 ... |
app/components/Indexbook.js | elevensky/bookstore | import React from 'react';
class Indexbook extends React.Component {
constructor(props) {
super(props);
}
render() {
let { author, name , imgsrc, isbn, descripe } = this.props;
return (
<div key={isbn} className='col-xs-3 col-sm-3 col-md-3'>
<div className='thumbnail fadeInUp animated'... |
templates/rubix/rubix-bootstrap/src/ModalDialog.js | jeffthemaximum/Teachers-Dont-Pay-Jeff | import React from 'react';
import classNames from 'classnames';
import BModalDialog from 'react-bootstrap/lib/ModalDialog';
export default class ModalDialog extends React.Component {
static propTypes = {
sm: React.PropTypes.bool,
lg: React.PropTypes.bool,
};
render() {
let props = {...this.props};
... |
server/sonar-web/src/main/js/apps/project-admin/quality-profiles/ProfileRow.js | Builders-SonarSource/sonarqube-bis | /*
* 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... |
src/js/components/icons/base/Close.js | linde12/grommet | // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... |
src/components/AbstractComponent.js | antonpkazakov/redux-app-controller | import React from 'react';
import ReduxAppController from './ReduxAppController';
import {Utils} from './Utils';
export default class AbstractComponent extends React.Component {
constructor() {
super();
this._element = null;
this.init = this.init.bind(this);
this.getDomElement = this.getDomElemen... |
src/esm/components/graphics/logos/kkbb-co/index.js | KissKissBankBank/kitten | import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["width", "height"];
import React from 'react';
import PropTypes from 'prop-types';
import { computeFromRatio } from '../../../../helpers/utils/ratio';
... |
blueocean-material-icons/src/js/components/svg-icons/action/payment.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ActionPayment = (props) => (
<SvgIcon {...props}>
<path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"/>
</SvgIcon>
);
ActionPayment.displayName = 'ActionPayment... |
src/cellars/CellarList.js | carab/Pinarium | import React from 'react'
import {observer} from 'mobx-react-lite'
import {Trans} from 'react-i18next/hooks'
import {Link} from '@reach/router'
import List from '@material-ui/core/List'
import ListItem from '@material-ui/core/ListItem'
import ListItemText from '@material-ui/core/ListItemText'
import ListItemSecondaryAc... |
src/components/LoadingSpinner/LoadingSpinner.js | taforyou/testtesttest-yo | import React from 'react'
import PropTypes from 'prop-types'
import CircularProgress from 'material-ui/CircularProgress'
import classes from './LoadingSpinner.scss'
export const LoadingSpinner = ({ size }) => (
<div className={classes.container}>
<div className={classes.progress}>
<CircularProgress mode='i... |
example/index.js | Stonelinks/react-toggle | import React from 'react'
import Toggle from '../index.es6'
// In your code this would be:
// import Toggle from 'react-toggle'
require("../style.less")
var App = React.createClass({
displayName: 'App',
getInitialState() {
return {
cheeseIsReady: false,
baconIsReady: false,
biscuitIsReady:... |
src/components/DonationReceipt.js | naitsirch/ecgpb-zuwendungsbestaetigungen | import React from 'react';
import T2W from 'numbers2words';
import PropTypes from 'prop-types';
import './DonationReceipt.css';
import CopyStamp from './CopyStamp.js';
import logoImg from '../img/logo.png';
import signatureImg from '../img/signature.png';
import { parseGermanDate } from './DateParser.js';
import { pars... |
app/javascript/mastodon/features/list_editor/components/search.js | imas/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { defineMessages, injectIntl } from 'react-intl';
import { fetchListSuggestions, clearListSuggestions, changeListSuggestions } from '../../../actions/lists';
import classNames from 'classnames';
import Icon from... |
client/index.js | Captain-Million/Captain-Million | /**
* Client entry point
*/
import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import App from './App';
import { configureStore } from './store';
// Initialize store
const store = configureStore(window.__INITIAL_STATE__);
const mountApp = document.getEleme... |
src/entry.js | jiadi0801/afreeca | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App.jsx';
import base from './assets/base.scss';
import iconfont from './assets/iconfont.css';
import appstyle from './assets/app.scss';
ReactDOM.render(
<App />,
document.querySelector('#app')
);
|
docs/src/pages/demos/tabs/IconTabs.js | cherniavskii/material-ui | import React from 'react';
import Paper from 'material-ui/Paper';
import Tabs, { Tab } from 'material-ui/Tabs';
import PhoneIcon from '@material-ui/icons/Phone';
import FavoriteIcon from '@material-ui/icons/Favorite';
import PersonPinIcon from '@material-ui/icons/PersonPin';
export default class IconTabs extends React... |
docs/src/NavMain.js | asiniy/react-bootstrap | import React from 'react';
import { Link } from 'react-router';
import Navbar from '../../src/Navbar';
import Nav from '../../src/Nav';
const NAV_LINKS = {
'introduction': {
link: 'introduction',
title: 'Introduction'
},
'getting-started': {
link: 'getting-started',
title: 'Getting started'
},
... |
app/javascript/mastodon/features/following/index.js | mecab/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from '../../components/loading_indicator';
import {
fetchAccount,
fetchFollowing,
expandFollowing,
} from '../../actions/account... |
examples/basic/app.js | jjmulenex/sdk | /** Very basic SDK application example.
*
* Contains a Map and demonstrates some of the dynamics of
* using the store.
*
*/
import {createStore, combineReducers, applyMiddleware} from 'redux';
import thunkMiddleware from 'redux-thunk';
import React from 'react';
import ReactDOM from 'react-dom';
import {Provi... |
src/routes/UIElement/layer/index.js | IssaTan1990/antd-admin | import React from 'react'
import { layer } from '../../../components'
import { Table, Row, Col, Button, Card } from 'antd'
let Enum = {
default: 1,
}
const IcoPage = () => {
const handleButtonClick = (key) => {
if (key === Enum.default) {
layer.open({
title: '默认弹层',
content: <div style={... |
react-native-kit/plist.js | fromatlantis/nojs | import React from 'react';
import {
View,
Text,
Image,
Navigator,
StyleSheet,
StatusBar,
TouchableOpacity,
Platform,
Dimensions
} from 'react-native';
import {
createNavigator,
createNavigationContainer,
TabRouter,
addNavigationHelpers,
StackNavigator
} from 'react-navigati... |
app/components/Room.js | LetSpotify/letspotify-client | import React, { Component } from 'react';
import styles from './Room.styl';
export default class Room extends Component {
constructor(props) {
super(props);
this.handleJoinRoom = this.handleJoinRoom.bind(this);
}
handleJoinRoom() {
this.props.joinRoom(this.props.rid);
}
render() {
return (... |
src/components/withViewport.js | sbassan/Kingsthorpe | /**
* 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 React, { Component } from 'react'; // eslint-disabl... |
React Native/Demos/OpenSourceDemo/index.ios.js | AngryLi/note | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
var Swiper = require('react-native-swiper');
import {
AppRegistry,
StyleSheet,
Text,
View,
Image
} from 'react-native';
class SwiperDemo extends Component{
render() {
... |
src/Async.js | OpenGov/react-select | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Select from './Select';
import stripDiacritics from './utils/stripDiacritics';
const propTypes = {
autoload: PropTypes.bool.isRequired, // automatically call the `loadOptions` prop on-mount; defaults to true
cache: PropTypes.a... |
src/containers/Login.js | dddhany/notes-app-client | import React, { Component } from 'react';
import { withRouter, } from 'react-router-dom';
import {
FormGroup,
FormControl,
ControlLabel,
} from 'react-bootstrap';
import {
CognitoUserPool,
AuthenticationDetails,
CognitoUser
} from 'amazon-cognito-identity-js';
import './Login.css';
import config from '../c... |
src/parser/deathknight/blood/modules/talents/RapidDecomposition.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS/index';
import calculateEffectiveDamage from 'parser/core/calculateEffectiveDamage';
import TalentStatisticBox from 'interface/others/TalentStatisticBox';
import STATISTIC_ORDER from 'interface/others/STATISTIC_ORD... |
apps/marketplace/components/Header/AdminHeaderActions.js | AusDTO/dto-digitalmarketplace-frontend | import React from 'react'
const AdminHeaderActions = () => (
<ul data-reactroot="" id="main-navigation" className="au-marketplace-header-inline-links">
<li>
<a href="/logout">Sign out</a>
</li>
</ul>
)
export default AdminHeaderActions
|
src/Switch/Switch.js | yurizhang/ishow | import React from 'react';
import PropTypes from 'prop-types';
import {default as Component,View} from '../Common/plugs/index.js'; //提供style, classname方法
import Transition from '../Message/transition';
import '../Common/css/Switch.css';
// type State = {
// value: boolean | number | string,
// coreWidth: number,... |
YEAR 3/SEM 1/MOBILE/mobile_exam_prep/screens/Experiment/ContestDetails/ContestContent.js | Zephyrrus/ubb | import React, { Component } from 'react';
import {
StyleSheet,
} from 'react-native';
import Markdown from 'rnmd';
import PropTypes from 'prop-types';
const rules = {
}
const styles = StyleSheet.create({
blockquoteText: {},
listUnorderedItemIcon: {
marginLeft: 10,
marginRight: 10,
... |
packages/veritone-widgets/src/widgets/EngineSelection/EngineListView/SelectedActionBar/index.js | veritone/veritone-sdk | import React from 'react';
import { arrayOf, string, number, func, bool } from 'prop-types';
import Button from '@material-ui/core/Button';
import IconButton from '@material-ui/core/IconButton';
import BackIcon from '@material-ui/icons/KeyboardBackspace';
import { makeStyles } from '@material-ui/styles';
import styles... |
src/components/TodoList.js | jhegedus42/egghead-redux-playaround | import type {TodoId} from '../state_types'
import React from 'react';
// @flow
// TodoList presentational component
const TodoReactElement = (props:{onClick:Function,completed:boolean,text:string}) : React$Element<any>=>(
<li onClick={props.onClick}
style ={{ textDecoration: props.completed ... |
src/components/Button/index.js | IntellectionStudio/intellection.kz | import {pure} from 'recompact';
import React from 'react';
import cx from 'classnames';
import styles from './index.css';
const Button = ({
params: {type, value, containerClassName, inputClassName},
}) => (
<div
className={cx(styles.root, {
[containerClassName]: !!containerClassName,
})}
>
<in... |
docs/app/Examples/addons/Confirm/Variations/index.js | vageeshb/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const ConfirmVariationsExamples = () => (
<ExampleSection title='Variations'>
<ComponentExample
title='Header'
descri... |
src/components/Counter.js | namelos/react-demo | import React, { Component } from 'react';
import Content from './Content';
export default class Counter extends Component {
constructor() {
super();
this.state = { counter: 0 }
}
handleClick = e =>
this.setState({ counter: this.state.counter + 1 });
render = () => <Content>
<h1 onClick={ thi... |
components/app_bar/AppBar.js | rubenmoya/react-toolbox | import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
import { themr } from 'react-css-themr';
import { APP_BAR } from '../identifiers';
import InjectIconButton from '../button/IconButton';
const factory = (IconButton) => {
class AppBar extends React.Component {
static propT... |
src/components/Feedback/Feedback.js | bogdosarov/link_share | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react';
import styles from './Feedback.css';
import withStyles from '../../decorators/withStyles';
@withStyles(styles)
class Feedback extends Component {
render() {
return (
<div className="Feedback... |
react-router/components/Routes.js | src-code/flux-examples | import React from 'react';
import { DefaultRoute, Route } from 'react-router';
import Application from './Application';
import Home from './Home';
import About from './About';
const routes = (
<Route name="app" path="/" handler={Application}>
<Route name="about" handler={About}/>
<DefaultRoute name... |
modules/IndexRoute.js | neebz/react-router | import React from 'react'
import invariant from 'invariant'
import warning from 'warning'
import { createRouteFromReactElement } from './RouteUtils'
import { component, components, falsy } from './PropTypes'
const { bool, func } = React.PropTypes
/**
* An <IndexRoute> is used to specify its parent's <Route indexRout... |
src/components/BlockContainer/index.js | iris-dni/iris-frontend | import React from 'react';
import styles from './block-container.scss';
const BlockContainer = ({ children }) => (
<div className={styles.root}>
{children}
</div>
);
export default BlockContainer;
|
src/routes/Counter/components/Counter.js | miyanokomiya/b-net | import React from 'react'
import PropTypes from 'prop-types'
export const Counter = ({ counter, increment, doubleAsync }) => (
<div style={{ margin: '0 auto' }} >
<h2>Counter: {counter}</h2>
<button className='btn btn-primary' onClick={increment}>
Increment
</button>
{' '}
<button className... |
index.js | vadirn/components-di | import PropTypes from 'prop-types';
import React from 'react';
import hoistStatics from 'hoist-non-react-statics';
const getDisplayName = Component => Component.displayName || Component.name || 'Component';
const isObject = item => typeof item === 'object' && item !== null && !Array.isArray(item);
// creates a new a... |
app/js/main.js | jjduhamel/koa-boilerplate | import React from 'react';
class Hello extends React.Component {
render() {
return <h1>Hello</h1>
}
}
class World extends React.Component {
render() {
return <h2>Koa</h2>
}
}
React.render(<Hello/>, document.getElementById('hello'));
React.render(<World/>, document.getElementById('world'));
|
src/components/SearchBar.js | apman/React_VideoPlayer-Exercise | import React, { Component } from 'react';
// REMEMBER: the addition of { Component } is equivalent to having another line:
// const Component = React.Component
// (allows us to reference Component directly everywhere (similar technique works with props))
// "class-based Component" allows us to keep track of s... |
fields/types/markdown/MarkdownField.js | sendyhalim/keystone | import Field from '../Field';
import React from 'react';
import { FormInput } from '../../../admin/client/App/elemental';
/**
* TODO:
* - Remove dependency on jQuery
*/
// Scope jQuery and the bootstrap-markdown editor so it will mount
var $ = require('jquery');
require('./lib/bootstrap-markdown');
// Append/remo... |
examples/demos/cultures.js | bluespore/react-big-calendar | import React from 'react';
import BigCalendar from 'react-big-calendar';
import events from '../events';
require('globalize/lib/cultures/globalize.culture.en-GB');
require('globalize/lib/cultures/globalize.culture.es');
require('globalize/lib/cultures/globalize.culture.fr');
require('globalize/lib/cultures/globalize.c... |
src/script/Content.js | phuongnd11/frequency-poc | import React from 'react';
import ListChannel from './ListChannel';
import ListVideo from './ListVideo';
class Content extends React.Component {
constructor(props) {
super(props);
this.state = {
videos: [],
};
this.fetchVideos = this.fetchVideos.bind(this);
}
fetchVideos(channelId) {
c... |
frontend/src/components/DisplayUrl.js | OpenCollective/opencollective-website | import React from 'react';
export function displayUrl(url) {
if (typeof url !== 'string') return '';
return url
.replace(/^https?:\/\/(www\.)?/,'')
.replace(/\/$/,'')
}
export default ({url}) => {
return (
<span><a href={url}>{displayUrl(url)}</a></span>
)
}; |
client/app/about/index.js | nebulae-io/coteries | import React, { Component } from 'react';
import styles from './style.scss';
import Flex from 'components/flex';
function mapStateToProps(state) {
return {};
}
function mapDispatchToProps(dispatch) {
return {
todoActions: bindActionCreators(todoActionCreators, dispatch),
counterActions: bindActionCreators... |
packages/material-ui-icons/src/Save.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let Save = props =>
<SvgIcon {...props}>
<path d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z" />
</SvgIcon... |
src/svg-icons/social/person-add.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialPersonAdd = (props) => (
<SvgIcon {...props}>
<path d="M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>
</... |
app/app.js | proProbe/jash.io | import React from 'react';
import ReactDOM from 'react-dom';
import Main from './components/main';
import Relay from 'react-relay';
class HomeRoute extends Relay.Route {
static routeName = 'Home';
static queries = {
store: (Component) => {
return Relay.QL`
query MainQuery {
store { ${Compon... |
packages/web/src/components/ErrorList.js | hwaterke/inab | import PropTypes from 'prop-types'
import React from 'react'
import {connect} from 'react-redux'
import {dismissErrors} from '../actions/error.js'
import {Section} from './presentational/atoms/Section'
class ErrorDialog extends React.Component {
static propTypes = {
errors: PropTypes.arrayOf(PropTypes.string).is... |
src/ButtonGroup.js | Sipree/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import bootstrapUtils, { bsClass } from './utils/bootstrapUtils';
import all from 'react-prop-types/lib/all';
import Button from './Button';
const ButtonGroup = React.createClass({
propTypes: {
vertical: React.PropTypes.bool,
justified: React.P... |
src/tabsets/notifs/RemoveItemFailNotif.js | dash-/netjumpio-tabs-web | ///
// Dependencies
///
import React, { Component } from 'react';
import FailRetryNotif from '../../elements/FailRetryNotif';
import * as actions from '../actions';
///
// View
///
class RemoveItemFailNotifView extends Component {
///
// Rendering
///
renderMessage(action, userMessage) {
return (
'Remov... |
src/containers/SearchNovelsResult.js | alphasp/pxview | import React, { Component } from 'react';
import { View, InteractionManager } from 'react-native';
import { connect } from 'react-redux';
import { connectLocalization } from '../components/Localization';
import NovelList from '../components/NovelList';
import NoResult from '../components/NoResult';
import * as searchNo... |
actor-apps/app-web/src/app/components/sidebar/RecentSectionItem.react.js | wangkang0627/actor-platform | import React from 'react';
import classNames from 'classnames';
import DialogActionCreators from 'actions/DialogActionCreators';
import DialogStore from 'stores/DialogStore';
import AvatarItem from 'components/common/AvatarItem.react';
class RecentSectionItem extends React.Component {
static propTypes = {
di... |
src/js/components/Image/stories/Fallback.js | HewlettPackard/grommet | import React from 'react';
import { Grommet, Image } from 'grommet';
import { grommet } from 'grommet/themes';
export const Fallback = () => (
<Grommet theme={grommet}>
<Image
fallback="//v2.grommet.io/assets/IMG_4245.jpg"
src="//v2.grommet.io/assets/IMG_4245_not_exists.jpg"
/>
</Grommet>
);
... |
renderer/pages/config.js | wulkano/kap | import React from 'react';
import {Provider} from 'unstated';
import {ipcRenderer as ipc} from 'electron-better-ipc';
import {ConfigContainer} from '../containers';
import Config from '../components/config';
import WindowHeader from '../components/window-header';
const configContainer = new ConfigContainer();
export... |
application/components/shared/popupNotifyOverlay/index.js | ronanamsterdam/squaredcoffee | import React, { Component } from 'react';
import { Text, View, ScrollView, Animated, Easing } from 'react-native';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import Button from 'react-native-button';
import AnimatedOverlay from 'react-native-animated-overlay';
import AppActio... |
examples/universal/client/index.js | Jyrno42/redux | import 'babel-core/polyfill';
import React from 'react';
import { Provider } from 'react-redux';
import configureStore from '../common/store/configureStore';
import App from '../common/containers/App';
const initialState = window.__INITIAL_STATE__;
const store = configureStore(initialState);
const rootElement = do... |
src/js/components/home.js | siunegu/react-fullstack-node-starter | import React from 'react';
import ReactDOM from 'react-dom';
import UserList from './userlist'
import UserForm from './userform'
class Home extends React.Component {
constructor() {
super();
}
render() {
return(
<div>
<h2>
This is a Home.
</h2>
<div>
<Us... |
node-react/client/src/index.js | FabioZTessitore/probability | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import MainController from './main_controller/MainController';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<MainController />, document.getElementById('root'));
registerServiceWorker();
|
node_modules/react-router/es/Prompt.js | paul-brabet/tinkerlist | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call &... |
src/renderer/Components/Sidebar.js | farnabaz/darling | 'use strict';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
class Sidebar extends Component {
constructor(props) {
super(props);
this.state = {
posts: []
};
darling.workspace.register((name) => {
switch (name) {
case 'blog-did-load':
this... |
app/javascript/mastodon/components/missing_indicator.js | TootCat/mastodon | import React from 'react';
import { FormattedMessage } from 'react-intl';
const MissingIndicator = () => (
<div className='missing-indicator'>
<div>
<FormattedMessage id='missing_indicator.label' defaultMessage='Not found' />
</div>
</div>
);
export default MissingIndicator;
|
src/table-body.js | knledg/react-blur-admin | import React from 'react';
export class TableBody extends React.Component {
render() {
return (
<tbody>
{this.props.children}
</tbody>
);
}
}
|
examples/todomvc/containers/Root.js | jstrimpel/redux | import React, { Component } from 'react';
import TodoApp from './TodoApp';
import { createStore, combineReducers } from 'redux';
import { Provider } from 'react-redux';
import rootReducer from '../reducers';
const store = createStore(rootReducer);
export default class Root extends Component {
render() {
return ... |
components/menu/Menu.js | KerenChandran/react-toolbox | import React from 'react';
import ReactDOM from 'react-dom';
import ClassNames from 'classnames';
import MenuItem from './MenuItem';
import { events, utils } from '../utils';
import style from './style.menu';
const POSITION = {
AUTO: 'auto',
STATIC: 'static',
TOP_LEFT: 'top-left',
TOP_RIGHT: 'top-right',
BOT... |
src/components/app/form/ImageGroup.js | teamNOne/showdown | import React from 'react';
import Dropzone from 'react-dropzone';
import '../../../styles/ImageGroup.css';
export default class ImageGroup extends React.Component {
render() {
return (
<div className={ `form-group ${ this.props.validationState }` }>
<label className='control-lab... |
src/App.spec.js | SteveHoggNZ/react-transform-boilerplate-tape-tests | import React from 'react';
import ReactDOM from 'react-dom';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import sd from 'skin-deep';
import $ from 'jquery';
import { render } from 'react-dom';
import { App, Counter } from './App';
import { NICE, SUPER_NICE } from './colors';
import test from 'tape';
test(... |
src/home/CaseCount.js | zhangxin840/mobile-env | import React, { Component } from 'react';
import _ from 'lodash';
var CaseCount = React.createClass({
getInitialState: function() {
return {};
},
componentDidMount: function() {
},
onClick: function() {
var evt = new CustomEvent('onCaseClick', {
detail: {
device: this.props.device,
... |
framework-examples/react/src/CheckboxLabel.js | Yizhachok/material-components-web | /**
* Copyright 2016 Google Inc. 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 appli... |
components/SetupScreen.js | sayakbiswas/Git-Blogger | import React from 'react';
import styles from '../styles/styles';
import globalVars from '../config/globalVars';
import PropTypes from 'prop-types';
import { Container } from 'semantic-ui-react';
function SetupScreen(props) {
return(
<Container text>
This is the setup screen!
</Container>
);
}
SetupScreen.pr... |
Project/src/containers/geolocation.js | Branimir123/Learning-React | import React from 'react';
import { Component } from 'react';
import { connect } from 'react-redux';
import fetchWeather from '../actions/index';
import { geolocated } from 'react-geolocated';
import { bindActionCreators } from 'redux';
class Geolocation extends Component {
constructor(props) {
super(props... |
examples/huge-apps/routes/Course/routes/Announcements/components/Sidebar.js | flocks/react-router | import React from 'react';
import { Link } from 'react-router';
export default class AnnouncementsSidebar extends React.Component {
static loadProps (params, cb) {
console.log('AnnouncementsSidebar', 'loadProps');
cb(null, {
announcements: COURSES[params.courseId].announcements
});
}
render (... |
node_modules/react-select/src/Value.js | mannyng/ceap | import React from 'react';
import classNames from 'classnames';
const Value = React.createClass({
displayName: 'Value',
propTypes: {
children: React.PropTypes.node,
disabled: React.PropTypes.bool, // disabled prop passed to ReactSelect
id: React.PropTypes.string, // Unique id ... |
app/javascript/mastodon/components/column.js | pso2club/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import detectPassiveEvents from 'detect-passive-events';
import { scrollTop } from '../scroll';
export default class Column extends React.PureComponent {
static propTypes = {
children: PropTypes.node,
label: PropTypes.string,
};
scrollTop (... |
frontend/src/components/ViewTrips/delete-trip-button.js | googleinterns/SLURP | import React from 'react';
import app from '../Firebase/';
import Button from 'react-bootstrap/Button';
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import * as DB from '../../constants/database.js';
const db = app.firestore();
// This constant determines the max number of docs deleted in a batc... |
frontend-app/welcome-app/header/welcome-parallax.js | easybird/easyblog | import React from 'react';
const WelcomeParallax = ({title, subTitle}) => (
<div className="container">
<h2 className="header">{title}</h2>
<h5 className="header">{subTitle}</h5>
</div>
);
export default WelcomeParallax; |
webapp/app/components/EditUser/Form/Buttons/index.js | EIP-SAM/SAM-Solution-Server | //
// Component email form in create user page
//
import React from 'react';
import { browserHistory } from 'react-router';
import { ButtonToolbar } from 'react-bootstrap';
import LinkContainerButton from 'components/Button';
import styles from 'components/EditUser/styles.css';
/* eslint-disable react/prefer-stateles... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.