path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/JSONValueNode.js | alexkuz/react-json-tree | import React from 'react';
import PropTypes from 'prop-types';
/**
* Renders simple values (eg. strings, numbers, booleans, etc)
*/
const JSONValueNode = ({
nodeType,
styling,
labelRenderer,
keyPath,
valueRenderer,
value,
valueGetter
}) => (
<li {...styling('value', nodeType, keyPath)}>
<label {... |
src/svg-icons/action/dashboard.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionDashboard = (props) => (
<SvgIcon {...props}>
<path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"/>
</SvgIcon>
);
ActionDashboard = pure(ActionDashboard);
ActionDashboard.displayName... |
node_modules/_antd@2.13.4@antd/es/radio/group.js | ligangwolai/blog | 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/possibleConstructorReturn';
import _inherits from 'babel-run... |
frontend/app_v2/src/components/DashboardHome/DashboardHomePresentation.js | First-Peoples-Cultural-Council/fv-web-ui | import React from 'react'
import PropTypes from 'prop-types'
// FPCC
import DashboardTiles from 'components/DashboardTiles'
import { getMediaUrl } from 'common/urlHelpers'
function DashboardHomePresentation({ site, tiles, currentUser }) {
return (
<main id="DashboardHome">
<div className="max-w-3xl mx-aut... |
packages/react-server-website/pages/source.js | lidawang/react-server | import React from 'react';
import {ReactServerAgent, RootContainer} from 'react-server';
import SourceBody from '../components/source-body';
import PageTitle from '../components/page-title';
import SourceContents from '../components/source-contents';
import DataBundleCacheManager from '../middleware/DataBundleCache';
... |
test/unit/shared/routes-test.js | travi-org/admin.travi.org | import React from 'react';
import dom from 'react-dom';
import {Router, createMemoryHistory} from 'react-router';
import proxyquire from 'proxyquire';
import {assert} from 'chai';
suite('routes', () => {
const routes = proxyquire('../../../src/shared/routes', {
'./views/theme/wrap/component': {
default: ({... |
FirstRedux/src/components/TodoList/TodoList.js | Louis0503/TestRact | import React from 'react';
const TodoList = ({
todos,
onDeleteTodo,
}) => (
<div>
<ul>
{
todos.map((todo, index) => (
<li key={index}>
{todo.get('text')}
<button onClick={onDeleteTodo(index)}>Delete</button>
</li>
)).toJS()
}
</ul>
... |
src/containers/menuSections/numericIncrementorMenu.js | Harlantr/text-mod | import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { changeText } from '../../actions/actions';
import incrementors from '../../const/incrementors';
class NumericIncrementorMenu extends Component {
constructor (props) {
super(props)... |
front/src/components/auth-redirect/auth-redirect.js | kris71990/travelapp | import React from 'react';
import { connect } from 'react-redux';
import { Redirect } from 'react-router-dom';
import PropTypes from 'prop-types';
function AuthRedirect(props) {
const { token, location } = props;
let redirectRoute;
if (location.pathname === '/login' || location.pathname === '/signup' || loca... |
docs/public/static/examples/unversioned/tutorial/sharing-web-workaround.js | exponentjs/exponent | import React from 'react';
import { Image, Platform, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import * as ImagePicker from 'expo-image-picker';
import * as Sharing from 'expo-sharing';
import uploadToAnonymousFilesAsync from 'anonymous-files';
export default function App() {
let [selectedImage... |
examples/react/app/index.js | tcurdt/xstatic | import React from 'react'
import { render } from 'react-dom'
import configureStore from './store/configureStore'
import Root from './containers/Root'
const store = configureStore()
render(
<Root store={store} />,
document.getElementById('root'))
|
frontend/app/components/Loadable.js | briancappello/flask-react-spa | import React from 'react'
import Loadable from 'react-loadable'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { showLoading, hideLoading } from 'react-redux-loading-bar'
/**
* Provide an integration between react-loadable and react-redux-loading-bar
*
* The ProgressBar com... |
packages/veritone-react-common/src/components/Lozenge/index.js | veritone/veritone-sdk | import React from 'react';
import { string, node } from 'prop-types';
import indigo from '@material-ui/core/colors/indigo';
import { makeStyles } from '@material-ui/styles';
import styles from './styles';
const useStyles = makeStyles(styles);
const Lozenge = ({
children,
iconClassName,
backgroundColor,
textC... |
src/svg-icons/content/remove-circle-outline.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentRemoveCircleOutline = (props) => (
<SvgIcon {...props}>
<path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8... |
app/index.js | Thecontrarian/bmux | import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router } from 'react-router';
import routes from './routes';
import configureStore from './store/configureStore';
import './app.css';
const store = configureStore();
render(
<Provider store={store}>
<... |
src/index.js | mikeastock/LonelyKnight | import React from 'react';
import Board from './Board';
import { observe } from './Game';
const rootEl = document.getElementById('root');
observe(knightPosition =>
React.render(
<Board knightPosition={knightPosition}/>,
rootEl
)
);
|
resources/react/components/parts/schedule/ScheduleContentHeadingIcon.js | fetus-hina/stat.ink | import PropTypes from 'prop-types';
import React from 'react';
export default function ScheduleContentHeadingIcon (props) {
const { schedule } = props;
if (!schedule || !schedule.rule || !schedule.rule.icon) {
return null;
}
return (
<img src={schedule.rule.icon} className='mr-1' />
);
}
ScheduleC... |
app/index.js | willy-claes/django-react | import React from 'react'
import ReactDOM from 'react-dom'
import createStore from 'App/store'
import createRoutes from 'App/routes'
import AppContainer from 'App/containers/AppContainer'
const initialState = typeof window.__INITIAL_STATE__ === 'string' ?
JSON.parse(window.__INITIAL_STATE__) : window.__INITIAL_STAT... |
src/components/video_list.js | mrjkc/react-redux | import React from 'react';
import VideoListItem from './video_list_item';
const VideoList = (props) => {
const videoItems = props.videos.map((video) => {
return <VideoListItem key={video.etag} video={video} />
});
return (
<ul className="col-md-4 list-group">
{videoItems}
</ul>
);
};
export... |
app/javascript/mastodon/containers/mastodon.js | tootcafe/mastodon | import React from 'react';
import { Provider } from 'react-redux';
import PropTypes from 'prop-types';
import configureStore from '../store/configureStore';
import { BrowserRouter, Route } from 'react-router-dom';
import { ScrollContext } from 'react-router-scroll-4';
import UI from '../features/ui';
import { fetchCust... |
src/svg-icons/content/next-week.js | tan-jerene/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... |
client/containers/HomePage/__tests__/App.spec.js | Vandivier/document-hello-world-docker-test | import React from 'react';
import test from 'ava';
import sinon from 'sinon';
import { shallow, mount } from 'enzyme';
import { App } from '../App';
import styles from '../App.css';
import { intlShape } from 'react-intl';
import { intl } from '../../../util/react-intl-test-helper';
import { toggleAddPost } from '../App... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/RestAndDefault.js | scyankai/create-react-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
import Rea... |
src/svg-icons/image/healing.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageHealing = (props) => (
<SvgIcon {...props}>
<path d="M17.73 12.02l3.98-3.98c.39-.39.39-1.02 0-1.41l-4.34-4.34c-.39-.39-1.02-.39-1.41 0l-3.98 3.98L8 2.29C7.8 2.1 7.55 2 7.29 2c-.25 0-.51.1-.7.29L2.25 6.63c-... |
examples/official-storybook/stories/addon-measure/StackingLabels.stories.js | storybooks/storybook | import React from 'react';
import { Visualization } from '../../components/addon-measure/Visualization';
export default {
title: 'Addons/Measure/StackingLabels',
parameters: {
layout: 'fullscreen',
},
};
const Template = (args) => <Visualization {...args} />;
export const EverythingUniform = Template.bind(... |
src/components/Projects.js | jlekas/Site | import React from 'react';
import Youtube from 'react-youtube';
export default class Projects extends React.Component {
constructor(props) {
super(props);
this.state = {
projects: [
{
title:"Ramp",
descript:[
"Developed a peer to peer application in python that ... |
web/src/components/blog-post-preview-list.js | ajmalafif/ajmalafif.com | import {Link} from 'gatsby'
import React from 'react'
import BlogPostPreview from './blog-post-preview'
function BlogPostPreviewGrid (props) {
return (
<div>
{props.title && <h2>{props.title}</h2>}
<ul>
{props.nodes &&
props.nodes.map(node => (
<li
key={node... |
react-router-tutorial/lessons/14-whats-next/modules/routes.js | zerotung/practices-and-notes | import React from 'react'
import { Route, IndexRoute } from 'react-router'
import App from './App'
import About from './About'
import Repos from './Repos'
import Repo from './Repo'
import Home from './Home'
module.exports = (
<Route path="/" component={App}>
<IndexRoute component={Home}/>
<Route path="/repos... |
src/components/ViewMaster.js | pjkarlik/ReactUI | import React from 'react';
import { resolve } from '../styles';
export default class ViewMaster extends React.Component {
static displayName = 'ViewMaster';
static propTypes={
classes: React.PropTypes.object,
items: React.PropTypes.object,
};
constructor(props) {
super(props);
this.state = {
... |
docs-ui/components/detailedError.stories.js | gencer/sentry | import React from 'react';
import {storiesOf} from '@storybook/react';
import {action} from '@storybook/addon-actions';
import {withInfo} from '@storybook/addon-info';
import DetailedError from 'sentry-ui/errors/detailedError';
// eslint-disable-next-line
storiesOf('DetailedError', module)
.add(
'default',
... |
app/javascript/mastodon/features/ui/components/embed_modal.js | Arukas/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage, injectIntl } from 'react-intl';
import api from '../../../api';
@injectIntl
export default class EmbedModal extends ImmutablePureComponent {
static propTypes... |
src/svg-icons/hardware/headset.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareHeadset = (props) => (
<SvgIcon {...props}>
<path d="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-3.87 3.13-7 7-7s7 3.13 7 7v2h-4v8h3c1.66 0 3-1.34 3-3v-7c0-4.97-4.03-9-9-9z"/>
</SvgIcon>
... |
webpack/scenes/RedHatRepositories/components/RepositoryTypeIcon.js | tstrachota/katello | import React from 'react';
import PropTypes from 'prop-types';
import { ListView, OverlayTrigger, Tooltip } from 'patternfly-react';
import { getTypeIcon } from '../../../services/index';
export default class RepositoryTypeIcon extends React.Component {
constructor(props) {
super(props);
this.tooltipId = `... |
src/parser/deathknight/blood/modules/features/InitialMarrowrendCast.js | fyruna/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import Abilities from 'parser/core/modules/Abilities';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
class InitialMarrowrendCast extends Analyzer {
static dependencies = {
abilities: Abilities,
};
firstM... |
node_modules/@material-ui/core/esm/internal/svg-icons/IndeterminateCheckBox.js | pcclarke/civ-techs | import React from 'react';
import createSvgIcon from './createSvgIcon';
/**
* @ignore - internal component.
*/
export default createSvgIcon(React.createElement("path", {
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
}), 'IndeterminateCheckBox'); |
frontend/assets/js/components/Home.js | ianmilliken/rwf | /*
*
* FRONTEND
* components/Home.js
*
*/
import React from 'react';
import ItemList from './ItemList';
class Home extends React.Component {
constructor() {
super();
}
render() {
return (
<div>
Results
<ItemList />
</div>
)
}
}
export default Home;
|
src/index.js | almost/react-native-swiper | 'use strict'
/*
react-native-swiper
@author leecade<leecade@163.com>
*/
import React from 'react';
import {
StyleSheet,
Text,
View,
ScrollView,
TouchableOpacity,
Dimensions,
} from 'react-native'
// Using bare setTimeout, setInterval, setImmediate
// and requestAnimationFrame calls is very dangerous
// b... |
js/jqwidgets/demos/react/app/datatable/fluidsize/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxDataTable from '../../../jqwidgets-react/react_jqxdatatable.js';
class App extends React.Component {
render() {
let data = new Array();
let firstNames =
[
'Andrew', 'Nancy', 'Shelley', 'Regina', 'Yos... |
spec/javascripts/jsx/blueprint_courses/components/CourseFilterSpec.js | venturehive/canvas-lms | /*
* Copyright (C) 2017 - 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... |
pages/users/Users.js | mikayel/react-cv | 'use strict';
import './Users.css';
import React from 'react'
import Header from '../../components/header/Header';
import Navigation from '../../components/navigation/Navigation';
import Footer from '../../components/footer/Footer';
const Users = React.createClass({
render() {
return <div className="pa... |
app/javascript/mastodon/components/intersection_observer_article.js | mimumemo/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... |
httpdocs/theme/react/hooks-app/opendesktop-home/components/ChatContainer.js | KDE/ocs-webserver | import React, { Component } from 'react';
class ChatContainer extends Component {
constructor(props){
super(props);
this.chatUrl = '/json/chat';
this.avatarUrl= 'https://chat.opendesktop.org/_matrix/media/v1/thumbnail';
this.state = {items:[]};
}
componentDidMount() {
fetch(this.chatUrl)
... |
cdap-ui/app/cdap/components/CaskWizards/StreamCreateWithUpload/SchemaStep/index.js | caskdata/cdap | /*
* Copyright © 2016 Cask Data, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed t... |
js/components/Gallery.js | fractal-mind/portfolio | import React from 'react';
import GalleryCard from './GalleryCard';
class Gallery extends React.Component {
render(){
return(
<div className="galleryContainer container">
<p className="galleryHeader">Portfolio</p>
{this.props.list.map(site => <GalleryCard key={site.key} name={site.name} url=... |
client/src/index.js | compewter/VeAL | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
import 'semantic-ui-css/semantic.min.css';
import {Provider} from 'react-redux';
import configureStore from './store';
import initialState from './initialState'
ReactDOM.render(
<Provider store={configureStore... |
src/svg-icons/action/bug-report.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionBugReport = (props) => (
<SvgIcon {...props}>
<path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7... |
react-flux-mui/js/material-ui/docs/src/app/components/pages/components/Paper/Page.js | pbogdan/react-flux-mui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import paperReadmeText from './README';
import PaperExampleSimple from './Exampl... |
src/package/plugins/slate-alignment-plugin/AlignmentRightButton.js | abobwhite/slate-editor | import React from 'react'
import classnames from 'classnames'
import FontAwesome from 'react-fontawesome'
import { Button} from '../../components/button'
import { alignmentMarkStrategy, hasMark, getMark } from './AlignmentUtils'
const AlignmentRightButton = ({ state, onChange, changeState, className, style, type }) ... |
fields/components/DateInput__OLD.js | Pylipala/keystone | import moment from 'moment';
import Pikaday from 'pikaday';
import React from 'react';
import { FormInput } from 'elemental';
module.exports = React.createClass({
displayName: 'DateInput',
// set default properties
getDefaultProps: function() {
return {
format: 'YYYY-MM-DD'
};
},
getInitialState: fu... |
src/client.js | muriloreis/drfarm | /**
* 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 ReactDOM from 'react-... |
docs/app/Examples/views/Feed/Types/Basic.js | jamiehill/stardust | import React from 'react'
import { Feed } from 'stardust'
const { Content, Date, Event, Extra, Label, Like, Meta, Summary, User } = Feed
const Basic = () => {
return (
<Feed>
<Event>
<Label>
<img src='http://semantic-ui.com/images/avatar/small/elliot.jpg' />
</Label>
<Con... |
versions/3-redux/1-containers/client/src/components/Counter.js | hamczu/techsummit-web2016 | import React from 'react'
export default ({ onClick, count }) => (
<div>
<button onClick={onClick}>click me!</button>
<span>{count}</span>
</div>
)
|
app/index.js | JSVillage/military-families | import React from 'react';
import {render} from 'react-dom';
import {Router, hashHistory} from 'react-router';
import routes from './routes';
render(<Router history={hashHistory} routes={routes} />, document.getElementById('app'));
|
es/components/Chat/Markup/Link.js | welovekpop/uwave-web-welovekpop.club | import _extends from "@babel/runtime/helpers/builtin/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/builtin/objectWithoutProperties";
import React from 'react';
import PropTypes from 'prop-types';
import shortenUrl from 'shorten-url';
var Link = function Link(_ref) {
var children = _ref.child... |
lib/blocks/h2.js | pairyo/kattappa | import React from 'react';
import QuillComponent from '../components/quill';
import BlockText from './text';
class BlockH2 extends BlockText.React {
render() {
return (
<h2 className="katap-block katap-h2">
<QuillComponent
showToolbar={false}
formats={[]}
content={th... |
src/components/templates/ArtworkCreate/index.js | ygoto3/artwork-manager | // @flow
import React, { Component } from 'react';
import { ArtworkForm } from '../../molecules/ArtworkForm';
export type ArtworkCreateProps = {
createArtwork: (artwork: Artwork) => void;
};
const validators = {
title: (t) => t.value.length ? null : 'too short',
};
export class ArtworkCreate extends Component<... |
src/svg-icons/hardware/desktop-windows.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareDesktopWindows = (props) => (
<SvgIcon {...props}>
<path d="M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H3V4h18v12z"/>
</SvgIcon>
);
HardwareDesk... |
src/main.js | scubism/react_todo_web | /**
* App entry point
*/
// Polyfill
import 'babel-polyfill';
// Libraries
import React from 'react';
import ReactDOM from 'react-dom';
import { match, Router, browserHistory } from 'react-router';
import { Provider } from 'react-redux';
import { trigger } from 'redial';
// Routes
import Routes from './common/comp... |
springboot/GReact/src/main/resources/static/app/components/navigation/components/MinifyMenu.js | ezsimple/java | /**
* Created by griga on 11/30/15.
*/
import React from 'react'
let $body = $('body');
let MinifyMenu = React.createClass({
toggle: function () {
if (!$body.hasClass("menu-on-top")) {
$body.toggleClass("minified");
$body.removeClass("hidden-menu");
$('html').removeC... |
src/app/containers/HomeContainer.js | paulawasylow/e-commerce-react-app | import React, { Component } from 'react';
import { data } from '../API/data';
import ProductHomePage from '../components/ProductHomePage';
class HomeContainer extends Component {
static propTypes = {
products: React.PropTypes.array,
product: React.PropTypes.object
}
state = {
products: ... |
src/svg-icons/file/cloud-upload.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let FileCloudUpload = (props) => (
<SvgIcon {...props}>
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.... |
scripts/donationSettings.js | diakov2100/YaStreamDesktop | import React from 'react';
import ReactDOM from 'react-dom';
import DonationSettingsMain from '../views/donationSettings/donationSettingsMain.jsx'
const $ = require('./jquery.js')
const {ipcRenderer} = require('electron')
const remote = require('electron').remote
window.onload = function(){
ReactDOM.render(<Donat... |
admin/client/App/screens/Home/components/Section.js | trentmillar/keystone | import React from 'react';
import getRelatedIconClass from '../utils/getRelatedIconClass';
class Section extends React.Component {
render () {
const iconClass = this.props.icon || getRelatedIconClass(this.props.id);
return (
<div className="dashboard-group" data-section-label={this.props.label}>
<div class... |
chrome/extension/inject.js | tariksahni/scraper.ooo | import React, { Component } from 'react';
import { render } from 'react-dom';
import Dock from 'react-dock';
class InjectApp extends Component {
constructor(props) {
super(props);
this.state = { isVisible: false };
}
buttonOnClick = () => {
this.setState({ isVisible: !this.state.isVisible });
};
... |
docs/pages/api-docs/timeline-item.js | lgollut/material-ui | import React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown';
const pageFilename = 'api/timeline-item';
const requireRaw = require.context('!raw-loader!./', false, /\/timeline-item\.md$/);
export default function... |
RNComponents/template.js | Jonham/ReactNative-EnjoySuffering | // this file works as a template file for any new ReactNative component
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
export default class COMPONENT_NAME extends Component {
render() {
return (
<View style={styles.parent}>
<Text style={st... |
assets/js/components/StripEntities/index.js | mlapierre/Winds | import React from 'react'
var Entities = require('html-entities').AllHtmlEntities,
entities = new Entities(),
normalizeWhitespace = require('normalize-html-whitespace')
export default props => (
<span>
{entities.decode(normalizeWhitespace(props.children))}
</span>
)
require('./styles.scss')
|
src/svg-icons/action/view-headline.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionViewHeadline = (props) => (
<SvgIcon {...props}>
<path d="M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"/>
</SvgIcon>
);
ActionViewHeadline = pure(ActionViewHeadline);
ActionViewHeadline.d... |
src/routes/dashboard/components/numberCard.js | shaohuawang2015/goldbeans-admin | import React from 'react'
import PropTypes from 'prop-types'
import { Icon, Card } from 'antd'
import CountUp from 'react-countup'
import styles from './numberCard.less'
function NumberCard ({ icon, color, title, number, countUp }) {
return (
<Card className={styles.numberCard} bordered={false} bodyStyle={{ padd... |
source/Table/defaultHeaderRenderer.js | edulan/react-virtualized | /** @flow */
import React from 'react'
import SortIndicator from './SortIndicator'
import type { HeaderRendererParams } from './types'
/**
* Default table header renderer.
*/
export default function defaultHeaderRenderer ({
columnData,
dataKey,
disableSort,
label,
sortBy,
sortDirection
}: HeaderRendererP... |
admin/client/App/screens/List/index.js | danielmahon/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... |
react-router/components/Home.js | ybbkrishna/flux-examples | /**
* Copyright 2014, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
import React from 'react';
class Home extends React.Component {
render() {
return <p>Welcome to the site!</p>;
}
}
export default Home;
|
src/Button.entry.js | giovanni0918/react-component-catalog | import React from 'react';
import { render } from 'react-dom';
import Button from './components/Button/Button.js';
render(
<Button
className='Button Button--primary'
onClick={(event) => console.log('Button Button--primary')}
textContent='hello' />,
document.getElementById('Button')
); |
src/components/category/component/_category.js | chemoish/react-webpack | import React from 'react';
import Router from 'react-router';
var {Link} = Router;
export default React.createClass({
render() {
let category = this.props.category;
return (
<Link className="category" to="category" params={{slug: category.category}}>
<div className="ca... |
definitions/npm/react-i18next_v2.x.x/test_react-i18next_v2.x.x.js | doberkofler/flow-typed | // @flow
import React from 'react'
import {
loadNamespaces,
translate,
I18nextProvider,
Interpolate,
} from 'react-i18next'
import type { TFunction, Translator } from 'react-i18next'
const i18n = { loadNamespaces: () => {} };
<I18nextProvider i18n={ i18n } children={ <div /> } />;
// $ExpectError - missing ... |
src/js/Components/Chronometer.js | gabsprates/facomp-quiz | import React from 'react';
export default function Heart(props) {
const iconStyle = {
color: '#f11',
};
const divStyle = {
width: '50px',
height: '50px',
display: 'flex',
marginLeft: 'auto',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#f5f5f5'
};
retur... |
src/chatbot/Animatable.js | Endore8/i-chatbot | import React from 'react'
import { CSSTransition } from 'react-transition-group'
const Animatable = ({ children, ...props }) => (
<CSSTransition
{...props}
timeout={{ enter: 500, exit: 300 }}>
{children}
</CSSTransition>
)
export default Animatable
|
imports/ui/components/messenger/messageItem.js | jiyuu-llc/jiyuu | import React from 'react';
import Hammer from 'react-hammerjs';
import Render from '../../components/render.jsx'
const MessageItem = ({data}) => ({
handleTap: function(data){
const dId = ("#d-" + data._id);
/* const fdId = ("#fd-" + data._id); */
if(data.userId == Meteor.userId()){
... |
App.js | FuzzyHatPublishing/isleep | import React from 'react';
import { AsyncStorage, Platform, StatusBar, StyleSheet, View } from 'react-native';
import { AppLoading, Asset, Font } from 'expo';
import { Ionicons } from '@expo/vector-icons';
import RootNavigation from './navigation/RootNavigation';
import TourScreen from './screens/TourScreen';
export d... |
demo/src/Loading.js | tkh44/data-driven-motion | import React from 'react'
export default function Loading ({isLoading, error, pastDelay}) {
if (isLoading) {
return pastDelay ? <div>Loading...</div> : null // Don't flash "Loading..." when we don't need to.
} else if (error) {
return (
<pre>
<h1>Error</h1>
{JSON.stringify(error, null... |
src/modules/users/components/BookshelfList/BookshelfList.js | cltk/cltk_frontend | import React from 'react';
import Masonry from 'react-masonry-component/lib';
import PropTypes from 'prop-types';
class BookshelfList extends React.Component {
render() {
const masonryOptions = {
isFitWidth: true,
transitionDuration: 300,
};
return (
<div className="works-list works-list--bookshelf">
... |
frontend/src/Calendar/Events/CalendarEvent.js | lidarr/Lidarr | import classNames from 'classnames';
import moment from 'moment';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import getStatusStyle from 'Calendar/getStatusStyle';
import Icon from 'Components/Icon';
import Link from 'Components/Link/Link';
import { icons } from 'Helpers/Props';
import... |
src/svg-icons/image/straighten.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageStraighten = (props) => (
<SvgIcon {...props}>
<path d="M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z"/>
</SvgIcon>
);
ImageStr... |
src/components/CardModal.js | robshox/boostv1 | import React from 'react';
import ReactDOM from 'react-dom';
import { Link, browserHistory } from 'react-router';
const CardModal = React.createClass({
componentDidUpdate() {
ReactDOM.findDOMNode(this.refs.front).focus();
},
render() {
let { card, onDelete } = this.props;
return (<div className='mod... |
app/js/pages/loadingPage.js | Dennetix/Motwo | import React from 'react';
import theme from '../utils/theme';
@theme
export default class LoginPage extends React.Component {
getStyle() {
return {
container: {
width: '100%',
height: '100vh'
},
loader: {
width: '75px',
height: '75px',
position: 'absolute',
left: '50%',
top: '5... |
src/decorators/withViewport.js | zhangmhao/circle | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react'; // eslint-disable-line no-unused-vars
import EventEmitter from 'eventemitter3';
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
let EE;
let viewport = {width: 1366, height: 768}; // Default si... |
webpack/scenes/AnsibleCollections/AnsibleCollectionsTableSchema.js | snagoor/katello | import React from 'react';
import { Link } from 'react-router-dom';
import { translate as __ } from 'foremanReact/common/I18n';
import { urlBuilder } from 'foremanReact/common/urlHelpers';
import {
headerFormatter,
cellFormatter,
} from '../../components/pf3Table/formatters';
const TableSchema = [
{
property... |
reaction/src/App.js | onespeed-workshops/the-vue-reaction | import React, { Component } from 'react';
import { TodoForm } from './TodoForm'
import { TodoList } from './TodoList'
class Root extends Component {
constructor(props) {
super(props)
this.state = {
localTodo: { value: '' },
todos: []
}
}
onLocalUpdate(newTodo) {
this.setState({
... |
src/streamlist/StreamList.js | saketkumar95/zulip-mobile | /* @flow */
import React from 'react';
import { FlatList, StyleSheet } from 'react-native';
import StreamItem from './StreamItem';
const styles = StyleSheet.create({
list: {
flex: 1,
flexDirection: 'column',
},
});
export default class StreamList extends React.Component {
props: {
streams: Object[... |
packages/material-ui-icons/legacy/SignalWifi1BarLock.js | lgollut/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><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 1.5-1.5s1.5.7 1.5 1.5V16z" /><path d="M15.5... |
src/components/options/OptionsImage3x.js | m0sk1t/react_email_editor | import React from 'react';
const OptionsImage3x = ({ block, language, onFileChange, onPropChange }) => {
return (
<div>
<div>
<label>{language["Custom style"]}: <input type="checkbox" checked={block.options.container.customStyle? 'checked': '' } onChange={(e) => onPropChange('customStyle', !block.options.con... |
src/components/utils/Gutters.js | jckfa/img.silly.graphics | import React from 'react'
import styled from 'styled-components'
import media from './media'
import { spacing } from '../config/vars'
const Container = styled.div`
padding-left: ${spacing.gutter}em;
padding-right: ${spacing.gutter}em;
${media.s`
padding-left: ${spacing.gutter * 2}em;
padding-right: ${... |
packages/wix-style-react/src/MultiSelect/test/MultiSelect.e2eStory.js | wix/wix-style-react | import React from 'react';
import { storiesOf } from '@storybook/react';
import { getTestStoryKind } from '../../../stories/storiesHierarchy';
import { storySettings, testStories } from './storySettings';
import { RTLWrapper } from '../../../stories/utils/RTLWrapper';
import MultiSelect from '..';
import ExampleReord... |
src/components/Navbar/Tabs.js | nicolas-adamini/littleblue | import React from 'react';
import { withRouter } from 'react-router-dom';
const Tabs = props => {
const handleClick = e => {
props.history.push('/' + e.target.name);
}
const pathname = props.location.pathname;
return (
<div className="tabs">
<button
name="web" onClick={handleClick}
... |
examples/ChartsExplorer/components/Pie.js | Jpadilla1/react-native-ios-charts | import React, { Component } from 'react';
import { StyleSheet } from 'react-native';
import { PieChart } from 'react-native-ios-charts';
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'stretch',
backgroundColor: 'transparent'
}
});
export default c... |
client/app/scripts/charts/nodes-chart.js | dilgerma/scope | import _ from 'lodash';
import d3 from 'd3';
import debug from 'debug';
import React from 'react';
import { connect } from 'react-redux';
import { Map as makeMap, fromJS, is as isDeepEqual } from 'immutable';
import timely from 'timely';
import { clickBackground } from '../actions/app-actions';
import { EDGE_ID_SEPARA... |
src/svg-icons/image/filter-6.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilter6 = (props) => (
<SvgIcon {...props}>
<path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-8-2h2c1.1 0 2-.89 2-2v-2... |
node_modules/react-bootstrap/es/Table.js | hsavit1/gosofi_webpage | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
src/mixins/helpers.js | robcolburn/react-slick | 'use strict';
import React from 'react';
import ReactTransitionEvents from 'react/lib/ReactTransitionEvents';
import {getTrackCSS, getTrackLeft, getTrackAnimateCSS} from './trackHelper';
import assign from 'object-assign';
var helpers = {
initialize: function (props) {
var slideCount = React.Children.count(prop... |
demo/examples/complex-transition/index.js | JulienPradet/react-flip | import React, { Component } from 'react';
import withRouter from 'react-router/withRouter';
import './index.scss';
import cards from './cards';
import CardList from './CardList';
class ComplexTransition extends Component {
constructor(props) {
super();
this.state = {
cards: cards(props.match.path)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.