path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/scenes/home/informationForm/formComponents/identifier.js | tal87/operationcode_frontend | import React, { Component } from 'react';
import Form from 'shared/components/form/form';
import PropTypes from 'prop-types';
import FormSelect from 'shared/components/form/formSelect/formSelect';
import { IDENTIFIERS } from 'shared/constants/status';
import styles from './formComponents.css';
class Identifier extends... |
js/react/shopping-cart/components/Cart.js | topliceanu/learn | import React from 'react'
import CartContents from './CartContents.js'
import CartTotal from './CartTotal.js'
let Cart = React.createClass({
propTypes: {
items: React.PropTypes.arrayOf(React.PropTypes.shape({
id: React.PropTypes.any.isRequired,
count: React.PropTypes.number,
... |
src/components/Book.js | pjamieson/westindiesbooks-react-redux | import React, { Component } from 'react';
import './Book.css';
class Book extends Component {
static propTypes = {
book: React.PropTypes.object.isRequired
};
render() {
const book = this.props.book;
const summary_paragraphs = [];
book.summary.forEach((paragraph) => {
summary_paragraphs.pus... |
app/javascript/mastodon/features/report/components/status_check_box.js | d6rkaiz/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Toggle from 'react-toggle';
import noop from 'lodash/noop';
import StatusContent from '../../../components/status_content';
import { MediaGallery, Video } from '../../ui/util/async-component... |
public/javascripts/routers/targetSearch.js | helloworldzxy/CarDetection | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, IndexRoute, hashHistory } from 'react-router';
import { HeaderBanner } from '../components/display/headerBanner.js';
import Navigation from '../components/display/navigation.js'; //注意二者引入方式,一个带大括号一个不带
import Motor from... |
addons/knobs/src/components/PropField.js | rhalff/storybook | /* eslint-disable no-underscore-dangle */
import PropTypes from 'prop-types';
import React from 'react';
import TypeMap from './types';
const InvalidType = () => <span>Invalid Type</span>;
const stylesheet = {
field: {
display: 'table-row',
padding: '5px',
},
label: {
display: 'table-cell',
box... |
app/js/index.js | yukiB/Splarm | import React from 'react'
import ReactDOM from 'react-dom'
import Container from './components/Container'
ReactDOM.render(
<Container />,
document.getElementById('container')
)
|
src/app.js | blackLearning/react-hackernews | /* 入口启动文件 */
import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { Router } from 'react-router'
import store, { history } from 'STORE'
import routes from 'ROUTE'
const MOUNT_NODE = document.getElementById('app')
// <Provider /> 是由 React Redux 提供的高阶组件,用来让你将 Redux 绑定到... |
examples/absolute-layout/src/App.js | react-tools/react-table | import React from 'react'
import styled from 'styled-components'
import { useTable, useAbsoluteLayout } from 'react-table'
import makeData from './makeData'
const Styles = styled.div`
padding: 1rem;
* {
box-sizing: border-box;
}
.table {
border: 1px solid #000;
max-width: 700px;
overflow-x: ... |
src/components/Login.js | danesparza/appliance-monitor-cloud | // React
import React, { Component } from 'react';
import {
Container
} from 'reactstrap';
// Components:
import PageError from './../components/PageError';
// Stores
import LoginPageStore from './../stores/LoginPageStore';
// Auth Utils
import CognitoAuthUtils from './../utils/CognitoAuthUtils';
// Button t... |
src/app-client.js | cessien/buzzer | // src/app-client.js
import React from 'react';
import ReactDOM from 'react-dom';
import AppRoutes from './components/AppRoutes';
window.onload = () => {
ReactDOM.render(<AppRoutes/>, document.getElementById('main'));
};
|
src/components/ProgressBar.js | bradparks/filepizza_javascript_send_files_webrtc | import React from 'react'
import classnames from 'classnames'
function formatProgress(dec) {
return (dec * 100).toPrecision(3) + "%"
}
export default class ProgressBar extends React.Component {
render() {
const failed = this.props.value < 0;
const inProgress = this.props.value < 1 && this.props.value >= ... |
frontend/src/containers/AttackListDetails.js | dionyziz/rupture | import React from 'react';
import AttackItem from './AttackItem';
import _ from 'lodash';
export default class AttackListDetails extends React.Component {
constructor() {
super();
this.state = {
completed: [],
runpaused: []
}
}
deleted = () => {
t... |
frontend/app_v2/src/components/ByAlphabet/ByAlphabetPresentation.js | First-Peoples-Cultural-Council/fv-web-ui | import React from 'react'
import PropTypes from 'prop-types'
import { Link } from 'react-router-dom'
import DictionaryListPresentation from 'components/DictionaryList/DictionaryListPresentation'
import DictionaryGrid from 'components/DictionaryGrid'
import AudioButton from 'components/AudioButton'
import Tabs from 'co... |
client/src/index.js | mikelearning91/seeme-starter | import React from 'react';
import ReactDOM from 'react-dom';
import { Router, browserHistory } from 'react-router';
import cookie from 'react-cookie';
import routes from './routes';
import 'bootstrap/dist/css/bootstrap.css';
import './App.css';
// import './js/script.js';
// import './js/jquery.mousewheel.js';
// impor... |
app/components/NavBarTop.js | BenGoldstein88/portfolio | import React from 'react';
export default class NavBarTop extends React.Component {
constructor(props) {
super(props);
this.handleNavButtonClick = this.handleNavButtonClick.bind(this)
}
handleNavButtonClick(e) {
e.preventDefault()
var newView = e.target.getAttribute("name")
this.props.onT... |
frontend/src/components/frame/components/Snackbar.js | jf248/scrape-the-plate | import React from 'react';
import { Snackbar as SnackbarController } from 'controllers/snackbar';
import SnackbarPres from './SnackbarPres';
function Snackbar() {
const renderFunc = ({ onClose, isOpen, extraProps }) => {
return <SnackbarPres {...{ onClose, isOpen, ...extraProps }} />;
};
return <SnackbarC... |
src/server/helpers/html.js | canonical-ols/build.snapcraft.io | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import ReactDOM from 'react-dom/server';
import Helmet from 'react-helmet';
import { Provider } from 'react-redux';
import { conf } from '../helpers/config';
import style from '../../common/style/vanilla/css/footer.css';
const GAID = conf.... |
ui/src/containers/Visualisations/components/CustomCard/index.js | LearningLocker/learninglocker | import React from 'react';
import PropTypes from 'prop-types';
import styled, { css } from 'styled-components';
const iconActiveMixin = css`
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
background: #eee;
`;
const VisualisationIcon = styled.div`
text-align: center;
vertical-align: top;
display: inline-block;
... |
src/components/TodoForm.js | pekkis/react-broilerplate-legacy | import React from 'react';
import uuid from 'node-uuid';
import styles from './TodoForm.pcss';
export default class TodoForm extends React.Component {
render() {
return (
<div className={styles.root}>
<form onSubmit={this.onSubmit.bind(this)}>
<label>Got ... |
webpack/scenes/Subscriptions/Details/SubscriptionDetails.js | cfouant/katello | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { translate as __ } from 'foremanReact/common/I18n';
import { Nav, NavItem, TabPane, TabContent, TabContainer, Grid, Row, Col } from 'patternfly-react';
import BreadcrumbsBar from 'foremanReact/components/BreadcrumbBar';
import Subscri... |
src/components/Header/HeaderContainer.js | MinisterioPublicoRJ/inLoco-2.0 | import React from 'react'
import Header from './Header'
import { connect } from 'react-redux'
import { showMenuLayer } from '../../actions/actions.js'
const mapStateToProps = (state) => {
return {
showTooltipMenu: state.showTooltipMenu,
}
}
const mapDispatchToProps = (dispatch) => {
return {
... |
examples/with-redux/src/App.js | casesandberg/react-color | /* eslint-disable no-console */
import React from 'react'
import { connect } from 'react-redux'
import { actions as appActions } from './reducer'
import { SketchPicker } from 'react-color'
export const App = ({ color, onChangeColor }) => {
return (
<div>
<SketchPicker
color={ color }
onCha... |
src/components/TopPlayers/TopPlayers.js | RetroGameNight/rgn-ui | /*
* Retro Game Night
* Copyright (c) 2015 Sasha Fahrenkopf, Cameron White
*
* 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 FluxComponent from 'flummox/component'
import Table from '../Table/Table'... |
src/components/portfolio/case_study_items.js | prodigygod0209/prodigygod0209.github.io | import React from 'react';
import Helmet from 'react-helmet';
import Link from 'gatsby-link';
import styled from 'styled-components';
import img from '../../img/showcase_movie-search.png';
const Caselink = styled.a`
display: block;
width: 80%;
opacity: 1;
height: 480px;
background-color: #1c1d25;
position: rela... |
src/utils/ValidComponentChildren.js | tonylinyy/react-bootstrap | import React from 'react';
/**
* Maps children that are typically specified as `props.children`,
* but only iterates over children that are "valid components".
*
* The mapFunction provided index will be normalised to the components mapped,
* so an invalid component would not increase the index.
*
* @param {?*} ... |
src/components/locationCard/index.js | nickfranciosi/terminal-frontend | import React from 'react';
import cn from 'classnames';
import styles from './style.module.css';
const LocationCard = ({imgSrc, parentPlace, city, comingSoon, className, style }) => {
return (
<div
className={cn(styles.card, className)}
style={{
backgroundImage: `url(${imgSrc})`,
...... |
docs/app/Examples/collections/Grid/Variations/GridExampleRelaxedVery.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import { Grid, Image } from 'semantic-ui-react'
const GridExampleRelaxedVery = () => (
<Grid relaxed='very' columns={4}>
<Grid.Column>
<Image src='http://semantic-ui.com/images/wireframe/image.png' />
</Grid.Column>
<Grid.Column>
<Image src='http://semantic-ui.com/im... |
src/Portal.js | PeterDaveHello/react-bootstrap | import React from 'react';
import CustomPropTypes from './utils/CustomPropTypes';
import domUtils from './utils/domUtils';
let Portal = React.createClass({
displayName: 'Portal',
propTypes: {
/**
* The DOM Node that the Component will render it's children into
*/
container: CustomPropTypes.moun... |
test/integration/image-component/default/pages/prose.js | flybayer/next.js | import Image from 'next/image'
import React from 'react'
import * as styles from './prose.module.css'
const Page = () => {
return (
<div className={styles.prose}>
<p>Hello World</p>
<Image id="prose-image" src="/test.jpg" width="400" height="400"></Image>
<p id="stubtext">This is the rotated pa... |
react/gameday2/components/embeds/EmbedLivestream.js | tsteward/the-blue-alliance | import React from 'react'
import { webcastPropType } from '../../utils/webcastUtils'
const EmbedLivestream = (props) => {
const channel = props.webcast.channel
const file = props.webcast.file
const iframeSrc = `https://new.livestream.com/accounts/${channel}/events/${file}/player?width=640&height=360&autoPlay=tru... |
node_modules/re-base/examples/firestore/github-notetaker/app/components/Github/UserProfile.js | aggiedefenders/aggiedefenders.github.io | import React from 'react';
import PropTypes from 'prop-types';
class UserProfiles extends React.Component {
render() {
return (
<div>
<h3> User Profile </h3>
<ul className="list-group">
{this.props.bio.avatar_url && (
<li className="list-group-item">
<img... |
node_modules/redux-form/es/Form.js | victor335882/ReduxSimpleStarter-4 | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des... |
src/client/app/components/Panels/FoodPanel/FoodMenuItem.js | sysart/dashboard | import React from 'react';
import styles from './styles.css';
class FoodMenuItem extends React.Component {
constructor(props) {
super(props);
}
render() {
const components = this.props.set.components.map((component, index) => {
return (<div key={index} className={styles.item}>... |
app/components/icons/Favorite.js | buildkite/frontend | import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
const starColor = "#f8cc1c";
const StarSVG = styled.svg`
.star {
fill: ${(props) => props.favorite ? starColor : 'none'};
fill-opacity: 0.3;
fill-rule: evenodd;
stroke: ${(props) => props.favorite ... |
lib/views/TypographySectionView.js | tuomashatakka/reduced-dark-ui | 'use babel'
import React from 'react'
import { Task } from 'atom'
import { applyFont } from '../core/configuration'
import { QueryField } from '../components/QueryField'
import { Icon } from '../components/base'
import Field from '../components/layout/Field'
import { PACKAGE_NAME } from '../constants'
const FontQuery... |
examples/active-links/app.js | djkirby/react-router | import React from 'react'
import { render } from 'react-dom'
import { Router, Route, IndexRoute, Link, IndexLink, browserHistory } from 'react-router'
import withExampleBasename from '../withExampleBasename'
const ACTIVE = { color: 'red' }
const App = ({ children }) => (
<div>
<h1>APP!</h1>
<ul>
<li>... |
src/app/views/oil.js | nazar/soapee-ui | import _ from 'lodash';
import React from 'react';
import Reflux from 'reflux';
import DocMeta from 'react-doc-meta';
import { Link, State } from 'react-router';
import oilActions from 'actions/oil';
import oilStore from 'stores/oil';
import oilsStore from 'stores/oils';
import calculatorStore from 'stores/calculator... |
src/containers/App/AppView.js | amaurymartiny/react-redux-auth0-kit | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Switch, Route } from 'react-router-dom';
import Header from '../Header/Header';
import HomePage from '../../components/HomePage/HomePage';
import AboutPage from '../../components/AboutPage/AboutPage';
import NotFoundPage from '../..... |
src/Notification1B/index.js | DuckyTeam/ducky-components | import Icon from '../Icon';
import Wrapper from '../Wrapper';
import NotificationItem from '../NotificationItem';
import React from 'react';
import PropTypes from 'prop-types';
import styles from './styles.css';
function Notification1B(props) {
return (
<NotificationItem
buttonClicked={props.buttonClick... |
src/docs/components/topology/TopologyDoc.js | grommet/grommet-docs | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import Topology from 'grommet/components/Topology';
import Box from 'grommet/components/Box';
import Button from 'grommet/components/Button';
import DocsArticle from '../../../components/DocsArticle';
export... |
src/decorators/HashTag/index.js | michalko/draft-wyswig | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import './styles.css';
class Hashtag {
constructor(config) {
this.className = config.className;
this.hashCharacter = config.hashCharacter || '#';
this.separator = config.separator || ' ';
}
getHashtag... |
blueocean-material-icons/src/js/components/svg-icons/image/blur-linear.js | jenkinsci/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageBlurLinear = (props) => (
<SvgIcon {...props}>
<path d="M5 17.5c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5zM9 13c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1z... |
src/app/components/footer/index.js | jackyzhen/coffee-tracker | import React from 'react';
export default function Footer() {
return (
<div />
);
}
Footer.displayName = 'Header';
Footer.propTypes = {
}; |
src/view/dashboard/components/quote.js | fishmankkk/mircowater2.0 | import React from 'react'
import PropTypes from 'prop-types'
import styles from './quote.less'
function Quote ({ name, content, title, avatar }) {
return (
<div className={styles.quote}>
<div className={styles.inner}>
{content}
</div>
<div className={styles.footer}>
<div classNa... |
react-native-app/src/components/art/easeTitle.js | nnecec/laboratory | import React from 'react';
import { Animated, Text, View } from 'react-native';
class EaseTitle extends React.Component {
state = {
fadeAnim: new Animated.Value(0), // Initial value for opacity: 0
}
componentDidMount() {
Animated.spring( // Animate over time
this.state.fadeAnim, ... |
src/routes.js | zebogen/film-bff-client | import React from 'react';
import { Route, IndexRoute } from 'react-router';
import FilmBffLayout from 'layouts/FilmBffLayout';
import HomeContainer from 'containers/HomeContainer';
import LoginContainer from 'containers/LoginContainer';
import WatchListsEditor from 'containers/WatchListsEditor';
import PublicWatchLis... |
src/TimePicker.js | mohitgupta8888/react-timepicker | import React from 'react'
import onClickOutside from 'react-onclickoutside'
import {parseSettings} from './Utils/Settings'
import TimeParser from './Utils/TimeParser'
import lang from './Lang'
var globalSettings;
var defaults = {
className: null,
maxTime: null,
minTime: null,
selectOnBlur: false,
... |
docs/app/Examples/modules/Accordion/Usage/index.js | koenvg/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
import { Message } from 'semantic-ui-react'
const AccordionUsageExamples = () => (
<ExampleSection title='Usage'>
<ComponentExa... |
examples/huge-apps/routes/Course/routes/Assignments/routes/Assignment/components/Assignment.js | mjw56/react-router | import React from 'react';
class Assignment extends React.Component {
render () {
var { courseId, assignmentId } = this.props.params;
var { title, body } = COURSES[courseId].assignments[assignmentId]
return (
<div>
<h4>{title}</h4>
<p>{body}</p>
</div>
);
}
}
export d... |
app/js/components/source/changeLanguage.js | jagatjeevan/dakiya | // Frameworks
import React from 'react';
import Cookie from 'js-cookie';
function changeLanguage(lang) {
Cookie.set('lang', lang);
/* eslint no-def: 0 */
location.reload();
}
const ChooseLanguage = () => (
<div className="language-selector">
<button onClick={() => changeLanguage('en')}>English</button>
... |
src/svg-icons/action/swap-vert.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSwapVert = (props) => (
<SvgIcon {...props}>
<path d="M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"/>
</SvgIcon>
);
ActionSwapVert = pure(ActionSwapVert);
ActionSwapVert.displa... |
src/renderer/index.js | venobo/app | console.time('init')
import debounce from 'debounce'
import {clipboard, remote, ipcRenderer} from 'electron'
import React from 'react'
import ReactDOM from 'react-dom'
//import {error, log} from './lib/logger'
import MetadataAdapter from './api/metadata/adapter'
import dispatch, {setupDispatchHandlers} from './lib/di... |
src/index.js | taggartbg/connectjs2015 | import ReactDOM from 'react-dom';
import React from 'react';
import List from './List';
ReactDOM.render(<List />, document.getElementById('root'));
|
public/assets/js/node_modules/react-router/es6/IndexLink.js | ngocson8b/6jar | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
import React from 'react';
import Link from './Link';
/**
*... |
app/javascript/mastodon/features/notifications/components/notification.js | clworld/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import StatusContainer from '../../../containers/status_container';
import AccountContainer from '../../../containers/account_container';
import { injectIntl, FormattedMessage } from 'react-intl';
... |
src/docs/components/select/SelectDoc.js | grommet/grommet-docs | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import Select from 'grommet/components/Select';
import Form from 'grommet/components/Form';
import FormField from 'grommet/components/FormField';
import Button from 'grommet/components/Button';
import DocsArt... |
frontend/src/Components/Form/IndexerFlagsSelectInputConnector.js | geogolem/Radarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import EnhancedSelectInput from './EnhancedSelectInput';
function createMapStateToProps() {
return createSelector(
(state, { indexerFlags }) => indexerFl... |
fontend/src/routes/IndexPage.js | bingweichen/GOKU | import React from 'react';
import { connect } from 'dva';
import styles from './IndexPage.css';
import auth from '../utils/Auth';
import Footer from '../components/MainLayout/Footer.jsx';
function IndexPage({ location }) {
const tab = location.query.tab ? location.query.tab : 'shop';
auth();
return (
<div >... |
app/javascript/mastodon/features/account_gallery/index.js | tootsuite/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { lookupAccount, fetchAccount } from 'mastodon/actions/accounts';
import { expandAccountMediaTimeline } from '../../actions/timelines';
import LoadingI... |
app/common/components/Toolbar/index.js | testpackbin/testpackbin | import React from 'react';
import {Decorator as Cerebral} from 'cerebral-view-react';
import styles from './styles.css';
@Cerebral({
recorder: ['recorder']
})
class Toolbar extends React.Component {
constructor() {
super();
}
render() {
return (
<div className={styles.wrapper}>
{ this.pro... |
src/components/inputs/TextField.js | rghorbani/react-native-common | import React from 'react';
import PropTypes from 'prop-types';
import { TextInput as RNTextInput, StyleSheet, Animated } from 'react-native';
import _ from 'lodash';
import {
Colors,
Constants,
Modal,
Text,
Typography,
View,
} from 'react-native-ui-lib';
import BaseInput from './BaseInput';
import TextArea ... |
src/pages/app/subscribe.js | getinsomnia/website | import React from 'react';
import PropTypes from 'prop-types';
import * as session from '../../lib/session';
import App from '../../lib/app-wrapper';
import Link from '../../components/link';
const planTypeTeam = 'team';
const planTypePlus = 'plus';
const planCycleMonthly = 'monthly';
const planCycleYearly = 'yearly';... |
src/client/components/TopicSelector.js | busyorg/busy | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import SortSelector from './SortSelector/SortSelector';
import Topic from './Button/Topic';
import './TopicSelector.less';
const TopicSelector = ({ sort, isSingle, topics, onTopicClose, onSortChange }) => (
... |
src/pages/indexPage/index.js | chenchenyuyu/zhihuDaily-react | import React from 'react';
// import { connect } from 'react-redux';
import CYComponent from 'components/base/index';
import HomeHeader from 'components/home-header/index';
import ListDefault from 'components/list-default/index';
import Img from '../../components/list-default/images/chenyu.png';
const res = [
{ date... |
javascript/ql/experimental/adaptivethreatmodeling/test/endpoint_large_scale/autogenerated/Xss/XssThroughDom/forms.js | github/codeql | import React from 'react';
import { Formik, withFormik, useFormikContext } from 'formik';
const FormikBasic = () => (
<div>
<Formik
initialValues={{ email: '', password: '' }}
validate={values => {
$("#id").html(values.foo); // NOT OK
}}
onSub... |
app/components/SettingOptions.js | SuperDOgePx/chrome-extension-react | // import _ from 'lodash';
import React, { Component } from 'react';
class SettingOptions extends Component {
openOptions() {
chrome.runtime.sendMessage({ service: 'open-options' });
}
render() {
return (
<div className="btn-group">
<div
className={`btn tooltip-right`}
... |
src/components/layout.js | sioked/ecomchicago | import React from 'react';
import PropTypes from 'prop-types';
import Helmet from 'react-helmet';
import Header from './Header';
import Footer from './Footer';
import content from '../constants/content.js';
import './layout.scss';
const TemplateWrapper = ({ children }) => (
<div>
<Helmet
title={content.si... |
src/components/tile.js | sugerPocket/react-redux-2048 | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import style from '../styles/tile.sass';
export default class Tile extends Component {
render() {
const { value, x, y, width, height, isExisting, isNew, merged, dispatch } = this.props;
let tileMerged = merged ? ' tile-merged'... |
src/selectable-group.js | leopoldjoy/react-selectable-extended | import React from 'react';
import ReactDOM from 'react-dom';
import isNodeInRoot from './nodeInRoot';
import getBoundsForNode from './getBoundsForNode';
import doObjectsCollide from './doObjectsCollide';
class SelectableGroup extends React.Component {
constructor (props) {
super(props);
this.state = {
isBox... |
test/utils.js | planttheidea/crio | // test
import test from 'ava';
import React from 'react';
import sinon from 'sinon';
// src
import * as utils from 'src/utils';
import * as is from 'src/is';
import CrioArray from 'src/CrioArray';
import CrioObject from 'src/CrioObject';
test('if createIterator will create an iterator method', (t) => {
const key =... |
docs/pages/api-docs/modal.js | lgollut/material-ui | import React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown';
const pageFilename = 'api/modal';
const requireRaw = require.context('!raw-loader!./', false, /\/modal\.md$/);
export default function Page({ docs }) ... |
src/svg-icons/av/queue.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvQueue = (props) => (
<SvgIcon {...props}>
<path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"/>
</SvgIco... |
packages/lightning-core/accounts/ChannelList.js | DaReaper/lightning-app | import React from 'react'
import _ from 'lodash'
import reactCSS from 'reactcss'
import { Icon } from 'lightning-components'
import { LoadingIcon } from '../common'
import ChannelListItem from './ChannelListItem'
export const ChannelList = ({ channels, loading }) => {
const styles = reactCSS({
'default': {
... |
client/src/core-components/form.js | ivandiazwm/opensupports | import React from 'react';
import _ from 'lodash';
import classNames from 'classnames';
import {reactDFS, renderChildrenWithProps} from 'lib-core/react-dfs';
import ValidationFactory from 'lib-app/validations/validator-factory';
import FormField from 'core-components/form-field';
class Form extends React.Component {... |
addons/comments/src/manager/components/CommentsPanel/index.js | enjoylife/storybook | import PropTypes from 'prop-types';
import React from 'react';
import CommentList from '../CommentList';
import CommentForm from '../CommentForm';
import style from './style';
export default function CommentsPanel(props) {
if (props.loading) {
return (
<div style={style.wrapper}>
<div style={style.... |
js/components/developer/create-job-screen/calendarCard.js | justarrived/p2p-client | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Grid, Col, Form, Card, CardItem } from 'native-base';
import CardHeader from '../../common/card-header/cardHeader';
import { setHStartDate, setHStartTime } from '../../../actions/jobCreation';
import I18n from '../../../i18n';
im... |
examples/real-world/index.js | aheuermann/redux | import 'babel-core/polyfill';
import React from 'react';
import Root from './containers/Root';
import BrowserHistory from 'react-router/lib/BrowserHistory';
React.render(
<Root history={new BrowserHistory()} />,
document.getElementById('root')
);
|
src/pages/index.js | kbariotis/kostasbariotis.com | import React from 'react';
import PropTypes from 'prop-types';
import { Row, Col } from 'react-flexbox-grid';
import { graphql, Link } from 'gatsby';
import IndexLayout from '../components/layouts/Index';
import Separator from '../components/blog/Separator';
import AuthorHeader from '../components/blog/AuthorHeader';
... |
examples/withLazyReducer-demo/src/modules/lazyCounter/LazyCounter.js | KeyFE/lazy-reducer | import React from 'react'
import { connect } from 'react-redux'
import { withLazyReducer } from 'lazy-reducer'
import lazyCounterReducer, { increase, decrease } from './reducer'
const LazyCounter = props => {
return (
<div style={{ margin: '12px' }}>
LazyCounter result: <span style={{ fontWeigh... |
core/src/plugins/access.ajxp_conf/res/js/AdminWorkspaces/meta/MetaList.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... |
app/javascript/mastodon/features/ui/components/video_modal.js | salvadorpla/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Video from 'mastodon/features/video';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage } from 'react-intl';
export const previewState = 'previe... |
internals/templates/app.js | 7ruth/PadStats2 | /**
* app.js
*
* This is the entry file for the application, only setup and boilerplate
* code.
*/
// Needed for redux-saga es6 generator support
import 'babel-polyfill';
// Import all the third party stuff
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
impor... |
src/routes.js | CodeTaha/react-redux-starter | /**
* Created by taha on 9/10/17.
*/
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/App';
import HomePage from './components/home/HomePage';
import AboutPage from './components/about/AboutPage';
import CoursesPage from './components/course/CoursesPage';
impo... |
src/pages/person/PartyFee.js | zzelune/neam | /*
* @Author: caixin1.zh
* @Date: 2017-10-19 06:06:10
* @Last Modified by: zhaozheng1.zh
* @Last Modified time: 2017-12-06 10:42:46
*/
import React from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
processColor,
ScrollView,
FlatList,Root,Dimensions
} from 'react-native';
import Toast, { DURA... |
coral/components/NavigationBar.js | fdjiangwu/Coral | import React from 'react';
import {StyleSheet, Platform, View, Text, StatusBar, TouchableOpacity} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import {connect} from 'react-redux';
import theme from '../constants/theme';
import px2dp from '../utils/px2dp';
class NavigationBar extends Reac... |
src/app.js | CodersInTheCommunity/curve-calculator | import React from 'react';
import ReactDOM from 'react-dom';
import update from 'react-addons-update';
import PossiblePoints from './components/PossiblePoints';
import TargetPercentage from './components/TargetPercentage'
import Input from './components/Input';
import Scores from './components/Scores';
import Curve fr... |
app/Components/MyNavigationBar.js | csujedihy/react-native-textgo | 'use strict';
import NavigationBar from 'react-native-navbar';
import React, { Component } from 'react';
import {StyleSheet} from 'react-native';
/* This is just a wrapper of Navbar */
export default class MyNavigationBar extends Component {
constructor(props) {
super(props);
}
render() {
let styles = StyleS... |
web/static/js/components/user_nav.js | babie/goal-server | import React from 'react';
import {Component} from 'flumpt';
class UserNavComponent extends Component {
render() {
return (
<nav id="user-nav">
<ul>
<li>
<i className="fa fa-user fa-2x fa-fw"></i>
</li>
<li>
<i className="fa fa-search fa-2x fa-f... |
src/click-game/ChildQues5.js | mrinalkrishnanm/Sld | import React from 'react';
import Navbar from '../Navbar';
import Modal from 'react-modal';
import { browserHistory } from "react-router";
import _ from 'lodash';
class ChildQues5 extends React.Component{
constructor(){
super();
this.state={
counter: 10,
modalIsOpen: true,
... |
app/javascript/mastodon/features/lists/components/new_list_form.js | primenumber/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { changeListEditorTitle, submitListEditor } from '../../../actions/lists';
import IconButton from '../../../components/icon_button';
import { defineMessages, injectIntl } from 'react-intl';
const messages = def... |
packages/cf-component-dynamic-content/example/basic/component.js | manatarms/cf-ui | import React from 'react';
import DynamicContent from 'cf-component-dynamic-content';
class DynamicContentComponent extends React.Component {
render() {
return (
<DynamicContent
dangerouslySetInnerHTML={{
__html: '<p>Not an XSS attack, I swear.</p>'
}}
/>
);
}
}
expor... |
src/svg-icons/action/settings-bluetooth.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsBluetooth = (props) => (
<SvgIcon {...props}>
<path d="M11 24h2v-2h-2v2zm-4 0h2v-2H7v2zm8 0h2v-2h-2v2zm2.71-18.29L12 0h-1v7.59L6.41 3 5 4.41 10.59 10 5 15.59 6.41 17 11 12.41V20h1l5.71-5.71-4.3-4.... |
src/components/children/PlaylistSavedDialog.js | Nfinley/Showcase-Playlist-Generator | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Button from '@material-ui/core/Button';
import Dialog from '@material-ui/core/Dialog';
import DialogActions from '@material-ui/core/DialogActions';
import DialogContent from '@material-ui/core/DialogContent';
import DialogContentText f... |
src/routes.js | davidraleigh/universal-redux-starter-todo | import React from 'react';
import { Route } from 'react-router';
import App from './containers/App/App';
export default () => {
return (
<Route path="/" component={App} />
);
};
|
src/components/video_list_item.js | Jaime691/ReactTube | import React from 'react';
const VideoListItem = ({video, onVideoSelect}) => {
// const video = props.video;
const imageUrl = video.snippet.thumbnails.default.url;
return (
<li
onClick= {()=> onVideoSelect(video)}
className="list-group-item">
<div className=... |
src/browser/app/Footer.react.js | SidhNor/este-cordova-starter-kit | import Component from 'react-pure-render/component';
import React from 'react';
import { FormattedHTMLMessage, defineMessages } from 'react-intl';
// Messages collocation ftw.
// https://github.com/yahoo/react-intl/wiki/API#definemessages
const messages = defineMessages({
madeByHtml: {
defaultMessage: 'Sample es... |
src/js/components/ItemProject/index.js | waagsociety/ams.datahub.client | import React from 'react'
import Li from '../Li'
export default function ItemProject({ data }) {
const { source, projectLeader, projectPartner, temporal, spatial } = data
return <section className='ItemProject content'>
<h1>Project</h1>
<ul>
<Li header='Project Leader' content={projectLeader}/>... |
src/app.js | Schubidu/gambling-block | import React from 'react';
import ReactDOM from 'react-dom';
import createBrowserHistory from 'history/lib/createHashHistory';
import { syncReduxAndRouter } from 'redux-simple-router';
import routes from './routes';
import Root from './containers/Root';
import configureStore from './redux/configureStore';
const histor... |
src/components/widgets/InputRange.js | rsamec/react-designer | import React from 'react';
import InputRange from 'react-input-range';
import styleFont from './utils/font';
let Renderer = (props) => {
var style = props.style || {};
styleFont(style, props.font);
var valueLink = props.valueLink || {
value: props.value, requestChange: ()=> {
}
};
var handle... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.