path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/svg-icons/action/book.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionBook = (props) => (
<SvgIcon {...props}>
<path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"/>
</SvgIcon>
);
ActionBook = pure(ActionBook);
Ac... |
examples/js/selection/select-bgcolor-table.js | prajapati-parth/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
products.push({
id: id,
... |
app/javascript/mastodon/features/compose/components/character_counter.js | anon5r/mastonon | import React from 'react';
import PropTypes from 'prop-types';
import { length } from 'stringz';
export default class CharacterCounter extends React.PureComponent {
static propTypes = {
text: PropTypes.string.isRequired,
max: PropTypes.number.isRequired,
};
checkRemainingText (diff) {
if (diff < 0)... |
src/svg-icons/communication/stay-current-landscape.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationStayCurrentLandscape = (props) => (
<SvgIcon {...props}>
<path d="M1.01 7L1 17c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2H3c-1.1 0-1.99.9-1.99 2zM19 7v10H5V7h14z"/>
</SvgIcon>
);
Communicat... |
src/svg-icons/action/settings-brightness.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsBrightness = (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-2zm0 16.01H3V4.99h18v14.02zM8 16h2.5l1.5 1.5 1.5-1.5H16v-2.5l1.5-1... |
demo/src/Dialogs.js | kiloe/ui | import React from 'react';
import Doc from './Doc';
import View from '../../package/View';
export default class Dialogs extends React.Component {
constructor(...args){
super(...args);
this.state = {};
window.hideDialog = this.hide;
}
show = () => {
this.setState({show: true});
}
hide = ()... |
src/client.js | bdefore/universal-redux | import React from 'react';
import ReactDOM from 'react-dom';
import createStore from './shared/create';
import { render as renderDevtools } from './client/devtools';
// dependencies of external source. these resolve via webpack aliases
// as assigned in merge-configs.js
import middleware, { middlewareAppliedCallback ... |
src/components/Notification/index.js | deep-c/react-redux-notify | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames/bind';
import styles from './Notification.scss';
export class Notification extends React.PureComponent {
static propTypes = {
id: PropTypes.number.isRequired,
type: PropTypes.string.isRequired,
canDismiss: P... |
client/src/components/ListGroup/ListGroupItem.js | silverstripe/silverstripe-admin | import React, { Component } from 'react';
import PropTypes from 'prop-types';
class ListGroupItem extends Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
handleClick(event) {
if (this.props.onClick) {
this.props.onClick(event, this.props.onClick... |
examples/huge-apps/components/Dashboard.js | ksivam/react-router | import React from 'react'
import { Link } from 'react-router'
class Dashboard extends React.Component {
render() {
const { courses } = this.props
return (
<div>
<h2>Super Scalable Apps</h2>
<p>
Open the network tab as you navigate. Notice that only the amount of
you... |
docs/containers/callout/index.js | aruberto/react-foundation-components | import React from 'react';
import { Callout } from '../../../src/callout';
const CalloutPage = () => (
<div>
<Callout>
<h5>This is a callout.</h5>
<p>It has an easy to override visual style, and is appropriately subdued.</p>
<a href="#">It's dangerous to go alone, take this.</a>
</Callout>... |
src/icons/IosToggle.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosToggle extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<path d="M128,320c-26.467,0-48,21.533-48,48s21.533,48,48,48s48-21.533,48-48S154.467,320,128,320z"></path>
<path d="M383.5,... |
src/pwa.js | prakash-u/react-redux | import React from 'react';
import ReactDOM from 'react-dom/server';
import Html from './helpers/Html';
export default function () {
return `<!doctype html>${ReactDOM.renderToStaticMarkup(<Html />)}`;
}
|
app/javascript/mastodon/containers/compose_container.js | increments/mastodon | import React from 'react';
import { Provider } from 'react-redux';
import PropTypes from 'prop-types';
import configureStore from '../store/configureStore';
import { hydrateStore } from '../actions/store';
import { IntlProvider, addLocaleData } from 'react-intl';
import { getLocale } from '../locales';
import Compose f... |
docs/app/Examples/elements/Rail/Variations/RailExampleAttachedInternal.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import { Image, Rail, Segment } from 'semantic-ui-react'
const RailExampleAttachedInternal = () => (
<Segment>
<Image src='http://semantic-ui.com/images/wireframe/paragraph.png' />
<Rail attached internal position='left'>
<Segment>Left Rail Content</Segment>
</Rail>
... |
node_modules/semantic-ui-react/dist/es/collections/Message/MessageContent.js | SuperUncleCat/ServerMonitoring | import _extends from 'babel-runtime/helpers/extends';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { customPropTypes, getElementType, getUnhandledProps, META } from '../../lib';
/**
* A message can contain a content.
*/
function MessageContent(props) {
var chi... |
fields/types/markdown/MarkdownField.js | Adam14Four/keystone | import Field from '../Field';
import React from 'react';
import { FormInput } from 'elemental';
/**
* TODO:
* - Remove dependency on jQuery
*/
// Scope jQuery and the bootstrap-markdown editor so it will mount
var $ = require('jquery');
require('./lib/bootstrap-markdown');
// Append/remove ### surround the select... |
docs/app/Examples/collections/Grid/ResponsiveVariations/GridExampleStackable.js | aabustamante/Semantic-UI-React | import React from 'react'
import { Grid, Image, Segment } from 'semantic-ui-react'
const GridExampleStackable = () => (
<Grid stackable columns={2}>
<Grid.Column>
<Segment>
<Image src='/assets/images/wireframe/paragraph.png' />
</Segment>
</Grid.Column>
<Grid.Column>
<Segment>
... |
docs/pages/api-docs/accordion-details.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/accordion-details';
const requireRaw = require.context('!raw-loader!./', false, /\/accordion-details\.md$/);
export default ... |
src/components/Video/index.js | welovekpop/uwave-web-welovekpop.club | import cx from 'classnames';
import isEqual from 'is-equal-shallow';
import React from 'react';
import PropTypes from 'prop-types';
import screenfull from 'screenfull';
import injectMediaSources from '../../utils/injectMediaSources';
import VideoBackdrop from './VideoBackdrop';
import VideoProgressBar from './VideoProg... |
src/browser/users/UsersPage.js | sikhote/davidsinclair | // @flow
import OnlineUsers from './OnlineUsers';
import React from 'react';
import linksMessages from '../../common/app/linksMessages';
import { Box, PageHeader } from '../../common/components';
import { Title } from '../components';
const UsersPage = () => (
<Box>
<Title message={linksMessages.users} />
<P... |
pootle/static/js/browser/components/TranslateActions.js | evernote/zing | /*
* Copyright (C) Zing contributors.
*
* This file is a part of the Zing project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import React from 'react';
import { t } from 'utils/i18n';
im... |
TGMeituan/Components/Common/HotView.js | targetcloud/Meituan | /**
* Created by targetcloud on 2016/12/22.
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Image,
TouchableOpacity
} from 'react-native';
var Dimensions = require('Dimensions');
var {width} = Dimensions.get('window');
var HotView = React.createClas... |
src/components/pagination.js | asommer70/dvdpila.electron | // import React, { Component } from 'react';
import React from 'react';
const Pagination = ({pages, currentPage, handleClick}) => {
console.log('pages:', pages);
return (
<ul className="pagination text-center" role="navigation" aria-label="Pagination">
<li className="pagination-previous"><a href="#" aria... |
src/components/app/App.js | gtdudu/hapi-wurb | import React from 'react';
import PropTypes from 'prop-types';
const App = ({ children }) => {
return (
<div>
{children}
</div>
);
};
App.propTypes = {
children : PropTypes.object
};
export default App;
|
src/searchbar/SearchBar-ios.js | martinezguillaume/react-native-elements | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import {
Button,
Dimensions,
LayoutAnimation,
UIManager,
StyleSheet,
View,
ActivityIndicator,
Text,
} from 'react-native';
import Ionicon from 'react-native-vector-icons/Ionicons';
import ViewPropTypes from '../config/ViewPro... |
docs/pages/api-docs/input.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/input';
const requireRaw = require.context('!raw-loader!./', false, /\/input\.md$/);
export default function Page({ docs }) ... |
client/src/App.js | chi-bumblebees-2017/gnomad | import React, { Component } from 'react';
import './App.css';
import Conversation from './Conversation';
import Conversations from './Conversations';
import NewProfile from './NewProfile';
import NavBar from './NavBar';
import Login from './components/Login';
import Profile from './components/Profile';
import SearchCon... |
src/icons/StrokeBasket.js | ipfs/webui | import React from 'react'
const StrokeBasket = props => (
<svg viewBox='0 0 100 100' {...props}>
<path d='M83.4 42.43h-6.89V27a8.77 8.77 0 0 0-8.32-8.75A3.46 3.46 0 0 0 64.74 15H40.09a3.47 3.47 0 0 0-3.45 3.23A8.78 8.78 0 0 0 28.32 27v15.43h-6.88c-3.46 0-6.27 3.3-6.27 7.35v1.85a7.61 7.61 0 0 0 3.35 6.48l3.65 20 ... |
example/src/app.js | derzunov/redux-react-i18n | import React from 'react';
import ReactDOM from 'react-dom';
import { createStore, combineReducers } from 'redux';
import { Provider } from 'react-redux';
import { i18nReducer, i18nActions } from 'redux-react-i18n';
let reducers = {};
import { reducer as formReducer } from 'redux-form'
reducers.form = formReducer;
red... |
src/Col.js | zanjs/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import styleMaps from './styleMaps';
import CustomPropTypes from './utils/CustomPropTypes';
const Col = React.createClass({
propTypes: {
/**
* The number of columns you wish to span
*
* for Extra small devices Phones (<768px)
*
... |
scripts/dashboard/components/ProjectForm/view.js | vedranjukic/dockerino | import React from 'react'
import { FormControl, FormGroup, ControlLabel, HelpBlock, Button } from 'react-bootstrap';
import ProjectFormServiceList from './ProjectFormServiceList'
import ProjectFormPortList from './ProjectFormPortList'
function view (props, state) {
const project = state.project
if (!project) {... |
src/components/Widgets/ListControl.js | dopry/netlify-cms | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { List, Map, fromJS } from 'immutable';
import { sortable } from 'react-sortable';
import FontIcon from 'react-toolbox/lib/font_icon';
import ObjectControl from './ObjectControl';
import styles from './ListControl.css';
function ListI... |
weather-app/src/containers/weather_list.js | murielg/react-redux | import _ from 'lodash';
import React, { Component } from 'react';
import {connect} from 'react-redux';
import Chart from '../components/chart';
import GoogleMap from '../components/google_map';
class WeatherList extends Component {
renderWeather (cityData) {
const name = cityData.city.name;
const strokeWidth... |
frontend/src/components/BackupConfig/ConnHistory.js | XiaocongDong/mongodb-backup-manager | import React, { Component } from 'react';
import Draggable from 'components/Draggable';
import object from 'utility/object';
class HistoryHeader extends Draggable {
render() {
const ids = this.props.selectedIds;
return (
<div className="history-connections-header" ref={ input => th... |
docs/app/Examples/collections/Form/Variations/FormExampleSize.js | aabustamante/Semantic-UI-React | import React from 'react'
import { Button, Divider, Form } from 'semantic-ui-react'
const sizes = ['mini', 'tiny', 'small', 'large', 'big', 'huge', 'massive']
const FormExampleSize = () => (
<div>
{sizes.map(size => (
<Form size={size} key={size}>
<Form.Group widths='equal'>
<Form.Field ... |
src/js/components/InfiniteScroll/stories/HeightReplace.js | grommet/grommet | import React from 'react';
import { Box, InfiniteScroll, Text } from 'grommet';
const allItems = Array(240)
.fill()
.map((_, i) => i + 1);
export const HeightReplace = () => (
// Uncomment <Grommet> lines when using outside of storybook
// <Grommet theme={...}>
<Box>
<InfiniteScroll items={allItems} re... |
example/src/screens/types/tabs/TabOne.js | junedomingo/react-native-navigation | import React from 'react';
import {View, Text} from 'react-native';
class TabOne extends React.Component {
render() {
return (
<View>
<Text>Tab One</Text>
</View>
);
}
}
export default TabOne;
|
src/partials/announcement.js | getinsomnia/insomnia.rest | import React from 'react';
class Announcement extends React.Component {
static defaultProps = {
loggedIn: false,
};
constructor(props) {
super(props);
this.state = {
visible: false,
};
}
componentDidMount() {
const { storageKey } = this.props;
if (localStorage.getItem(`announ... |
admin/client/App/screens/Home/components/Section.js | danielmahon/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... |
babel-plugin-css-in-js/button.js | MicheleBertoli/css-in-js | import React from 'react';
import { render } from 'react-dom';
const styles = cssInJS({
container: {
textAlign: 'center'
},
button: {
backgroundColor: '#ff0000',
width: 320,
padding: 20,
borderRadius: 5,
border: 'none',
outline: 'none',
':hover': {
color: '#fff'
},
'... |
src/pages/about.js | dkonieczek/dkonieczek.github.io | import React from 'react';
import Link from 'gatsby-link';
import frontend from '../assets/frontend.png';
import backend from '../assets/backend.png';
import tools from '../assets/tools.png';
import creative from '../assets/creative.png';
import design from '../assets/design.png';
const AboutPage = () => (
<div cla... |
client/modules/users/components/bye.js | freiraumpetersburg/mitgliederverwaltung | import {Meteor} from 'meteor/meteor';
import React from 'react';
class Bye extends React.Component {
componentWillMount() {
Meteor.logout();
}
render() {
return (
<div>
<h2>Bye</h2>
<p>Hope to see you soon!</p>
</div>
);
}
}
export default Bye;
|
examples/todos/src/index.js | gaearon/redux | import React from 'react'
import { render } from 'react-dom'
import { createStore } from 'redux'
import { Provider } from 'react-redux'
import App from './components/App'
import rootReducer from './reducers'
const store = createStore(rootReducer)
render(
<Provider store={store}>
<App />
</Provider>,
documen... |
client/react/src/components/common/Header.js | peasy/peasy-js-samples | import React from 'react';
import { NavLink } from 'react-router-dom';
import constants from '../../constants';
let routes = constants.routes;
const Header = () => {
return (
<nav className="navbar navbar-expand-lg navbar-dark bg-dark">
<ul className="navbar-nav mr-auto">
<li className="nav-item">
<... |
packages/mineral-ui-icons/src/IconWifiTethering.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 IconWifiTethering(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...icon... |
boilerplates/project/pcWeb/src/components/App/App.js | FuluUE/vd-generator | import React from 'react';
import PropTypes from 'prop-types';
class App extends React.Component {
static defaultProps = {}
static propTypes = {}
constructor(props) {
super(props);
}
render() {
return 'Hello World!'
}
}
export default App;
|
src/svg-icons/device/battery-charging-60.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBatteryCharging60 = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V11h3.87L13 7v4h4V5.33C17 4.6 16.4 4 15.67 4z"/><path d="M13 12.5h2L11 20v-5.5H9l1... |
frontend/src/Map.js | googleinterns/step238-2020 | import React, { Component } from 'react';
import ITINERARY_KEY from "./configMap";
import WEATHER_KEY from "./configWeather";
import './Itinerary.css';
import Button from "react-bootstrap/Button";
class Map extends Component {
constructor(props) {
super(props);
this.onScriptLoad = this.onScriptLoa... |
expense-manager-app/src/routers/AppRouter.js | VeeShostak/Expense-Manager | import React from 'react';
import {Router, Route, Switch, Link, NavLink} from 'react-router-dom';
import createHistory from 'history/createBrowserHistory';
import ExpenseDashboardPage from '../components/ExpenseDashboardPage';
import AddExpensePage from '../components/AddExpensePage';
import EditExpensePage from '../co... |
webpack/scenes/Subscriptions/Manifest/DeleteManifestModalText.js | johnpmitsch/katello | import React from 'react';
import { translate as __ } from 'foremanReact/common/I18n';
const question = __('Are you sure you want to delete the manifest?');
const note = __(`Note: Deleting a subscription manifest is STRONGLY discouraged.
Deleting a manifest will:`);
const l1 = __('Delete all subscript... |
src/containers/home-container.js | ChrisRast/Le-Taguenet | import React from 'react';
import * as r from 'react-router-dom';
import * as ui from 'semantic-ui-react';
import {
ROUTES
} from '../config/routes';
export default class Home extends React.PureComponent {
render () {
return (
<ui.Container
text
>
<ui.Header>
Bienvenus sur Le Taguenet !
</ui... |
app/components/GeneratedKeysView.js | ixje/neon-wallet-react-native | import React from 'react'
import { ScrollView, View, Text, StyleSheet, TextInput, Clipboard } from 'react-native'
import KeyDataRow from './KeyDataRow'
import Button from './Button'
import { DropDownHolder } from '../utils/DropDownHolder'
import PropTypes from 'prop-types'
class GeneratedKeysView extends React.Compone... |
src/settings/OwnerSettings.js | folio-org/ui-users | import _ from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
import {
injectIntl,
FormattedMessage,
} from 'react-intl';
import { Field } from 'react-final-form';
import {
MultiSelection,
Label,
} from '@folio/stripes/components';
import { ControlledVocab } from '@folio/stripes/smart-c... |
src/components/layout/Sidebar.js | huang6349/react-dva | import React, { Component } from 'react';
import {
Icon,
Menu,
} from 'antd';
import PropTypes from 'prop-types';
import { Link } from 'dva/router';
import { isEqual, isEmpty, last, uniq, filter, difference } from 'underscore';
import { MENU } from '../../utils/constants';
import styles from './Sidebar.css';
cla... |
examples/shared-root/app.js | whouses/react-router | import React from 'react';
import { Router, Route, Link } from 'react-router';
var App = React.createClass({
render() {
return (
<div>
<p>
This illustrates how routes can share UI w/o sharing the URL.
When routes have no path, they never match themselves but their
chil... |
src/client/devtools.js | apazzolini/rook | import React from 'react';
import { compose as _compose, applyMiddleware } from 'redux';
import { createDevTools, persistState } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
export const DevTools = createDevTools(
<DockMonitor tog... |
src/components/Board/Output/SymbolOutput/BackspaceButton/BackspaceButton.js | shayc/cboard | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import IconButton from '@material-ui/core/IconButton';
import BackspaceIcon from '@material-ui/icons/Backspace';
import { Scannable } from 'react-scannable';
const styles = {
button: {... |
src/svg-icons/image/filter-6.js | lawrence-yu/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... |
src/lens/negative-space/LensBottom.js | ethanselzer/react-image-magnify | import React from 'react';
import objectAssign from 'object-assign';
import clamp from 'clamp';
import Lens from './Lens';
import LensPropTypes from '../../prop-types/Lens';
const LensBottom = ({
cursorOffset,
position,
fadeDurationInMs,
isActive,
isPositionOutside,
smallImage,
style: paren... |
app/containers/HomePage.js | andrewjong/react-interactive-calculator | // @flow
import React, { Component } from 'react';
import Home from '../components/Home';
export default class HomePage extends Component {
render() {
return (
<Home />
);
}
}
|
src/browser/intl/SwitchLocale.js | sikhote/davidsinclair | // @flow
import type { State } from '../../common/types';
import React from 'react';
import { Box, Button } from '../../common/components';
import { compose } from 'ramda';
import { connect } from 'react-redux';
import { setCurrentLocale } from '../../common/intl/actions';
type SwitchLocaleProps = {
currentLocale: s... |
docs/app/Examples/collections/Table/Variations/TableExampleVeryCompact.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import { Table } from 'semantic-ui-react'
const TableExampleVeryCompact = () => {
return (
<Table compact='very'>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Name</Table.HeaderCell>
<Table.HeaderCell>Status</Table.HeaderCell>
<Table.HeaderCel... |
app/javascript/mastodon/features/generic_not_found/index.js | im-in-space/mastodon | import React from 'react';
import Column from '../ui/components/column';
import MissingIndicator from '../../components/missing_indicator';
const GenericNotFound = () => (
<Column>
<MissingIndicator fullPage />
</Column>
);
export default GenericNotFound;
|
src/Components/IconLargeFlatButtonGroup.js | charlesbao/jinjiu_mission_app | import React, { Component } from 'react';
import { Box } from './FlexBox'
import FlatButton from 'material-ui/FlatButton';
import FontIcon from 'material-ui/FontIcon';
import CONSTANTS from '../Constants'
const IconFlatButtonGroup = ({onTap})=>(
<Box style={{margin:"10px 0"}}>
<IconFlatButton label="钱包" i... |
actor-apps/app-web/src/app/components/activity/GroupProfileMembers.react.js | zomeelee/actor-platform | import _ from 'lodash';
import React from 'react';
import { PureRenderMixin } from 'react/addons';
import DialogActionCreators from 'actions/DialogActionCreators';
import LoginStore from 'stores/LoginStore';
import AvatarItem from 'components/common/AvatarItem.react';
const GroupProfileMembers = React.createClass(... |
client/room.js | rewired-live/assemble | import React from 'react'
import { render } from 'react-dom'
import { LocaleProvider } from 'antd'
import enUS from 'antd/lib/locale-provider/en_US'
import Main from './room/main'
window.onload = () => {
render(
<LocaleProvider locale={enUS}>
<Main />
</LocaleProvider>,
document.querySelector('#rea... |
common/shared/add-post/add-review/FileUpload.js | gobble43/gobble-dist-web | import React, { Component } from 'react';
import config from './../../../../env/client.js';
class FileUpload extends Component {
componentDidMount() {
const Dropzone = window.Dropzone;
const dropzone = new Dropzone('#dropzone', { url: `${config.GOBBLE_MEDIA_URL}/api/media` });
dropzone.on('success', (err... |
src/app/components/list/Contact.js | cherishstand/OA-react | import React from 'react';
import ReactDOM from 'react-dom';
import {List, ListItem} from 'material-ui/List';
import Drawer from 'material-ui/Drawer';
import {Link} from 'react-router';
import fetch from 'isomorphic-fetch';
import AppBar from 'material-ui/AppBar';
import Search from '../public/Search';
import MenuTotal... |
MobileApp/mstudentApp/components/Home.js | FresnoState/mobilestudentintranet | import React, { Component } from 'react';
import {
Text,
View,
ListView,
Platform
} from 'react-native';
import {Icon} from 'native-base';
import FCM, {FCMEvent, RemoteNotificationResult, WillPresentNotificationResult, NotificationType} from 'react-native-fcm';
import message from '../modules/message.js... |
app/javascript/mastodon/features/ui/components/zoomable_image.js | salvadorpla/mastodon | import React from 'react';
import PropTypes from 'prop-types';
const MIN_SCALE = 1;
const MAX_SCALE = 4;
const getMidpoint = (p1, p2) => ({
x: (p1.clientX + p2.clientX) / 2,
y: (p1.clientY + p2.clientY) / 2,
});
const getDistance = (p1, p2) =>
Math.sqrt(Math.pow(p1.clientX - p2.clientX, 2) + Math.pow(p1.client... |
src/Slides.js | tmpaul06/gathering-client | import React from 'react';
import UserStore from './stores/UserStore';
import { socket } from './socket';
import Background from './Background';
export default class Slides extends React.Component {
constructor(props) {
super(props);
let masterState = UserStore.masterState || {};
this.state = {
sli... |
src/svg-icons/maps/pin-drop.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsPinDrop = (props) => (
<SvgIcon {...props}>
<path d="M18 8c0-3.31-2.69-6-6-6S6 4.69 6 8c0 4.5 6 11 6 11s6-6.5 6-11zm-8 0c0-1.1.9-2 2-2s2 .9 2 2-.89 2-2 2c-1.1 0-2-.9-2-2zM5 20v2h14v-2H5z"/>
</SvgIcon>
);
... |
app/src/Navigation.js | darjanin/xp-library | import React from 'react'
import databaseUtils from './pages/utils/DatabaseUtils'
export default class Navigation extends React.Component {
constructor(props) {
super(props)
this.state = {
userInfo: null,
}
}
componentWillMount() {
let userId = this.props.userId
if (userId... |
src/components/FinishMilestone.js | tborisova/fridment-react | import React, { Component } from 'react';
import { Redirect } from 'react-router-dom'
class FinishMilestone extends Component {
componentDidMount() {
fetch(`/milestones/finish/${this.props.match.params.milestone_id}`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Cont... |
src/components/Architecture/Architecture.js | malinowsky/dataroot_03 | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-... |
react-ui/src/components/FourOhFour.js | civicparty/legitometer | import React from 'react'
const FourOhFour = ({ }) => (
<div>Oops! This page doesn't exisit. It must be fake news. Go back to <a href="/">home</a>.</div>
)
export default FourOhFour
|
code/workspaces/web-app/src/containers/sites/CreateSiteDialogContainer.js | NERC-CEH/datalab | import React from 'react';
import CreateStacksModalWrapper from '../modal/CreateStacksModalWrapper';
import CreateSiteDialog from '../../components/modal/CreateSiteDialog';
const CreateSiteDialogContainer = props => <CreateStacksModalWrapper Dialog={CreateSiteDialog} {...props} />;
export default CreateSiteDialogCont... |
src/Parser/Warlock/Demonology/Modules/Features/DoomguardInfernal.js | hasseboulen/WoWAnalyzer | import React from 'react';
import Analyzer from 'Parser/Core/Analyzer';
import AbilityTracker from 'Parser/Core/Modules/AbilityTracker';
import Combatants from 'Parser/Core/Modules/Combatants';
import calculateMaxCasts from 'Parser/Core/calculateMaxCasts';
import SPELLS from 'common/SPELLS';
import SpellLink from 'co... |
assets/js/containers/TweetTimelineContainer.js | chocoelho/twitter-activities-monitor | import React from 'react';
import ReactDOM from 'react-dom';
import TweetPaginator from '../components/TweetPaginator';
import TweetModal from '../components/TweetModal'
import TweetFilterContainer from '../containers/TweetFilterContainer'
import Spinner from '../components/Spinner';
var TweetTimelineContainer = React... |
src/svg-icons/image/iso.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageIso = (props) => (
<SvgIcon {...props}>
<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-2zM5.5 7.5h2v-2H9v2h2V9H9v2H7.5V9h-2V7.5zM19 19H5L19 5v14zm-2-2v-1.5h-5V17h5z"/>
... |
client/components/Root/Root.js | marcocom/portfolio-react-webpack2 | import React from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'react-redux';
import { Router } from 'react-router';
import routes from '../../routes';
import DevTools from '../DevTools';
const isProd = process.env.NODE_ENV === 'production';
export default function Root(props) {
const { sto... |
fields/types/localfiles/LocalFilesField.js | michaelerobertsjr/keystone | import _ from 'lodash';
import bytes from 'bytes';
import Field from '../Field';
import React from 'react';
import { Button, FormField, FormInput, FormNote } from 'elemental';
const ICON_EXTS = [
'aac', 'ai', 'aiff', 'avi', 'bmp', 'c', 'cpp', 'css', 'dat', 'dmg', 'doc', 'dotx', 'dwg', 'dxf', 'eps', 'exe', 'flv', 'gif... |
src/renderer/app.js | airtoxin/youtubar | import React from 'react';
import lodash from 'lodash';
import { render } from 'react-dom';
import { root } from 'baobab-react/higher-order';
import App from './views/App';
import tree from './tree';
import * as localStorageService from './services/localstorage';
import middlewares from './middlewares';
import apiClien... |
src/components/graph.js | saiteja/SvgWithReact | import React from 'react';
import Axis from './axis';
import GraphBody from './graph_body';
import Task from './task';
import Start from './start';
import Stop from './stop';
export default class Graph extends React.Component {
static defaultProps = { width: 800, height: 600 };
render() {
var indents = ... |
docs/app/Examples/modules/Rating/Types/RatingExampleHeart.js | mohammed88/Semantic-UI-React | import React from 'react'
import { Rating } from 'semantic-ui-react'
const RatingExampleHeart = () => (
<Rating icon='heart' defaultRating={1} maxRating={3} />
)
export default RatingExampleHeart
|
app/components/playlist_track.js | AlienStream/experimental-frontend | import React from 'react';
class PlaylistTrack extends React.Component {
render() {
return (
<li className="list-group-item">
<div className="pull-right m-l">
<a href="#" className="m-r-sm"><i className="icon-heart"></i></a>
<a href="#" cl... |
src/app/components/Number.js | XPRO-LTD/resource-managment-react | import React, { Component } from 'react';
class Number extends Component {
render(){
return (
<h1 style={{color: this.props.color }}> { this.props.data } </h1>
);
}
}
export default Number; |
examples/js/basic/single-column-table.js | AllenFang/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
products.push({
id: id,
... |
src/svg-icons/action/https.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionHttps = (props) => (
<SvgIcon {...props}>
<path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-... |
src/InputField/index.js | WolfgaungBeer/scado | import React from 'react';
import { oneOf, node, bool, string, func } from 'prop-types';
import fieldPropTypes from '../fieldPropTypes';
import defaultFieldPropTypes from '../defaultFieldPropTypes';
import { FieldWrapper, FieldInput } from './styled';
import Icon from '../Icon';
import Text from '../Text';
const propT... |
MobileApp/node_modules/babel-plugin-react-transform/test/fixtures/code-class-extends-component-with-render-method/actual.js | VowelWeb/CoinTradePros.com | import React, { Component } from 'react';
class Foo extends Component {
render() {}
}
|
src/client.js | codejunkienick/katakana | /**
* THIS IS THE ENTRY POINT FOR THE CLIENT, JUST LIKE server.js IS THE ENTRY POINT FOR THE SERVER.
*/
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import ga from 'react-ga';
import createStore from './redux/create';
import ApiClient from './helpers/ApiClient';
import io from... |
packages/editor/src/core/maps.js | strues/boldr | import React from 'react';
export const getHeadings = lang => [
{
key: 'header-one',
title: `${lang.controls.header} 1`,
text: <h1>{lang.controls.header} 1</h1>,
type: 'block-type',
command: 'header-one',
},
{
key: 'header-two',
title: `${lang.controls.header} 2`,
text: <h2>{lang.... |
mixins/ContainerMixin.js | FaridSafi/react-native-gifted-form | import React from 'react';
import PropTypes from 'prop-types';
import {
ScrollView,
View,
Platform,
Dimensions
} from 'react-native';
var GiftedFormManager = require('../GiftedFormManager');
module.exports = {
propTypes: {
formName: PropTypes.string,
scrollOnTap: PropTypes.bool,
scrollEnabled: ... |
addons/a11y/.storybook/components/Button/component.js | rhalff/storybook | import React from 'react';
import PropTypes from 'prop-types';
const styles = {
button: {
padding: '12px 6px',
fontSize: '12px',
lineHeight: '16px',
borderRadius: '5px',
},
ok: {
backgroundColor: '#028402',
color: '#ffffff',
},
wrong: {
color: '#ffffff',
backgroundColor: '#4ca... |
views/notfound_page.js | SpaceyRezum/react-trivia-game | import React from 'react';
import { Link } from 'react-router';
class PageNotFound extends React.Component {
render() {
return (
<div className="page-not-found-container">
<p>Oh no! It looks like you've gone off-path!</p>
<p>For your safety, please head back to the <Link to="/">main page and check out ou... |
src/svg-icons/hardware/laptop.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareLaptop = (props) => (
<SvgIcon {...props}>
<path d="M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"/>
</SvgIcon>
);
HardwareLaptop = pure(Hardwa... |
src/components/PrevNext/PrevNext.js | joyvuu-dave/comeals-ui-react | // rendered by DateBox
import React from 'react'
import { Link } from 'react-router'
import classes from './PrevNext.scss'
type Props = {
prevId: number,
nextId: number,
ui: {
disabled: boolean,
hidden: boolean
}
};
export class PrevNext extends React.Component<void, Props, void> {
constructor () {
... |
src/Pagination.js | andrew-d/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import PaginationButton from './PaginationButton';
import CustomPropTypes from './utils/CustomPropTypes';
import SafeAnchor from './SafeAnchor';
const Pagination = React.createClass({
mixins: [BootstrapMixi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.