path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/js/components/menu/menu_item.js | rafaelfbs/realizejs | import React, { Component } from 'react';
import PropTypes from '../../prop_types';
import Link from '../link/link';
import Button from '../button/button';
export default class MenuItem extends Component {
static propTypes = {
text: PropTypes.string,
method: PropTypes.string,
element: PropTypes.componen... |
src/widgets/Sticky/index.js | mydearxym/mastani | /*
*
* Sticky
* this code is on github:
* https://github.com/codecks-io/react-sticky-box/blob/master/src/index.js
* copy here for reduce the final bundle size
*
*/
import React from 'react'
import T from 'prop-types'
import ResizeObserver from 'resize-observer-polyfill'
import { Global } from '@/utils/helper'
... |
js/components/singleMapBookmark/index.js | kondoSoft/que_hacer_movil | import React, { Component } from 'react';
import MapView from 'react-native-maps';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Image, TouchableOpacity, Dimensions, Linking, Platform } from 'react-native'
import { Container, Header, Content, Fab, Text,... |
app/javascript/mastodon/components/setting_text.js | lynlynlynx/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
export default class SettingText extends React.PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,
settingKey: PropTypes.array.isRequired,
label: PropT... |
client/src/pages/report/SalesReportListProductItem.js | ccwukong/lfcommerce-react | import React from 'react';
import PropTypes from 'prop-types';
import numeral from 'numeral';
const SalesReportListProductItem = props => {
return (
<tr>
<td>{props.name}</td>
<td>{props.sku}</td>
<td>{props.currencySign + numeral(props.price).format('0,0.00')}</td>
<td>{props.quantity}</... |
packages/wix-style-react/src/StatisticsWidget/docs/examples/LongText.js | wix/wix-style-react | /* eslint-disable no-undef */
import React from 'react';
import { StatisticsWidget } from 'wix-style-react';
render(
<div style={{ background: '#fff' }}>
<StatisticsWidget
items={[
{
value: '$500,000,000',
description: 'Revenue',
},
{
value: '$1,500',
... |
opwen_statuspage/src/App.js | ascoderu/opwen-cloudserver | import React from 'react';
import { Divider, Layout } from 'antd';
import Header from './Header';
import ClientStats from './ClientStats';
import PingStats from './PingStats';
const localStorageKey = 'settings';
const defaultSettings = {
pingIntervalSeconds: 5,
githubAccessToken: undefined,
githubUsername: unde... |
src/components/login.js | andrei-cacio/nuclear-github-explorer | import React, { Component } from 'react';
import actions from '../modules/user-management/actions';
import Paper from '../../node_modules/material-ui/lib/paper';
import TextField from '../../node_modules/material-ui/lib/text-field';
import RaisedButton from '../../node_modules/material-ui/lib/raised-button';
import Cir... |
examples/js/column/column-align-table.js | pvoznyuk/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,
... |
client/src/index.js | jacted/depbot | import React from 'react'
import ReactDOM from 'react-dom'
import { Router, browserHistory } from 'react-router'
import { createStore, applyMiddleware } from 'redux'
import { Provider } from 'react-redux'
import thunk from 'redux-thunk'
import reducers from './reducers'
// Routes
import rootRoute from './routes'
// G... |
src/native/app/Menu.js | TheoMer/este | // @flow
import type { State, User } from '../../common/types';
import React from 'react';
import linksMessages from '../../common/app/linksMessages';
import { Box } from '../../common/components';
import { FormattedMessage } from 'react-intl';
import { Link } from '../components';
import { ScrollView } from 'react-nat... |
app/index.js | passeme/passeme | import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, hashHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import routes from './routes';
import configureStore from './store/configureStore';
import { loadLogins } ... |
src/index.js | albertchanged/YouTube-Topics | import _ from 'lodash';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
import VideoList from './components/video_list';
import VideoDetail from './components/video_detail';
import VideoListData from ... |
docs/pages/playground.js | ajainvivek/react-aztec | import React from 'react';
import { Page, ReactSpecimen } from 'catalog';
import JSONTree from 'react-json-tree';
import Highlight from 'react-highlight';
import 'highlight.js/styles/zenburn.css';
import * as MUI from 'material-ui';
import FlatButton from 'material-ui/FlatButton';
import AppBar from 'material-ui/AppBar... |
app/components/MemberFollow.js | Toreant/monster_web | /**
* Created by apache on 15-12-1.
*/
import React from 'react';
import MemberFollowActions from '../actions/MemberFollowActions';
import MemberFollowStore from '../stores/MemberFollowStore';
import Loading from './Loading';
import {Link} from 'react-router';
import NotFound from './NotFound';
class MemberFollow ex... |
app/javascript/mastodon/components/timeline_hint.js | theoria24/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
const TimelineHint = ({ resource, url }) => (
<div className='timeline-hint'>
<strong><FormattedMessage id='timeline_hint.remote_resource_not_displayed' defaultMessage='{resource} from other servers are ... |
examples/src/components/Cities.js | jacycode/react-select-plus-2 | import React from 'react';
import Select from 'react-select-plus-2';
import { AutoSizer, VirtualScroll } from 'react-virtualized';
const DATA = require('../data/cities');
const OPTION_HEIGHT = 35;
const MAX_OPTIONS_HEIGHT = 200;
var CitiesField = React.createClass({
displayName: 'CitiesField',
propTypes: {
label... |
stories/Tabs.stories.js | react-materialize/react-materialize | import React from 'react';
import { storiesOf } from '@storybook/react';
import Tabs from '../src/Tabs';
import Tab from '../src/Tab';
const stories = storiesOf('Javascript/Tabs', module);
stories.addParameters({
info: {
text: `The tabs structure consists of an unordered list of tabs that have hashes correspond... |
client/fragments/quizzes/pacman-timer/index.js | yeoh-joer/synapse | /**
* External dependencies
*/
import React from 'react'
import PropTypes from 'prop-types'
/**
* Internal dependencies
*/
import './style.scss'
export default class PacmanTimer extends React.Component {
static propTypes = {
action: PropTypes.string,
totalCount: PropTypes.number,
timeout: PropTypes.func
}... |
src/components/LoadingMessage/LoadingMessage.js | TestKitt/TestKittUI | import React from 'react'
import style from './LoadingMessage.scss'
import ProgressBar from 'react-toolbox/lib/progress_bar'
export const LoadingMessage = (props) => (
<div className={`${style.loading_message} text-center`} >
<ProgressBar className={style.indicator} type="circular" mode="indeterminate" />
<h... |
src/svg-icons/communication/rss-feed.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationRssFeed = (props) => (
<SvgIcon {...props}>
<circle cx="6.18" cy="17.82" r="2.18"/><path d="M4 4.44v2.83c7.03 0 12.73 5.7 12.73 12.73h2.83c0-8.59-6.97-15.56-15.56-15.56zm0 5.66v2.83c3.9 0 7.07 3.17... |
app/javascript/mastodon/components/display_name.js | yukimochi/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { autoPlayGif } from 'mastodon/initial_state';
export default class DisplayName extends React.PureComponent {
static propTypes = {
account: ImmutablePropTypes.map.isRequired,
oth... |
client/components/About.js | rickyeh/nimblecode | import React, { Component } from 'react';
import AboutProfile from './AboutProfile.js';
const team = [{
key: 1,
name: "Mark Kim",
bio: "Mark is interested in using software to build useful products. He believes that empathy is key in designing great products, in collaborating with others, and in growing as a dev... |
app/javascript/mastodon/features/home_timeline/components/setting_text.js | ebihara99999/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
class SettingText extends React.PureComponent {
static propTypes = {
settings: ImmutablePropTypes.map.isRequired,
settingKey: PropTypes.array.isRequired,
label: PropTypes.string.isR... |
app/src/containers/Album.js | wtfil/google-music-unofficial-client | import React from 'react';
import {connect} from 'react-redux';
import {Link} from 'react-router';
import {loadAlbum, selectTrack} from '../actions';
import Row from '../components/Row';
import List from '../components/List';
import Info from '../components/Info';
@connect(state => state)
export default class Artist e... |
src/components/badges/demos/IconOverText.js | isogon/styled-mdl | import React from 'react'
import { Badge, Icon } from '../../../'
export default () => <Badge text={<Icon sm name="done" />}>Walk the dog</Badge>
|
src/svg-icons/image/compare.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageCompare = (props) => (
<SvgIcon {...props}>
<path d="M10 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h5v2h2V1h-2v2zm0 15H5l5-6v6zm9-15h-5v2h5v13l-5-6v9h5c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/>
</SvgIcon>
);
ImageCo... |
app/components/decorators/ContextMixin.js | isp1r0/nerd-stack | import React from 'react';
export default {
contextTypes: {
data: React.PropTypes.object
},
componentWillMount(){
if (this.context && this.context.data) {
this.setState(this.context.data[this.constructor.displayName]);
}
}
};
|
examples/query-params/app.js | Nedomas/react-router | import React from 'react'
import { createHistory, useBasename } from 'history'
import { Router, Route, Link } from 'react-router'
const history = useBasename(createHistory)({
basename: '/query-params'
})
class User extends React.Component {
render() {
let { userID } = this.props.params
let { query } = thi... |
src/components/Chat/NotationLink.js | vNakamura/pocket-campaign | // @flow
import React, { Component } from 'react';
import { connect } from 'react-redux';
import styled from 'styled-components';
import { rollDice } from '../../actions/chat';
import type { State, UserState } from '../../types/State';
const StyledAnchor = styled.a`
color: ${props => props.theme.palette.text};
`;
... |
src/svg-icons/device/battery-charging-60.js | nathanmarks/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... |
src/components/hamburger.js | JohnTasto/EverythingIsFalling | import React from 'react'
import Radium from 'radium'
function Hamburger(props) {
const style = props.style || {}
const isOpen = props.isOpen || false
const color = props.color || '#000'
const height = props.height || 3... |
src/containers/todo_list.js | vijayviji/react-native-redux-todoapp | import React, { Component } from 'react';
import TodoListComp from '../components/todo_list';
export default class TodoList extends Component {
constructor(props) {
super(props);
}
componentDidMount() {
this.unsubscribe = this.props.store.subscribe(() => {
this.forceUpdate();
});
... |
client/main.js | earthref/earthref | import {Meteor} from 'meteor/meteor';
import React from 'react';
import {render} from 'react-dom';
import App from './app';
Meteor.startup(() => {
render(<App/>, document.getElementById('react-root'));
}); |
assets/jqwidgets/demos/react/app/chart/exporttoimage/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxChart from '../../../jqwidgets-react/react_jqxchart.js';
import JqxButton from '../../../jqwidgets-react/react_jqxbuttons.js';
class App extends React.Component {
componentDidMount() {
this.refs.jpegButton.on('click', () => {
... |
components/product-grid/card.js | dwest-teo/wattos-spaceship-emporium | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from '../../routes';
import { Flex, Box, Text, Image } from '../base';
const cardStyles = { flexBasis: 200 };
const Card = ({ name, price, thumbnail, slug }) => (
<Box
m1
rounded
border
borderGray2
flexAuto
css={c... |
Rosa_Madeira/Revendedor/src/components/common/RefreshIcon.js | victorditadi/IQApp | import React, { Component } from 'react';
import { Text, TouchableOpacity } from 'react-native';
import { Icon } from 'native-base';
const RefreshIcon = () => {
return (
<TouchableOpacity>
<Icon name='ios-mail' style={Styles.iconStyle}/>
</TouchableOpacity>
)
}
const Styles = {
i... |
lib/cli/test/fixtures/react_scripts_v2_forked/src/App.js | storybooks/react-storybook | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/... |
components/Layout/Navigation.js | jamesrf/weddingwebsite | /**
* React Static Boilerplate
* https://github.com/kriasoft/react-static-boilerplate
*
* Copyright © 2015-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';
... |
stories/Button.story.js | byte-foundry/prototypo | import React from 'react';
import {storiesOf} from '@storybook/react';
import Button from '../app/scripts/components/shared/new-button.components';
storiesOf('shared/Button', module)
.addDecorator(story => (
<div
style={{margin: 'auto', padding: '20px', textAlign: 'center'}}
className="normal"
>
{story(... |
public/js/components/profile/visitor/activityfeed/activityMain.react.js | TRomesh/Coupley | import React from 'react';
import ActivityContainer from './activityContainer.react';
import ActivityList from './activityListComp.react';
const ActivityMain = React.createClass({
render: function () {
return (
<div>
<div>
<ActivityContainer/>
... |
views/status_line.js | genecyber/black-screen | import React from 'react';
export default React.createClass({
render() {
return (
<div className="status-line">
<CurrentDirectory currentWorkingDirectory={this.props.currentWorkingDirectory}/>
<VcsData data={this.props.vcsData}/>
</div>
)
... |
src/editors/BoxEditor.js | rsamec/react-property-editor | import React from 'react';
import _ from 'lodash';
import Json from 'react-json-fork';
var defaultValues = {
margin:{},
padding:{},
border:{},
content:{}
};
var settings = {
form: true,
fixedFields: true,
adder: false,
editing: true,
fields:{
margin:{type:'boxSizeEditor'},
... |
src/components/base/index.js | chenchenyuyu/zhihuDaily-react | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import config from './config';
import CYError from './error';
class CYComponent extends Component {
constructor(props) {
super(props);
this.autoBind('handleClick');
this.initStateFromProps(props);
}
componentWillReceivePro... |
packages/slate-react/src/components/content.js | AlbertHilb/slate |
import Debug from 'debug'
import React from 'react'
import SlateTypes from 'slate-prop-types'
import Types from 'prop-types'
import getWindow from 'get-window'
import logger from 'slate-dev-logger'
import EVENT_HANDLERS from '../constants/event-handlers'
import Node from './node'
import findClosestNode from '../utils... |
docs/src/components/Docs/Usage/index.js | jpuri/react-draft-wysiwyg | /* @flow */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { EditorState, convertToRaw, ContentState, Modifier } from 'draft-js';
import draftToHtml from 'draftjs-to-html';
import htmlToDraft from 'html-to-draftjs';
import { Editor } from 'react-draft-wysiwyg';
import Codemirror f... |
src/screen/Oscilloscope/components/Settings.js | wavicles/fossasia-pslab-apps | import React from 'react';
import { Scrollbars } from 'react-custom-scrollbars';
import {
SettingsContainer,
FixedWrapper,
ScrollWrapper,
} from './Settings.styles';
import ChannelParameters from './ChannelParameters';
import TimeParameters from './TimeParameters';
import AnalysisParameters from './AnalysisParame... |
client.js | Wykks/My-notes | /*global document, window */
import React from 'react';
import debug from 'debug';
import { createElementWithContext } from 'fluxible-addons-react';
import app from './app';
const debugClient = debug('my-notes');
const dehydratedState = window.App; // Sent from the server
window.React = React; // For chrome dev tool... |
src/Accordion.js | modulexcite/react-bootstrap | import React from 'react';
import PanelGroup from './PanelGroup';
const Accordion = React.createClass({
render() {
return (
<PanelGroup {...this.props} accordion>
{this.props.children}
</PanelGroup>
);
}
});
export default Accordion;
|
src/js/components/Editor/AudioBlock.react.js | planetarylink/planetary-link | 'use strict';
import React from 'react';
import {Entity} from 'draft-js';
import AudioPlayer from '../AudioPlayer.react'
export default ({ block }) => {
const audioContent = Entity.get(block.getEntityAt(0)).getData()['source'];
return <AudioPlayer
src={audioContent}
preload='none'
/>;
};
|
dev/test-studio/parts/tools/css-variables/propertyPreview.js | sanity-io/sanity | import PropTypes from 'prop-types'
import React from 'react'
import styles from './propertyPreview.css'
// eslint-disable-next-line complexity
export function ThemePropertyPreview({property}) {
if (property.type === 'color') {
return (
<div
className={styles.root}
data-type={property.type}... |
packages/icons/src/md/hardware/KeyboardHide.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdKeyboardHide(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M40 4c2.21 0 4 1.79 4 4v20c0 2.21-1.79 4-4 4H8c-2.21 0-4-1.79-4-4l.02-20c0-2.21 1.77-4 3.98-4h32zm-18 6v4h4v-4h-4zm0 6v4h4v-4h-4zm-6-6v4h4v-4h-4... |
FourtyTwo.Client/src/containers/dashboard-page.js | valorl/FourtyTwo | import React from 'react';
import { connect } from 'react-redux';
import { browserHistory } from 'react-router';
import HeaderBar from './header-bar';
import { logout, setIsLoading,
requestExercises, storeCurrentExercise } from '../actions';
import Paper from 'material-ui/lib/Paper';
import IconButton from 'material-... |
techCurriculum/ui/solutions/4.8/src/index.js | AnxChow/EngineeringEssentials-group | /**
* Copyright 2017 Goldman Sachs.
* 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 writ... |
src/components/pagination/PaginationButton/PaginationPage.js | cltk/cltk_frontend | import React from 'react';
import { Link, withRouter } from 'react-router';
const PaginationPage = props => (
<Link
to={{
pathname: '/browse',
query: {
...props.location.query,
page: props.page,
},
}}
>
<span>
{props.page}
</span>
</Link>
);
export default withRouter(PaginationPage);
|
src/containers/FlashMessage.js | iris-dni/iris-frontend | import React from 'react';
import { connect } from 'react-redux';
import FlashMessage from 'components/FlashMessage';
import { hideFlashMessage } from 'actions/FlashActions';
const FlashMessageContainer = (props) => (
props.text
? <FlashMessage {...props} />
: null
);
FlashMessageContainer.propTypes = {
t... |
src/components/App.js | clayhan/reactserver | import React from 'react';
import Home from './Home';
import Navbar from './Navbar';
export default class App extends React.Component {
constructor(props) {
super(props);
}
render() {
console.log('====================');
console.log('Rendering App.js');
console.log('====================');
... |
src/components/Header/Header.js | Jahans3/thecraic | /**
* 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, { Component } from 'react';
import withStyle... |
16/notes/src/pages/calendar/Day.js | nanohop/hop_into_react | import React, { Component } from 'react';
class Day extends Component {
render() {
return <span className={"day " + (this.props.selected ? "selected" : "")}
style={{textDecoration: (this.props.todos.length > 0 ? 'underline' : 'none')}}
onClick={this.props.onClick}>{this.props.number}</span>
}
}
... |
src/components/ShowWhen/index.js | iris-dni/iris-frontend | import React from 'react';
import Rezponsive from 'rezponsive';
import {
mediaQueries,
serverMediaQueries
} from 'helpers/getMediaQueries';
const AddMQs = (WrappedComponent) => (props) => (
<WrappedComponent
{...props}
mq={mediaQueries}
serverMedia={serverMediaQueries[props.when || 'medium']}
/>
);... |
assets/components/product/main.js | alwayalive/admin-be | import React from 'react';
import ReactDOM from 'react-dom'
import { connect } from 'react-redux'
import { Table } from 'antd'
import Fieldset from 'commons/fieldset.js'
import Search from './search.js'
import { loadingState, initDataSource, initPagination, changeScroll } from 'actions/product/list.js'
import { is } fr... |
app/screens/navigation/grid2.js | andry-baka/dapur-ngebul-app | import React from 'react';
import {
ScrollView,
View,
StyleSheet
} from 'react-native';
import {
RkText,
RkButton,
RkStyleSheet
} from 'react-native-ui-kitten';
import {MainRoutes} from '../../config/navigation/routes';
export class GridV2 extends React.Component {
static navigationOptions = {
title:... |
src/js/components/modal/modal_form.js | working-minds/realizejs | import React, { Component } from 'react';
import PropTypes from '../../prop_types';
import { autobind, mixin } from '../../utils/decorators';
import {
Modal,
ModalHeader,
ModalContent,
ModalFooter,
Form,
FormButtonGroup,
} from '../../components';
import {
CssClassMixin,
ContainerMixin,
} from '../../... |
src/gm3/components/map/button.js | geomoose/gm3 | import React from 'react';
import PropTypes from 'prop-types';
import {withTranslation} from 'react-i18next';
const MapButton = ({label, icon, onClick, t, index, disabled}) => {
return (
<div
className={`map-button fade-in ${index} ${disabled ? 'disabled' : ''}`}
title={t(label)}
... |
app/boards/porsche-cup-gt3/components/warnings.js | fermio/motorsport-display | import React from 'react';
import _ from 'lodash';
import { EngineWarnings } from '../../constants';
const Speed = React.createClass({
propTypes: {
warnings: React.PropTypes.array,
onTrack: React.PropTypes.bool
},
getDefaultProps: function() {
return {
warnings: [],
... |
src/svg-icons/social/sentiment-dissatisfied.js | rscnt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialSentimentDissatisfied = (props) => (
<SvgIcon {...props}>
<circle cx="15.5" cy="9.5" r="1.5"/><circle cx="8.5" cy="9.5" r="1.5"/><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 1... |
SynapseClient/components/ReportModal.js | jmorg/synapse | /**
* Created by jhank on 4/13/2017.
*/
import React, { Component } from 'react';
import {
Alert,
AsyncStorage,
Dimensions,
Image,
Keyboard,
Modal,
Picker,
StyleSheet,
Switch,
Text,
TextInput,
View,
} from 'react-native';
import { ImageButton } from './ImageButton';
... |
docs/src/app/components/pages/components/DropDownMenu/ExampleSimple.js | skarnecki/material-ui | import React from 'react';
import DropDownMenu from 'material-ui/DropDownMenu';
import MenuItem from 'material-ui/MenuItem';
const styles = {
customWidth: {
width: 200,
},
};
export default class DropDownMenuSimpleExample extends React.Component {
constructor(props) {
super(props);
this.state = {va... |
example/src/screens/types/TopTabs.js | pqkluan/react-native-navigation | import React from 'react';
import {PixelRatio} from 'react-native';
class TopTabs extends React.Component {
static navigatorStyle = {
topTabTextColor: '#ffffff',
topTabTextFontFamily: 'BioRhyme-Bold',
selectedTopTabTextColor: '#ff505c',
// Icons
topTabIconColor: '#ffffff',
selectedTopTabIcon... |
js/source/Navigation/SingleNavi.js | peano-ito/giuseppe | /*********************************************************************/
/* Single Navigation */
/* (c) 2017 Peano System Inc. */
/*********************************************************************/
'use strict';
import React from ... |
src/app/index.js | iprignano/gelateria | import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'react-redux';
import {createStore, applyMiddleware, compose} from 'redux';
import logger from 'redux-logger';
import thunkMiddleware from 'redux-thunk';
import gelateria from 'app/store/reducers';
import {BrowserRouter} from 'react-ro... |
src/shared/views/shows/ShowsRoute.js | in-depth/indepth-core | import React from 'react'
import { ShowsListContainer } from './index'
const ShowsRoute = () => {
return (
<div>
<ShowsListContainer />
</div>
)
}
export default ShowsRoute
|
frontend/app/components/SearchDictionary/SearchDictionaryListLargeScreen.js | First-Peoples-Cultural-Council/fv-web-ui | import React from 'react'
import PropTypes from 'prop-types'
// Material-UI
import Table from '@material-ui/core/Table'
import TableBody from '@material-ui/core/TableBody'
import TableCell from '@material-ui/core/TableCell'
import TableHead from '@material-ui/core/TableHead'
import TableRow from '@material-ui/core/Tab... |
examples/components/Select.js | hanbar/formsy-react | import React from 'react';
import Formsy from 'formsy-react';
const MySelect = React.createClass({
mixins: [Formsy.Mixin],
changeValue(event) {
this.setValue(event.currentTarget.value);
},
render() {
const className = 'form-group' + (this.props.className || ' ') +
(this.showRequired() ? 'requir... |
opentech/static_src/src/app/src/containers/ScreeningOutcome.js | OpenTechFund/WebApp | import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import SidebarBlock from '@components/SidebarBlock'
import { getSubmissionOfID } from '@selectors/submissions'
const ScreeningOutcome = ({ submission }) => {
const outcome = submission && submission.screening;
... |
src/components/wp/admin-header.js | NatalieMac/simple-event-listing | import React from 'react';
export default function( props ) {
return <h1>{ props.children }</h1>;
}
|
examples/js/manipulation/multi-search-table.js | powerhome/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;
const fruits = [ 'banana', 'apple', 'orange', 'tomato', 'strawberries', 'cherries' ];
for (let i =... |
examples/with-apollo-and-redux/pages/redux.js | BlancheXu/test | import React from 'react'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
import { startClock, addCount, serverRenderClock } from '../lib/store'
import App from '../components/App'
import Header from '../components/Header'
import Page from '../components/Page'
class Index extends Reac... |
src/browser/app/components/Title.js | VigneshRavichandran02/3io | /* @flow */
import Helmet from 'react-helmet';
import React from 'react';
import { FormattedMessage } from 'react-intl';
const Title = ({ message, values }: any) => {
if (typeof message === 'string') {
return (
<Helmet title={message} />
);
}
return (
<FormattedMessage {...message} values={valu... |
code/workspaces/web-app/src/components/welcome/DescribeElementCardLinks.js | NERC-CEH/datalab | import React from 'react';
import PropTypes from 'prop-types';
import Button from '@material-ui/core/Button';
import CardActions from '@material-ui/core/CardActions';
const Link = ({ displayName, href }) => (
<Button style={{ fontSize: 'larger' }} onClick={() => window.open(href)} color="primary">
{`${displayNam... |
src/component/programmer/programmerView.js | tech-dojo/React-Task-Manager | import React from 'react';
import Drawer from 'material-ui/Drawer';
import MenuItem from 'material-ui/MenuItem';
import RaisedButton from 'material-ui/RaisedButton';
import AppBar from 'material-ui/AppBar';
import IconButton from 'material-ui/IconButton';
import Menu from 'material-ui/Menu';
import {Link} from 'react-r... |
react-fundamental/src/components/SelfCreateComponent.js | zhangfaliang/learnReact | 'use strict';
import React, { Component } from 'react';
// 定义一个组件,通过React.Children 拿到组件里面的子元素
class ListComponent extends Component {
render(){
return <ul>
{
React.Children.map( this.props.children, function(c){
return <li>{c}</li>;
})
}
</ul>
}
}
class UseChildrenCo... |
Libraries/Modal/Modal.js | catalinmiron/react-native | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
examples/Chips.js | 15lyfromsaturn/react-materialize | import React from 'react';
import Row from '../src/Row';
import Col from '../src/Col';
import Chip from '../src/Chip';
import Tag from '../src/Tag';
export default
<Row>
<Col s={12}>
<Chip>
<image src='assets/yuna.jpg' alt='Contact Person' />
Jane Doe
</Chip>
<Tag>tag</Tag>
</Col>
</Row>;
|
app/screens/code/code.js | mattermost/mattermost-mobile | // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import PropTypes from 'prop-types';
import React from 'react';
import {
BackHandler,
Platform,
ScrollView,
StyleSheet,
Text,
TextInput,
View,
} from 'react-native';
import {SafeAr... |
src/frontend/characters/components/ToggleEditModeButton.js | plotify/plotify | import { disableCharacterEditMode, enableCharacterEditMode } from '../actions'
import { isCharacterEditModeEnabled, isCharacterSelected } from '../selectors'
import Button from 'material-ui/Button'
import PropTypes from 'prop-types'
import React from 'react'
import Tooltip from 'material-ui/Tooltip'
import { connect }... |
imports/components/TabHistory.js | naustudio/nau-jukebox | /* © 2017
* @author Tu Nguyen
*/
/* eslint-disable react/no-array-index-key */
import React, { Component } from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import PropTypes from 'proptypes';
import { Songs } from '../collections';
import SongList from './SongList';
const queryLimit = 20;
clas... |
js/src/modals/FirstRun/Completed/completed.js | nipunn1313/parity | // Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any lat... |
src/js/components/Directories.js | zhukov-maxim/sbertech-test-task | import React from 'react';
const Directories = React.createClass({
displayName: 'Directories',
propTypes: {
items: React.PropTypes.arrayOf(React.PropTypes.object)
},
renderItem: function (item) {
return (
<li className='b-directories__item' key={item.id}>
<a href='#'>
{item.na... |
clients/libs/webpage/src/lib/plugins/donation/components/finish-post-donation/form-select.js | nossas/bonde-client | import React from 'react'
import { FormattedMessage } from 'react-intl'
import PropTypes from 'prop-types'
const FormSelect = (props) => {
const {
widget: { settings },
mobilization: { header_font },
onChange,
value,
onSubmit
} = props
const mainColor = (settings && settings.main_color) || '... |
src/main/scripts/modules/sea-siege/react/components/component.js | twuni/sea-siege | import React from 'react';
import _ from 'lodash';
import I18n from '../../i18n';
class Component extends React.Component {
static get className() {
return `${_.kebabCase(this.name)} component`;
}
static get contextTypes() {
return React.Component.contextTypes;
}
static get propTypes() {
retu... |
src/components/Footer.js | salsita/supercomments | import React from 'react';
const styles = {
wrapper: {
borderTop: '2px solid',
padding: '24px 0px 10px',
fontSize: '12px',
color: 'rgba(0, 39, 59, 0.2)'
},
webAppDevLink: {
paddingLeft: '0px',
textDecoration: 'underline',
color: 'inherit'
},
reactDevelopers: {
paddingLeft: '0p... |
src/svg-icons/navigation/chevron-left.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationChevronLeft = (props) => (
<SvgIcon {...props}>
<path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/>
</SvgIcon>
);
NavigationChevronLeft = pure(NavigationChevronLeft);
NavigationChevronLeft.dis... |
src/BackgroundCells.js | manishksmd/react-scheduler-smartdata | import PropTypes from 'prop-types';
import React from 'react';
import { findDOMNode } from 'react-dom';
import cn from 'classnames';
import dates from './utils/dates';
import { segStyle } from './utils/eventLevels';
import { notify } from './utils/helpers';
import { elementType } from './utils/propTypes';
import { dat... |
musical/src/RoomInfo.js | dmeredith96/MadHacks2017 | import React, { Component } from 'react';
import './RoomInfo.css';
import Users from './Users';
import Scoreboard from './Scoreboard';
class RoomInfo extends Component {
constructor(props) {
super(props);
this.state = {
players: this.props.players
}
}
render(){
... |
website/src/react-native/index.js | alin23/react-native | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
'use strict... |
web/static/js/search/SearchBar.js | EddyShure/artus | import React from 'react'
import channel from "../socket"
import Autocomplete from 'react-autocomplete'
import queryString from 'query-string'
class SearchBar extends React.Component {
constructor() {
super();
this.state = {
value: "",
suggestions: []
}
}
componentDidMount() {
if (win... |
fields/types/boolean/BooleanField.js | woody0907/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.... |
app/components/common/LineGraph/line-graph.js | builtwithluv/ZenFocus | import React from 'react';
import PropTypes from 'prop-types';
import {
CartesianGrid,
LineChart,
Line,
ResponsiveContainer,
Tooltip,
XAxis,
YAxis
} from 'recharts';
import { Themes } from 'enums';
import { getClockTime, twoDigits } from 'utils/countdown-timer.util';
const LineGraph = ({ data, theme })... |
mxcube3/ui/containers/LoggerOverlayContainer.js | meguiraun/mxcube3 | import React from 'react';
import { connect } from 'react-redux';
import UserLog from '../components/SampleView/UserLog';
export class LoggerOverlayContainer extends React.Component {
toggleWindow() {
const body = document.body;
const wrapper = document.querySelector('#o-wrapper');
const log = document.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.