path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
reactviews/src/index.js | yvesago/dioc | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
src/components/FormCheckbox/FormCheckbox.js | Landish/react-spectre-css | import React from 'react';
import { string, bool, func, node } from 'prop-types';
import classNames from 'classnames';
const FormCheckbox = ({
name,
value,
isChecked,
onChange,
children,
className,
...rest
}) => {
return (
<label className={classNames('form-checkbox', className)} {...rest}>
<... |
test/test_helper.js | itstriz/website | import _$ from 'jquery'
import React from 'react'
import ReactDOM from 'react-dom'
import TestUtils from 'react-addons-test-utils'
import jsdom from 'jsdom'
import chai, { expect } from 'chai'
import chaiJquery from 'chai-jquery'
import { Provider } from 'react-redux'
import { createStore } from 'redux'
import reducers... |
src/components/common/typography/PageTitle.js | zainxyz/react-reads | import PropTypes from 'prop-types';
import React from 'react';
/**
* A component for building the page title with an optional sub-title
* @param {string} [options.className] Optional class name
* @param {string} options.title The required title for the section heading
* @param {string} [options.subtitle] ... |
linksa/Approval.js | liuhui219/linksa | import React from 'react';
import {
View,
StyleSheet,
Navigator,
TouchableOpacity,
TouchableHighlight,
Text,
ScrollView,
ActivityIndicator,
InteractionManager,
Dimensions,
BackAndroid,
Image,
RefreshControl,
ListView,
} from 'react-native';
import ScrollableTabView, { DefaultTabBar, } from 'react-n... |
src/svg-icons/navigation-arrow-drop-right.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../SvgIcon';
let NavigationArrowDropRight = (props) => (
<SvgIcon {...props}>
<path d="M9.5,7l5,5l-5,5V7z" />
</SvgIcon>
);
NavigationArrowDropRight = pure(NavigationArrowDropRight);
NavigationArrowDropRight.displayName = 'Navi... |
src/svg-icons/action/search.js | hai-cea/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... |
src/js/component/canvas-control.js | thiagohmoreira/ReactiveCanvas | import React from 'react';
import CircleList from '../component/circle-list';
import { MAX_CIRCLES, getCirclesLeft, getMaxNewRadius } from '../api/canvas';
export default function CanvasControl({ canvas, viewport, actions }) {
const circlesLeft = getCirclesLeft(canvas);
const radiusLeft = getMaxNewRadius(c... |
imports/api/content/content.js | howlround/worldtheatremap | // Utilities
import { TAPi18n } from 'meteor/tap:i18n';
import React from 'react';
import { FormattedMessage } from 'react-intl';
import t from 'tcomb-form';
class ContentCollection extends TAPi18n.Collection {
// insert(content, callback) {
// }
// remove(selector, callback) {
// }
}
export const Content = n... |
src/components/AppNavDrawer.js | yiweimatou/yibinghoutai | import React from 'react'
import Drawer from 'material-ui/Drawer'
import { List, ListItem, MakeSelectable } from 'material-ui/List'
import getMuiTheme from 'material-ui/styles/getMuiTheme'
const SelectableList = MakeSelectable(List)
const styles = {
containerStyle :{
marginTop:getMuiTheme().appBar.height,
... |
src/index.js | matwej/IAmHungryFor | import 'jquery';
import 'bootstrap/dist/js/bootstrap';
import 'bootstrap/dist/css/bootstrap.css';
import './app.css';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import App from './components/app';
import store from './store';
ReactDOM.render(
<Provider stor... |
src/client/formHelpers/textField.js | r3dDoX/geekplanet | import React from 'react';
import TextField from '@material-ui/core/TextField';
import styled from 'styled-components';
const StyledTextField = styled(TextField)`
margin-top: 10px !important;
margin-bottom: 10px !important;
`;
// eslint-disable-next-line
export default ({ input, label, meta: { touched, error }, .... |
core/src/plugins/access.ajxp_conf/res/js/AdminLogs/board/Dashboard.js | huzergackl/pydio-core | /*
* Copyright 2007-2017 Charles du Jeu - Abstrium SAS <team (at) pyd.io>
* This file is part of Pydio.
*
* Pydio 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, o... |
admin/client/App/elemental/DropdownButton/index.js | Pop-Code/keystone | /* eslint quote-props: ["error", "as-needed"] */
import React from 'react';
import { css } from 'glamor';
import Button from '../Button';
function DropdownButton ({ children, ...props }) {
return (
<Button {...props}>
{children}
<span className={css(classes.arrow)} />
</Button>
);
};
// NOTE
// 1: take a... |
app/javascript/mastodon/features/ui/components/column_header.js | MitarashiDango/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Icon from 'mastodon/components/icon';
export default class ColumnHeader extends React.PureComponent {
static propTypes = {
icon: PropTypes.string,
type: PropTypes.string,
active: PropTypes.bool,
... |
examples/samples/swiper.js | InnerPeace080/react-native-swiper | import React from 'react'
import { StyleSheet, Text, View, Image } from 'react-native'
import Swiper from '../swiper.dist'
const styles = StyleSheet.create({
wrapper: {
},
slide: {
flex: 1,
justifyContent: 'center',
backgroundColor: 'transparent'
},
slide1: {
flex: 1,
justifyContent: 'c... |
redux-subspace-mpeyper/src/randomGif/RandomGif.js | slorber/scalable-frontend-with-elm-or-redux | import React from 'react'
import { connect } from 'react-redux'
import { getGif } from './actions'
const RandomGif = ({ loading, src, getGif }) => (
<div style={{ width: '100px' }}>
<button onClick={getGif} disabled={loading}>{ loading ? "Loading..." : "Get Gif" }</button>
{ src && <div><img alt="Gif" src={s... |
src/views/badge.js | depcheck/depcheck-www | import React from 'react';
export default React.createClass({
render() {
const width = this.props.width;
const depcheckWidth = 63;
const depcheckPosition = depcheckWidth / 2 + 1;
const captionWidth = width - depcheckWidth;
const captionPosition = captionWidth / 2 + depcheckWidth - 1;
return (... |
src/routes/login/index.js | yurikrupnik/meaner | /**
* 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 Login from './Login';
e... |
Realization/frontend/czechidm-core/src/content/audit/loggingEvent/LoggingEventTable.js | bcvsolutions/CzechIdMng | import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
import _ from 'lodash';
//
import * as Utils from '../../../utils';
import * as Basic from '../../../components/basic';
import * as Advanced from '../../../components/advanced';
import { LoggingEventManager } from '../... |
Example/Swiper.js | CheragV/react-native-tinderlike-swiper | import React from 'react'
import {
PanResponder,
Slider,
Text,
View,
Dimensions,
Animated
} from 'react-native'
import styles, { circleSize } from './styles'
const { height, width } = Dimensions.get('window')
class Swiper extends React.Component {
constructor(props) {
super(props)
this.state = {... |
app/containers/LocaleToggle/index.js | VeloCloud/website-ui | /*
*
* LanguageToggle
*
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import Toggle from 'components/Toggle';
import Wrapper from './Wrapper';
import messages from './messages';
import { appLocales } from '../../i18n';
import { changeLocale } from ... |
antd-dva/ant-design-pro-demo/test/src/layouts/PageHeaderLayout.js | JianmingXia/StudyTest | import React from 'react';
import { Link } from 'dva/router';
import PageHeader from '../components/PageHeader';
import styles from './PageHeaderLayout.less';
export default ({ children, wrapperClassName, top, ...restProps }) => (
<div style={{ margin: '-24px -24px 0' }} className={wrapperClassName}>
{top}
<... |
components/Modes/CapitalsGame.js | whatever555/countries | import React, { Component } from 'react';
import Flag from '../Flag';
import { translate } from '../../helpers/translate';
import {
ResultBox,
ContentHolder,
NoScriptLink,
Clip,
ClippyShadowWrapper,
FlagHolder,
ListButton,
ListItem,
List,
QuestionBox,
} from '../../common/styles';
import RightWrong ... |
src/svg-icons/maps/person-pin.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsPersonPin = (props) => (
<SvgIcon {...props}>
<path d="M19 2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 3.3c1.49 0 2.7 1.21 2.7 2.7 0 1.49-1.21 2.7-2.7 2.7-1.49 0-2... |
src/index.js | osmlab/to-fix | // Polyfills
import 'whatwg-fetch';
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, hashHistory } from 'react-router';
import routes from './routes';
import store from './stores/store';
render((
<Provider store={store}>
<Router
histo... |
js/Landing.js | thomasxmartinez/feturnip | import React from 'react'
import { Link } from 'react-router'
import { connect } from 'react-redux'
import { setSearchTerm } from './actionCreators'
// import '../public/normalize.css'
// import '../public/style.css'
const { string, func, object } = React.PropTypes
const Landing = React.createClass({
propTypes: {
... |
react-base/src/App.js | rushton3179/ReactBase | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import './navbar/NavBar.css';
import '../node_modules/font-awesome/css/font-awesome.min.css';
import Footer from './Footer';
import NavBar from './navbar/NavBar';
const data = [{
key: 1,
text: 'Link 1',
url: '#',
}];
co... |
packages/docs/pages/plugin/image/index.js | draft-js-plugins/draft-js-plugins | // eslint-disable-next-line import/no-unresolved
// eslint-disable-next-line import/no-duplicates
import addImageExampleCode from '!!raw-loader!../../../components/Examples/image/AddImageEditor';
// eslint-disable-next-line import/no-unresolved
import addImageExampleEditorStylesCode from '!!raw-loader!../../../componen... |
src/js/SimpleTourItem.js | khankuan/react-tourist | import React from 'react';
class SimpleTourItem extends React.Component {
render() {
const containerStyle = {
background: 'white',
padding: '20px',
color: 'black',
maxWidth: '300px'
};
const buttonStyle = {
cursor: 'pointer',
textDecoration: 'none',
color: '#34... |
gui/components/Avatar/Avatar.js | siauPatrick/seimur | import React from 'react';
export default class Avatar extends React.Component {
state = {
imageUri: ''
}
defaultImageUri = '/static/default_avatar.svg';
componentDidMount() {
const {images} = this.props;
this.setExistingImage(images);
}
componentWillReceiveProps({images}) {
this.setExi... |
docs/app/Examples/elements/Header/Variations/HeaderExampleColored.js | mohammed88/Semantic-UI-React | import React from 'react'
import { Header } from 'semantic-ui-react'
const HeaderExampleColored = () => (
<div>
<Header as='h4' color='red'>Red</Header>
<Header as='h4' color='orange'>Orange</Header>
<Header as='h4' color='yellow'>Yellow</Header>
<Header as='h4' color='olive'>Olive</Header>
<Head... |
examples/webpack/src/App.js | bluetidepro/react-styleguidist | /* eslint-disable */
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
</... |
internals/templates/containers/HomePage/index.js | anneback/react-quiz | /*
* HomePage
*
* This is the first thing users see of our App, at the '/' route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a necessity for you then you can refactor it and remove
* the l... |
src/svg-icons/device/battery-90.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBattery90 = (props) => (
<SvgIcon {...props}>
<path fillOpacity=".3" d="M17 5.33C17 4.6 16.4 4 15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33V8h10V5.33z"/><path d="M7 8v12.67C7 21.4 7.6 22 8.33 22h7.33c.74 0 1... |
src/components/Question.js | donjar/learn-latex | import React from 'react';
import QuestionDescription from './QuestionDescription';
import QuestionExpectedResult from './QuestionExpectedResult';
import QuestionUserInput from './QuestionUserInput';
import QuestionUserResult from './QuestionUserResult';
import LatexHelper from '../helpers/LatexHelper';
class Question... |
entry_types/scrolled/package/src/frontend/ContentElements.js | codevise/pageflow | import React from 'react';
import {ContentElement} from './ContentElement';
export function ContentElements(props) {
return (
<>
{props.items.map((item, index) =>
props.children(item,
<MemoizedContentElement key={item.id}
id={it... |
src/Async.js | fattenap/react-async | /**
* @copyright 2015 Andrey Popp <8mayday@gmail.com>
*/
import React from 'react';
import invariant from 'react/lib/invariant';
import AsyncComponent from './AsyncComponent';
/**
* This is a component class decorator which receives a component class, an
* observable specification and returns a new component clas... |
src/public/components/form/register.js | Harrns/segta |
import React from 'react'
import $ from 'jquery'
import Notify from '../notification'
import TextInput from '../input/text'
import SubmitButton from '../button/submit'
import Form from './default'
export default class RegisterForm extends React.Component {
constructor (props) {
super(props)
this.minPassL... |
templates/src/components/About/About.js | ekatzenstein/create-react-app-fullstack | // src/components/About/index.js
import React, { Component } from 'react';
import classnames from 'classnames';
import './style.css';
export default class About extends Component {
render() {
const { className, ...props } = this.props;
return (
<div className={classnames('About', className)} {...props... |
examples/js/basic/no-data-table.js | neelvadgama-hailo/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
export default class NoDataTable extends React.Component {
render() {
return (
<BootstrapTable data={ products } options={ { noDataText: 'This is custom text ... |
client/app/scripts/components/node-details/node-details-health-link-item.js | alban/scope | import React from 'react';
import moment from 'moment';
import { connect } from 'react-redux';
import NodeDetailsHealthItem from './node-details-health-item';
import CloudLink from '../cloud-link';
import { getMetricColor } from '../../utils/metric-utils';
import { darkenColor } from '../../utils/color-utils';
import ... |
src/components/contact.js | ajspotts/ajspotts.github.io | import React from 'react';
import { FaEnvelope, FaLinkedin } from 'react-icons/fa';
const Contact = ({id}) => (
<section id={id} className="section">
<div className="contact">
<h1 className="name"><b>Contact Me</b></h1>
<div className="contacts-box">
<span id="contacts"><h3><FaEnvelope /> ajspo... |
ee/app/engagement-dashboard/client/components/data/LegendSymbol.stories.js | iiet/iiet-chat | import { Box, Margins } from '@rocket.chat/fuselage';
import React from 'react';
import { LegendSymbol } from './LegendSymbol';
import { monochromaticColors, polychromaticColors } from './colors';
export default {
title: 'admin/enterprise/engagement/data/LegendSymbol',
component: LegendSymbol,
decorators: [(fn) =>... |
src/app/components/auth/chat/message_list.js | rokbar/vivdchat | import React from 'react';
import {
List,
ListItem,
Subheader,
Paper,
} from 'material-ui';
import moment from 'moment';
import base64js from 'base64-js';
import { isArray } from 'lodash';
const MessageList = (props) => {
const groupName = new String(props.groupName);
const messageItems = props.message... |
components/roster.js | francisdzheng/calwtcrew | import React from 'react';
import '../css/Roster.scss';
const Roster = ({ rosterName, names, sides, years, hometowns, majors }) => (
<div className="roster-container">
<header>
<h1>{rosterName}</h1>
</header>
<div className="column-container">
<div className="roster__column">
<h3>Nam... |
src/components/LinkButton/index.js | bogas04/SikhJS | import PropTypes from 'prop-types';
import React from 'react';
import { Link } from 'react-router-dom';
import Button from '../Button';
export default function LinkButton ({ disabled = false, children, to, ...otherProps }) {
return disabled
? <Button disabled {...otherProps}>{children}</Button>
: <Link to=... |
src/components/02-molecules/ErrorMessages/index.js | buildit/bookit-web | import React from 'react'
import PropTypes from 'prop-types'
import ErrorMessage from '../../01-atoms/ErrorMessage'
const ErrorMessages = ({ errors = {} }) => (
<div>
{
Object.keys(errors).map(error => (
<ErrorMessage key={error} message={errors[error]} />
))
}
</div>
)
export default... |
modules/Link.js | sprjr/react-router | import React from 'react'
import warning from 'warning'
const { bool, object, string, func } = React.PropTypes
function isLeftClickEvent(event) {
return event.button === 0
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey)
}
function isEmptyObject(obj... |
app/pages/_error.js | jesseditson/xraytv-video-generator | import React from 'react'
import Layout from '../components/Layout'
export default class Error extends React.Component {
static getInitialProps ({ res, xhr }) {
const statusCode = res ? res.statusCode : (xhr ? xhr.status : null)
return { statusCode }
}
render () {
return (<Layout>
<h1>Error</h... |
src/components/tab/tabbar.js | n7best/react-weui | import React from 'react';
import classNames from '../../utils/classnames';
/**
* Bottom bar for tabs
*
*/
export default class TabBar extends React.Component {
render() {
const {children, className, ...others} = this.props;
const cls = classNames({
'weui-tabbar': true
}, ... |
react-admin-dashboard/src/pages/Dashboard/currencyChart.js | chaitanya1375/Myprojects | import React from 'react';
import { connect } from 'react-redux';
import '../../assets/styles/currency-chart.css';
class CurrencyStatistic extends React.Component {
handleChange(e){
this.props.first(e.target.value);
}
render(){
let dynamicClass = this.props.selectedCurrency.id;
re... |
docs/src/app/components/pages/components/Card/Page.js | mmrtnz/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import cardReadmeText from './README';
import cardExampleWithAvatarCode from '!r... |
packages/node_modules/@webex/react-component-error-display/src/index.js | ciscospark/react-ciscospark | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './styles.css';
const propTypes = {
actionTitle: PropTypes.string,
onAction: PropTypes.func,
secondaryTitle: PropTypes.string,
title: PropTypes.string.isRequired,
transparent: PropTypes.boo... |
docs/src/app/components/pages/components/Drawer/Page.js | pradel/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import drawerReadmeText from './README';
import DrawerSimpleExample from './Exam... |
src/wac-network-midi/index.js | crosslandwa/chippanfire-site | import React from 'react'
import ExternalLink from '../external-link'
import PageTemplate from '../PageTemplate'
const WacNetworkMidi = () => (
<PageTemplate>
<h1 className="cpf-header">Wac Network MIDI</h1>
<p>
Cross-platform (Win/OS X) tool for transmitting MIDI from one computer to another via a net... |
app/components/BuyConfirmModal/index.js | Royten/fashgame | /**
*
* BuyConfirmModal
*
*/
import React from 'react'
import styled from 'styled-components'
import Gem from '../../assets/gem.png'
import buy from '../../assets/popupscreen/buy.png'
import remove from '../../assets/popupscreen/remove.png'
const Backdrop = styled.div`
width: 100vw;
height: 100vh;
position: a... |
src/components/ListItems.js | jonstuebe/farkle | import React from 'react';
const ListItems = React.createClass({
render(){
return (
<div className="list-items">
{this.props.children}
</div>
)
}
});
export default ListItems;
|
src/server.js | Justkant/WhatAShop | import Express from 'express';
import React from 'react';
import ReactDOM from 'react-dom/server';
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';
import ApiC... |
client/modules/App/__tests__/Components/Footer.spec.js | Parinaaz/TempApplication17 | import React from 'react';
import test from 'ava';
import { shallow } from 'enzyme';
import { Footer } from '../../components/Footer/Footer';
test('renders the footer properly', t => {
const wrapper = shallow(
<Footer />
);
t.is(wrapper.find('p').length, 2);
t.is(wrapper.find('p').first().text(), '© 2016 ... |
src/components/SearchInputDropdown.js | aragonwa/kc-restaurant-reviews | import React from 'react';
import PropTypes from 'prop-types';
const SearchInputDropDown = ({ searchTypeText, setSearchType, searchType }) => {
//TODO: MOVE TO STYLESHEET
const styles = { borderBottom: 'none' };
const items = [{ type: 'name', text: 'Restaurant name' }, { type: 'city', text: 'City' }, { type: 'zi... |
src/common/components/Routes.js | deflexor/react_route_seek | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './App';
import OrderPage from '../../pages/order/page';
import HomePage from '../../pages/home/page';
//console.log(HomePage);
export default (
<Route path="/" component={App}>
<IndexRoute component={HomePage} />
... |
docs/src/app/components/pages/components/Menu/ExampleSecondary.js | rhaedes/material-ui | import React from 'react';
import Paper from 'material-ui/Paper';
import Menu from 'material-ui/Menu';
import MenuItem from 'material-ui/MenuItem';
import Divider from 'material-ui/Divider';
import ArrowDropRight from 'material-ui/svg-icons/navigation-arrow-drop-right';
const style = {
display: 'inline-block',
flo... |
src/native/app/Root.js | TheoMer/Gyms-Of-The-World | // @flow
import App from './App';
import Fela from '../../common/components/FelaProvider';
import React from 'react';
import configureFela from '../configureFela';
import { MemoryRouter } from 'react-router';
import { Provider as Redux } from 'react-redux';
import { Image, Text, TextInput, TouchableOpacity, View } from... |
docs/app/Examples/collections/Table/Variations/TableExamplePadded.js | clemensw/stardust | import React from 'react'
import { Table } from 'semantic-ui-react'
const TableExamplePadded = () => {
return (
<Table padded>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Name</Table.HeaderCell>
<Table.HeaderCell>Status</Table.HeaderCell>
<Table.HeaderCell>Notes</Tabl... |
examples/templates/components/header/index.js | jeffhandley/react-composition | import React from 'react';
import url from 'url';
import Header from './containers/Header';
import reducers from './reducers';
import actionCreators from './actionCreators';
import { bindActionCreators, createStore } from 'redux';
import { Container } from 'react-composite-pages';
import ReactCreateClass from 'create-r... |
app/components/Bookmarks.js | y-takey/shokushu | import _ from 'lodash';
import React, { Component } from 'react';
import List from 'material-ui/lib/lists/list';
import ListItem from 'material-ui/lib/lists/list-item';
import Avatar from 'material-ui/lib/avatar';
import Color from 'material-ui/lib/styles/colors'
import { mmss } from '../utils/formatter';
const style ... |
node_modules/react-router/es6/Redirect.js | gurusewak/redux101 | import React from 'react';
import invariant from 'invariant';
import { createRouteFromReactElement as _createRouteFromReactElement } from './RouteUtils';
import { formatPattern } from './PatternUtils';
import { falsy } from './InternalPropTypes';
var _React$PropTypes = React.PropTypes;
var string = _React$PropTypes.st... |
packages/react/cleanup.js | simplesvg/simple-svg | const fs = require('fs');
const reactSearch = "import React from 'react';";
const reactImport = 'React';
function fixTypes(filename) {
let content = fs.readFileSync(__dirname + filename, 'utf8');
if (content.indexOf(reactSearch) === -1) {
throw new Error(`Missing React import in ${filename}`);
}
let replaced = ... |
NativeModule/speechtoText/index.android.js | sutani/tryout-02 | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
NativeModules,
TouchableOpacity,
Image,
} from 'react-native';
const SpeechModule = NativeModules.speechtoText;
co... |
src/containers/Charts/reactChart2/components/randomizedLine/randomizedLine.js | EncontrAR/backoffice | import React from 'react';
import {Line} from 'react-chartjs-2';
import { initialData } from './randomizedConfig';
class Graph extends React.Component {
componentWillMount(){
this.setState(initialData);
}
componentDidMount(){
const _this = this;
setInterval(() => {
const { datasets } = _this.state;
let ... |
demo-react/src/App-ReactState.js | jeffhandley/strickland | import React, { Component } from 'react';
import formValidator from './formValidator';
import { getValidationMessage, getValidationClassName } from './helpers';
import validate from 'strickland';
class App extends Component {
constructor(props) {
super(props);
this.state = {
form: {
... |
js/jqwidgets/demos/react/app/grid/showhidecolumns/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxGrid from '../../../jqwidgets-react/react_jqxgrid.js';
import JqxListBox from '../../../jqwidgets-react/react_jqxlistbox.js';
class App extends React.Component {
componentDidMount() {
this.refs.myListBox.on('checkChange', (event) => {
... |
docs/src/app/components/pages/components/Avatar/Page.js | barakmitz/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import avatarReadmeText from './README';
import AvatarExampleSimple from './Exam... |
node_modules/_antd@2.13.4@antd/es/avatar/index.js | ligangwolai/blog | import _extends from 'babel-runtime/helpers/extends';
import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possib... |
examples/column-ordering/src/App.js | react-tools/react-table | import React from 'react'
import styled from 'styled-components'
import { useTable, useColumnOrder } from 'react-table'
import makeData from './makeData'
const Styles = styled.div`
padding: 1rem;
table {
border-spacing: 0;
border: 1px solid black;
tr {
:last-child {
td {
bord... |
src/redux/containers/AddTodo.js | davidraleigh/universal-redux-starter-todo | import React from 'react'
import { connect } from 'react-redux'
import { addTodo } from '../actions'
let AddTodo = ({ dispatch }) => {
let input
return (
<div>
<input ref={node => {
input = node
}} />
<button onClick={() => {
dispatch(addTodo(input.value))
input.value... |
tests/site4/code/partial.js | dominikwilkowski/cuttlebelle | import PropTypes from 'prop-types';
import React from 'react';
/**
* The Partial component for the default layout of partials
*/
const Partial = ({ _body, title }) => (
<article>
{ title && <h2>{ title }</h2> }
<div>{ _body }</div>
</article>
);
Partial.propTypes = {
/**
* title: Partial title
*/
titl... |
react/DeleteIcon/DeleteIcon.sketch.js | seek-oss/seek-style-guide | import React from 'react';
import DeleteIcon from './DeleteIcon';
import generateSketchIconSizes from '../private/generateSketchIconSizes';
export const symbols = {
...generateSketchIconSizes('Delete', <DeleteIcon />)
};
|
src/redux/utils/createDevToolsWindow.js | banjeremy/react-redux-todo | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import DevTools from '../../containers/DevToolsWindow';
export default function createDevToolsWindow (store) {
const win = window.open(
null,
'redux-devtools', // give it a name so it reuses the same window
... |
internals/templates/containers/HomePage/index.js | zuban/zuban-boilerplate | /*
* HomePage
*
* This is the first thing users see of our App, at the '/' route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a necessity for you then you can refactor it and remove
* the l... |
analysis/demonhuntervengeance/src/modules/spells/ImmolationAura.js | yajinni/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import AbilityTracker from 'parser/shared/modules/AbilityTracker';
import SPELLS from 'common/SPELLS';
import { formatPercentage, formatThousands, formatDuration } from 'common/format';
import BoringSpellValueText from 'parser/ui/BoringSpellValu... |
src/components/Menu/News.js | shierby/storehome | import React from 'react';
class News extends React.Component {
render() {
return (
<div className="container-fluid catalog_page">
<div className="container">
<h1>News Page</h1>
</div>
</div>
)
}
}
export default News; |
js/jqwidgets/demos/react/app/tooltip/defaultfunctionality/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxTooltip from '../../../jqwidgets-react/react_jqxtooltip.js';
class App extends React.Component {
render () {
let imgStyle = { margin: 10 };
let tooltipStyle = { float: 'left' };
let containersStyle = { width: 400, float... |
fields/types/boolean/BooleanField.js | tanbo800/keystone | import React from 'react';
import Field from '../Field';
import { Checkbox, FormField, FormNote } from 'elemental';
module.exports = Field.create({
displayName: 'BooleanField',
propTypes: {
indent: React.PropTypes.bool,
label: React.PropTypes.string,
note: React.PropTypes.string,
onChange: React.PropTypes.... |
pootle/static/js/auth/components/SocialVerification.js | claudep/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle 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 assign from 'object-assign';
import React from 'rea... |
app/screens/settings/notification_settings_mentions/notification_settings_mentions.android.js | mattermost/mattermost-mobile | // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {injectIntl} from 'react-intl';
import {
Modal,
ScrollView,
Text,
TouchableOpacity,
View,
} from 'react-native';
import FormattedText from '@components/... |
StudyNotes/ReactNative_/component/newsdetail.js | coderZsq/coderZsq.target.swift | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Image,
WebView
} from 'react-native';
var NewsDetail = React.createClass({
getInitialState(){
return {
html: '正在加载网页~'
}
},
render(){
return (
<WebView
auto... |
node_modules/react-router-native/modules/Forward.js | Right-Men/Ironman | /* @flow */
import React from 'react';
import Go from './Go';
const Forward = (props: any): ReactElement<any> => (
<Go {...props} type="forward" />
);
export default Forward;
|
src/library/Tabs/styled.js | mineral-ui/mineral-ui | /* @flow */
import isPropValid from '@emotion/is-prop-valid';
import styled from '@emotion/styled';
import React from 'react';
import withProps from 'recompose/withProps';
import Button from '../Button';
import OverflowContainer, {
OverflowContainerWithShadows
} from '../OverflowContainer';
import { componentStyleRes... |
Lumino/js/components/GatewayForm/GatewayForm.js | evonove/lumino | import React from 'react';
import PropTypes from 'prop-types';
import { Field } from 'redux-form';
import { Button, Text, View } from 'react-native';
import styles from './style';
import TextInput from '../WrappedComponents/TextInput';
import Switch from '../WrappedComponents/Switch';
const GatewayForm = props => (
... |
src/routes/NotFound.js | cherishstand/dva-quickstart | import React from 'react';
import { Link } from 'dva/router';
export default function NotFound() {
return (
<div id='page-404'>
<section>
<h1>404</h1>
<p>你要找的页面不存在 <Link to="/">返回首页</Link></p>
<style
dangerouslySetInnerHTML={{... |
node-siebel-rest/siebel-claims-native/screens/PolicyDetails.js | Pravici/node-siebel | import React, { Component } from 'react';
import Icon from 'react-native-vector-icons/FontAwesome';
import { MaterialIcons } from '@expo/vector-icons';
import {
StyleSheet,
View,
TouchableHighlight,
ActivityIndicator,
Text,
Image,
} from 'react-native';
import myConfig from '../config/Config';
import { ca... |
components/list/ListItemLayout.js | jasonleibowitz/react-toolbox | import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { themr } from 'react-css-themr';
import { LIST } from '../identifiers.js';
import FontIcon from '../font_icon/FontIcon.js';
import InjectAvatar from '../avatar/Avatar.js';
import InjectListItemContent from './Lis... |
src/components/AppTicker.js | nicholasaiello/reactjs-squawk-some | import React from 'react';
// TODO receive data via WebSockets
const AppTicker = ({ query, symbol, open, close, low, high, volume, updated }) => {
if (query.charAt(0) !== '$') {
return (
<div className="ticker">
no info available for <strong>{query}</strong>.
</div>
);
} else if ... |
docs/app/Examples/collections/Grid/Variations/GridExampleTextAlignmentMixed.js | mohammed88/Semantic-UI-React | import React from 'react'
import { Grid, Menu } from 'semantic-ui-react'
const GridExampleTextAlignmentJustified = () => (
<Grid>
<Grid.Row columns={3}>
<Grid.Column>
<Menu fluid vertical>
<Menu.Item className='header'>Cats</Menu.Item>
</Menu>
</Grid.Column>
<Grid.Colu... |
lib/FilterHandler.js | eddyson-de/react-grid | import React from 'react';
import PropTypes from 'prop-types';
import { filterConfig } from './proptypes';
import TextFilter from './TextFilter';
import warning from 'warning';
const defaultFilterFunction = ({displayValue, expression, columnName}) => {
if (!(typeof expression === 'string') || expression === ''){
... |
lib/ui/src/modules/ui/routes.js | enjoylife/storybook | import React from 'react';
import ReactDOM from 'react-dom';
import Layout from './containers/layout';
import LeftPanel from './containers/left_panel';
import DownPanel from './containers/down_panel';
import ShortcutsHelp from './containers/shortcuts_help';
import SearchBox from './containers/search_box';
export defau... |
components/transition/src/story.js | fi11/uikit | import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import StateProvider from '@uikit/state-provider';
import Transition from './index';
storiesOf('helpers/Transition', module).add('Popup with transition', () => (
<StateProvider>
{(state, s... |
app/components/logo.js | mthmulders/lin2go | import React from 'react';
import { Image } from 'react-native';
import styles from '../styles';
import logo from '../resources/logo.png';
export default () => (
<Image source={ logo } style={ styles.logo } />
);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.