path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
packages/with-debugger/demo/index.js | deepsweet/hocs | import React from 'react'
import { compose, withProps } from 'recompose'
import withDebugger from '../src/'
const Demo = () => (
<h1>Hi</h1>
)
export default compose(
withProps({ a: 1, b: 2, c: 3 }),
withDebugger
)(Demo)
|
packages/icons/src/restart.js | geek/joyent-portal | import React from 'react';
import Rotate from './rotate';
import calcFill from './fill';
export default ({
fill = null,
light = false,
disabled = false,
direction = 'down',
colors = {},
style = {},
...rest
}) => (
<Rotate direction={direction}>
{({ style: rotateStyle }) => (
<svg
xml... |
index.ios.js | thedgbrt/react-native-masonry | /**
* Masonry demo app
* @flow
*/
import React from 'react';
import { AppRegistry } from 'react-native';
import MasonryExample from './example';
AppRegistry.registerComponent('MasonryExample', () => MasonryExample);
|
src/library/validations/components/Form.js | zdizzle6717/react-redux-arc | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import classNames from 'classnames';
import FormActions from '../actions/FormActions';
const mapStateToProps = (state) => {
return {
'forms': state.forms
}
}
c... |
pootle/static/js/admin/general/components/ContentEditor.js | Yelp/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import React from 'react';
import CodeMirror from 'compon... |
src/svg-icons/action/thumbs-up-down.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionThumbsUpDown = (props) => (
<SvgIcon {...props}>
<path d="M12 6c0-.55-.45-1-1-1H5.82l.66-3.18.02-.23c0-.31-.13-.59-.33-.8L5.38 0 .44 4.94C.17 5.21 0 5.59 0 6v6.5c0 .83.67 1.5 1.5 1.5h6.75c.62 0 1.15-.38 1... |
client/src/components/Listing/AddListing/AddListingComponents/ListingTitle.js | Darkrender/raptor-ads | import React from 'react';
import { Form } from 'semantic-ui-react';
const ListingTitle = ({ title, onChange, getFormClass }) =>
<Form.Field className="ui center aligned grid">
<label>Title</label>
<input
placeholder="Insert title of job here"
name="title"
value={title}
onChange={e =>... |
public/js/pages/RegisterPage.js | JasonShin/HELP-yo | import React from 'react';
import { browserHistory, Link, withRouter } from 'react-router';
import { registerFirebase, loginFirebase } from '../api/student.api';
import { sendReminder } from '../api/reminder.api';
import FirebaseAPI from '../api/firebase.api';
import config from '../../config/config';
import Spinner f... |
examples/huge-apps/routes/Course/routes/Announcements/routes/Announcement/components/Announcement.js | bmathews/react-router | import React from 'react';
class Announcement extends React.Component {
//static loadProps (params, cb) {
//cb(null, {
//announcement: COURSES[params.courseId].announcements[params.announcementId]
//});
//}
render () {
//var { title, body } = this.props.announcement;
var { courseId, annou... |
src/dom-to-react/index.js | diva-e/dom-to-react | import React from 'react';
import noTextChildNodes from './noTextChildNodes';
import possibleStandardNames from './possibleStandardNames';
class Dom2React {
constructor(tests) {
this.tests = tests || [];
}
prepareChildren(childNodeList, level) {
const children = Array.prototype.slice.call(childNodeList... |
client/pages/UserProfile/UserProfile.js | jkettmann/universal-react-relay-starter-kit | import React from 'react'
import PropTypes from 'prop-types'
import { graphql } from 'react-relay'
import { fragment } from 'relay-compose'
import { compose, flattenProp } from 'recompose'
import Wrapper from './Wrapper'
const Profile = ({ firstName, lastName, email }) => (
<Wrapper>
<h2>Your Account</h2>
<... |
src/routes/home/index.js | KantanGroup/zuzu-sites | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Home from './Home';
i... |
src/svg-icons/content/next-week.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentNextWeek = (props) => (
<SvgIcon {...props}>
<path d="M20 7h-4V5c0-.55-.22-1.05-.59-1.41C15.05 3.22 14.55 3 14 3h-4c-1.1 0-2 .9-2 2v2H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2... |
node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | tomas70/zeal | 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/svg-icons/device/signal-wifi-2-bar-lock.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalWifi2BarLock = (props) => (
<SvgIcon {...props}>
<path d="M23 16v-1.5c0-1.4-1.1-2.5-2.5-2.5S18 13.1 18 14.5V16c-.5 0-1 .5-1 1v4c0 .5.5 1 1 1h5c.5 0 1-.5 1-1v-4c0-.5-.5-1-1-1zm-1 0h-3v-1.5c0-.8.7-1.5... |
spec/javascripts/jsx/external_apps/components/TextAreaInputSpec.js | djbender/canvas-lms | /*
* Copyright (C) 2014 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distribut... |
courses/react-for-beginners/src/components/Fish.js | rmartin/experiments | import React from 'react';
import { formatPrice } from '../helpers';
class Fish extends React.Component {
render(){
const { details, index } = this.props;
const isAvailable = details.status === 'available';
const buttonText = isAvailable ? 'Add to Order' : 'Sold Out!';
return(
... |
src/components/ZoneProposition.js | alexravs/midgar | import React from 'react';
import { getCountryLevels } from '../reducers/geojsons';
import _ from 'underscore';
import styled from 'styled-components';
const Wrapper = styled.div`
width: 100%;
border-radius: 5px;
border-left: 5px solid white;
padding: 10px;
&:hover {
border-left: 5px solid rgba(52, 152,... |
web/static/js/components/NoticesPage.js | ryo33/Yayaka19 | import React from 'react'
import { connect } from 'react-redux'
import { Header, Feed, Segment, Icon } from 'semantic-ui-react'
import UserID from './UserID.js'
import Time from './Time.js'
import { userPage } from '../pages.js'
import Post from './Post.js'
import UserButton from './UserButton.js'
import FollowButton... |
packages/app/app/components/Dashboard/BestNewMusicTab/index.js | nukeop/nuclear | import React from 'react';
import { Tab } from 'semantic-ui-react';
import _ from 'lodash';
import BestNewMusicMenu from './BestNewMusicMenu';
import BestNewMusicContent from './BestNewMusicContent';
import styles from './styles.scss';
class BestNewMusicTab extends React.Component {
constructor(props) {
super(p... |
demo/pages/ClientLoader.js | gearz-lab/react-vnav | import React from 'react';
import Router from 'react-router';
import Routes from '../Routes.js';
const ClientLoader = React.createClass({
render: function () {
let browserInitScriptObj = {
__html:`console.log('fuuuu');`
};
return (
<div>
<div id="c... |
storybook/config.js | 8796n/mastodon | import { configure, setAddon } from '@kadira/storybook';
import IntlAddon from 'react-storybook-addon-intl';
import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import { addLocaleData } from 'react-intl';
import en from 'react-intl/locale-data/en';
import '../app/javascript/styles/applicat... |
webpack/components/ActionableDetail.js | Katello/katello | import React from 'react';
import {
TextListItem,
TextListItemVariants,
Tooltip,
TooltipPosition,
Spinner,
} from '@patternfly/react-core';
import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons';
import PropTypes from 'prop-types';
import EditableTextInput from './EditableTextInput';
import Edi... |
docs/app/Examples/elements/Button/GroupVariations/ButtonExampleGroupSize.js | ben174/Semantic-UI-React | import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleGroupSize = () => (
<Button.Group size='large'>
<Button>One</Button>
<Button>Two</Button>
<Button>Three</Button>
</Button.Group>
)
export default ButtonExampleGroupSize
|
admin/client/App/shared/Popout/PopoutPane.js | vokal/keystone | /**
* Render a popout pane, calls props.onLayout when the component mounts
*/
import React from 'react';
import blacklist from 'blacklist';
import classnames from 'classnames';
var PopoutPane = React.createClass({
displayName: 'PopoutPane',
propTypes: {
children: React.PropTypes.node.isRequired,
className: Re... |
src/App.js | mtheoryx/tomato-timer | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
... |
app/javascript/mastodon/features/nicovideo/rankings/index.js | masarakki/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Column from '../../../components/column';
import ColumnHeader from '../../../components/column_header';
import RankingList from './list';
import { defi... |
ui/app/ui/signin-button.js | antono/ban-dong-dong | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { push } from 'react-router-redux';
import FlatButton from 'material-ui/FlatButton';
class SigninButton extends Component {
static muiName = 'FlatButton';
static propTypes = {
handleSignIn: React.PropTypes.func.isRequired
... |
test/test_helper.js | andela-hms/hali-anga | import _$ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import jsdom from 'jsdom';
import chai, { expect } from 'chai';
import chaiJquery from 'chai-jquery';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import... |
src/svg-icons/action/settings-input-hdmi.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsInputHdmi = (props) => (
<SvgIcon {...props}>
<path d="M18 7V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v3H5v6l3 6v3h8v-3l3-6V7h-1zM8 4h8v3h-2V5h-1v2h-2V5h-1v2H8V4z"/>
</SvgIcon>
);
ActionSettingsInputHd... |
examples/IconSizes.js | chris-gooley/react-materialize | import React from 'react';
import Section from '../src/Section';
import Icon from '../src/Icon';
import Row from '../src/Row';
import Col from '../src/Col';
export default
<Section>
<Row className='center'>
<Col s={3}>
<Icon tiny>insert_chart</Icon>
<p>tiny</p>
</Col>
<Col s={3}>
<Icon ... |
src-client/scripts/pack-auth-view.js | PaulRSwift/iLuggit | import React from 'react'
import Backbone from 'backbone'
import $ from 'jquery'
import ACTIONS from './ACTIONS.js'
const PackAuthView = React.createClass({
_submitLogin: function(evt){
console.log('evt', evt);
evt.preventDefault()
let newLogin = {
useruser: this.refs.user_name2... |
src/components/SaleDetail.js | wanliu/DataSync | import React from 'react';
import Currency from './Currency';
import moment from 'moment';
import numeral from 'numeral';
import formatCurrency from 'format-currency';
import DataTabler from './DataTabler';
import Table from './Table';
import NotificationSystem from 'react-notification-system';
import {API_SERVER} from... |
src/client/config/routes.js | vidaaudrey/trippian | import React from 'react'
import {
Router, Route, IndexRoute, browserHistory
}
from 'react-router'
import {
App, Home, About, JoinUs, NotFound, Press,
Destination, DestinationDetail, DestinationPost, Contact,
InquiryAdd, InquiryDetail, InquiryList,
Login, LoginWrapper, LoginSuccess, Logout,
PopularTrips, T... |
src/routes/admin/index.js | yvanwangl/UniversalBlog | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Layout from '../../co... |
docs/src/examples/elements/Button/Content/ButtonExampleConditionals.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleConditionals = () => (
<Button.Group>
<Button>Cancel</Button>
<Button.Or />
<Button positive>Save</Button>
</Button.Group>
)
export default ButtonExampleConditionals
|
packages/idyll-components/src/float.js | idyll-lang/idyll | import React from 'react';
class Float extends React.PureComponent {
render() {
return (
<div
className={`float ${this.props.position}`}
style={{
float: this.props.position,
width: this.props.width || '50%',
...this.props.style
}}
>
{this.... |
sources/js/search.js | streetlives/streetlivesnyc | 'use strict';
import React from 'react';
import { Locations } from './models.js';
import { Typeahead } from 'react-typeahead';
import _ from 'lodash';
import '../scss/search.scss';
module.exports.Search = React.createClass({
focus: function() {
var self = this;
setTimeout(function() {
self.r... |
app/components/AboutPageComponents/OurValues.js | rapicastillo/beautifulrising-client | /**
*
* AboutPageComponents
*
*/
import React from 'react';
import styled, {ThemeProvider} from 'styled-components';
import LanguageThemeProvider from 'components/LanguageThemeProvider';
import Markdown from 'react-remarkable';
import ContentBlock from 'components/ContentBlock';
import { FormattedMessage, injectIntl }... |
blueocean-material-icons/src/js/components/svg-icons/av/play-circle-filled.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const AvPlayCircleFilled = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z"/>
</SvgIcon>
);
AvPlayCircleFilled.displayName = 'AvPlayCircleFilled';
AvPlayCircleFi... |
src/routes/dashboardPages/processPending/processPending.js | bhavik3jain/LibertyMutual320Project | import React, { Component } from 'react';
import Panel from 'react-bootstrap/lib/Panel';
import Alert from 'react-bootstrap/lib/Alert';
import Button from 'react-bootstrap/lib/Button';
import OverlayTrigger from 'react-bootstrap/lib/OverlayTrigger';
import Tooltip from 'react-bootstrap/lib/Tooltip';
import Popover from... |
app/components/Header/index.js | ledminh/ledminh-home | /**
*
* Header
*
*/
import React from 'react';
// import styled from 'styled-components';
import LightUp from 'components/LightUp';
import Wrapper from './wrapper';
import Text from './text';
import messages from './messages';
function Header() {
return (
<Wrapper>
<Text center>
<LightUp>... |
src/routes.js | ferryhinardi/swapii_ass | import React from 'react';
import { Route, IndexRedirect } from 'react-router';
import App from './components/App';
import Films from './containers/Films';
import Film from './containers/Film';
import People from './containers/People';
import Person from './containers/Person';
import Planets from './containers/Planets... |
src/views/NewrecipeView.js | abachuk/fullbag-react-redux-dashboard | import React from 'react'
import {reduxForm} from 'redux-form'
import 'styles/core.scss'
import IngredientsForm from '../components/ingredients-fields'
// import Firebase from 'firebase'
// import constants from 'utils/constants'
// import { actions as authActions } from '../redux/modules/auth'
// import { connect } fr... |
src/hocs/withAppConfig/index.js | cantonjs/re-admin | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import hoist, { extractRef } from 'hocs/hoist';
export default function withAppConfig(mapConfig) {
return function createWithAppConfigComponent(WrappedComponent) {
@hoist(WrappedComponent)
class WithAppConfig extends Component {
stat... |
entry_types/scrolled/package/src/frontend/inlineEditing/DropTargets.js | tf/pageflow | import React from 'react';
import classNames from 'classnames';
import {useDrop} from 'react-dnd';
import styles from './DropTargets.module.css';
export function DropTargets({
accept,
canDrop,
onDrop
}) {
const [{canDropBefore, isBefore}, dropBefore] = useDrop({
accept,
canDrop: item => canDrop({at: '... |
src/components/Segment/index.js | r1cebank/react-native-boilerplate | import React from 'react';
import { TouchableOpacity, Platform } from 'react-native';
import { Components } from '../../global/globalIncludes';
const { Text } = Components.Text;
import Styles from './resources/styles';
class Segment extends React.Component {
static propTypes = {
isSelected: React.PropTy... |
src/Hero/HeroArticle.js | boldr/boldr-ui | /* @flow */
import React from 'react';
import styled from 'styled-components';
type Props = {
bgImg: ?string,
children: ReactChildren,
bgColor: ?string,
bgHeight: ?number,
};
const HeroArticle = (props: Props) => {
const BoldrHero = styled.div`
background-color: ${props.bgColor};
background-image: u... |
src/svg-icons/action/favorite.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFavorite = (props) => (
<SvgIcon {...props}>
<path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6... |
js/app.js | catalinmiron/react-boilerplate | import 'file?name=[name].[ext]!../serviceworker.js';
import 'file?name=[name].[ext]!../manifest.json';
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/serviceworker.js').then(function(registration) {
// Registration was successful
console.log('ServiceWorker registration successful with... |
admin/client/components/Popout.js | Redmart/keystone | import React from 'react';
import Portal from './Portal';
import Transition from 'react-addons-css-transition-group';
const sizes = {
arrowHeight: 12,
};
var Popout = React.createClass({
displayName: 'Popout',
propTypes: {
isOpen: React.PropTypes.bool,
onCancel: React.PropTypes.func,
onSubmit: React.PropType... |
actor-apps/app-web/src/app/components/Install.react.js | hzy87email/actor-platform | import React from 'react';
export default class Install extends React.Component {
render() {
return (
<section className="mobile-placeholder col-xs row center-xs middle-xs">
<div>
<img alt="Actor messenger"
className="logo"
src="assets/img/logo.png"
... |
src/decorators/ContextBoundDecorator.js | thomas-p-wilson/react-form | import React from 'react';
/**
* A helper function to retrieve a path within an object, yielding null if it
* cannot be retrieved.
* @param {Object} obj - The object to find the path in
* @param {String} path - The path to find within the object
* @returns {*} - The value of the path, or null if not found
*/
fun... |
node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | akre96/GeneDiagrams | 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/features/compose/components/autosuggest_account.js | kagucho/mastodon | import React from 'react';
import Avatar from '../../../components/avatar';
import DisplayName from '../../../components/display_name';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
export default class AutosuggestAccount extends Immuta... |
docs/src/app/components/pages/components/Dialog/ExampleCustomWidth.js | tan-jerene/material-ui | import React from 'react';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
import RaisedButton from 'material-ui/RaisedButton';
const customContentStyle = {
width: '100%',
maxWidth: 'none',
};
/**
* The dialog width has been set to occupy the full width of browser throug... |
lib/ui/components/Mimic.js | 500tech/bdsm | import React from 'react';
import { ThemeProvider } from 'styled-components';
import EVENTS from 'api/constants/events';
import LatestRequestNotifications from 'ui/components/LatestRequestNotifications';
import MimicControls from 'ui/components/BottomBar/MimicControls';
import QuickEdit from 'ui/components/QuickEdit/Qu... |
webApp/src/Components/BroadcastProfileViewEdit.js | s-law/silent-disco | import React from 'react';
// MATERIAL DESIGN CARD
import Card from 'material-ui/lib/card/card';
import CardActions from '../../node_modules/material-ui/lib/card/card-actions';
import CardText from '../../node_modules/material-ui/lib/card/card-text';
import CardTitle from '../../node_modules/material-ui/lib/card/card-... |
demo/menu/menu.js | eferte/react-mdl-1 | import React from 'react';
import IconButton from '../../src/IconButton';
import Menu, { MenuItem } from '../../src/Menu';
class Demo extends React.Component {
render() {
return (
<div style={{width: '300px', margin: 'auto', position: 'relative'}}>
<p>Lower left</p>
... |
blueocean-material-icons/src/js/components/svg-icons/device/battery-90.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const DeviceBattery90 = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V8h10V5.33z"/><path d="M7 8v12.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V8H7z"/>
</SvgI... |
src/icons/OpenWithIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class OpenWithIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M20 18h8v-6h6L24 2 14 12h6v6zm-2 2h-6v-6L2 24l10 10v-6h6v-8zm28 4L36 14v6h-6v8h6v6l10-10zm-18 6h-8v6h-6l1... |
app/javascript/mastodon/features/compose/components/autosuggest_account.js | mecab/mastodon | import React from 'react';
import Avatar from '../../../components/avatar';
import DisplayName from '../../../components/display_name';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
class AutosuggestAccount extends ImmutablePureComponen... |
ui/src/main/js/components/Time.js | crashlytics/aurora | import moment from 'moment';
import React from 'react';
export function RelativeTime({ ts }) {
return <span>{moment(ts).fromNow()}</span>;
}
|
demo/src/examples/AsyncGithubUserMentions.js | effektif/react-mentions | import React from 'react'
import { MentionsInput, Mention } from '../../../src'
import { provideExampleValue } from './higher-order'
import defaultStyle from './defaultStyle'
import defaultMentionStyle from './defaultMentionStyle'
function fetchUsers(query, callback) {
if (!query) return
fetch(`https://api.gith... |
src/js_src/index.js | hitz/python-flask-es-test | import React from 'react';
import { render } from 'react-dom';
import ReactApp from './reactApplication';
render(<ReactApp />, document.getElementById('app'));
|
components/react-semantify/src/commons/column.js | react-douban/douban-book-web | import React from 'react';
import ClassGenerator from '../mixins/classGenerator';
let defaultClassName = 'column';
const Column = React.createClass({
mixins: [ClassGenerator],
render: function () {
let {className, ...other} = this.props;
return (
<div {...other} className={this.getClassName(defa... |
app/javascript/mastodon/features/public_timeline/components/column_settings.js | tri-star/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, FormattedMessage } from 'react-intl';
import SettingToggle from '../../notifications/components/setting_toggle';
export default @injectIntl
class ColumnSettings extends React.... |
app/containers/HomePage/index.js | balintsoos/app.rezsi.io | /*
* HomePage
*
* This is the first thing users see of our App, at the '/' route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a necessity for you then you can refactor it and remove
* the l... |
src/routes/events/Event.js | zuban/edhunter | import React from 'react';
import PropTypes from 'prop-types';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './Styles.css';
import {
Container, Row, Col, Form, FormGroup, Label, Input, Button
} from 'reactstrap';
class Event extends React.Component {
static propTypes = {
title... |
src/app/components/AXLogo/index.js | mahimaag/react-web-boilerplate | import React from 'react';
import styles from './style.scss';
class AXLogo extends React.Component {
render() {
//const type = this.props.type;
return (
<div className="logo">
<h1 className="logo-text">awarwX</h1>
</div>
);
}
}
export default AXL... |
src/components/views/lists/CloudCastList.js | planlodge/soundmix | import React from 'react';
import MixView from '../items/MixView';
// Using "Stateless Functional Components"
export default function(props) {
//console.log("Ps", props);
return (
<MixView mixList={props.cloudcasts} />
);
} |
client/modules/Admin/components/AdminList/AdminList.js | lordknight1904/bigvnadmin | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { FormControl, Button, Table } from 'react-bootstrap';
import { getAdminSearch } from '../../AdminActions';
import { getAdmin, getSearch, getCurrentPage } from '../../AdminReducer';
import { getId... |
examples/counter/index.js | BayanGroup/redux | import React from 'react';
import Root from './containers/Root';
React.render(
<Root />,
document.getElementById('root')
);
|
packages/icons/src/sp/Facebook.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function SpFacebook(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M40.059 6H7.989A1.99 1.99 0 0 0 6 7.99v32.069c0 1.099.89 1.99 1.99 1.99h17.265v-13.96h-4.698v-5.44h4.698v-4.013c0-4.656 2.843-7.191 6.997-7.191 1.99... |
src/svg-icons/image/brush.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageBrush = (props) => (
<SvgIcon {...props}>
<path d="M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3zm13.71-9.37l-1.34-1.34c-.39-.39-1.02-.39-1.41 0L9 12.25... |
src/components/ListView.js | inProgress-team/react-native-meteor | 'use strict';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { ListView } from 'react-native';
import Data from '../Data';
export default class MeteorListView extends Component {
static propTypes = {
collection: PropTypes.string.isRequired,
selector: PropTypes.oneOfTyp... |
example/src/index.js | rauljordan/kynplex-component | import React from 'react';
import ReactDOM from 'react-dom';
import Scraper from '../../src/Scraper.jsx';
const success = (data) => {
alert('Worked!');
};
const failure = (err) => {
alert(`Error: ${err.reason}`);
};
window.onload = () => {
ReactDOM.render(
<Scraper
inputClass='scraper-input'
bu... |
src/List.js | iegik/react-autocomplete | import React from 'react';
import map from './map';
export default ({
items = [],
selectedIndex = -1,
getItemText = i => i,
renderItem = i => i,
onSelect = () => {},
...rest,
}) => items.length ? (
<div {...{...rest, className: 'react-dadata__suggestions'}}>
{map(items, (item, key) ... |
react/features/overlay/components/UserMediaPermissionsFilmstripOnlyOverlay.js | KalinduDN/kalindudn.github.io | import React, { Component } from 'react';
import { translate, translateToHTML } from '../../base/i18n';
import FilmstripOnlyOverlayFrame from './FilmstripOnlyOverlayFrame';
/**
* Implements a React Component for overlay with guidance how to proceed with
* gUM prompt. This component will be displayed only for films... |
style-guide/src/components/design-nav/design-nav.js | opentable/design-tokens | import React from 'react';
import { Link } from 'gatsby';
import styles from '../../styles/index.module.scss';
const isPartiallyActive = ({ isCurrent }) => {
return isCurrent ? { className: styles.linkActive } : null;
};
const NavLink = props => (
<div className={styles.navLink}>
<Link to={props.to} getProps={... |
tools/cli/templates/Page.js | thehig/arpggio-firebase-client | import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import Immutable from 'immutable';
import * as actions from './redux/actions';
export class ${PAGE_NAME} extends Component {
static propTypes = {
${CAM... |
src/main.js | ArcQ/stocks-on-stats | import React from 'react';
import ReactDOM from 'react-dom';
import createStore from './store/createStore';
import AppContainer from './containers/app-container';
import Routes from './routes';
import "babel-polyfill";
// ========================================================
// Store Instantiation
// ==============... |
src/components/Html.js | bmatthews/haze-lea | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-... |
src/components/Layout/Header.js | zhouchao0924/SLCOPY | import React from 'react'
import PropTypes from 'prop-types'
import { Menu, Icon, Popover } from 'antd'
import styles from './Header.less'
import Menus from './Menu'
const SubMenu = Menu.SubMenu
const Header = ({ user, logout, switchSider, siderFold, isNavbar, menuPopoverVisible, location, switchMenuPopover, navOpenK... |
ui-centric-question(react)/node_modules/react-router/es6/RouterContext.js | foobearer/code-challenge | var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _extends = Object.assign || function (target) { for (var i = 1; i < argum... |
src/svg-icons/editor/pie-chart-outlined.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorPieChartOutlined = (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 2zm1 2.07c3.61.45 6.48 3.33 6.93 6.93H13V4.07zM4 12c0-4.06 3.07-7.44 7-7.93v15.87c-... |
packages/xo-web/src/xo-app/host/tab-logs.js | vatesfr/xo-web | import _ from 'intl'
import Component from 'base-component'
import isEmpty from 'lodash/isEmpty'
import React from 'react'
import SortedTable from 'sorted-table'
import { createPager } from 'selectors'
import { Row, Col } from 'grid'
import { deleteMessage, deleteMessages } from 'xo'
import { FormattedRelative, Formatt... |
my-app1/src/components/UnitSelector/UnitSelector.js | rob-blackbourn/scratch-js | import React from 'react'
import PropTypes from 'prop-types'
export default class UnitSelector extends React.Component {
render() {
return (
<div>
<div>
<select>
{this.props.fromUnitSelector.domains.map(domain => (<option>{domain}</op... |
app/javascript/mastodon/features/community_timeline/index.js | codl/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import ColumnHeader from '../../components/column_header';
import {
refreshCommunityTimeline,
... |
addons/storyshots/stories/directly_required/index.js | enjoylife/storybook | import React from 'react';
import { storiesOf } from '@storybook/react'; // eslint-disable-line
import { action } from '@storybook/addon-actions'; // eslint-disable-line
import Button from './Button';
storiesOf('Another Button', module)
.add('with text', () => <Button onClick={action('clicked')}>Hello Button</Button... |
packages/react/.storybook/preview.js | carbon-design-system/carbon-components | /**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { addDecorator, addParameters } from '@storybook/react';
import addons from '@storybook/addons';
import { t... |
src/Panel/Item.js | szchenghuang/react-mdui | 'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import ClassNames from 'classnames';
class Item extends React.Component {
constructor( props ) {
super( props );
this.state = {
open: props.defaultOpen
};
}
componentDidMount() {
this.root.addEventListener( 'open... |
src/features/board/drag-marker.js | koscelansky/Dama | import React from 'react'
import PropTypes from 'prop-types'
import Circle from './circle'
const DragMarker = ({ type }) => {
const [color, shadow, opacity] = (() => {
switch (type) {
case 'can-drop': return ['red', '0px 0px 7px red', 1]
case 'can-drop-over': return ['red', '0px 0px 10px blue', 1]
... |
src/components/ControlSidebar/TabContent.js | falmar/react-adm-lte | import React from 'react'
import PropTypes from 'prop-types'
import TabContent from '../NavTab/TabContent'
const ControlSidebarTabContent = ({children}) => {
return (
<TabContent>
{children}
</TabContent>
)
}
ControlSidebarTabContent.propTypes = {
children: PropTypes.element
}
export default Con... |
frontend/src/components/frame/components/DrawerContent/components/TagListItemPres.js | jf248/scrape-the-plate | import React from 'react';
import * as Mui from '@material-ui/core';
import Label from '@material-ui/icons/Label';
const styles = () => ({
root: {},
});
TagListItemPres.defaultProps = {
record: {},
};
function TagListItemPres({ record, selected, onClick, ...rest }) {
return (
<Mui.ListItem
key={recor... |
src/parser/paladin/retribution/modules/core/Retribution.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import Events from 'parser/core/Events';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import { formatNumber, formatPercentage } from 'common/format';
import StatisticBox, { STATISTIC_ORDER } fr... |
src/js/components/widget/DevicePicker.js | kukua/dashboard | import _ from 'underscore'
import React from 'react'
import { connect } from 'react-redux'
import actions from '../../actions/deviceGroup'
import BaseWidget from './Base'
import { current as user } from '../../models/User'
import Checkbox from 'rc-checkbox'
import 'rc-checkbox/assets/index.css'
const mapStateToProps ... |
docs/src/examples/collections/Form/Content/FormExampleField.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Form } from 'semantic-ui-react'
const FormExampleField = () => (
<Form>
<Form.Field>
<label>User Input</label>
<input />
</Form.Field>
</Form>
)
export default FormExampleField
|
pootle/static/js/admin/components/ItemDelete.js | pavels/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import React from 'react';
const ItemDelete = React.crea... |
admin/client/App/elemental/ScreenReaderOnly/index.js | helloworld3q3q/keystone | import React from 'react';
import { css, StyleSheet } from 'aphrodite/no-important';
function ScreenReaderOnly ({ className, ...props }) {
props.className = css(classes.srOnly, className);
return <span {...props} />;
};
const classes = StyleSheet.create({
srOnly: {
border: 0,
clip: 'rect(0,0,0,0)',
height: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.