path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
frontend/src/app/components/Header.js | dannycoates/testpilot | import React from 'react';
import { Link } from 'react-router';
import classnames from 'classnames';
import LayoutWrapper from './LayoutWrapper';
import RetireConfirmationDialog from './RetireConfirmationDialog';
export default class Header extends React.Component {
constructor(props) {
super(props);
this.... |
src/routes/Home/components/HomeView.js | dmassaneiro/integracao-continua | import React from 'react'
import DuckImage from '../assets/Duck.jpg'
import './HomeView.scss'
export const HomeView = () => (
<div>
<h4>Welcome!</h4>
<img alt='This is a duck, because Redux!' className='duck' src={DuckImage} />
</div>
)
export default HomeView
|
src/components/Home/Shows/Views/Desktop/tpl.js | HopeUA/tv.hope.ua-react | /**
* [IL]
* Library Import
*/
import React from 'react';
import Slider from 'vendor/Slider/SliderComponent';
/**
* [IS]
* Style Import
*/
import Styles from './Styles/main.scss';
import Grids from 'theme/Grid.scss';
function Desktop() {
const styles = {
backgroundImage: 'url(https://cdn.hope.ua/med... |
src/js/components/input_error_body.js | frig-js/frigging-bootstrap | import React from 'react'
export default class InputErrorBody extends React.Component {
static propTypes = {
msg: React.PropTypes.string.isRequired,
i: React.PropTypes.number,
}
static defaultProps = {
i: 0,
}
render() {
return (
<span className="help-block" key={`error-${this.props.i... |
admin/client/App/screens/Home/components/ListTile.js | xyzteam2016/keystone | import React from 'react';
import { Link } from 'react-router';
/**
* Displays information about a list and lets you create a new one.
*/
var ListTile = React.createClass({
propTypes: {
count: React.PropTypes.string,
href: React.PropTypes.string,
label: React.PropTypes.string,
path: React.PropTypes.string,
... |
client/components/Breakpoints.js | HelpAssistHer/help-assist-her | import React from 'react'
import Responsive from 'react-responsive'
const PHONE_MIN_BREAKPOINT = 320
const PHONE_MAX_BREAKPOINT = 439
const BIG_PHONE_MIN_BREAKPOINT = 440
const BIG_PHONE_MAX_BREAKPOINT = 699
const TABLET_MIN_BREAKPOINT = 700
const TABLET_MAX_BREAKPOINT = 1099
const DESKTOP_MIN_BREAKPOINT = 1100
const... |
src/schema/test.dataSchema.js | jiangxy/react-antd-admin | import React from 'react';
import {Icon} from 'antd';
// 定义某个表的dataSchema, 结构跟querySchema很相似, 见下面的例子
// 注意: 所有的key不能重复
// 这个配置不只决定了table的schema, 也包括用于新增/删除的表单的schema
module.exports = [
{
key: 'id', // 传递给后端的key
title: 'ID', // 前端显示的名字
// 其实dataType对前端的意义不大, 更重要的是生成后端接口时要用到, 所以要和DB中的类型一致
// 对java... |
DataRepository.js | dcy0701/ReactNativeServer | 'use strict';
import {
AsyncStorage,
} from 'react-native';
import React, { Component } from 'react';
var API_COVER_URL = "http://news-at.zhihu.com/api/4/start-image/1080*1776";
var KEY_COVER = '@Cover';
function parseDateFromYYYYMMdd(str) {
if (!str) return new Date();
return new Date(str.slice(0, 4),str.sli... |
src/components/index.js | ctrl-alt-p/born-to-sell | import React from 'react';
import App from './app';
import CommentBox from './comment_box';
import CommentList from './comment_list';
export default App;
export default CommentList;
export default CommentBox;
|
docs/src/PropTable.js | herojobs/react-bootstrap | import merge from 'lodash/object/merge';
import React from 'react';
import Glyphicon from '../../src/Glyphicon';
import Label from '../../src/Label';
import Table from '../../src/Table';
let cleanDocletValue = str => str.trim().replace(/^\{/, '').replace(/\}$/, '');
let capitalize = str => str[0].toUpperCase() + str.... |
src/components/LoggedInPage.js | KingCountySAR/database-frontend | import React from 'react';
import { withRouter } from 'react-router-dom';
import { CallbackComponent } from 'redux-oidc';
import userManager from '../userManager';
class CallbackPage extends React.Component {
successCallback = () => {
this.props.history.push(sessionStorage.redirect || '/');
}
rend... |
src/svg-icons/action/account-box.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAccountBox = (props) => (
<SvgIcon {...props}>
<path d="M3 5v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2zm12 4c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zm-9 8c0-2 4-3... |
7.Middlewares/src/components/app.js | Branimir123/Learning-React | import React, { Component } from 'react';
import UserList from './user_list';
export default class App extends Component {
render() {
return (
<div>
<UserList />
</div>
);
}
}
|
src/app/components/Home.js | maria-robobug/react-js-basics | import React from 'react';
export class Home extends React.Component {
constructor (props) {
super();
this.state = {
age: props.initialAge,
status: 0,
homeLink: props.initialLinkName
};
setTimeout(() => {
this.setState({
status: 1
});
},3000);
console.log('Constructor');
}
component... |
app/components/Journal.js | csreyes/TLCJournal | import React from 'react';
import {Link} from 'react-router';
import {Pager, PageItem} from 'react-bootstrap';
import moment from 'moment';
import JournalStore from '../stores/JournalStore'
import JournalActions from '../actions/JournalActions';
// import HomeStore from '../stores/HomeStore'
// import HomeActions fro... |
src/components/RefreshableListView.js | yogakurniawan/phoney-mobile | /*
* Component Name: RefreshableListView
* Author: Simar Singh (github/iSimar)
* Description: This component is used to render a listview that can be
* pulled down to refresh
* Dependencies:
* -> react-native-gifted-listview 0.0.15 (https://github.com/FaridSafi/react-native-gifted-listview)
*
* Pr... |
src/routes/admin/Admin.js | ben-miller/adddr.io | /**
* adddr (https://www.adddr.io/)
*
* 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-types';
import withStyl... |
src/index.js | superpersonman/react-raf-parallax | import React from 'react';
var lastTime = 0,
lastTimeSelected = 0,
elementCache = [];
export default React.createClass({
getDefaultProps() {
return {
perspective: 100,
x: false,
y: true,
relativeToParent: true
}
},
componentDidMount()... |
dist/lib/carbon-fields/assets/js/fields/components/checkbox/index.js | ArtFever911/statrer-kit | /**
* The external dependencies.
*/
import React from 'react';
import PropTypes from 'prop-types';
import {
compose,
withProps,
withHandlers,
setStatic
} from 'recompose';
/**
* The internal dependencies.
*/
import Field from 'fields/components/field';
import withStore from 'fields/decorators/with-store';
impo... |
app/javascript/mastodon/features/public_timeline/index.js | primenumber/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import ColumnHeader fro... |
components/Html.js | hobinjk/illuminate | import React from 'react';
class Html extends React.Component {
render() {
return (
<html>
<head>
<meta charSet="utf-8" />
<title>{this.props.title}</title>
<meta name="viewport" content="width=device-width, user-scalable=no" />
<link rel="styleshee... |
packages/react-events/src/FocusScope.js | VioletLife/react | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import type {
ReactResponderEvent,
ReactResponderContext,
} from 'shared/ReactTypes';
import React from 'react';
... |
packages/material-ui-icons/src/EventBusy.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let EventBusy = props =>
<SvgIcon {...props}>
<path d="M9.31 17l2.44-2.44L14.19 17l1.06-1.06-2.44-2.44 2.44-2.44L14.19 10l-2.44 2.44L9.31 10l-1.06 1.06 2.44 2.44-2.44 2.44L9.31 17zM19 3h-1V1h-2v2H8V1H6v2H5c-1... |
components/HighlightGrid.js | RomainInnocent/tpdevops | /**
* Created by Adrien on 30/06/2017.
*/
import React from 'react';
import {GridList, GridTile} from 'material-ui/GridList';
import IconButton from 'material-ui/IconButton';
import Subheader from 'material-ui/Subheader';
import StarBorder from 'material-ui/svg-icons/toggle/star-border';
import StartupCard from './St... |
packages/showcase/plot/grid.js | uber/react-vis | // Copyright (c) 2016 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify... |
src/containers/AddTodo.js | lingxiao-Zhu/react-redux-demo | /**
* Created by larry on 2017/1/4.
*/
import React from 'react';
import { connect } from 'react-redux';
import { addTodo } from '../actions';
let AddTodo = ({ dispatch }) => {
let input;
return(
<div>
<form onSubmit={e=>{
e.preventDefault();
if(!input.val... |
humantest/App.js | gutenye/react-mc | /* eslint-disable */
import React from 'react'
import '../docs/docs'
import '../docs/docs.css'
import { render } from 'react-dom'
import {
Button,
Card,
Dialog,
Drawer,
Elevation,
Checkbox,
Fab,
FormField,
GridList,
IconToggle,
LayoutGrid,
LinearProgress,
Menu,
List,
Radio,
Select,
Sli... |
src/UnmountClosed.js | nkbt/react-collapse | import React from 'react';
import PropTypes from 'prop-types';
import {Collapse} from './Collapse';
export class UnmountClosed extends React.PureComponent {
static propTypes = {
isOpened: PropTypes.bool.isRequired,
onWork: PropTypes.func,
onRest: PropTypes.func
};
static defaultProps = {
onWork... |
client/components/layout/nav.js | LIYINGZHEN/meteor-react-redux-base | import React from 'react';
import {Link} from 'react-router';
export default (props) => (
<nav className="navbar navbar-default navbar-fixed-top">
<div className="container">
<div className="navbar-header">
<button aria-controls="navbar" aria-expanded="false" data-target="#navbar" data-toggle="coll... |
examples/ErrorMessage.js | jaredpalmer/formik | import React from 'react';
import { Formik, Field, Form, ErrorMessage } from 'formik';
import * as Yup from 'yup';
import { Debug } from './Debug';
// While you can use any validation library (or write you own), Formik
// comes with special support for Yup by @jquense. It has a builder API like
// React PropTypes / Ha... |
webclient/userProfile/changePassword.js | souravDutta123/Cognitive-Assistant | import React from 'react';
class ChangePassword extends React.Component {
constructor()
{
super();
this.state={
drawerMenu: [],
}
}
componentDidMount()
{
}
render() {
const style={
textAlign: 'center',
};
return(
<div><h1 style={style}>ChangePassword :/</h1></div>
... |
src/svg-icons/notification/airline-seat-recline-normal.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAirlineSeatReclineNormal = (props) => (
<SvgIcon {...props}>
<path d="M7.59 5.41c-.78-.78-.78-2.05 0-2.83.78-.78 2.05-.78 2.83 0 .78.78.78 2.05 0 2.83-.79.79-2.05.79-2.83 0zM6 16V7H4v9c0 2.76 2.24 5... |
packages/wix-style-react/src/GenericModalLayout/GenericModalLayout.js | wix/wix-style-react | import classNames from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import styles from './GenericModalLayout.scss';
export default class GenericModalLayout extends React.PureComponent {
render() {
const { dataHook, fullscreen, header, content, footer } = this.props;
const con... |
src/components/ForgotPassword/ForgotPasswordForm.js | folio-org/stripes-core | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Field, Form } from 'react-final-form';
import { FormattedMessage } from 'react-intl';
import {
TextField,
Button,
Headline,
Row,
Col,
} from '@folio/stripes-components';
import OrganizationLogo from '../OrganizationLogo';... |
src/index.js | jonathanweiss/pixelboard | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, hashHistory } from 'react-router';
import App from './app.jsx';
import Clock from './apps/clock.jsx';
import FreeText from './apps/freetext.jsx';
import RandomPixels from './apps/random.jsx';
import Draw from './apps/draw.jsx';
Reac... |
code/schritte/redux/7-redux-complete-app/src/main.js | st-he/react-workshop | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import { composeWithDevTools } from 'redux-devtools-extension';
import Layout from './components/Layout';
import { rootReducer } f... |
packages/react/src/components/organisms/HeaderSlim/index.js | massgov/mayflower | /**
* HeaderSlim module.
* @module @massds/mayflower-react/HeaderSlim
* @requires module:@massds/mayflower-assets/scss/03-organisms/header-slim
*/
import React from 'react';
import PropTypes from 'prop-types';
const HeaderSlim = ({
skipNav,
siteLogo,
mainNav,
utilityNav
}) => (
<div className="ma__header... |
app/packs/src/admin/converter/AdminApp.js | ComPlat/chemotion_ELN | import React, { Component } from 'react';
import { Button } from 'react-bootstrap';
import ConverterApi from '../../components/fetchers/ConverterFetcher';
import ProfileNewModal from './create/ProfileNewModal';
import ProfileList from './list/ProfileList';
import ProfileEdit from './edit/ProfileEdit';
import ProfileCr... |
src/boilerplate-layout/components/layout/elements/loading.js | joropeza/react-fullscreen-app-boilerplate | import React from 'react';
const Loading = () => (
<div>
<p className="center" style={{ marginTop: 100, opacity: 0.5 }}>
<i className="fa fa-cog fa-spin fa-5x" />
</p>
</div>
);
export default Loading;
|
src/routes/Counter/components/Counter.js | wookiecookie87/lunch_group_creator_with_reactjs | import React from 'react'
import PropTypes from 'prop-types'
export const Counter = ({ counter, increment, doubleAsync }) => (
<div style={{ margin: '0 auto' }} >
<h2>Counter: {counter}</h2>
<button className='btn btn-primary' onClick={increment}>
Increment
</button>
{' '}
<button className... |
js/components/common/AddLocationModal.js | a-omsk/Vegreact | import React from 'react';
import Modal from 'react-modal';
import AddLocationForm from './AddLocationForm';
const modalStyle = {
overlay: {
zIndex: 10,
},
content: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
h... |
src/svg-icons/social/sentiment-satisfied.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialSentimentSatisfied = (props) => (
<SvgIcon {...props}>
<circle cx="15.5" cy="9.5" r="1.5"/><circle cx="8.5" cy="9.5" r="1.5"/><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S1... |
src/svg-icons/av/fiber-dvr.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvFiberDvr = (props) => (
<SvgIcon {...props}>
<path d="M17.5 10.5h2v1h-2zm-13 0h2v3h-2zM21 3H3c-1.11 0-2 .89-2 2v14c0 1.1.89 2 2 2h18c1.11 0 2-.9 2-2V5c0-1.11-.89-2-2-2zM8 13.5c0 .85-.65 1.5-1.5 1.5H3V9h3.5c.8... |
app/components/ConArticle.js | Toreant/monster_web | /**
* Created by apache on 15-11-14.
*/
import React from 'react';
import ConList from './ConList';
class ConArticle extends React.Component {
constructor(props) {
super(props);
}
render() {
let Result;
if(this.props.params.domain !== undefined) {
Result = (
... |
src/common/components/ErrorMessage.js | algernon/mad-tooter | // @flow
/* The Mad Tooter -- A Mastodon client
* Copyright (C) 2017 Gergely Nagy
*
* This program 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, either version 3 of the
* License, or (at your o... |
plugins/Files/js/components/unlockwarning.js | NebulousLabs/New-Sia-UI | import PropTypes from 'prop-types'
import React from 'react'
const UnlockWarning = ({ onClick }) => (
<div className='allowance-dialog unlock-warning'>
<h1 className='unlock-warning-head'>
Your wallet must be unlocked and synchronized to buy storage.
</h1>
<div className='allowance-buttons'>
... |
src/app/components/forms/inputs/XEditable.js | backpackcoder/world-in-flames | import React from 'react'
import 'X-editable/dist/bootstrap3-editable/js/bootstrap-editable.js'
import _ from 'lodash'
export default class XEditable extends React.Component {
componentDidMount() {
this.xEditable()
}
componentDidUpdate() {
this.xEditable()
}
xEditable = ()=> {
const element = ... |
src/svg-icons/social/sentiment-very-satisfied.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialSentimentVerySatisfied = (props) => (
<SvgIcon {...props}>
<path d="M11.99 2C6.47 2 2 6.47 2 12s4.47 10 9.99 10S22 17.53 22 12 17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm1... |
packages/component/src/SendBox/Assets/MicrophoneIcon.js | billba/botchat | import React from 'react';
const MicrophoneIcon = () => (
<svg height={28} viewBox="0 0 34.75 46" width={28}>
<path
className="a"
d="M29.75,23v6.36a7,7,0,0,1-.56,2.78,7.16,7.16,0,0,1-3.8,3.8,7,7,0,0,1-2.78.56H18.5v2.25H23V41H11.75v-2.25h4.5V36.5h-4.11a7,7,0,0,1-2.78-.56,7.16,7.16,0,0,1-3.8-3.8,7,7,0,... |
src/views/containers/pages/error_page/error_page.js | michaelBenin/react-ssr-spa | import React from 'react';
import PropTypes from 'prop-types';
import Footer from './../../../components/footer/footer';
function ErrorPage({ env, componentInfo, err }) {
const isDevelopment = env === 'development';
if (isDevelopment) {
console.error(err); // eslint-disable-line no-console
console.error(e... |
packages/material-ui-icons/src/FeaturedPlayList.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let FeaturedPlayList = props =>
<SvgIcon {...props}>
<path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 8H3V9h9v2zm0-4H3V5h9v2z" />
</SvgIcon>;
FeaturedPlayList = pure... |
react-ui/src/components/UpdateEmail/UpdateEmail.js | hokustalkshow/find-popular | import React, { Component } from 'react';
import ErrorAlert from '../ErrorAlert/ErrorAlert';
import SpinnerOnly from '../Spinner/SpinnerOnly';
class UpdateEmail extends Component {
constructor(props) {
super(props);
this.state = {
showEmailForm: false,
newEmail: '',
}
}
displayEmailForm = () => {
th... |
app/js/components/PITApp.js | makeing/PIT.react | import React from 'react';
import ProjectList from './Project/ProjectList';
import ProjectStore from '../stores/ProjectStore';
function getProjectState() {
return {
allProjects: ProjectStore.getAll()
};
}
export default class PITApp extends React.Component {
constructor(props) {
super(prop... |
src/js/components/nodes/NodesToolbar/NodesToolbarForm.js | knowncitizen/tripleo-ui | /**
* Copyright 2017 Red Hat 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 to... |
tests/lib/rules/vars-on-top.js | bbondy/eslint | /**
* @fileoverview Tests for vars-on-top rule.
* @author Danny Fritz
* @author Gyandeep Singh
* @copyright 2014 Danny Fritz. All rights reserved.
* @copyright 2014 Gyandeep Singh. All rights reserved.
*/
"use strict";
//------------------------------------------------------------------------------
// Requiremen... |
src/components/Clock.js | LBNL-UCB-STI/beam-viz | /*
* A stateless css-clock component
* Props: time (in seconds)
*/
import React from 'react';
import './Clock.scss';
const getHoursAngle = (time_in_seconds) => {
const time_in_hours = time_in_seconds / (60 * 60);
return time_in_hours * (360 / 12);
}
const getMinutesAngle = (time_in_seconds) => {
const time... |
client/src/components/plugins/mention-highlighter.js | shamb0t/orbit | // Based on https://github.com/banyan/react-emoji
import React from 'react';
import assign from 'object-assign';
let MentionHighlighter = () => {
return {
highlight(srcText, highlightText, options = {}) {
if(typeof srcText !== 'string') return srcText;
if(!srcText || !highlightText) return srcText;
... |
fields/types/geopoint/GeoPointColumn.js | xyzteam2016/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var GeoPointColumn = React.createClass({
displayName: 'GeoPointColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.object,
},
renderValue... |
client/admin/import/ImportHistoryPage.stories.js | Sing-Li/Rocket.Chat | import React from 'react';
import ImportHistoryPage from './ImportHistoryPage';
export default {
title: 'admin/import/ImportHistoryPage',
component: ImportHistoryPage,
};
export const _default = () => <ImportHistoryPage />;
|
src/layouts/Header.js | dash-/netjumpio-tabs-web | ///
// Dependencies
///
import React, { Component } from 'react';
import TabSetsLogo from '../elements/TabSetsLogo';
import ProfilePanelButton from '../profile/ProfilePanelButton';
///
// View
///
class Header extends Component {
render() {
return (
<div className="app-header-container dark-theme">
<div ... |
docs/src/app/components/pages/components/Paper/ExampleSimple.js | pradel/material-ui | import React from 'react';
import Paper from 'material-ui/Paper';
const style = {
height: 100,
width: 100,
margin: 20,
textAlign: 'center',
display: 'inline-block',
};
const PaperExampleSimple = () => (
<div>
<Paper style={style} zDepth={1} />
<Paper style={style} zDepth={2} />
<Paper style={s... |
examples/lists-and-named-requests/src/components/BooksList.js | jmeas/resourceful-redux | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { getStatus, getResources } from 'redux-resource';
class BooksList extends Component {
render() {
const { state } = this.props;
const searchStatus = getStatus(
state,
'books.requests.readUserBooks.status',
... |
docs/src/app/components/pages/components/DropDownMenu/ExampleLongMenu.js | tan-jerene/material-ui | import React from 'react';
import DropDownMenu from 'material-ui/DropDownMenu';
import MenuItem from 'material-ui/MenuItem';
const items = [];
for (let i = 0; i < 100; i++ ) {
items.push(<MenuItem value={i} key={i} primaryText={`Item ${i}`} />);
}
export default class DropDownMenuLongMenuExample extends React.Compo... |
app/components/Home.js | SumoCreations/SumoCreationsWeb | import React from 'react';
import { Parse } from 'parse';
export default class Home extends React.Component {
handleSSO() {
Parse.FacebookUtils.logIn(null, {
success: function(user) {
if (!user.existed()) {
alert("User signed up and logged in through Facebook!");
} else {
... |
actor-apps/app-web/src/app/components/common/Fold.React.js | Rogerlin2013/actor-platform | /* eslint-disable */
import React from 'react';
import classnames from 'classnames';
class Fold extends React.Component {
static PropTypes = {
icon: React.PropTypes.string,
iconClassName: React.PropTypes.string,
title: React.PropTypes.string.isRequired
};
state = {
isOpen: false
};
construc... |
src/components/Button.js | OpenCollective/frontend | import React from 'react';
import PropTypes from 'prop-types';
import colors from '../constants/colors';
import { Router } from '../server/pages';
import HashLink from 'react-scrollchor';
const star = '/static/images/icons/star.svg';
const icons = {
star,
};
class Button extends React.Component {
static propType... |
src/server.js | mdonthireddy/js_exp | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import 'babel-core/polyfill';
import path from 'path';
import express from 'express';
import React from 'react';
import ReactDOM from 'react-dom/server';
import Router from './routes';
import Html from './components/Html';
const server = global.... |
packages/material-ui-icons/src/LabelOutline.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let LabelOutline = props =>
<SvgIcon {...props}>
<path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16zM16 17H5V7h11l3.55... |
packages/react-ui-components/src/_lib/storyUtils.js | grebaldi/PackageFactory.Guevara | import React from 'react';
import PropTypes from 'prop-types';
/**
* The StoryWrapper is a simple component which can be used to wrap stories
* of the react-storybook lib.
*/
export const StoryWrapper = ({children, ...rest}) => (
<div
style={{background: '#000', padding: '1rem', position: 'relative'}}
... |
src/utils/filters.js | halo-design/halo-optimus | import React from 'react'
const listHasItem = (list, key, val) => {
let hasIt = false
list.map(item => {
if (item[key] === val) {
hasIt = true
}
})
return hasIt
}
export const checkBtnList = (menu, btnList, noDivider) => {
const ableBtn = []
const divider = <span className='ant-divider' />
... |
src/DayColumn.js | intljusticemission/react-big-calendar | import PropTypes from 'prop-types'
import React from 'react'
import { findDOMNode } from 'react-dom'
import clsx from 'clsx'
import Selection, { getBoundsForNode, isEvent } from './Selection'
import * as dates from './utils/dates'
import * as TimeSlotUtils from './utils/TimeSlots'
import { isSelected } from './utils/s... |
js/components/blankPage/index.js | phamngoclinh/PetOnline_vs2 |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { AppRegistry, View, TextInput, ScrollView, Dimensions, AsyncStorage } from 'react-native';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Header, Title, Content, Text, Button, Icon, List, List... |
pnpm-offline/.pnpm-store-offline/1/registry.npmjs.org/react-bootstrap/0.31.0/es/NavbarCollapse.js | JamieMason/npm-cache-benchmark | 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/Popover.js | mxc/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import CustomPropTypes from './utils/CustomPropTypes';
const Popover = React.createClass({
mixins: [ BootstrapMixin ],
propTypes: {
/**
* An html id attribute, necessary for accessibility
... |
fields/components/columns/ArrayColumn.js | Yaska/keystone | import React from 'react';
import ItemsTableCell from '../../components/ItemsTableCell';
import ItemsTableValue from '../../components/ItemsTableValue';
var ArrayColumn = React.createClass({
displayName: 'ArrayColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.object,
},
renderValue () {
... |
packages/extra/src/LinearGradient.js | finnfiddle/number-picture | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import get from 'lodash.get';
import gradients from '../node_modules/uigradients/gradients.json';
import { types } from '@potion/util';
const GRADIENTS_HASH = gradients.reduce((acc, g) => ({
...acc,
[g.name.toLowerCase()]: g.colors,
}),... |
samples/apollo-client/src/index.js | johnberzy-bazinga/FSharp.Data.GraphQL | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import QueryRunner from './QueryRunner';
ReactDOM.render(<QueryRunner />, document.getElementById('root'));
|
examples/with-algolia-react-instantsearch/components/head.js | flybayer/next.js | import NextHead from 'next/head'
import { string } from 'prop-types'
import React from 'react'
const defaultDescription = ''
const defaultOGURL = ''
const defaultOGImage = ''
export const Head = (props) => (
<NextHead>
<meta charSet="UTF-8" />
<title>{props.title || ''}</title>
<meta
name="descrip... |
packages/ringcentral-widgets-docs/src/app/pages/Components/SlideMenu/Demo.js | ringcentral/ringcentral-js-widget | import React from 'react';
// eslint-disable-next-line
import SlideMenu from 'ringcentral-widgets/components/SlideMenu';
const props = {};
/**
* A example of `SlideMenu`
*/
const SlideMenuDemo = () => <SlideMenu {...props} />;
export default SlideMenuDemo;
|
src/components/Footer/Footer.js | kuao775/mandragora | /**
* 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 withStyles from 'isom... |
packages/mineral-ui-icons/src/IconNextWeek.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconNextWeek(props: IconProps) {
const iconProps = {
rtl: true,
...props
};
return (
<Icon {...iconProps}... |
examples/todos-flow/src/components/TodoList.js | bvasko/redux | // @flow
import React from 'react'
import Todo from './Todo'
import type { Todos, Id } from '../types'
export type Props = {
todos: Todos,
onTodoClick: (id: Id) => void
};
const TodoList = ({ todos, onTodoClick }: Props) => (
<ul>
{todos.map(todo =>
<Todo
key={todo.id}
{...todo}
... |
src/components/MessageDialog/MessageDialog.js | austinknight/ui-components | import React from 'react';
import styled from 'styled-components';
import Modal from '../Modal'
import ButtonBar from '../ButtonBar';
import {
colors,
fontSizes,
typography,
renderThemeIfPresentOrDefault,
} from '../styles';
const Title = styled.div`
width: 100%;
color: ${renderThemeIfPresentOrDefault({ ... |
20200300-js-spa-react-node-sql/client/src/components/UIHelpModal.js | DamienFremont/blog | import React from 'react';
import { FormattedMessage } from 'react-intl';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faCheck } from '@fortawesome/free-solid-svg-icons';
import { Button, Modal, ModalFooter } from 'reactstrap';
const UIHelpModal = (props) => {
const settingsName = pr... |
src/parser/shaman/elemental/modules/talents/MasterOfTheElements.js | sMteX/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import StatisticBox, { STATISTIC_ORDER } from 'interface/others/StatisticBox';
import { formatNumber, formatPercentage } from 'common/format';
import SpellIcon from 'common/SpellIcon';
import SPELLS from 'common/SPELLS';
import calculateEffectiveD... |
client/modules/Post/__tests__/components/PostListItem.spec.js | acguanacaste/liomysSalvini | import React from 'react';
import test from 'ava';
import sinon from 'sinon';
import PostListItem from '../../components/PostListItem/PostListItem';
import { mountWithIntl, shallowWithIntl } from '../../../../util/react-intl-test-helper';
const post = { name: 'Prashant', title: 'Hello Mern', slug: 'hello-mern', cuid: ... |
node_modules/react-router/es6/RouteUtils.js | jvstrpv/reactredux_2 | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
import React from 'react';
function isValidChild(object) {
... |
Libraries/Text/Text.js | rickbeerendonk/react-native | /**
* 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.
*
* @provides... |
App/Components/LandmarkList.js | quickresolve/CycleTheBay | "use strict";
import React, { Component } from 'react';
import {
StyleSheet,
Text,
TouchableOpacity,
ScrollView,
Image,
TabBarIOS,
AlertIOS,
ListView,
View,
AppActions,
navigator
} from 'react-native';
import Trail from './Trail'
import Main from './Main'
import Weather from './Weather'
import L... |
packages/ringcentral-widgets/components/MultiCallAnswerButton/index.js | u9520107/ringcentral-js-widget | import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import AnswerIcon from '../../assets/images/Answer.svg';
import HoldIcon from '../../assets/images/Hold.svg';
import EndIcon from '../../assets/images/End.svg';
import CircleButton from '../CircleButton';
import style... |
src/svg-icons/av/movie.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvMovie = (props) => (
<SvgIcon {...props}>
<path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"/>
</SvgIcon>
);
AvMovie = pure(AvMovie);
Av... |
src/svg-icons/navigation/subdirectory-arrow-right.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationSubdirectoryArrowRight = (props) => (
<SvgIcon {...props}>
<path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"/>
</SvgIcon>
);
NavigationSubdirectoryArrowRight = pure(Navigat... |
imports/ui/components/Transition/Slide.js | ShinyLeee/meteor-album-app | import PropTypes from 'prop-types';
import React from 'react';
import CSSTransition from 'react-transition-group/CSSTransition';
const SlideTransition = ({ children, ...props }) => (
<CSSTransition
{...props}
classNames="slide"
timeout={300}
appear
>
{children}
</CSSTransition>
);
SlideTrans... |
packages/ringcentral-widgets/components/CopyToClipboard/index.js | ringcentral/ringcentral-js-widget | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { Button } from '../Button';
import styles from './styles.scss';
import i18n from './i18n';
class CopyToClipboard extends Component {
executeCopy() {
this.copyTextArea.focus();
this.copyT... |
node_modules/react-dnd/examples/_dustbin-interesting/index.js | asm-products/notello | 'use strict';
import React from 'react';
import Container from './Container';
const DustbinSorted = React.createClass({
render() {
return (
<div>
<Container />
<hr />
<p>
Several different dustbins can handle several types of items. Note that the last dustbin is special: ... |
static/src/components/StatsPanel.js | Firazenics/finalreckoningbot | // @flow
import React from 'react';
import numeral from 'numeral';
import * as StatsActions from '../actions/StatsActions';
import Constants from '../Constants';
const BOTTOM_PADDING = 8;
const StatsRow = ({icon, label, value}) => {
return (
<div className="stats-row">
<img src={icon} />
<div class... |
2021/src/components/Typography/Text.js | sjamcsclub/jamhacks.ca | import React from 'react';
import styled from 'styled-components';
import { media } from '../../utils/media';
const Text = styled.p`
color: ${(props) =>
props.dark
? props.theme.colors.text.dark.text
: props.theme.colors.text.light.text};
&::selection {
background: ${(props) =>
props.dark... |
app/js/components/LoadingIndicator.js | niksoc/srmconnect | import React from 'react';
const LoadingIndicator = ()=>(<p>loading...</p>);
export default LoadingIndicator;
|
packages/icons/src/dv/Fortran.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function DvFortran(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M7.314 38.048h2.954c1.637 0 3.246-.925 3.246-3.224V13.176c0-2.912-.97-3.224-3.987-3.224H7.5V6h33.186v14.362h-3.87c0-3.431-.392-5.939-1.373-7.81-1.08-... |
src/server.js | wework/react-redux-universal-hot-example | import Express from 'express';
import React from 'react';
import Location from 'react-router/lib/Location';
import config from './config';
import favicon from 'serve-favicon';
import compression from 'compression';
import httpProxy from 'http-proxy';
import path from 'path';
import createStore from './redux/create';
im... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.