path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/components/Todo/__tests__/List.js | jigsawye/redux-hot-boilerplate | import test from 'ava';
import React from 'react';
import { spy } from 'sinon';
import { shallow } from 'enzyme';
import { fromJS } from 'immutable';
import List from '../List';
const setup = () => {
const onTodoClick = spy();
const todos = fromJS([
{ id: 0, completed: false, text: 'first todo' },
{ id: 1,... |
src/components/Debug/index.js | bitmoremedia/mygi-app | import React, { Component } from 'react';
import { View, Text, AsyncStorage } from 'react-native';
import _ from 'lodash';
import Button from '../common/Button';
function incrementCounterState(state) {
return {
clickCount: state.clickCount + 1,
};
}
export default class MyGi extends Component {
constructo... |
app/app.js | ParkarDev/react-resume | /**
* app.js
*
* This is the entry file for the application, only setup and boilerplate
* code.
*/
import 'babel-polyfill';
// Load the manifest.json file and the .htaccess file
import 'file?name=[name].[ext]!./manifest.json';
import 'file?name=[name].[ext]!./.htaccess';
// Import all the third party stuff
impo... |
examples/universal/client/index.js | mikeachen/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... |
app/javascript/lca/index.js | makzu/lotcastingatemi | // @flow
/* eslint-disable no-undef */
require('typeface-roboto')
import React from 'react'
import ReactDOM from 'react-dom'
import './i18n'
import configureStore from './store.js'
import history from './utils/history'
import { lcaInit } from './ducks/actions.js'
import RootContainer from './containers/rootContaine... |
spec/components/card.js | showings/react-toolbox | /* eslint-disable react/prop-types */
import React from 'react';
import Button, { IconButton } from '../../components/button';
import Card, { CardActions, CardMedia, CardText, CardTitle } from '../../components/card';
import style from '../style';
const dummyText = 'Lorem Ipsum is simply dummy text of the printing and... |
source/router.js | simonewebdesign/react-router-page-js | import React from 'react';
import page from 'page';
export default class Router extends React.Component {
// Since we are going to deal with routes inside componentDidMount the initial
// load of our component won't have this.state.component yet, so let's set a
// default value for that.
constructor(props) {
... |
src/svg-icons/image/photo-size-select-small.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePhotoSizeSelectSmall = (props) => (
<SvgIcon {...props}>
<path d="M23 15h-2v2h2v-2zm0-4h-2v2h2v-2zm0 8h-2v2c1 0 2-1 2-2zM15 3h-2v2h2V3zm8 4h-2v2h2V7zm-2-4v2h2c0-1-1-2-2-2zM3 21h8v-6H1v4c0 1.1.9 2 2 2zM3 7H... |
example/lab/test25.js | flywingdevelopers/rn-naive | /**
* Roll Overlay test
* Kevin Lee 19 Oct 2017
**/
import React from 'react'
import Camera from 'react-native-camera'
import { Screen, Bar, Roll } from '../rn-naive'
export default class App extends React.Component {
constructor(props) {
super(props);
this.camera = null;
this.state = {
camera:... |
src/components/icons/ChevronUpIcon.js | InsideSalesOfficial/insidesales-components | import React from 'react';
const ChevronUpIcon = props => (
<svg {...props.size || { width: '24px', height: '24px' }} {...props} viewBox="0 0 100 100">
{props.title && <title>{props.title}</title>}
<polygon points="28.79 67.68 50 46.46 71.21 67.68 78.28 60.61 50 32.32 21.72 60.61 28.79 67.68" />
</svg>
);
... |
client/index.js | Alex-Shilman/Drupal8Node | import React from 'react';
import {
render
} from 'react-dom';
import {
Router,
Route,
IndexRoute,
browserHistory,
hashHistory
} from 'react-router';
import {
Provider
} from 'react-redux';
import configureStore from '../shared/store';
import createRootRoute from '../shared/routes';
let store = configureStore()... |
app/containers/Steps/BearingIntroduction/index.js | nypl-spacetime/where | import React from 'react'
import Button from 'components/Button'
import Flex from 'components/Flex'
import { Explanation, TextStep, Buttons } from '../styles'
import explanation from 'images/bearing-explanation.svg'
export class Step extends React.Component {
render () {
return (
<TextStep>
<div... |
code/workspaces/web-app/src/components/welcome/VerifyEmail.js | NERC-CEH/datalab | import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import datalabsLogo from '../../assets/images/datalabs-vert.png';
import PagePrimaryActionButton from '../common/buttons/PagePrimaryActionButton';
import PrimaryActionButton from '../... |
app/react/demo/src/stories/Button.js | shilman/storybook | import PropTypes from 'prop-types';
import React from 'react';
const buttonStyles = {
border: '1px solid #eee',
borderRadius: 3,
backgroundColor: '#FFFFFF',
cursor: 'pointer',
fontSize: 15,
padding: '3px 10px',
margin: 10,
};
const Button = ({ children, onClick }) => (
<button style={buttonStyles} onC... |
examples/todos-with-undo/containers/UndoRedo.js | edge/redux | import React from 'react'
import { ActionCreators as UndoActionCreators } from 'redux-undo'
import { connect } from 'react-redux'
let UndoRedo = ({ canUndo, canRedo, onUndo, onRedo }) => (
<p>
<button onClick={onUndo} disabled={!canUndo}>
Undo
</button>
<button onClick={onRedo} disabled={!canRedo}>... |
src/svg-icons/av/replay-30.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvReplay30 = (props) => (
<SvgIcon {...props}>
<path d="M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-2.4 8.5h.4c.2 0 .4-.1.5-.2s.2-.2.2-.4v-.2s-.1-.1-.1-.2-.1-.... |
src/components/thunderbird/header.js | mozilla/donate.mozilla.org | import React from 'react';
module.exports = React.createClass({
contextTypes: {
intl: React.PropTypes.object
},
propTypes: {
alt: React.PropTypes.string
},
render: function() {
var alt = "Thunderbird";
// FIXME: Should update the list in the regex for locales that did the translation
// ... |
Demo/src/components/App.js | bspaulding/presentation-react-router-4-universal-links | import React, { Component } from 'react';
import { StyleSheet, ScrollView } from 'react-native';
import Route from './Route';
import Switch from './Switch';
import Resources from './Resources';
import People from './People';
import Planets from './Planets';
import Films from './Films';
import Species from './Species';
... |
src/Shared/Checkbox.js | infinitered/reactotron | import React from 'react'
import PropTypes from 'prop-types'
import {
MdCheckBoxOutlineBlank as IconUnchecked,
MdCheckBox as IconChecked,
} from 'react-icons/md'
import Colors from '../Theme/Colors'
const Styles = {
container: {
cursor: 'pointer'
},
icon: {
fontSize: 22,
paddingRight: 4
},
la... |
server/src/component.js | joshferrell/hapi-maily | import React from 'react';
import PropTypes from 'prop-types';
import { Footer, Header, PreHeader, FieldValue, Button } from 'hapi-maily-widgets';
const SimpleEmail = ({ firstName, lastName }) => (
<mj-wrapper full-width="full-width" text-align="left">
<PreHeader value="Example Email" />
<Header
... |
examples/huge-apps/routes/Course/routes/Announcements/components/Sidebar.js | besarthoxhaj/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 (... |
src/modules/Attachment/component.js | svmn/ace-fnd | 'use strict';
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Component as AttachmentImage } from '../AttachmentImage';
import { Component as AttachmentYoutube } from '../AttachmentYoutube';
import { Component as AttachmentWebm } from '../AttachmentWebm';
import {
getExtWebmUrl... |
app/components/widgets/AddPlace.js | wbowling/deciderer | import React from 'react'
import PollActions from '../../actions/PollActions'
import PollStore from '../../stores/PollStore'
import { Input, Button, Row, Col } from 'react-bootstrap'
const AddPlace = React.createClass({
getInitialState() {
return {
text: ''
}
},
onChange(e) {
this.setState({ ... |
examples/async/src/index.js | roth1002/redux | import React from 'react'
import { render } from 'react-dom'
import { createStore, applyMiddleware } from 'redux'
import { Provider } from 'react-redux'
import thunk from 'redux-thunk'
import { createLogger } from 'redux-logger'
import reducer from './reducers'
import App from './containers/App'
const middleware = [ t... |
src/amo/routes.js | mstriemer/addons-frontend | import React from 'react';
import { IndexRoute, Route } from 'react-router';
import HandleLogin from 'core/containers/HandleLogin';
import App from './containers/App';
import Home from './containers/Home';
import DetailPage from './containers/DetailPage';
import SearchPage from './containers/SearchPage';
export defa... |
src/rich-editor-controls.js | ryapapap/draft-editor | import React from 'react';
import BlockStyleControls from './style-controls-block';
import InlineStyleControls from './style-controls-inline';
import ModalStyleControls from './style-controls-modal';
export default function StyleControls(props) {
return (<div className="controls-root">
<InlineStyleControls {...p... |
src/svg-icons/editor/strikethrough-s.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorStrikethroughS = (props) => (
<SvgIcon {...props}>
<path d="M7.24 8.75c-.26-.48-.39-1.03-.39-1.67 0-.61.13-1.16.4-1.67.26-.5.63-.93 1.11-1.29.48-.35 1.05-.63 1.7-.83.66-.19 1.39-.29 2.18-.29.81 0 1.54.11 ... |
app/javascript/mastodon/features/account_gallery/index.js | ambition-vietnam/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { fetchAccount } from '../../actions/accounts';
import { refreshAccountMediaTimeline, expandAccountMediaTimeline } from '../../actions/timelines';
impo... |
docs/app/Examples/collections/Breadcrumb/Variations/index.js | aabustamante/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const BreadcrumbVariationsExamples = () => (
<div>
<ExampleSection title='Variations'>
<ComponentExample
title='Siz... |
src/assets/js/react/components/Template/TemplateHeaderTitle.js | blueliquiddesigns/gravity-forms-pdf-extended | import PropTypes from 'prop-types'
import React from 'react'
/**
* Renders the Template Header Title
*
* @package Gravity PDF
* @copyright Copyright (c) 2020, Blue Liquid Designs
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
* @since 4.1
*/
/**
* React Component
*
... |
src/components/single-page.js | openregister/specification | import React from 'react';
import PropTypes from 'prop-types';
import Section from './section';
const SinglePage = ({tree}) => {
return (
tree.map(SectionHierarchy)
);
};
const SectionHierarchy = ({id, items, content}) => {
return (
<Section key={id} id={id} content={content}>
{
items
... |
node_modules/styled-components/src/hoc/withTheme.js | bburnett-cpf/react-intro | // @flow
/* globals ReactClass */
import React from 'react'
import PropTypes from 'prop-types'
import hoistStatics from 'hoist-non-react-statics'
import { CHANNEL } from '../models/ThemeProvider'
import _isStyledComponent from '../utils/isStyledComponent'
const wrapWithTheme = (Component: ReactClass<any>) => {
cons... |
actor-apps/app-web/src/app/components/Install.react.js | stonegithubs/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/Diary/Diary.js | riccardone/MySelfLog.Ui | import React, { Component } from 'react';
import NavBarTop from '../navbar.top';
import Footer from '../footer';
import Bus from '../bus';
import DiaryLog from './DiaryLog';
import DiaryLink from './DiaryLink';
import DiaryReport from './DiaryReport';
import CreateDiary from './CreateDiary';
import { ToastContainer, to... |
src/scene/Nearby/NearbyScene.js | dudongge/DDGMeiTuan | /**
* Copyright (c) 2017-present, dudongge
* All rights reserved.
*
* https://github.com/dudongge/DDGMeiTuan
* copyright by dudodongge
*/
//import liraries
import React, { Component } from 'react';
import { View, Text, StyleSheet, ScrollView, TouchableOpacity, ListView, Image } from 'react-native';
import Scroll... |
console-ui/src/pages/AuthorityControl/PermissionsManagement/NewPermissions.js | alibaba/nacos | /*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* 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 applica... |
test/index.js | cheton/react-infinite-tree | import React from 'react';
import { mount } from 'enzyme';
import { test } from 'tap';
import '../setupTests';
import InfiniteTree from '../src';
import Tree from '../examples/Tree';
test('<InfiniteTree />', (t) => {
const onUpdate = (node) => {
t.equal(node.id, '<root>.0');
};
const wrapper = mou... |
src/navigation/tabs.js | b1alpha/Smoothie-Du-Jour | /**
* Tabs Scenes
*
* React Native Starter App
* https://github.com/mcnamee/react-native-starter-app
*/
import React from 'react';
import { Scene } from 'react-native-router-flux';
// Consts and Libs
import { AppConfig } from '@constants/';
import { AppStyles, AppSizes } from '@theme/';
// Components
import { Ta... |
src/components/Button/Base/ButtonIcon.js | propertybase/react-lds | import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { IconSVG } from '../../Icon';
const ButtonIcon = (props) => {
const {
className,
icon,
size,
sprite,
position,
...rest
} = props;
const sldsClasses = cx(
'slds-button__icon',
{ [`s... |
src/js/components/acl/permission_manager.js | rafaelfbs/realizejs | import React, { Component } from 'react';
import PropTypes from '../../prop_types';
import $ from 'jquery';
import { autobind, mixin } from '../../utils/decorators';
import { uuid } from '../../utils';
import {
Grid,
PrincipalActionButtons,
} from '../../components';
import { RequestHandlerMixin } from '../../mix... |
src/SplitToggle.js | sheep902/react-bootstrap | import React from 'react';
import DropdownToggle from './DropdownToggle';
export default class SplitToggle extends React.Component {
render() {
return (
<DropdownToggle
{...this.props}
useAnchor={false}
noCaret={false}
/>
);
}
}
SplitToggle.defaultProps = DropdownToggle... |
src/js/Components/Li.js | heymexa/react-test | import React from 'react';
export default class Li extends React.Component {
constructor(props) {
super(props);
this.onDragStart = this.onDragStart.bind(this);
}
onDragStart(event) {
event.dataTransfer.setData('text/plain', JSON.stringify(this.props));
}
render() {
... |
test/common/components/App-test.js | ChrisWphoto/react-ccms | import test from 'ava';
import React from 'react';
import { shallow } from 'enzyme';
import App from '../../../src/common/components/App';
test('render with container div', t => {
const wrapper = shallow(React.createElement(App));
t.is(wrapper.find('#container').length, 1);
});
|
app/components/IssueIcon/index.js | KyleAWang/react-boilerplate | import React from 'react';
function IssueIcon(props) {
return (
<svg
height="1em"
width="0.875em"
className={props.className}
>
<path d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7S10.14 13.7 7 13.7 1.3 11.14 1.3 8s2.56-5.7 5.7-5.7m0-1.3C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7S10.86 1 7 1z m1 3H6v... |
src/components/homePanel/index.js | nai888/langua | import React from 'react'
import { Link } from 'gatsby'
import PropTypes from 'prop-types'
import styles from './homePanel.module.sass'
const HomePanel = ({ linkTo, toolTitle, disabled, children }) => (
<Link
to={linkTo}
className={disabled ? `${styles.panel} ${styles.disabled}` : styles.panel}
>
<h2 ... |
generators/component/templates/3/components/StatelessNoStyles.js | newtriks/generator-react-webpack | 'use strict';
import React from 'react';
let <%= component.className %> = () => (
<div className="<%= style.className %>">
Please edit <%= component.path %>/<%= component.fileName %> to update this component!
</div>
);
<%= component.className %>.displayName = '<%= component.displayName %>';
// Uncomment pro... |
app/containers/NotFoundPage/index.js | Frai/Events | /**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*/
import React from 'react';
import { FormattedMessage } from 'react-intl';
import H1 from 'components/H1';
import messages from './messages';
export default function NotFound() {
return (
<article>
... |
docs/src/app/components/pages/components/DatePicker/ExampleControlled.js | frnk94/material-ui | import React from 'react';
import DatePicker from 'material-ui/DatePicker';
/**
* `DatePicker` can be implemented as a controlled input,
* where `value` is handled by state in the parent component.
*/
export default class DatePickerExampleControlled extends React.Component {
constructor(props) {
super(props)... |
src/Components/Presentational/RoomItem/RoomItem.js | DeadManPoe/ReactChat | import React from 'react';
import PropTypes from 'prop-types';
import RoomItemPropTypes from './RoomItemPropTypes';
const RoomItem = (props)=>{
return (
<div onClick={()=>{props.onRoomClick(props.item.id)}}>
<img src={props.item.thumbnail} width={props.item.thumbnail_width} height={props.item.t... |
src/svg-icons/image/exposure-neg-1.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageExposureNeg1 = (props) => (
<SvgIcon {...props}>
<path d="M4 11v2h8v-2H4zm15 7h-2V7.38L14 8.4V6.7L18.7 5h.3v13z"/>
</SvgIcon>
);
ImageExposureNeg1 = pure(ImageExposureNeg1);
ImageExposureNeg1.displayName... |
app/javascript/mastodon/components/avatar.js | MitarashiDango/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { autoPlayGif } from '../initial_state';
export default class Avatar extends React.PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,
size: PropType... |
blueocean-material-icons/src/js/components/svg-icons/image/adjust.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageAdjust = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 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 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"/>
... |
src/hocs/withStages.js | eunvanz/handpokemon2 | import React from 'react'
import PropTypes from 'prop-types'
import shallowCompare from 'react-addons-shallow-compare'
import { connect } from 'react-redux'
import { firebaseConnect, dataToJS } from 'react-redux-firebase'
import { orderBy } from 'lodash'
import { convertMapToArr } from 'utils/commonUtil'
import Loadi... |
Rosa_Madeira/Revendedor/src/components/common/ButtonLoginPage.js | victorditadi/IQApp | import React from 'react';
import { Text, TouchableOpacity, Dimensions } from 'react-native';
import { Button } from 'native-base';
var width = Dimensions.get('window').width;
var height = Dimensions.get('window').height;
const ButtonHome = ({ onPress, children, color}) => {
const styles = {
buttonStyle: {
... |
docs/src/sections/BadgeSection.js | Sipree/react-bootstrap | import React from 'react';
import Anchor from '../Anchor';
import PropTable from '../PropTable';
import ReactPlayground from '../ReactPlayground';
import Samples from '../Samples';
export default function BadgeSection() {
return (
<div className="bs-docs-section">
<h2 className="page-header">
<Anc... |
src/components/auth/signin.js | finfort/TodoReactApp | import React, { Component } from 'react';
import { reduxForm, Field } from 'redux-form';
import { connect } from 'react-redux';
import * as actions from '../../actions';
import Header from '../header';
class Signin extends Component {
handleFormSubmit({email, password}) {
this.props.signinUser({ email, p... |
examples/with-redux-saga/pages/other.js | nelak/next.js | import React from 'react'
import {increment, startClock} from '../actions'
import {withReduxSaga} from '../store'
import Page from '../components/page'
class Counter extends React.Component {
static async getInitialProps ({store}) {
store.dispatch(increment())
}
componentDidMount () {
this.props.dispat... |
app/js/components/project/ProjectList.js | makeing/PIT.react | import React from 'react';
import ProjectItem from './ProjectItem';
import {Link, RouteHandler} from 'react-router';
import Logger from '../../utils/Logger';
export default class ProjectList extends React.Component {
render() {
Logger.log("ProjectList.render()", this.props.projects);
var projectItems = this... |
src/components/SimpleCommonComponents/Tooltip/index.js | ProteinsWebTeam/interpro7-client | // @flow
import React from 'react';
import T from 'prop-types';
import Tippy from '@tippy.js/react';
import { hideAll } from 'tippy.js';
import 'tippy.js/dist/tippy.css';
const _Tooltip = (
{
html,
title,
interactive,
useContext,
children,
distance,
...rest
} /*: {html?: any, title?: an... |
src/ReactBoilerplate/Scripts/containers/Manage/Logins/Logins.js | pauldotknopf/react-dot-net | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { loadExternalLogins, destroyExternalLogins, addExternalLogin, removeExternalLogin } from 'redux/modules/manage';
import { authenticate as externalAuthenticate, clearAuthentication as clearExternalAuthentication } from 'redux/module... |
docs/src/sections/PaginationSection.js | Lucifier129/react-bootstrap | import React from 'react';
import Anchor from '../Anchor';
import PropTable from '../PropTable';
import ReactPlayground from '../ReactPlayground';
import Samples from '../Samples';
export default function PaginationSection() {
return (
<div className="bs-docs-section">
<h2 className="page-header">
... |
node_modules 11.32.44 AM/react-router/modules/Link.js | drankadank/client | import React from 'react';
import warning from 'warning';
var { bool, object, string, func } = React.PropTypes;
function isLeftClickEvent(event) {
return event.button === 0;
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}
function isEmptyObject(... |
docs/src/examples/elements/Button/States/ButtonExampleDisabled.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleDisabled = () => <Button disabled>Disabled</Button>
export default ButtonExampleDisabled
|
EEG101/src/components/RecorderButton.js | tmcneely/eeg-101 | // RecorderButton.js
// Dynamic button that switches between a red button or square to indicate recording start/stop
import React, { Component } from 'react';
import {
Image,
View,
TouchableOpacity,
StyleSheet,
} from 'react-native';
export default class RecordingButton extends Component{
constructor(props)... |
src/svg-icons/maps/local-shipping.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalShipping = (props) => (
<SvgIcon {...props}>
<path d="M20 8h-3V4H3c-1.1 0-2 .9-2 2v11h2c0 1.66 1.34 3 3 3s3-1.34 3-3h6c0 1.66 1.34 3 3 3s3-1.34 3-3h2v-5l-3-4zM6 18.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-... |
src/pages/index.js | jsfeb26/parklnsouth | import React from 'react'
import Link from 'gatsby-link'
const IndexPage = () => (
<div>
<h1>Hi people</h1>
<p>Welcome to your new Gatsby site.</p>
<p>Now go build something great.</p>
</div>
)
export default IndexPage |
app/javascript/mastodon/features/ui/components/tabs_bar.js | glitch-soc/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { NavLink, withRouter } from 'react-router-dom';
import { FormattedMessage, injectIntl } from 'react-intl';
import { debounce } from 'lodash';
import { isUserTouching } from '../../../is_mobile';
import Icon from 'mastodon/components/icon';
import No... |
src/components/FreelancerBanner/FreelancerBanner.js | ortonomy/flingapp-frontend | import React from 'react';
import banner from './FreelancerBanner.module.css';
function FreelancerBanner (props) {
return (
<div className={banner.FreelancerBanner}>
<div className={banner.text}>
<h2>{props.name}</h2>
<div className={banner.active}>{props.status}</div>
</d... |
src/svg-icons/maps/hotel.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsHotel = (props) => (
<SvgIcon {...props}>
<path d="M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z"/>
</SvgIcon>
);
MapsHotel = pure(MapsHot... |
src/svg-icons/av/art-track.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvArtTrack = (props) => (
<SvgIcon {...props}>
<path d="M22 13h-8v-2h8v2zm0-6h-8v2h8V7zm-8 10h8v-2h-8v2zm-2-8v6c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2zm-1.5 6l-2.25-3-1.75 2.26-1.25-1... |
app/components/Screens/Freelances/Freelances.js | fabienjuif/KeyBoard | import React from 'react'
import FullSized from 'FullSized'
const Freelances = () => {
return (
<FullSized second>Hello Freelances !</FullSized>
)
}
export default Freelances
|
lab-nodejs/lab-nodejs-react-basic/src/App.js | rojarsmith/Lab | import React from 'react';
import './App.css';
import ComponentA from './components/ComponentA';
import { MyComponent, FancyButton } from './components/CreateForwardRef';
const multiButton = () => {
var output = [];
for (let i = 0; i < 4; ++i) {
output.push(<button key={i}>{i}</button>)
}
return output;
}
... |
packages/lore-hook-dialogs-material-ui/src/blueprints/update/Wizard/formMap.js | lore/lore-forms | import React from 'react';
import Step from './forms/Step';
import Confirmation from './forms/Confirmation';
export default {
step: {
render: (props, config) => {
return (
<Step
{...props}
{...config}
/>
);
}
},
confirmation: {
render: (props, config) =... |
generators/molecule/templates/molecule.js | cassioscabral/generator-atomic-reactor | 'use strict';
import React from 'react';
require('./stylesheets/<%= filename %>.scss');
class <%= component %> extends React.Component {
render() {
return (
<div className="<%= componentClass %>">
Please edit <%= filepath %> to update this component!
</div>
);
}
}
<%= component %>.di... |
src/components/author/AuthorDashboard.js | vlcik/booky | import React from 'react';
const authorDashboard = (props) => {
return (
<div></div>
);
}
export default authorDashboard; |
gatsby-strapi-tutorial/cms/plugins/content-manager/admin/src/components/TableDelete/index.js | strapi/strapi-examples | /**
*
* TableDelete
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import styles from './styles.scss';
function TableDelete({ colspan, number, onToggleDeleteAll }) {
const suffix = number > 1 ? 'plural' : 'singular';
return (
<tr classN... |
src/components/icons/NextJS.js | dtjv/dtjv.github.io | import React from 'react'
export const NextjsIcon = ({ className, ...props }) => (
<svg
{...props}
className={`text-nextjs ${className}`}
role="img"
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
viewBox="0 0 24 24"
>
<title>Next.js</title>
<path d="M11.5725 0c-.1763 0-.3098... |
src/js/services/ethereum/nodeProviders/CachedServerProvider.js | KyberNetwork/KyberWallet | import React from 'react';
import BLOCKCHAIN_INFO from "../../../../../env"
import * as constants from "../../constants"
import { isUserLogin } from "../../../utils/common"
import * as converters from "../../../utils/converter";
export default class CachedServerProvider extends React.Component {
constructor(props) {... |
src/components/icons/Email.js | typical000/paveldavydov | import React from 'react'
import PropTypes from 'prop-types'
import cn from 'classnames'
import Icon from './Icon'
const Email = ({className}) => (
<Icon>
{({classes}) => (
<svg
className={cn(classes.icon, className)}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
>
... |
data/board.js | uclaacm/website | import Link from 'next/link';
import React from 'react';
export default [
{
name: 'Board',
class: 'board',
image: '/images/committees/board_wordmark.svg',
diamond: '/images/logo.png',
internship: {
whatWeDo: (
<>
With ACM being such a ... |
components/Navigation/Navigation.js | ahw/flash-cards-static-app | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import React from 'react';
import './Navigation.scss';
import Link from '../Link';
function Navigation() {
return (
<ul className="Navigation" role="menu">
... |
information/blendle-frontend-react-source/app/components/social/ConnectLanding.js | BramscoChill/BlendleParser | import React from 'react';
import PropTypes from 'prop-types';
import Link from 'components/Link';
import classNames from 'classnames';
import { translate } from 'instances/i18n';
import { STATUS_PENDING } from 'app-constants';
class ConnectLanding extends React.Component {
static propTypes = {
facebookConnected... |
src/index.js | Yangani/friendlist | import React from 'react';
import ReactDOM from 'react-dom';
import App from './containers/App';
ReactDOM.render(<App />, document.getElementById('root'));
|
examples/simple/index.js | malte-wessel/react-custom-scrollbars | import './sass/app.scss';
import React from 'react';
import { render } from 'react-dom';
import DefaultScrollbarsApp from './components/DefaultScrollbars/App';
import ColoredScrollbarsApp from './components/ColoredScrollbars/App';
import SpringScrollbarsApp from './components/SpringScrollbars/App';
import ShadowScroll... |
src/router.js | EthHead/ens.trade | import React from 'react';
function decodeParam(val) {
if (!(typeof val === 'string' || val.length === 0)) {
return val;
}
try {
return decodeURIComponent(val);
} catch (err) {
if (err instanceof URIError) {
err.message = `Failed to decode param '${val}'`;
err.status = 400;
}
... |
app/components/header/Header.js | yashprit/mongoment | import React, { Component } from 'react';
import {AppBar, Link, FontIcon, Navigation} from 'react-toolbox';
import {LinkContainer} from 'react-router-bootstrap';
const Header = (props) => {
return (
<AppBar title={props.title}>
<Navigation type='horizontal'>
<FontIcon value='more_vert'/>
</Navigation>
... |
lib/index.js | applegrain/enzyme-playground | import React from 'react';
import ReactDOM from 'react-dom';
import Main from './Main';
ReactDOM.render(<Main />, document.getElementById('container'));
|
blueocean-material-icons/src/js/components/svg-icons/communication/call.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const CommunicationCall = (props) => (
<SvgIcon {...props}>
<path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 ... |
packages/react-scripts/fixtures/kitchensink/src/features/env/FileEnvVariables.js | sThig/jabbascrypt | /**
* 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... |
examples/create-react-app/src/components/Navigation.js | wfp/ui | import React from 'react';
import { Button,User, Search, Link } from "@wfp/ui";
import {
MainNavigation,
MainNavigationItem,
SubNavigation,
SubNavigationHeader,
SubNavigationTitle,
SubNavigationLink,
SubNavigationContent,
SubNavigationFilter,
SubNavigationList,
SubNavigationGroup... |
public/src/js/app.js | crumbapp/web-app | import React from 'react';
import Router from 'react-router';
// TODO: Implement mapbox
// import L from 'mapbox.js';
// TODO: Retrieve Mapbox access token
// L.mapbox.accessToken = ''
import routes from './routes';
/**
* Initialize router
*/
Router.run(routes, Router.HistoryLocation, (Handler) => {
React.re... |
src/Overlay.js | Tomyail/react-overlays | import PropTypes from 'prop-types';
import elementType from 'prop-types-extra/lib/elementType';
import React from 'react';
import Portal from './Portal';
import Position from './Position';
import RootCloseWrapper from './RootCloseWrapper';
/**
* Built on top of `<Position/>` and `<Portal/>`, the overlay component is... |
client/extensions/woocommerce/app/promotions/fields/form-field.js | Automattic/woocommerce-connect-client | /** @format */
/**
* External dependencies
*/
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
/**
* Internal dependencies
*/
import FormCheckbox from 'components/forms/form-checkbox';
import FormFieldset from 'components/forms/form-fieldset';
import FormInputVal... |
frontend/src/components/passwordReset/passwordReset.js | unicef/un-partner-portal | import React, { Component } from 'react';
import { browserHistory as history } from 'react-router';
import { connect } from 'react-redux';
import { compose } from 'redux';
import {
isPristine,
isSubmitting,
SubmissionError,
submit,
} from 'redux-form';
import { withStyles } from 'material-ui/styles';
import Typ... |
app/javascript/mastodon/features/standalone/public_timeline/index.js | ambition-vietnam/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import StatusListContainer from '../../ui/containers/status_list_container';
import {
refreshPublicTimeline,
expandPublicTimeline,
} from '../../../actions/timelines';
import Column from '../../../components/column... |
example/src/Source.js | inuscript/redux-candy | import React, { Component } from 'react';
import axios from 'axios'
import SyntaxHighlighter from "react-syntax-highlighter"
import { githubGist } from 'react-syntax-highlighter/dist/styles';
const req = axios.create()
const loadSource = (url) => {
return req.get(url, {responseType: 'text'})
.then(({data}) => {
... |
examples/huge-apps/routes/Profile/components/Profile.js | mattkrick/react-router | import React from 'react'
class Profile extends React.Component {
render() {
return (
<div>
<h2>Profile</h2>
</div>
)
}
}
module.exports = Profile
|
src/component/SubHeading.js | dentemple/developer-portfolio | import React from 'react'
import PropTypes from 'prop-types'
import ExternalLink from './ExternalLink'
const SubHeading = ({text, link}) => {
return (
<h3 className='subheading'>
<ExternalLink text={text} link={link} />
</h3>
)
}
SubHeading.propTypes = {
text: PropTypes.string.isRequired,
link: ... |
src/js/jobs/components/filters/PublishedDropdown.js | tpucci/jobads-webapp | import React from 'react';
import DropDownMenu from 'material-ui/DropDownMenu';
import MenuItem from 'material-ui/MenuItem';
const menu = {
filter: "beginning",
label : "Date de publication",
default: 0,
values : [
{value: 4, label: 'Il y a 2 mois'},
{value: 3, label: 'Il y a 1 mois'},
... |
src/pages/message.js | markpalfreeman/github-labels | import React from 'react'
export default React.createClass({
displayName: 'MessagePage',
render () {
return (
<div>
<h1>{this.props.title}</h1>
<p>{this.props.body}</p>
</div>
)
}
}) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.