path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
extensions/usertracking/server.js | axax/lunuc | import schema from './gensrc/schema'
import resolver from './gensrc/resolver'
import Hook from 'util/hook'
import {deepMergeToFirst} from 'util/deepMerge'
import {clientAddress, getHostFromHeaders} from '../../util/host'
import {trackUser} from './track'
import React from 'react'
import Util from '../../api/util'
// H... |
app/views/STF/Dashboard/Metrics/SubTable/SubTable.js | RcKeller/STF-Refresh | import React from 'react'
import PropTypes from 'prop-types'
// import _ from 'lodash'
import { Table, Alert } from 'antd'
const columns = [
{ title: 'Prompt', dataIndex: 'prompt', key: 'prompt' },
{ title: 'Score', dataIndex: 'score', key: 'score', width: 40 }
]
/*
SUBTABLE COMPONENT:
Table views f... |
ajax/libs/react-select/1.0.0-rc.8/react-select.es.js | holtkamp/cdnjs | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import AutosizeInput from 'react-input-autosize';
import classNames from 'classnames';
function arrowRenderer(_ref) {
var onMouseDown = _ref.onMouseDown;
return React.createElement('span', {
className: ... |
ajax/libs/react-instantsearch/4.5.0/Connectors.js | holtkamp/cdnjs | /*! ReactInstantSearch 4.5.0 | © Algolia, inc. | https://community.algolia.com/react-instantsearch */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
... |
src/components/EditorTools.js | mirokk/react-content-builder | import React from 'react';
import ElementConfig from '../config.elements';
import Handle from './Handle';
import Row from './Row'
import Col from './Col'
export default ()=>(
<div className="toolbox editorTools editorContainer rowContainer colContainer">
<div className="toolbox-hl">Elements:</div>
{
Object.k... |
shared/app/Tms/components/Icons/User.js | pebie/react-universally-node-config | /* eslint max-len: 0 */
import PropTypes from 'prop-types';
import React from 'react';
const User = ({ width, height, svgClass }) =>
(<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 92 100"
width={width}
height={height}
className={svgClass}
aria-labelledby="title desc"
tabIndex="0"
... |
src/components/Event.js | OpenCollective/frontend | import React from 'react';
import PropTypes from 'prop-types';
import Header from './Header';
import Body from './Body';
import Footer from './Footer';
import CollectiveCover from './CollectiveCover';
import Location from './Location';
import Tier from './Tier';
import NotificationBar from './NotificationBar';
import I... |
app/data/ContactData.js | hsin421/tacec-2017 | import React from 'react';
import styles from '../styles.css';
import aboutImg from '../images/02_about_03.png';
import tacecLogo from '../images/tacec_logo.png';
import tangLogo from '../images/tang_logo.png';
import otdLogo from '../images/otd_logo.png';
const textStyle = styles.bodyTextAbout
function Paragraph (... |
src/node_modules/react-router/es6/IndexRedirect.js | oferkafry/gps-tracker-ui | 'use strict';
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must e... |
demo/app/components/SwiperView.js | braveliuchina/pig-react-native | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Image,
TextInput,
TouchableOpacity
} from 'react-native';
import Swiper from 'react-native-swiper';
import {Images, LoginStyles} from '../resource/';
export default class SwiperView extends Component {
render(){
return(
... |
src/svg-icons/toggle/star-half.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ToggleStarHalf = (props) => (
<SvgIcon {...props}>
<path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.... |
src/components/campaign-avatar/index.js | datea/datea-webapp-react | import './campaign-avatar.scss';
import React from 'react';
import PropTypes from 'prop-types';
import cn from 'classnames';
import Avatar from '@material-ui/core/Avatar';
import DIcon from '../../icons';
import {getImgSrc} from '../../utils';
const CampaignAvatar = ({src, className, style}) => !!src
? <Avatar src={... |
app/javascript/mastodon/features/favourites/index.js | MitarashiDango/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from '../../components/loading_indicator';
import { fetchFavourit... |
actor-apps/app-web/src/app/components/dialog/messages/Text.react.js | Dreezydraig/actor-platform | import _ from 'lodash';
import React from 'react';
import memoize from 'memoizee';
import emojify from 'emojify.js';
import emojiCharacters from 'emoji-named-characters';
import Markdown from '../../../utils/Markdown';
const inversedEmojiCharacters = _.invert(_.mapValues(emojiCharacters, (e) => e.character));
emoj... |
docs/app/Examples/elements/List/Content/ListExampleItem.js | aabustamante/Semantic-UI-React | import React from 'react'
import { List } from 'semantic-ui-react'
const ListExampleItem = () => (
<List>
<List.Item>1</List.Item>
<List.Item>2</List.Item>
<List.Item>3</List.Item>
</List>
)
export default ListExampleItem
|
src/server.js | deslee/reactstarterkitattempt | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import 'babel-core/polyfill';
import path from 'path';
import express from 'express';
import React from 'react';
import ReactDOM from 'react-dom/server';
import Router from './routes';
import Html from './components/Html';
const server = global.... |
examples/official-storybook/components/DocgenButton.js | rhalff/storybook | import React from 'react';
import PropTypes from 'prop-types';
/** DocgenButton component description imported from comments inside the component file */
const DocgenButton = ({ disabled, label, onClick }) => (
<button disabled={disabled} onClick={onClick}>
{label}
</button>
);
DocgenButton.defaultProps = {
... |
new-lamassu-admin/src/pages/Maintenance/Wizard/WizardStep.js | naconner/lamassu-server | import { makeStyles } from '@material-ui/core'
import classnames from 'classnames'
import { Formik, Form, Field } from 'formik'
import * as R from 'ramda'
import React from 'react'
import Stepper from 'src/components/Stepper'
import { HoverableTooltip } from 'src/components/Tooltip'
import { Button } from 'src/compone... |
web/portal/src/components/Select/index.js | trendmicro/serverless-survey-forms |
// CSS
import styles from './style.css';
import React from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import PureComponent from 'react-pure-render/component';
import classNames from 'classnames';
class Select extends PureComponent {
constructor(props) {
super(props);
... |
src/icons/IosTime.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosTime extends React.Component {
render() {
if(this.props.bare) {
return <g>
<style type="text/css">
.st0{fill:#010101;}
</style>
<g>
<path class="st0" d="M256,32C132.3,32,32,132.3,32,256c0,123.7,100.3,2... |
js/jqwidgets/demos/react/app/formattedinput/events/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxFormattedInput from '../../../jqwidgets-react/react_jqxformattedinput.js';
import JqxPanel from '../../../jqwidgets-react/react_jqxpanel.js';
class App extends React.Component {
componentDidMount() {
this.refs.myFormattedInput.on('open... |
src/js/components/Markdown.js | linde12/grommet | // (C) Copyright 2016 Hewlett Packard Enterprise Development LP
import React from 'react';
import PropTypes from 'prop-types';
import Markdown from 'markdown-to-jsx';
import deepAssign from 'deep-assign';
import Paragraph from './Paragraph';
import Table from './Table';
import Heading from './Heading';
import Anchor f... |
src/neff_birkley/index.js | neffbirkley/everything | import React from 'react';
import ReactDOM from 'react-dom';
import { AppContainer as HotReload } from 'react-hot-loader';
import getRootNode from '@libs/getRootNode';
import App from './components/App';
import './main.css';
const render = () => {
ReactDOM.render(
<HotReload>
<App />
</HotReload>,
... |
e2e-tests/production-runtime/src/pages/env-vars.js | 0x80/gatsby | import React from 'react'
import Layout from '../components/layout'
const UseEnv = ({ heading, envVar }) => (
<React.Fragment>
<h2>{heading}</h2>
<pre>
<code data-testid={heading}>{JSON.stringify(envVar)}</code>
</pre>
</React.Fragment>
)
const SecondPage = () => (
<Layout>
<h1>Using env ... |
src/svg-icons/hardware/desktop-windows.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareDesktopWindows = (props) => (
<SvgIcon {...props}>
<path d="M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H3V4h18v12z"/>
</SvgIcon>
);
HardwareDesk... |
lib/head.js | arunoda/next.js | import React from 'react'
import PropTypes from 'prop-types'
import sideEffect from './side-effect'
class Head extends React.Component {
static contextTypes = {
headManager: PropTypes.object
}
render () {
return null
}
}
export function defaultHead () {
return [<meta charSet='utf-8' className='next... |
sitedeo/src/App.js | jobportalcompunnel/bkcust | import React, { Component } from 'react';
import { BrowserRouter as Router, Switch, Route, Link } from 'react-router-dom';
import logo from './logo.svg';
import './App.css';
import Header from './Layout/Header/Header';
import Footer from './Layout/Footer/Footer';
import Home from './Home/Home';
import Pages from './Pag... |
js/landing.js | caylazabel/learning-react | import React from 'react'
import { connect } from 'react-redux'
import { Link } from 'react-router'
import { setSearchTerm } from './actionCreators'
const { string, func, object } = React.PropTypes
const Landing = React.createClass({
contextTypes: {
router: object
},
propTypes: {
searchTerm: string,
... |
src/App/Components/HostLists.js | ccubed/Vertinext | import React from 'react';
class HostLists extends React.Component {
render(){
return(
<table className="highlight centered">
<thead>
<tr>
<th data-field="url">URL</th>
<th data-field="desc">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://www.vertinext.com... |
src/routes.js | abathz/react-boilerplate | import React from 'react'
import { BrowserRouter, Route } from 'react-router-dom'
import App from 'container/App'
const Routes = () => (
<BrowserRouter>
<Route exact path='/' component={App} />
</BrowserRouter>
)
export default Routes
|
app/react-icons/fa/sign-language.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaSignLanguage extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m20.1 15q0.7 0 1.3 0.4l4.9 3.3q1.4 0.9 2.5 2.2l3.2 3.8q0.9 1 0.7 2.4l-1... |
src/svg-icons/notification/sync-disabled.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationSyncDisabled = (props) => (
<SvgIcon {...props}>
<path d="M10 6.35V4.26c-.8.21-1.55.54-2.23.96l1.46 1.46c.25-.12.5-.24.77-.33zm-7.14-.94l2.36 2.36C4.45 8.99 4 10.44 4 12c0 2.21.91 4.2 2.36 5.64L4 20... |
node/stack/src/client/main.js | petrsmid/modern-javascript-course | import React from 'react';
import "./components/helloworld";
export default class Main extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<HelloWorld />
</div>
);
}
}
|
fields/types/cloudinaryimage/CloudinaryImageColumn.js | wmertens/keystone | import React from 'react';
import CloudinaryImageSummary from '../../components/columns/CloudinaryImageSummary';
import ItemsTableCell from '../../../admin/client/components/ItemsTable/ItemsTableCell';
import ItemsTableValue from '../../../admin/client/components/ItemsTable/ItemsTableValue';
var CloudinaryImageColumn ... |
packages/vulcan-backoffice/lib/hocs/withRouteParam.js | VulcanJS/Vulcan | /**
* Pass a route param to its child
*
*/
import React from 'react';
import PropTypes from 'prop-types';
export const withRouteParam = fieldName => Component => {
const Wrapper = props => (
<Component
{...props}
{...{
[fieldName]: props[fieldName] || (props.params && props.params[fieldNam... |
app/javascript/mastodon/features/introduction/index.js | mimumemo/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ReactSwipeableViews from 'react-swipeable-views';
import classNames from 'classnames';
import { connect } from 'react-redux';
import { FormattedMessage } from 'react-intl';
import { closeOnboarding } from '../../actions/onboarding';
import screenHell... |
src/components/charts/charts/table/tr.js | noahehall/udacity-corporate-dashboard | import React from 'react';
export const Tr = ({ fields, filterable, length, id, idx, th }) => {
const cells = [];
let i = 0;
if (th && length && id && filterable)
while (i < length) {
cells.push(
<th key={`${id}${i}`}>
<input
className={i === length - 1 ? 'flt_s' : 'flt'}
... |
src/components/BPlanInfo.js | cismet/wupp-geoportal3-powerboats | import React from 'react';
import PropTypes from 'prop-types';
import { OverlayTrigger, Well, Tooltip } from 'react-bootstrap';
import Loadable from 'react-loading-overlay';
import { Icon } from 'react-fa';
// Since this component is simple and static, there's no parent container for it.
const BPlanInfo = ({
featureC... |
src/containers/NotFound/NotFound.js | zunperior/wear4cast | import React from 'react';
export default function NotFound() {
return (
<div className="container">
<h1>{'Doh! 404!'}</h1>
<p>{'These are '}<em>{'not'}</em>{' the droids you are looking for!'}</p>
</div>
);
}
|
app/javascript/mastodon/features/ui/components/drawer_loading.js | 5thfloor/ichiji-social | import React from 'react';
const DrawerLoading = () => (
<div className='drawer'>
<div className='drawer__pager'>
<div className='drawer__inner' />
</div>
</div>
);
export default DrawerLoading;
|
app/javascript/mastodon/containers/compose_container.js | ashfurrow/mastodon | import React from 'react';
import { Provider } from 'react-redux';
import PropTypes from 'prop-types';
import configureStore from '../store/configureStore';
import { hydrateStore } from '../actions/store';
import { IntlProvider, addLocaleData } from 'react-intl';
import { getLocale } from '../locales';
import Compose f... |
rojak-ui-web/src/app/kit/Card.js | pyk/rojak | import React from 'react';
import styles from './Card.css';
const Card = ({ children, style, className }) => {
return (
<div className={`${className} ${styles.cardWrapper} `} style={style}>
<div className={styles.card}>{children}</div>
</div>
);
};
export default Card;
|
src/svg-icons/device/settings-system-daydream.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSettingsSystemDaydream = (props) => (
<SvgIcon {...props}>
<path d="M9 16h6.5c1.38 0 2.5-1.12 2.5-2.5S16.88 11 15.5 11h-.05c-.24-1.69-1.69-3-3.45-3-1.4 0-2.6.83-3.16 2.02h-.16C7.17 10.18 6 11.45 6 13c0 1.... |
src/svg-icons/notification/sms.js | lawrence-yu/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationSms = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/>
</SvgIcon>
);
NotificationSm... |
eventkit_cloud/ui/static/ui/app/components/Banner.js | terranodo/eventkit-cloud | import PropTypes from 'prop-types';
import React, { Component } from 'react';
class Banner extends Component {
render() {
const style = {
lineHeight: '25px',
backgroundColor: this.context.config.BANNER_BACKGROUND_COLOR
? this.context.config.BANNER_BACKGROUND_COLOR : ... |
src/reducers/reducer_phrase.js | mcekiera/hangman | import React from 'react';
import { CHAR_GUESSED } from '../actions/index';
export default function (state = "", action) {
switch (action.type) {
case CHAR_GUESSED:
const arr = [];
for(let i = 0; i < state.guessed.length; i+= 1) {
if(state.guessed[i] || action.payload.indices[i]) {
... |
local-cli/templates/HelloNavigation/views/chat/ChatListScreen.js | frantic/react-native | 'use strict';
import React, { Component } from 'react';
import {
ActivityIndicator,
Image,
ListView,
Platform,
StyleSheet,
View,
} from 'react-native';
import ListItem from '../../components/ListItem';
import Backend from '../../lib/Backend';
export default class ChatListScreen extends Component {
stat... |
node_modules/react-bootstrap/es/Tab.js | firdiansyah/crud-req | import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import _extends from 'babel-runtime/helpers/extends';
import React from 'react';
import PropTypes from 'pr... |
site/components/PageBody.js | wagonhq/react-dnd | import React from 'react';
import './PageBody.less';
export default class PageBody {
static propTypes = {
hasSidebar: React.PropTypes.bool
};
render() {
var {hasSidebar, html, ...props} = this.props;
return (
<div className={`PageBody ${hasSidebar ? 'PageBody--hasSidebar' : ''}`}>
<div... |
src/react/jsx/数组.js | huangming1994/react-tutorial | import React from 'react'
import ReactDOM from 'react-dom'
const arr = [
<h1>这是h1</h1>,
<h2>这是h2</h2>,
]
ReactDOM.render(
<div>{arr}</div>,
document.getElementById('root')
)
// 这个一般应用场景为抽取公共组件,抽取的都是同级的标签,这时候语法上外层需要一个wrapper,但是又有点多余,就可以放在数组里。
const arr1 = (
<div> // 如果外层不包div,语法会报错,但是包了div虽然结果是可以,但是结构上其实是... |
examples/parameterized-routing/pages/blog.js | nahue/next.js | import React from 'react'
export default class extends React.Component {
static getInitialProps ({ query: { id } }) {
return { id }
}
render () {
return <div>
<h1>My {this.props.id} blog post</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
tem... |
docs/app/Examples/elements/Segment/Variations/index.js | jcarbo/stardust | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
import { Message } from 'stardust'
const SegmentVariationsExamples = () => (
<ExampleSection title='Variations'>
<ComponentExampl... |
src/components/login/loginByPhone.js | liuweiGL/eastcoal_mgr_react | import React from 'react'
import { Form, Input, message as msgTool } from 'antd'
import { CountButton } from './index'
import styles from './index.less'
const FormItem = Form.Item;
class LoginByPassword extends React.Component {
componentWillReceiveProps ( nextProps ) {
const { validator, form: { setFields... |
src/scripts/pages/ProjectConfigs.page.story.js | kodokojo/kodokojo-ui | import React from 'react'
import { Provider } from 'react-redux'
import { IntlProvider } from 'react-intl'
import { storiesOf, linkTo } from '@kadira/storybook'
// contexte
import configureStore from '../store/configureStore'
import en from '../i18n/en'
// component to story
import App from '../components/app/App.com... |
src/app/routes/index.js | skratchdot/audio-links | import React from 'react';
import { Route } from 'react-router';
import App from '../containers/App';
const packageInfo = require('../../../package.json');
// pages
import NotFound from '../pages/NotFound';
import Home from '../pages/Home';
import About from '../pages/About';
const routes = (
<Route component={App}>... |
src/containers/Post.js | Seeingu/medium-demo | /*
写文章
*/
import React, { Component } from 'react';
import styled from 'styled-components';
import {
MainContainer,
PrimaryButton,
media,
RootContainer,
TextArea
} from '../styles';
import Header from '../components/Header';
import { Redirect } from 'react-router';
import { connect } from 're... |
packages/native/src/components/shared/TouchableItem.js | appbaseio/reactivesearch | import React, { Component } from 'react';
import { TouchableNativeFeedback, TouchableOpacity, Platform, View } from 'react-native';
import types from '@appbaseio/reactivecore/lib/utils/types';
const LOLLIPOP = 21;
class TouchableItem extends Component {
handlePress = () => {
global.requestAnimationFrame(this.prop... |
app/scripts/routes.js | jokezer/base_react | import React from 'react';
import { Router, Route, IndexRoute } from 'react-router';
import createHistory from 'history/lib/createHashHistory'
import App from './pages/app.jsx';
import OrdersList from './pages/ordersList.jsx';
import OrderPage from './pages/orderPage.jsx';
import Info from './pages/info.jsx';
import P... |
core/server/index.js | wp-pwa/wp-pwa | /* eslint-disable no-console, global-require, import/no-dynamic-require */
import React from 'react';
import ReactDOM from 'react-dom/server';
import { ServerStyleSheet } from 'styled-components';
import { flushChunkNames } from 'react-universal-component/server';
import flushChunks from 'webpack-flush-chunks';
import ... |
src/components/CallToAction/CallToAction.js | tabulatech/tabula-web | import React, { Component } from 'react';
import styles from './CallToAction.scss'; // eslint-disable-line
import { Col, Grid, Row } from 'react-bootstrap';
export default class CallToAction extends Component {
render() {
return (
<section className={styles.center}>
<Grid fluid>
<Row>
... |
paraviewweb/src/React/Widgets/ButtonSelectorWidget/index.js | CordyChen/VisMechan | import React from 'react';
import style from 'PVWStyle/ReactWidgets/ButtonSelectorWidget.mcss';
export default React.createClass({
displayName: 'ButtonSelectorWidget',
propTypes: {
list: React.PropTypes.array.isRequired,
onChange: React.PropTypes.func,
},
processItem(event) {
var name = event.ta... |
app/javascript/src/components/SearchInput.js | michelson/chaskiq | import React from 'react'
import {
SeachIcon
} from './icons'
export default function SearchInput ({ onSubmit, placeholder, defaultValue }) {
const [value, setValue] = React.useState(defaultValue)
return <div className="my-4">
<div className="mt-1 flex rounded-md shadow-sm">
<div className="relative... |
src/components/SignOutButton/SignOutButton.js | F-Ruxton/taskata | import React, { Component } from 'react';
import Button from '../Button/Button'
class SignOutButton extends Component {
render () {
return (
<Button
btnId='sign-out-btn'
btnClass='auth'
text='Sign Out'
onClick={() => {window.taskata.signOutUser()}}/>
)
}
}
export defa... |
imports/ui/components/AboutUs/ContactUs/ContactUs.js | haraneesh/mydev | import { Meteor } from 'meteor/meteor';
import React from 'react';
import { Panel, Row, Col } from 'react-bootstrap';
import './ContactUs.scss';
const WhatsAppSupport = Meteor.settings.public.Support_Numbers.whatsapp;
const LandLineSupport = Meteor.settings.public.Support_Numbers.landline;
const ContactUs = () => (
... |
src/admin/client/routes/customers/index.js | cezerin/cezerin | import React from 'react';
import CustomersList from 'modules/customers/list';
import Groups from 'modules/customerGroups/list';
export default () => (
<div className="row row--no-gutter col-full-height">
<div className="col-xs-12 col-sm-4 col-md-3 col--no-gutter scroll col-full-height">
<Groups showAll={true} s... |
node_modules/react-router/es6/RouteContext.js | mattrusso/mattrusso.github.io | import warning from './routerWarning';
import React from 'react';
var object = React.PropTypes.object;
/**
* The RouteContext mixin provides a convenient way for route
* components to set the route in context. This is needed for
* routes that render elements that want to use the Lifecycle
* mixin to prevent trans... |
client-react/index/view.1.js | BclEx/generator-xrm-core | /*
* generator-xrm
* https://github.com/BclEx/generator-xrm
*
* Copyright (c) 2015 Sky Morey, contributors
* Licensed under the MIT license.
*/
'use strict';
// jshint multistr: true
// External libs.
var _ = require('lodash');
function q(s, ctx) {
var camelCase = _.camelCase(ctx.name);
... |
src/main/js/nav/PrivateRoute.js | MannanM/corporate-game-share | import React from 'react';
import { Route, Redirect } from 'react-router-dom';
const PrivateRoute = ({ component: Component, authenticated, ...rest }) => (
<Route
{...rest}
render={props => (
authenticated
? <Component {...props} />
: <Redirect to="/" />
)}
/>
);
export default P... |
src/react/rest/collection/item.js | luxui/lux-core | /**
* @module react/rest/collection/list/item
* @memberof react/rest/collection/list
*/
import React from 'react'; // `React` must be in scope when using JSX
import registry from '../../../lib/componentRegistry';
import Link from '../../link';
const icon = (<span className="collection-items__icon" />);
function... |
lib/cli/generators/WEBPACK_REACT/template/stories/index.stories.js | rhalff/storybook | import React from 'react';
import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';
import { Button, Welcome } from '@storybook/react/demo';
storiesOf('Welcome', module).add('to Storybook', () => <Welcome showApp={linkTo('Button... |
src/svg-icons/maps/local-activity.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalActivity = (props) => (
<SvgIcon {...props}>
<path d="M20 12c0-1.1.9-2 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-1.99.9-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2z... |
app/javascript/mastodon/components/autosuggest_hashtag.js | kazh98/social.arnip.org | import React from 'react';
import PropTypes from 'prop-types';
import { shortNumberFormat } from 'mastodon/utils/numbers';
import { FormattedMessage } from 'react-intl';
export default class AutosuggestHashtag extends React.PureComponent {
static propTypes = {
tag: PropTypes.shape({
name: PropTypes.string... |
app/javascript/mastodon/features/ui/index.js | danhunsaker/mastodon | import classNames from 'classnames';
import React from 'react';
import { HotKeys } from 'react-hotkeys';
import { defineMessages, injectIntl } from 'react-intl';
import { connect } from 'react-redux';
import { Redirect, withRouter } from 'react-router-dom';
import PropTypes from 'prop-types';
import NotificationsContai... |
src/svg-icons/image/picture-as-pdf.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePictureAsPdf = (props) => (
<SvgIcon {...props}>
<path d="M20 2H8c-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-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 ... |
desktop-site/components/ServiceStopped.js | goominc/goommerce-react | // Copyright (C) 2016 Goom Inc. All rights reserved.
import React from 'react';
import { constants } from 'commons/utils/constants';
export default React.createClass({
render() {
return (
<div className="service-stopped-container">
<img src={`${constants.resourceRoot}/banner/service_stopped_16042... |
app/scripts/components/Header.js | felipemrodrigues/react-starter | import React from 'react';
const Header = () => (
<section className="header">
<div className="container">
<h1>Welcome to React Starter</h1>
</div>
</section>
);
export default Header;
|
react/gameday2/components/NoWebcasts.js | jaredhasenklein/the-blue-alliance | import React from 'react'
import RaisedButton from 'material-ui/RaisedButton'
export default () => (
<div className="no-webcasts-container">
<h1>No webcasts found</h1>
<p>Looks like there aren't any events with webcasts this week. Check on The Blue Alliance for upcoming events!</p>
<RaisedButton
... |
src/containers/Survey/Survey.js | prakash-u/react-redux | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import Helmet from 'react-helmet';
import { initialize } from 'redux-form';
import SurveyForm from 'components/SurveyForm/SurveyForm';
@connect(() => ({}), { initialize })
export default class Survey ex... |
lib/components/term.js | KunalKene1797/hyper | /* global Blob,URL,requestAnimationFrame */
import React from 'react';
import Terminal from 'xterm';
import {clipboard} from 'electron';
import {PureComponent} from '../base-components';
import terms from '../terms';
import processClipboard from '../utils/paste';
// map old hterm constants to xterm.js
const CURSOR_STY... |
src/server/middleware/universalReactApp.js | tarkalabs/material-todo-jsc2016 | import React from 'react';
import RouterContext from 'react-router/lib/RouterContext';
import createMemoryHistory from 'react-router/lib/createMemoryHistory';
import match from 'react-router/lib/match';
import render from '../htmlPage/render';
import routes from '../../shared/routes';
/**
* An express middleware that... |
src/components/typography/endnotes/endnote-item.js | mattmischuk/m1x | // @flow
import React from 'react'
import type { Node } from 'react'
import styled from 'styled-components'
import { myTheme } from '../../../styles'
import EndnoteBacklink from './endnote-backlink'
const { fontSize } = myTheme
type Props = {
id: string,
children: Node,
}
const ListItem = styled.li`
font-size... |
app/jsx/external_apps/components/Lti2Permissions.js | djbender/canvas-lms | /*
* Copyright (C) 2014 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas 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, version 3 of the License.
*
* Canvas is distribut... |
examples/grouping-column/src/index.js | react-tools/react-table | import React from 'react'
import ReactDOM from 'react-dom'
import './index.css'
import App from './App'
ReactDOM.render(<App />, document.getElementById('root'))
|
app/javascript/mastodon/features/account_gallery/components/media_item.js | cobodo/mastodon | import Blurhash from 'mastodon/components/blurhash';
import classNames from 'classnames';
import Icon from 'mastodon/components/icon';
import { autoPlayGif, displayMedia, useBlurhash } from 'mastodon/initial_state';
import { isIOS } from 'mastodon/is_mobile';
import PropTypes from 'prop-types';
import React from 'react... |
react-server/components/hello-world.js | axelson/home-dashboard | import React from 'react';
import {Link, logging} from 'react-server';
const logger = logging.getLogger(__LOGGER__);
export default class HelloWorld extends React.Component {
constructor(props) {
super(props);
this.state = {exclamationCount: 0};
this.handleClick = () => {
logger.info(`Getting more... |
js/components/Layout.js | furgat/sabertoot | 'use strict';
import React from 'react';
export default class Layout extends React.Component {
navigate() {
this.props.history.replaceState(null, "/");
}
render() {
return (
<div className="layout">
{this.props.children}
</div>
)
}
}
|
UI/Fields/Timer.js | Datasilk/Dedicate | import React from 'react';
import { View, StyleSheet } from 'react-native';
import Text from 'text/Text';
import ButtonOutline from 'buttons/ButtonOutline';
import GetDate from 'utility/Date';
export default class Timer extends React.Component{
constructor(props){
super(props);
this.state = {
... |
src/svg-icons/navigation/close.js | rscnt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationClose = (props) => (
<SvgIcon {...props}>
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
</SvgIcon>
);
NavigationClose = pure(Navig... |
app/main.js | jackqt/AngularJS-JSPM-Jasmine | import React from 'react';
import ReactDom from 'react-dom';
import {getRepoByUser} from './api';
class HelloWorld extends React.Component {
constructor(props) {
super(props);
this.state = { repos: []};
}
componentDidMount() {
getRepoByUser(this.props.name).then((repos) => {
this.setState({rep... |
src/Card/Card.js | kradio3/react-mdc-web | import PropTypes from 'prop-types';
import React from 'react';
import classnames from 'classnames';
const propTypes = {
className: PropTypes.string,
children: PropTypes.node,
};
const Card = ({ className, children, ...otherProps }) => (
<div
className={classnames('mdc-card', className)}
{...otherProps}
... |
src/components/weather-panel.js | sebastianrb/react-redux-weather-app | import React from 'react';
import EasyTransition from 'react-easy-transition';
import { Link } from "react-router-dom";
import { transitionSetting } from "../index.js";
import { connect } from "react-redux";
import conditions from "./conditions-object";
import WeatherDay from "./weather-day";
import ReactCSSTransitionG... |
examples/js/expandRow/expand-row-with-cellEdit.js | AllenFang/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
if (i < 3) {
products.push... |
node_modules/semantic-ui-react/dist/es/modules/Modal/ModalDescription.js | mowbell/clickdelivery-fed-test | import _extends from 'babel-runtime/helpers/extends';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { customPropTypes, getElementType, getUnhandledProps, META } from '../../lib';
/**
* A modal can have a header.
*/
function ModalDescription(props) {
var childre... |
generators/app/templates/src/static/components/DemoComponent/index.js | sunshinewlz01/generator-react-webapp | import React, { Component } from 'react';
import './style.css';
class DemoComponent extends Component {
componentWillMount() {
}
render() {
return (
<div className="demo-section">
Hello React!
</div>
);
}
}
export default DemoComponent;
|
src/svg-icons/action/bookmark.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionBookmark = (props) => (
<SvgIcon {...props}>
<path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"/>
</SvgIcon>
);
ActionBookmark = pure(ActionBookmark);
ActionBookmark.displayName = 'Ac... |
app/javascript/mastodon/features/compose/components/autosuggest_account.js | yukimochi/mastodon | import React from 'react';
import Avatar from '../../../components/avatar';
import DisplayName from '../../../components/display_name';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
export default class AutosuggestAccount extends Immuta... |
test/index.js | joerter/tape-jsx-includes | import React from 'react';
import {createRenderer} from 'react-addons-test-utils';
import tape from 'tape';
import addAssertions from 'extend-tape';
import jsxIncludes from '../src';
const test = addAssertions(tape, {jsxIncludes});
const renderer = createRenderer();
const MyComponent = ({color}) => {
const classNam... |
src/app/petroglyphs/Classes.js | johneisenheim/petroadvisor | import React from 'react';
import Paper from 'material-ui/Paper';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import {
grey900, grey300,
white, darkBlack
} from 'material-ui/styles/colors';
import {fade} from 'material-ui/utils/co... |
src/svg-icons/social/public.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialPublic = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9... |
src/routes/users/UserFilter.js | zhangjingge/sse-antd-admin | import React from 'react'
import PropTypes from 'prop-types'
import { Form, Button, Row, Col, Switch } from 'antd'
import { Search } from '../../components'
const UserFilter = ({
field,
keyword,
onSearch,
onAdd,
isMotion,
switchIsMotion,
}) => {
const searchGroupProps = {
field,
keyword,
size... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.