path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
react_version/src/AppHeader/AppHeader.js | maju435/drozdz | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import './AppHeader.css';
import { Link } from 'react-router-dom';
class AppHeader extends Component {
render() {
return (
<header className="App-header">
<nav className="main-nav">
<div className="main-nav-left... |
src/components/metadata/MetaArray.js | ashmaroli/jekyll-admin | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Sortable from 'sortablejs';
import _ from 'underscore';
import MetaArrayItem from './MetaArrayItem';
export class MetaArray extends Component {
sortableGroupDecorator(component) {
const { moveArrayItem, namePrefix } = this.pro... |
components/list/ListItemActions.js | KerenChandran/react-toolbox | import React from 'react';
import style from './style';
import ListItemAction from './ListItemAction';
const ListItemActions = ({type, children}) => {
const validChildren = React.Children.toArray(children).filter(c => (
React.isValidElement(c)
));
return (
<span className={style[type]}>
{validChil... |
src/js/components/PasswordInput.js | kylebyerly-hp/grommet | // (C) Copyright 2014 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../utils/CSSClassnames';
import Button from './Button';
import ViewIcon from './icons/base/View';
import Intl fro... |
react-fundamental/src/components/LifeCycle.js | zhangfaliang/learnReact | import React, { Component } from 'react';
class LifeCycle extends Component {
static defaultProps = {
value: '开始渲染'
}
componentWillReceiveProps(nextProps){
console.log('componentWillReceiveProps');
this.setState({
value: nextProps.value
});
}
/**
* diff 数据对比
* 对比完成,如果数据没有差异,不... |
index.ios.js | t4sk/react-native-todo | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class Todo extends Component {
render() {
return (
<View style={styles.container}>
... |
template/src/Component.js | nkbt/cf-react-component-template | import React from 'react';
export const {{package.global}} = () =>
<div>{{package.name}}</div>;
|
docs/src/app/components/pages/customization/Styles.js | IsenrichO/mui-with-arrows | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../CodeExample';
import MarkdownElement from '../../MarkdownElement';
import stylesText from './styles.md';
import stylesOverridingInlineText from './styles-overriding-inline.md';
import StylesOverridingInlineExample from ... |
src/layouts/Header/containers/HeaderContainer.js | dkanas/timelog | import React from 'react'
import { connect } from 'react-redux'
import pick from 'lodash/pick'
import { logout } from 'store/sessionModule'
import Header from '../components/Header'
const Connect = connect(
state => pick(state.session, ['user', 'isAuthenticated']),
{ logout }
)
const HeaderContainer = ({ isAuthen... |
example-swift/ReactNativeEventBridgeSwift/ReactNative/index.ios.js | maicki/react-native-event-bridge | /**
* @flow
*/
import React from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Button,
Alert,
EmitterSubscription,
} from 'react-native';
import EventBridge from 'react-native-event-bridge';
export default class ReactNativeEventBridgeSwift extends React.Component {
_eventSubscription: ?Emit... |
app/components/Header/index.js | juanda99/arasaac-frontend | /**
*
* Header
*
*/
import React from 'react'
import PropTypes from 'prop-types'
import AppBar from 'material-ui/AppBar'
import styles from './styles'
import Title from './Title'
import UserMenu from './UserMenu'
import GuestMenu from './GuestMenu'
const Header = (props) => {
const handleTouchTapLeftIconButton =... |
src/server.js | GustavPersson/tvattstuga | import path from 'path';
import morgan from 'morgan';
import express from 'express';
import compression from 'compression';
import helmet from 'helmet';
import hpp from 'hpp';
import favicon from 'serve-favicon';
import React from 'react';
import { renderToString } from 'react-dom/server';
import { Provider } from 'rea... |
src/Row.js | omerts/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import CustomPropTypes from './utils/CustomPropTypes';
const Row = React.createClass({
propTypes: {
/**
* You can use a custom element for this component
*/
componentClass: CustomPropTypes.elementType
},
getDefaultProps() {
re... |
src/svg-icons/hardware/laptop-mac.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareLaptopMac = (props) => (
<SvgIcon {...props}>
<path d="M20 18c1.1 0 1.99-.9 1.99-2L22 5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2H0c0 1.1.9 2 2 2h20c1.1 0 2-.9 2-2h-4zM4 5h16v11H4V5zm8 14c-.55 0... |
src/public/js/logs.js | TooAngel/democratic-collaboration | import React from 'react';
/**
* Logs class
**/
export class Logs extends React.Component { // eslint-disable-line no-unused-vars
/**
* contructor - The constructor
*
* @param {object} props - The properties
* @return {void}
**/
constructor(props) {
super(props);
this.state = {
dataF... |
src/components/file/upload.js | abbr/ShowPreper | import React from 'react'
import ReactDOM from 'react-dom'
module.exports = class Importer extends React.Component {
click = () => {
let domEle = ReactDOM.findDOMNode(this)
domEle.value = null
domEle.click()
}
onChange = e => {
let file = e.target.files[0]
// TODO validate file mime type
... |
react-dixie-memory-considerate-loading/src/components/SwitchWithLabel/index.js | GoogleChromeLabs/adaptive-loading | /*
* Copyright 2019 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
src/svg-icons/image/wb-sunny.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageWbSunny = (props) => (
<SvgIcon {...props}>
<path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7... |
app/features/notifications/Notify/index.js | Kaniwani/KW-Frontend | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createPortal } from 'react-dom';
import { CSSTransition, TransitionGroup } from 'react-transition-group';
import { POSITIONS } from '../constants';
import actions from '../actions';
import Notification from '... |
app/components/LoadingIndicator/index.js | chaintng/react-boilerplate | import React from 'react';
import Circle from './Circle';
import Wrapper from './Wrapper';
const LoadingIndicator = () => (
<Wrapper>
<Circle />
<Circle rotate={30} delay={-1.1} />
<Circle rotate={60} delay={-1} />
<Circle rotate={90} delay={-0.9} />
<Circle rotate={120} delay={-0.8} />
<Cir... |
src/components/Account/OAuthLogin/OAuthLogin.container.js | shayc/cboard | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
import { login } from '../Login/Login.actions';
import messages from './OAuthLogin.messages';
import { getUser } from '../../App/App.selectors';
imp... |
src/components/Buttons/Switch.js | instacart/Snacks | import React from 'react'
import PropTypes from 'prop-types'
import RadioCheckboxBase from '../../base/RadioCheckboxBase'
import colors from '../../styles/colors'
import ZeroSvg from '../../assets/zero.svg'
import OneSvg from '../../assets/one.svg'
const SWITCH_WIDTH = 36
const STYLES = {
background: {
borderRa... |
src/components/Ingredients.js | MichaelLSmith/recipeBox | import React from 'react';
import { ListGroup, ListGroupItem } from 'react-bootstrap';
function Ingredients(props) {
// console.log(props);
if(props.ingredients == undefined){
return <div>Ingredients here</div>
}
const ingredientsList = props.ingredients.map(
(ingredient, key) => {
return (
<... |
ui/src/components/event/EventExecs.js | d3sw/conductor | import React, { Component } from 'react';
import { Link, browserHistory } from 'react-router';
import { Breadcrumb, BreadcrumbItem, Input, Well, Button, Panel, DropdownButton, MenuItem, Popover, OverlayTrigger, ButtonGroup, Table, Grid, Row, Col } from 'react-bootstrap';
import {BootstrapTable, TableHeaderColumn} from ... |
src/Accordion.js | leozdgao/react-bootstrap | import React from 'react';
import PanelGroup from './PanelGroup';
const Accordion = React.createClass({
render() {
return (
<PanelGroup {...this.props} accordion={true}>
{this.props.children}
</PanelGroup>
);
}
});
export default Accordion;
|
src/interface/report/Results/Timeline/Buffs.js | sMteX/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import { Trans } from '@lingui/macro';
import { formatDuration } from 'common/format';
import Icon from 'common/Icon';
import SpellLink from 'common/SpellLink';
import BuffsModule from 'parser/core/modules/Buffs';
import Tooltip from 'common/Tooltip';
imp... |
src/components/Footer/Footer.js | YumboRumbo/FlashCard | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react';
import s from './Footer.scss';
import withStyles from '../../decorators/withStyles';
import Link from '../Link';
@withStyles(s)
class Footer extends Component {
render() {
return (
<div clas... |
mla_game/front-end/javascript/components/partials/corrections.js | WGBH/FixIt | import React from 'react'
import classNames from 'classnames'
class Corrections extends React.Component {
render(){
return(
<div className="vote-option corrected">
{this.props.text}
</div>
)
}
}
export default Corrections; |
src/scenes/imports/view.js | bobinette/papernet-front | import PropTypes from 'prop-types';
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import classNames from 'classnames';
import { paperPropType } from 'utils/constants';
import FileLoader from './components/file-loader';
import ImportViewRow from './components/row';
import './v... |
app.js | melnik88/rusty-hammers | /* global document */
import './node_modules/milligram/dist/milligram.min.css';
import './style.css';
import Main from './components/Main.jsx';
import Results from './components/Results.jsx';
import Contacts from './components/Contacts.jsx';
import Walks from './components/Walks.jsx';
import React from 'react';
impor... |
src/client/app.js | JBostelaar/Digital-Dash | import getRoutes from 'client/utils/getRoutes';
import { Provider } from 'react-redux';
import { createStore, combineReducers } from 'redux';
import React from 'react';
import { render } from 'react-dom';
import { Router, browserHistory } from 'react-router';
import * as reducers from 'client/reducers';
const reducer ... |
src/components/AnimalPage.js | KingCountySAR/database-frontend | import React from 'react';
import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
import { Card, CardHeader, CardText } from 'material-ui/Card';
import MissionsTable from './MissionsTable';
import { missionProp, animalProp } from '../propTypes';
import Page from './Page';
const AnimalPage = ({ ... |
react-frontend/src/LoginPanel.js | aabmass/print-web | import React, { Component } from 'react';
import { Card, Button } from 'semantic-ui-react'
import LoginForm from './LoginForm';
// a react function component
class LoginPanel extends Component {
render() {
let body = undefined;
let isLoggedIn = this.props.user.isLoggedIn;
if (isLoggedIn) {
let { ... |
stories/toast.stories.js | sovrin/spectres | import React from 'react';
import {storiesOf} from '@storybook/react';
import Toast from '../src/components/Toast';
import Button from '../src/components/Button';
import Toasts from '../src/managers/Toasts';
import {text} from '../.storybook/addons';
const manager = Toasts.getManager();
storiesOf('Toast', module)
... |
examples/03 Nesting/Drop Targets/Container.js | arnif/react-dnd | import React from 'react';
import Dustbin from './Dustbin';
import Box from './Box';
import { DragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd/modules/backends/HTML5';
@DragDropContext(HTML5Backend)
export default class Container {
render() {
return (
<div>
<div style={{ over... |
app/scripts/main.js | kroupaTomass/Piknik-In-The-City | import React from 'react';
import Router from 'react-router';
import routes from './routes';
Router.run(routes, Handler => React.render(<Handler />, document.body));
|
frontend/app/common/conf/pagesIndex.js | First-Peoples-Cultural-Council/fv-web-ui | /*
Copyright 2016 First People's Cultural Council
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 in w... |
src/components/common/Button.js | jaggerwang/zqc-app-demo | /**
* 在球场
* zaiqiuchang.com
*/
import React from 'react'
import {StyleSheet, Text, TouchableOpacity} from 'react-native'
import flattenStyle from 'flattenStyle'
import {COLOR} from '../../config'
export default ({text, onPress, containerStyle, textStyle}) => {
let {fontSize} = flattenStyle(textStyle || styles.t... |
interface/components/SendTx/index.js | ethereum/mist | import React, { Component } from 'react';
import { connect } from 'react-redux';
import _ from 'lodash';
import ExecutionContext from './ExecutionContext';
import FeeSelector from './FeeSelector';
import Footer from './Footer';
import TxParties from './TxParties';
import {
confirmTx,
determineIfContract,
estimate... |
lib/client/app/components/grid-rows.js | andrei-cacio/perl-prerender | /* jshint esnext: true */
import React from 'react';
import ReactDOM from 'react-dom';
import Griddle from 'griddle-react';
import {fakeData} from '../fixtures/grid';
/* jshint ignore:start */
export const GriddleRows = React.createClass({
componentWillMount() {
this.setState({
rows: this.prop... |
react/features/base/react/components/native/NavigateSectionListItem.js | jitsi/jitsi-meet | // @flow
import React, { Component } from 'react';
import type { Item } from '../../Types';
import AvatarListItem from './AvatarListItem';
import Container from './Container';
import Text from './Text';
import styles from './styles';
type Props = {
/**
* Item containing data to be rendered.
*/
it... |
src/svg-icons/editor/multiline-chart.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorMultilineChart = (props) => (
<SvgIcon {...props}>
<path d="M22 6.92l-1.41-1.41-2.85 3.21C15.68 6.4 12.83 5 9.61 5 6.72 5 4.07 6.16 2 8l1.42 1.42C5.12 7.93 7.27 7 9.61 7c2.74 0 5.09 1.26 6.77 3.24l-2.88 3... |
src/parser/monk/brewmaster/modules/features/StaggerPoolGraph.js | FaideWW/WoWAnalyzer | import React from 'react';
import { Line as LineChart } from 'react-chartjs-2';
import 'common/chartjs-plugin-vertical';
import { formatDuration, formatNumber } from 'common/format';
import SPELLS from 'common/SPELLS';
import SpellLink from 'common/SpellLink';
import Analyzer from 'parser/core/Analyzer';
import Tab fr... |
imports/react/containers/AppContainer.js | leocavalcante/mars | import React from 'react'
import App from '../components/App'
import { connect } from 'react-redux'
import { queryMessages } from '/imports/redux/actions/query-messages'
import { addMessage } from '/imports/redux/actions/add-message'
const props = state => ({
label: state.label,
messages: state.messages,
})
const... |
src/components/structures/RightPanel.js | martindale/vector | /*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2017 Vector Creations Ltd
Copyright 2017 New Vector 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... |
src/app.js | telpalbrox/EliteTime | 'use strict';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { HashRouter as Router, Route } from 'react-router-dom';
import MainPage from './components/MainPage.js';
import TorrentPage from './components/TorrentPage';
import SearchPage from './components/SearchPage';
import Settings... |
packages/react-scripts/fixtures/kitchensink/src/features/syntax/DestructuringAndAwait.js | RobzDoom/frame_trap | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
import Rea... |
src/components/ExperienceDetail/Heading/index.js | goodjoblife/GoodJobShare | import React from 'react';
import PropTypes from 'prop-types';
import { Heading, P } from 'common/base';
import cn from 'classnames';
import styles from './Heading.module.css';
import { companyNameSelector, jobTitleSelector } from '../experienceSelector';
const formatType = type => {
switch (type) {
case 'work'... |
packages/stockflux-launcher/src/search-results/SearchResults.js | owennw/OpenFinD3FC | import React from 'react';
import classNames from 'classnames';
import SearchResult from './SearchResult';
export default ({ results, paddingNeeded }) =>
results &&
results.length > 0 && (
<div className={classNames('cards', { 'padding-top': paddingNeeded })}>
{results.map(result => (
<SearchResu... |
packages/mineral-ui-icons/src/IconCode.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 IconCode(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconProps}>
... |
dva/wind-tunnel/src/routes/P3.js | imuntil/React | import React from 'react'
import MainLayout from '../components/MainLayout/MainLayout'
import FadeInOut from '../components/Animation/FadeInOut'
import Form from '../components/End/Form'
import { connect } from 'dva'
function P3({current, dispatch, location, history, match}) {
function handleSubmit() {
dispatch(... |
client/my-sites/importer/dispatcher-converter.js | tinkertinker/wp-calypso | import Dispatcher from 'dispatcher';
import React from 'react';
import find from 'lodash/find';
import identity from 'lodash/identity';
import isFunction from 'lodash/isFunction';
const firstCallable = ( ...args ) => find( args, isFunction );
const mergeProps = ( ...args ) => Object.assign( {}, ...args );
const dispa... |
src/Form/Field/FieldBody.js | boldr/boldr-ui | // @flow
import React from 'react';
import classNames from 'classnames';
import { createWrappedComponent } from '../../util/boldrui';
export type Props = {
tag?: string,
className?: string,
};
export function FieldBody({ tag = 'div', ...props }: Props) {
const className = classNames('boldrui-form__field-body',... |
internals/templates/containers/LanguageProvider/index.js | iPhaeton/Selectors-study | /*
*
* LanguageProvider
*
* this component connects the redux state language locale to the
* IntlProvider component and i18n messages (loaded from `app/translations`)
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { IntlProvider } from 'reac... |
app/pages/ProductPage.js | Byte-Code/lm-digitalstore | import React from 'react';
import PropTypes from 'prop-types';
import Page from '../components/Page';
import Product from '../containers/Product';
import Footer from '../components/Footer';
import SideMenu from '../components/SideMenu';
export default function ProductPage(props) {
return (
<Page padding="0 0 14... |
src/svg-icons/action/search.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSearch = (props) => (
<SvgIcon {...props}>
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 1... |
packages/example-phone/src/scripts/components/auth-status.js | udaysrinath/spark-js-sdk | import React from 'react';
export default function AuthStatus({authenticated, authenticating}) {
let message;
if (authenticated) {
message = `authenticated`;
}
else if (authenticating) {
message = `authenticating`;
}
else {
message = `not authenticated`;
}
return <span className="authentic... |
src/routes/request/index.js | mapengze/Antd-Backstage | import React from 'react'
import styles from './index.less'
import Mock from 'mockjs'
import { request, config } from '../../utils'
import {
Row,
Col,
Card,
Select,
Input,
Button,
} from 'antd'
const { api, baseURL } = config
const { dashboard, users, userLogin, user } = api
const requestOptions = [
{
... |
client/components/user/user_profile.js | xxnatc/waste-not | import React, { Component } from 'react';
import InventoryList from './inventory_list';
import Map from '../map/map';
export default class OrganizationProfile extends Component {
render() {
return (
<div>
<InventoryList />
<Map />
</div>
);
}
}
|
src/elements/List/ListIcon.js | shengnian/shengnian-ui-react | import cx from 'classnames'
import PropTypes from 'prop-types'
import React from 'react'
import {
createShorthandFactory,
getUnhandledProps,
META,
SUI,
useVerticalAlignProp,
} from '../../lib'
import Icon from '../Icon/Icon'
/**
* A list item can contain an icon.
*/
function ListIcon(props) {
const { cl... |
src/component/List.js | CompileYouth/SmallFish | import React, { Component } from 'react';
import {
ListView
} from 'react-native';
import Item from './Item';
export default class List extends Component {
constructor() {
super();
this._renderTodo = this._renderTodo.bind(this);
}
componentWillMount() {
this.todos = [
{ text: '吃饭', date: '... |
src/svg-icons/action/visibility.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionVisibility = (props) => (
<SvgIcon {...props}>
<path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-... |
public/js/left.js | MelanistOnca/Pers | import React from 'react';
import { render } from 'react-dom';
import $ from 'jquery';
import Foot from './foot';
import LayoutSelector from './subComponents/layoutSelector'
import site_left_switch from './helpers/site_left_switch'
export default class Left extends React.Component {
render(){
// console.log... |
templates/frontOffice/modern/components/React/SubTitle/index.js | lopes-vincent/thelia | import React from 'react';
export default function SubTitle({ subTitle, className }) {
return (
<div
className={`text-3xl font-bold text-left outline-none mb-8 leading-none ${className}`}
>
{subTitle}
</div>
);
}
|
src/containers/ProductsContainer.js | ihenvyr/react-parse | import React from 'react';
import Products from '../components/Products';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { brandsLoad } from '../actions';
import { withRouter } from 'react-router';
const ProductsContainer = (props) => {
return (
<Products {...props} />
... |
src/scripts/routes.js | jie/microgate | import cookie from './utils/cookie'
import React from 'react'
import { Router, Route } from 'react-router'
import AccountLoginApp from './containers/account'
import { MainApp } from './containers/admin'
import { DashboardApp } from './containers/admin'
import { ApiCreateApp, ApisListApp } from './containers/admin'
impo... |
fields/types/file/FileField.js | xyzteam2016/keystone | import Field from '../Field';
import React from 'react';
import { Button, FormField, FormInput, FormNote } from 'elemental';
module.exports = Field.create({
displayName: 'FileField',
statics: {
type: 'File',
},
shouldCollapse () {
return this.props.collapse && !this.hasExisting();
},
fileFieldNode () {
... |
app/components/Editor/index.js | rohitRev/React | /**
*
* Editor
*
*/
import React from 'react';
import Dialog from 'material-ui/Dialog';
import FlatButton from 'material-ui/FlatButton';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
const customContentStyle = {
width: '60%',
maxWidth: 'none',
};
class Editor extends React.Component { /... |
js/components/tabMenu/index.js | gectorat/react-native-app |
import React, { Component } from 'react';
import {
TouchableOpacity,
Image,
Alert
} from 'react-native';
import { View as RawView } from 'react-native';
import { connect } from 'react-redux';
import {
Container,
Content,
Header,
Title,
Tabs,
Text,
Card,
CardItem,
Grid,
Col,
Row,
Button,
... |
src/svg-icons/maps/local-convenience-store.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalConvenienceStore = (props) => (
<SvgIcon {...props}>
<path d="M19 7V4H5v3H2v13h8v-4h4v4h8V7h-3zm-8 3H9v1h2v1H8V9h2V8H8V7h3v3zm5 2h-1v-2h-2V7h1v2h1V7h1v5z"/>
</SvgIcon>
);
MapsLocalConvenienceStore = ... |
app/utils/icons.js | wilomgfx/AnyWeatherReactRedux | import React from 'react';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
export default function getWeatherIconByIconName(darkSkyIconName, iconSize =30, color='white', styles= {}){
switch (darkSkyIconName){
case 'clear-day':
return <Icon name="weather-sunny" size={iconSize} color={... |
react/features/welcome/components/AbstractWelcomePage.js | bickelj/jitsi-meet | import React, { Component } from 'react';
import { appNavigate } from '../../app';
import { isRoomValid } from '../../base/conference';
import { VideoTrack } from '../../base/media';
import { getLocalVideoTrack } from '../../base/tracks';
/**
* Base (abstract) class for container component rendering the welcome page... |
src/svg-icons/notification/power.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationPower = (props) => (
<SvgIcon {...props}>
<path d="M16.01 7L16 3h-2v4h-4V3H8v4h-.01C7 6.99 6 7.99 6 8.99v5.49L9.5 18v3h5v-3l3.5-3.51v-5.5c0-1-1-2-1.99-1.99z"/>
</SvgIcon>
);
NotificationPower = pu... |
examples/js/manipulation/del-row-custom-confirm.js | rolandsusans/react-bootstrap-table | /* eslint max-len: 0 */
/* eslint no-console: 0 */
/* eslint no-alert: 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 i... |
src/app/DevTools.js | eordano/sherlock | import React from 'react'
import { createDevTools } from 'redux-devtools'
import LogMonitor from 'redux-devtools-log-monitor'
import DockMonitor from 'redux-devtools-dock-monitor'
export default createDevTools(
<DockMonitor
toggleVisibilityKey='ctrl-g'
changePositionKey='ctrl-q' >
<LogMonitor />
</Dock... |
src/components/Account/components/Reservations/components/PastReservations/components/PastReservation/index.js | galsen0/hair-dv-front | /**
* Created by diop on 11/05/2017.
*/
import React from 'react';
import { Item, Label, Button, Grid, Icon } from 'semantic-ui-react';
const PastReservation = () => {
return(
<Item>
<Item.Image src='../../../img/front-image-one.jpeg' size="medium" />
<Item.Content>
... |
packages/core/stories/tokens/icons/Icon.stories.js | massgov/mayflower | import React from 'react';
import { assets } from './Icon.knob.options';
import IconDisplay from './IconDisplay';
import generateTitle from '../../util/generateTitle';
export const Icons = (args) => (
<ul className="sg-icons">
{
Object.keys(assets).map((icon) => (
<IconDisplay {...args} name={i... |
app/javascript/mastodon/features/favourited_statuses/index.js | Kirishima21/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { fetchFavouritedStatuses, expandFavouritedStatuses } from '../../actions/favourites';
import Column from '../ui/components/column';
import ColumnHeade... |
server/dashboard/js/components/Bench.react.js | MrAlone/mzbench | import React from 'react';
import BenchStore from '../stores/BenchStore';
import BenchNav from './BenchNav.react';
import BenchOverview from './BenchOverview.react';
import BenchGraphs from './BenchGraphs.react';
import BenchReports from './BenchReports.react';
import BenchScenario from './BenchScenario.react';
import... |
react/private/GlobalFooter/GlobalFooter.js | seekinternational/seek-asia-style-guide | import React, { Component } from 'react';
import styles from './GlobalFooter.less';
import PropTypes from 'prop-types';
import FooterLinks from './components/FooterLinks/FooterLinks';
import UpperFooter from './components/UpperFooter/UpperFooter';
import { Hidden, Text, PageBlock, ListItem, Icon } from 'seek-asia-style... |
docs/tutorial/DO_NOT_TOUCH/01/src/index.js | FWeinb/cerebral | import React from 'react'
import {render} from 'react-dom'
import {Controller} from 'cerebral'
import {Container} from 'cerebral/react'
import Devtools from 'cerebral/devtools'
import App from './components/App'
const controller = Controller({
devtools: Devtools()
})
render((
<Container controller={controller}>
... |
src/routes/register/index.js | jwhchambers/react-starter-kit | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 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 Register from './Registe... |
client/modules/core/components/main_layout.js | wmzhai/mantra-demo | import React from 'react';
import Header from './header';
const Layout = ({content = () => null }) => (
<div>
<Header />
<main className="app-layout">
{content()}
</main>
<footer className="site-footer">
<small>基于<a href='https://github.com/kadirahq/mantra'>Mantra</a> & Meteor构建.</s... |
src/BootstrapMixin.js | natlownes/react-bootstrap | import React from 'react';
import styleMaps from './styleMaps';
import CustomPropTypes from './utils/CustomPropTypes';
const BootstrapMixin = {
propTypes: {
/**
* bootstrap className
* @private
*/
bsClass: CustomPropTypes.keyOf(styleMaps.CLASSES),
/**
* Style variants
* @type {("... |
src/app/containers/App.js | skratchdot/js-playground | import React, { Component } from 'react';
import { Grid } from 'react-bootstrap';
import pathGet from 'object-path-get';
import GithubCorner from 'react-github-corner';
import Header from '../components/Header';
import Footer from '../components/Footer';
import stringToCssName from '../helpers/stringToCssName';
class ... |
hw8/frontend/src/index.js | yusong-shen/comp531-web-development | /*
High level logic for entire front-end applicaiton
*/
require('expose?$!expose?jQuery!jquery')
require("bootstrap-webpack")
require('./styles.css')
import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import createLogger from 'redux-logger'
import { createStore, compose,... |
assets/jqwidgets/demos/react/app/grid/bindingtoobservablearray/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxGrid from '../../../jqwidgets-react/react_jqxgrid.js';
import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js';
class App extends React.Component {
constructor() {
super();
this.state = {
observableArra... |
src/svg-icons/action/label.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionLabel = (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.16z"/>
</SvgIcon>
);
A... |
src/basic/Textarea.js | sampsasaarela/NativeBase | import React, { Component } from 'react';
import { TextInput } from 'react-native';
import { connectStyle } from 'native-base-shoutem-theme';
import variables from '../theme/variables/platform';
import computeProps from '../Utils/computeProps';
import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames';
class Te... |
src/svg-icons/av/not-interested.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvNotInterested = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12... |
src/svg-icons/image/center-focus-strong.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCenterFocusStrong = (props) => (
<SvgIcon {...props}>
<path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm-7 7H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V... |
examples/js/selection/select-bgcolor-table.js | dana2208/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/scenes/ProductView/index.native.js | Manuelandro/Universal-Commerce | import React from 'react'
import { graphql, compose } from 'react-apollo'
import { ProductViewQuery } from '../../../server/graphql/queries/product'
import ProductView from './component.native'
import { ScrollView } from '../../components/native'
const ProductViewWithData = (props) =>
(
<ScrollView>
... |
packages/bonde-admin-canary/src/components/Tutorial/Provider.js | ourcities/rebu-client | // Provider is responsible to union Dialog components
import React from 'react'
import PropTypes from 'prop-types'
import Context, { defaultContext } from './Context'
import Dialog from './Dialog'
const initializeCondition = initialize => (
typeof initialize === 'function'
? initialize()
: initialize
)
clas... |
app/components/SoundPlayer/ShowSoundPlayer.js | juanda99/arasaac-frontend | import React from 'react'
import SoundPlayer from './index';
import GetAppIcon from 'material-ui/svg-icons/action/get-app'
import IconButton from 'material-ui/IconButton'
import {
LOCUTIONS_URL,
} from 'services/config'
import {downloadLocution } from 'services'
const ShowSoundPlayer = ({hasLocution, locale, keyword... |
src/components/Charts/Bar/index.js | ascrutae/sky-walking-ui | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may... |
fields/types/boolean/BooleanFilter.js | stosorio/keystone | import React from 'react';
import { SegmentedControl } from 'elemental';
const TOGGLE_OPTIONS = [
{ label: 'Is Checked', value: true },
{ label: 'Is NOT Checked', value: false }
];
var BooleanFilter = React.createClass({
getInitialState () {
return {
checked: this.props.value || TOGGLE_OPTIONS[0].value
};
... |
client/components/ui/tabs.js | bnjbvr/kresus | import React from 'react';
import { Route, Switch, Redirect, NavLink } from 'react-router-dom';
import PropTypes from 'prop-types';
class TabsContainer extends React.Component {
handleSelectorChange = event => {
let newPath = event.target.value;
// Only modify current path if necessary
if (... |
app/javascript/mastodon/features/ui/components/column_link.js | mimumemo/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
const ColumnLink = ({ icon, text, to, href, method, badge }) => {
const badgeElement = typeof badge !== 'undefined' ? <span className='column-link__badge'>{badge}</span> : null;
if (href) {
return (
<... |
src/components/molecules/Feature/index.js | DimensionLab/narc | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { ifProp } from 'styled-tools'
import { Icon, Link, Paragraph, Heading, Badge, PreformattedText } from 'components'
const Wrapper = styled.div`
position: relative;
display: flex;
padding: 1rem;
box-sizin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.