path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/components/structures/InteractiveAuth.js | aperezdc/matrix-react-sdk | /*
Copyright 2017 Vector Creations Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... |
examples/with-custom-babel-config/src/server.js | jaredpalmer/razzle | import { StaticRouter } from 'react-router-dom';
import App from './App';
import React from 'react';
import express from 'express';
import { renderToString } from 'react-dom/server';
const assets = require(process.env.RAZZLE_ASSETS_MANIFEST);
const cssLinksFromAssets = (assets, entrypoint) => {
return assets[entry... |
client/src/components/nav/NavLink.js | JasonProcka/venos |
// --- Imports ----
// >>> React
import React from 'react';
// >>> React Router
import {Link} from 'react-router';
// >>> Material-UI
import FlatButton from 'material-ui/FlatButton';
import FontIcon from 'material-ui/FontIcon';
import Badge from 'material-ui/Badge';
// Our customized Link <LI> for the navigation l... |
src/components/common/FormItem.js | jinqiupeter/mtsr | import React from 'react';
import {StyleSheet, View, Text} from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
import {COLOR} from '../../config';
export default ({children, iconName, containerStyle, iconStyle}) => {
return (
<View style={[styles.container, containerStyle]}>
{ic... |
src/routes/Home/components/twitter/Twitter.js | stock-the-prices/frontend | import React from 'react'
import TweetEmbed from 'react-tweet-embed'
import InfiniteScroll from 'react-infinite-scroller'
import Tweet from './Tweet'
class Twitter extends React.Component {
constructor(props) {
super(props)
// props needs a list of tweet items that have
// id, date (for so... |
ShotClock/index.android.js | smaniotto/shot-clock-app | /**
* Sample React Native App
* https://github.com/facebook/react-native
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
class ShotClock extends Component {
render() {
return (
<View style={styles.container}>
<Text style={... |
tests/react/createContext.js | facebook/flow | // @flow
import React from 'react';
{
const Context = React.createContext('div');
const {Consumer, Provider} = Context;
class Foo extends React.Component<{}> {
divRef: {current: null | HTMLDivElement} = React.createRef();
render() {
return (
<React.Fragment>
<Provider value='sp... |
fields/types/location/LocationFilter.js | tanbo800/keystone | import _ from 'underscore';
import classNames from 'classnames';
import React from 'react';
import { FormField, FormInput, FormRow, SegmentedControl } from 'elemental';
const MODE_OPTIONS = [
{ label: 'Exactly', value: 'exactly' },
{ label: 'Contains', value: 'contains' }
];
const TOGGLE_OPTIONS = [
{ labe... |
packages/wix-style-react/src/IconButton/docs/index.story.js | wix/wix-style-react | import React from 'react';
import {
tab,
tabs,
api,
playground,
description,
divider,
importExample,
columns,
header,
title,
example as baseExample,
} from 'wix-storybook-utils/Sections';
import More from 'wix-ui-icons-common/More';
import IconButton from '..';
import { Layout } from '../../Layou... |
docs/src/examples/elements/Input/Variations/InputExampleRightCornerLabeled.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Input } from 'semantic-ui-react'
const InputExampleLeftCornerLabeled = () => (
<Input
label={{ icon: 'asterisk' }}
labelPosition='right corner'
placeholder='Search...'
/>
)
export default InputExampleLeftCornerLabeled
|
react-native-demo/Zebreto/src/components/HeadingText.js | zhangjunhd/react-examples | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
import {fonts, scalingFactors} from './../styles/fonts';
import Dimensions from 'Dimensions';
let {width} = Dimensions.get('window');
class HeadingText extends Component {
static displayName = 'HeadingText';
re... |
src/docs/components/distribution/DistributionExamplesDoc.js | grommet/grommet-docs | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import Distribution from 'grommet/components/Distribution';
import InteractiveExample from '../../../components/InteractiveExample';
const PROPS_SCHEMA = {
full: { value: true },
size: { options: ['small... |
app/components/counter.js | meddle0x53/react-koa-gulp-postgres-passport-example | import React from 'react';
import request from 'superagent';
import { Button, Badge } from 'react-bootstrap';
const get = (url, cb) => {
request.get(url)
.set('Content-Type', 'application/json')
.end(cb);
};
export default class Counter extends React.Component {
static displayName = 'Counter';
static propT... |
packages/wix-style-react/src/Themes/businessDashboard/perfer-tests/theme/index.js | wix/wix-style-react | import React from 'react';
import { theme } from '../../index';
import ThemeProvider from '../../../../ThemeProvider';
/*
* This is just a simple usage of the Theme to calculate the additional bundle size
* Pay attention that the bundle size limitiaion is the maximum size. If only some components in the theme are us... |
koa/src/views/poster/index.js | FeifeiyuM/test-repo | import React from 'react'
import { render } from 'react-dom'
import { Router, Route, browserHistory } from 'react-router'
import Poster from './components/poster'
import TestTemp from './template/test-temp/index'
const rootRoute = {
childRoutes: [{
path: '/poster',
component: Poster,
childRoutes: [
TestTemp
... |
components/warning.js | sgmap/inspire | import React from 'react'
import PropTypes from 'prop-types'
import WarningIcon from 'react-icons/lib/fa/exclamation-triangle'
const Warning = ({children}) => (
<div className='container'>
<span className='icon'>
<WarningIcon />
</span>
<div>{children}</div>
<style jsx>{`
@import 'color... |
packages/reactor-kitchensink/src/examples/Charts/Financial/OHLC/OHLC.js | sencha/extjs-reactor | import React, { Component } from 'react';
import { Container } from '@extjs/ext-react';
import { Cartesian } from '@extjs/ext-react-charts';
import ChartToolbar from '../../ChartToolbar';
import createData from './createData';
Ext.require([
'Ext.chart.axis.Numeric',
'Ext.chart.axis.Time',
'Ext.chart.series... |
docs/app/Examples/modules/Progress/Types/Standard.js | jcarbo/stardust | import React from 'react'
import { Progress } from 'stardust'
const ProgressStandardExample = () => (
<Progress percent={11} />
)
export default ProgressStandardExample
|
src/App.js | LarsBaertschi/lendtracker | import React from 'react';
import { connect } from 'react-redux';
import { Framework7App, Statusbar } from 'framework7-react';
import { lendOperations } from './state/lend';
import LeftPanel from './views/LeftPanel';
import AppPopup from './views/AppPopup';
import MainView from './views/MainView';
import routes from '... |
src/misc/index.js | kriasoft/react-static-boilerplate | /**
* React Starter Kit for Firebase
* https://github.com/kriasoft/react-firebase-starter
* Copyright (c) 2015-present Kriasoft | MIT License
*/
import React from 'react';
import { graphql } from 'relay-runtime';
import Layout from '../common/Layout';
export default [
{
path: '/about',
query: graphql`
... |
packages/storybook/examples/form/SelectRow.stories.js | iCHEF/gypcrete | import React from 'react';
import { action } from '@storybook/addon-actions';
import Avatar from '@ichef/gypcrete/src/Avatar';
import List from '@ichef/gypcrete/src/List';
import SelectRow, { PureSelectRow } from '@ichef/gypcrete-form/src/SelectRow';
import SelectOption from '@ichef/gypcrete-form/src/SelectOption';
e... |
stories/themes.stories.js | rcaferati/react-awesome-button | import React from 'react';
import { storiesOf } from '@storybook/react';
import centered from '@storybook/addon-centered';
import { List } from './ui';
import { THEMES, MODULES } from '../demo/helpers/modules';
import { AwesomeButton } from '../src/index';
const themes = storiesOf('Themes', module);
const renderTheme... |
app/javascript/flavours/glitch/features/notifications/components/overlay.js | im-in-space/mastodon | /**
* Notification overlay
*/
// Package imports.
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { defineMessages, injectIntl } from 'react-intl';
import Icon from... |
src/components/Home.js | kipp0/course_directory | import React, { Component } from 'react';
// import { Link } from 'react-router-dom';
class Home extends Component {
submit_handler = (e) => {
e.preventDefault()
let teacher_name = this.name.value
let teacher_topic = this.topic.value
let path = `teachers/${teacher_topic}/${teacher_name}`
this.... |
src/components/ExternalLink/ExternalLink.js | bkuzma/bkuzma.github.io | import React from 'react';
export default ({ label, url }) => (
<a
href={url}
target="_blank"
rel="noreferrer"
>
{label}
</a>
);
|
src/Survey/Complex/Plant/Samples/Location.js | NERC-CEH/irecord-app | import React from 'react';
import PropTypes from 'prop-types';
import _ from 'lodash';
import bigu from 'bigu';
import { observer } from 'mobx-react';
import { IonPage } from '@ionic/react';
import Log from 'helpers/log';
import { message } from 'helpers/toast';
import Header from 'Components/Location/Header';
import M... |
app/static/src/diagnostic/EquipmentForm_modules/NewEquipmentTypeForm.js | SnowBeaver/Vision | import React from 'react';
import FormControl from 'react-bootstrap/lib/FormControl';
import FormGroup from 'react-bootstrap/lib/FormGroup';
import ControlLabel from 'react-bootstrap/lib/ControlLabel';
import Button from 'react-bootstrap/lib/Button';
import Panel from 'react-bootstrap/lib/Panel';
import {findDOMNode} f... |
src/Select/index.js | narqo/react-islands | import React from 'react';
import ReactDOM from 'react-dom';
import Component from '../Component';
import Button from '../Button';
import Popup from '../Popup';
import Menu from '../Menu';
import Icon from '../Icon';
import Group from '../Group';
import Item from '../Item';
class Select extends Component {
constr... |
src/icons/FormatItalicIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class FormatItalicIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M20 8v6h4.43l-6.86 16H12v6h16v-6h-4.43l6.86-16H36V8z"/></svg>;}
}; |
js/components/developer/language-picker-screen/index.js | justarrived/p2p-client | import React, { Component } from 'react';
import { Container, Content, Text } from 'native-base';
import LanguagePicker from './languagePicker';
import I18n from '../../../i18n';
// Example screen containing a LanguagePicker
export default class LanguagePickerScreen extends Component {
// Navigation information
... |
src/component/TriedTodos.js | sososimsim/TT | import React, { Component } from 'react';
import '../styles/TriedTodos.css';
import TriedTodo from './TriedTodo';
import { connect } from 'react-redux';
import * as actions from '../actions';
class TriedTodos extends Component {
constructor(props){
super();
}
_isNotCompletedToday(todo){
const now = new ... |
src/components/common/svg-icons/image/brightness-5.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageBrightness5 = (props) => (
<SvgIcon {...props}>
<path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.6... |
www/components/Navbar/utils/makeSection.js | andrewlinfoot/keystone | import React from 'react';
import Item from '../Item';
export default function makeSection (currentPath, layer, depth) {
return layer.map((section, idx) => {
const sectionStyles = depth === 1 ? styles.section : styles.subsection;
return (
<ul key={idx} css={[styles.menu, styles[`menu_depth_${depth}`]]}>
<... |
src/components/Container.js | binora/the-wed-app | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Image
} from 'react-native';
import bgImage from '../images/bg_image.jpg';
export default class Container extends Component {
render() {
return (
<Image source={bgImage} style={styles.container} >
{this.props.ch... |
src/components/navbar/AboutDropdownMenu.js | AndrewZures/ixora | import React, { Component } from 'react';
import { Link } from 'react-router';
export default class PlayDropdownMenu extends Component {
render() {
return (
<div className="dropdown">
<Link to="/about">About</Link>
<div className="dropdown-content">
<ul>
<li><a href="... |
src/server/index.js | AbrahamAlcaina/boda | import Express from 'express';
import React from 'react';
import ReactDOM from 'react-dom/server';
import config from '../config';
import favicon from 'serve-favicon';
import compression from 'compression';
import path from 'path';
import createStore from '../redux/create';
import ApiClient from '../helpers/ApiClient';... |
src/Row.js | bbc/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import elementType from 'react-prop-types/lib/elementType';
const Row = React.createClass({
propTypes: {
/**
* You can use a custom element for this component
*/
componentClass: elementType
},
getDefaultProps() {
return {
... |
AirFront/index_point.js | sunshinezxf/Airburg | import React from 'react';
import ReactDOM from 'react-dom';
import {Router, Route, IndexRoute,hashHistory} from 'react-router';
import Activation from './point/activation';
import {PointCenter} from './point/profile';
import './index.css';
const router=(
<Router history={hashHistory}>
<Route path="/act... |
app/src/components/ImageDropzone/index.js | JaySmartwave/palace-bot-sw | import React from 'react';
import styles from './index.module.scss';
import cssModules from 'react-css-modules';
const ImageDropzone = (props) => (
<div className={styles.imageDropzone}>
</div>
);
export default cssModules(ImageDropzone, styles);
|
client/components/Footer/Footer.js | ncrmro/ango | import React from 'react';
import styles from './Footer.scss';
const Footer = ({ title }: {title: String}) =>
<footer className={styles.root} >
<span>{title}</span>
</footer>;
export default Footer;
|
src/Day.js | jquense/react-big-calendar | import PropTypes from 'prop-types'
import React from 'react'
import { navigate } from './utils/constants'
import TimeGrid from './TimeGrid'
class Day extends React.Component {
render() {
/**
* This allows us to default min, max, and scrollToTime
* using our localizer. This is necessary until such time... |
app/components/common/NoMatch.js | friend0/react_sensor_app | import React from 'react';
export default class NoMatch extends React.Component {
render() {
return (
<section className="app-content">
<header className="section-header">
<h3 className="title">Not Found</h3>
</header>
</section>
... |
src/containers/App/footer.js | zhangsichu/HybridAppReduxVsIonic | import React from 'react'
import styles from './styles.scss'
function Footer () {
return (
<ul className={styles.footer}>
<li>
<a href='#/'>Home</a>
</li>
<li>
<a href='#/static/about'>About</a>
</li>
<li>
<a href='#/static/more'>More</a>
... |
src/components/Weui/tab/tab_body_item.js | ynu/res-track-wxe | /**
* Created by n7best
*/
import React from 'react';
import classNames from 'classnames';
export default class TabBodyItem extends React.Component {
static propTypes = {
active: React.PropTypes.bool
};
static defaultProps = {
active: false
};
render() {
const {children,... |
src/svg-icons/image/timer-off.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageTimerOff = (props) => (
<SvgIcon {...props}>
<path d="M19.04 4.55l-1.42 1.42C16.07 4.74 14.12 4 12 4c-1.83 0-3.53.55-4.95 1.48l1.46 1.46C9.53 6.35 10.73 6 12 6c3.87 0 7 3.13 7 7 0 1.27-.35 2.47-.94 3.49l1.... |
app/assets/javascripts/src/components/users/ProfileForm.js | talum/creamery | import React from 'react'
import moment from 'moment'
import { connect } from 'react-redux'
import { updateUser } from '../../actions/users'
import Form from '../sharedComponents/Form'
import InputField from '../sharedComponents/InputField'
import SubmitButton from '../sharedComponents/SubmitButton'
import { debounce }... |
src/parser/hunter/shared/modules/talents/BornToBeWild.js | FaideWW/WoWAnalyzer | import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';
import TalentStatisticBox from 'interface/others/TalentStatisticBox';
import React from 'react';
import SPECS from 'game/SPECS';
import { formatNumber } from 'common/format';
/**
* Reduces the cooldowns of Aspect of the Cheetah and Aspec... |
components/card-list/index.js | blockstack/blockstack-site | import React from 'react'
import { Text, Title } from '@components/section/index'
import { Box, Flex } from 'blockstack-ui'
import { useHover } from 'use-events'
import { transition } from '@common/theme'
import ArrowTopRightIcon from 'mdi-react/ArrowTopRightIcon'
const Logo = ({ logo: Logo, src, ...rest }) =>
src ?... |
example/Container.js | a-type/redux-data-table | import React from 'react';
import { connect } from 'react-redux';
import data from './data';
import ExampleTable from './ExampleTable';
class View extends React.Component {
static propTypes = {
loading: React.PropTypes.bool,
data: React.PropTypes.array,
loadData: React.PropTypes.func,
};
componentD... |
ReactNativeApp/react-native-starter-app/src/containers/views/DetailedRecipeScreen.js | jjhyu/hackthe6ix2017 | import React, { Component } from 'react';
import { StyleSheet, Text, View, TouchableHighlight } from 'react-native';
var tts = require('react-native-android-speech')
// import ViewRecipe from './screens/ViewRecipe';
var steps = [{"stepNumber": 1, "text": "Preheat oven to 350 degrees F (175 degrees C).\n", "lengthMin... |
src/utils/domUtils.js | omerts/react-bootstrap | import React from 'react';
let canUseDom = !!(
typeof window !== 'undefined' &&
window.document &&
window.document.createElement
);
/**
* Get elements owner document
*
* @param {ReactComponent|HTMLElement} componentOrElement
* @returns {HTMLElement}
*/
function ownerDocument(componentOrElement) {
let e... |
src/InputBase.js | gianpaj/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import FormGroup from './FormGroup';
import Glyphicon from './Glyphicon';
class InputBase extends React.Component {
getInputDOMNode() {
return React.findDOMNode(this.refs.input);
}
getValue() {
if (this.props.type === 'static') {
retu... |
app/javascript/mastodon/features/ui/components/confirmation_modal.js | KnzkDev/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, FormattedMessage } from 'react-intl';
import Button from '../../../components/button';
export default @injectIntl
class ConfirmationModal extends React.PureComponent {
static propTypes = {
message: PropTypes.node.isRequired,
... |
tests/react_custom_funs/create_factory.js | facebook/flow | // @flow
import React from 'react';
declare var any: any;
React.createFactory(any)(); // OK
React.createFactory(any)({}); // OK
React.createFactory(any)(undefined); // OK
React.createFactory(any)(null); // OK
class A extends React.Component<{foo: number, bar: number}, void> {}
function B(props: {foo: number, bar: n... |
src/js/components/Menu/stories/Simple.js | grommet/grommet | import React from 'react';
import { Box, Menu } from 'grommet';
const SimpleMenu = () => (
<Box align="center" pad="large">
<Menu
dropProps={{
a11yTitle: 'Simple drop content',
align: { top: 'bottom', left: 'left' },
elevation: 'xlarge',
}}
label="actions"
items={... |
StarterRNP/src/Boo/LoginBackground.js | khanhqd/ProjectOT1 | /**
* @file LoginBackground.js
*
* @author Nguyen Thanh Trung
* @version 1.0.0
*
* @DESCRIPTION
*
* Just a PlayGround for react-native
* @flow
*/
import React from 'react';
import { View, Dimensions, StatusBar } from 'react-native';
const { maxHeight, maxWidth } = Dimensions.get('window');
const LoginBackg... |
app.js | al6mina/jsCom | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import 'babel/polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
import Location from '.... |
src/svg-icons/av/branding-watermark.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvBrandingWatermark = (props) => (
<SvgIcon {...props}>
<path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16h-9v-6h9v6z"/>
</SvgIcon>
);
AvBrandingWatermark = pure(AvBran... |
src/containers/HelpPage.js | Destinia/Splendor | import React from 'react';
import HelpMessage from '../components/HelpMessage.js';
const HelpPage = (props) => (
<div>
<HelpMessage {...props} />
</div>
);
export default HelpPage;
|
packages/xo-web/src/common/ephemeral-input.js | vatesfr/xo-web | import decorate from 'apply-decorators'
import PropTypes from 'prop-types'
import React from 'react'
import { injectState, provideState } from 'reaclette'
import { linkState } from 'reaclette-utils'
const ENTER_KEY_CODE = 13
const ESCAPE_KEY_CODE = 27
const EphemeralInput = decorate([
provideState({
initialStat... |
client/src/javascript/components/general/filesystem/TorrentDestination.js | jfurrow/flood | import _ from 'lodash';
import {Checkbox, ContextMenu, FormElementAddon, FormRow, FormRowGroup, Portal, Textbox} from 'flood-ui-kit';
import {FormattedMessage, injectIntl} from 'react-intl';
import React from 'react';
import EventTypes from '../../../constants/EventTypes';
import FilesystemBrowser from './FilesystemBr... |
examples/js/remote/remote-store-insert-row.js | neelvadgama-hailo/react-bootstrap-table | import React from 'react';
import RemoteInsertRow from './remote-insert-row';
function getProducts() {
const products = [];
const startId = products.length;
for (let i = 0; i < 12; i++) {
const id = startId + i;
products.push({
id: id,
name: 'Item name ' + id,
price: Math.floor((Math.ra... |
react-app/src/components/Loader/index.js | grumd/osu-pps | import React from 'react';
import './loader.scss';
export default function Loader() {
return (
<div className="loader">
<svg
width="40"
height="12"
viewBox="0 0 120 30"
xmlns="http://www.w3.org/2000/svg"
fill="#eee"
>
<circle cx="15" cy="15" r="15">
... |
src/components/title/index.js | ianmcgregor/mcgregor.codes | import React from 'react';
import styled from 'styled-components';
import Label from '../label';
import {linkCss, marginFixed} from '../../styles';
const Header = styled.div`
margin: ${marginFixed}px 0 ${marginFixed * 2}px;
display: flex;
align-items: flex-start;
justify-content: space-between;
`;
con... |
src/svg-icons/file/folder.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let FileFolder = (props) => (
<SvgIcon {...props}>
<path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/>
</SvgIcon>
);
FileFolder = pure(FileFolder);
FileFolder.d... |
src/components/Header/Header.js | kaushik94/react-starter | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React from 'react';
import styles from './Header.css';
import withStyles from '../../decorators/withStyles';
import Link from '../../utils/Link';
import Navigation from '../Navigation';
@withStyles(styles)
class Header {
render() {
... |
examples/huge-apps/routes/Course/routes/Announcements/components/Sidebar.js | dyzhu12/react-router | import React from 'react';
import { Link } from 'react-router';
export default class AnnouncementsSidebar extends React.Component {
static loadProps (params, cb) {
console.log('AnnouncementsSidebar', 'loadProps');
cb(null, {
announcements: COURSES[params.courseId].announcements
});
}
render (... |
create-event/src/index.js | picatic/picatic-examples | /* @flow */
import React from 'react'
import ReactDOM from 'react-dom'
import { createStore, applyMiddleware, compose } from 'redux'
import { Provider } from 'react-redux'
import thunkMiddleware from 'redux-thunk'
import { ConnectedRouter, routerMiddleware } from 'react-router-redux'
import createHistory from 'history... |
app/components/Stage/index.js | rapicastillo/beautifulrising-client | /**
*
* Stage
*
*/
import React from 'react';
import styled from 'styled-components';
export default styled.section`
width: 75%;
float: ${props=>props.lang==='ar' ? 'right' : 'left'};
margin-${props=>props.lang==='ar' ? 'right' : 'left'}: 10px;
text-align: ${props=>props.lang==='ar' ? 'right' : 'left'};
* ... |
src/Main/Contributor.js | hasseboulen/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import Wrapper from 'common/Wrapper';
const Contributor = ({ nickname, avatar, github, ...others }) => (
<span key={nickname} className="contributor" data-tip={github ? github : undefined} {...others}>
{avatar && <Wrapper><img src={avatar} alt="Avat... |
src/svg-icons/action/settings-voice.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSettingsVoice = (props) => (
<SvgIcon {...props}>
<path d="M7 24h2v-2H7v2zm5-11c1.66 0 2.99-1.34 2.99-3L15 4c0-1.66-1.34-3-3-3S9 2.34 9 4v6c0 1.66 1.34 3 3 3zm-1 11h2v-2h-2v2zm4 0h2v-2h-2v2zm4-14h-1.7c0 3... |
app/javascript/mastodon/features/compose/components/privacy_dropdown.js | amazedkoumei/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
import IconButton from '../../../components/icon_button';
import Overlay from 'react-overlays/lib/Overlay';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spr... |
docs/src/app/components/pages/components/List/ExamplePhone.js | tan-jerene/material-ui | import React from 'react';
import MobileTearSheet from '../../../MobileTearSheet';
import {List, ListItem} from 'material-ui/List';
import Divider from 'material-ui/Divider';
import CommunicationCall from 'material-ui/svg-icons/communication/call';
import CommunicationChatBubble from 'material-ui/svg-icons/communicatio... |
internals/templates/containers/App/index.js | josh-butler/react-bp-demo | /**
*
* App.react.js
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If... |
src/containers/Asians/Registration/Institutions/StatusNotice/PendingInstance/index.js | westoncolemanl/tabbr-web | import React from 'react'
import { connect } from 'react-redux'
import withStyles from 'material-ui/styles/withStyles'
import Card, {
CardHeader,
CardActions,
CardContent
} from 'material-ui/Card'
import Button from 'material-ui/Button'
import * as utils from 'utils'
import onCancel from './onCancel'
const st... |
app/js/components/Events/EventListComponent.js | JeffRisberg/RE03 | import React, { Component } from 'react';
import { PropTypes } from 'prop-types';
import { Link } from 'react-router-dom';
import { Loading } from 'components';
import 'components/Loading/Loading.scss';
import './Events.scss';
class EventListComponent extends Component {
static propTypes = {
records: PropTypes.a... |
client/js/app_calculator.js | training4developers/react_06262017 | import React from 'react';
import ReactDOM from 'react-dom';
import { createStore, bindActionCreators } from 'redux';
import { connect, Provider } from 'react-redux';
const reducer = (state = { result: 0 }, action) => {
switch (action.type) {
case 'ADD':
return Object.assign({}, state, { result: state.res... |
frontend/src/Settings/UI/UISettingsConnector.js | Radarr/Radarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { clearPendingChanges } from 'Store/Actions/baseActions';
import { fetchUISettings, saveUISettings, setUISettingsValue } from 'Store/Actions/settingsActi... |
pootle/static/js/auth/components/EmailConfirmation.js | dwaynebailey/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import React from 'react';
import { PureRenderMixin } from... |
src/components/RelatedArticles.js | jumpalottahigh/blog.georgi-yanev.com | import React from 'react'
import styled from 'styled-components'
import { Link, graphql, useStaticQuery } from 'gatsby'
const StyledRelatedArticles = styled.div`
border-top: 1px solid #cecece;
padding: 1rem 0;
& a {
display: inline-block;
padding: 6px 0;
}
& a:hover {
box-shadow: inset 0 -34px ... |
components/SearchBar.js | CoffeeApp/clientSide | import React from 'react'
import { hashHistory } from 'react-router'
import LinkOrderHistory from './LinkOrderHistory'
import LinkBack from './LinkBack'
import LinkCart from './LinkCart'
import Logo from './Logo'
const SearchBar = ({order, screen, updateScreen, searchWord, updateSearchWord, placeholder}) => (
<div cl... |
html.js | philipnilsson/Badness10k | import React from 'react'
import Helmet from 'react-helmet'
import { prefixLink } from 'gatsby-helpers'
import { TypographyStyle, GoogleFont } from 'react-typography'
import typography from './utils/typography'
const BUILD_TIME = new Date().getTime()
module.exports = class Html extends React.Component {
render ... |
src/components/views/messages/MFileBody.js | aperezdc/matrix-react-sdk | /*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2018 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable la... |
node_modules/react-router/es6/IndexRoute.js | superKaigon/TheCave | import React from 'react';
import warning from './routerWarning';
import invariant from 'invariant';
import { createRouteFromReactElement as _createRouteFromReactElement } from './RouteUtils';
import { component, components, falsy } from './InternalPropTypes';
var func = React.PropTypes.func;
/**
* An <IndexRoute> i... |
app/components/Logo.js | fullstack-zmrdi/bounty-land-app | /* @flow */
import { Image } from 'react-native'
import LogoImage from '../images/logo.png'
import React from 'react'
const Logo = ({
size = 200,
style
} : {
size: number,
style?: Object
}) => {
return (
<Image
source={LogoImage}
style={[
style,
{
width: size,
... |
src/app/capital_projects/CIPFilter.js | cityofasheville/simplicity2 | import React from 'react';
import PropTypes from 'prop-types';
import Toggle from 'react-toggle';
import { CheckboxGroup } from 'accessible-react-checkbox-group';
import { urlCategory } from './cip_utilities';
import FilterCheckbox from '../../shared/FilterCheckbox';
import { refreshLocation } from '../../utilities/gen... |
client/src/components/Main.js | kanissimov/meteo-demo | import React from 'react';
import Sidebar from './Sidebar';
import Details from './Details';
const Main = () => {
return (
<main className="container">
<div className="row">
<div className="col s12 m4">
<Sidebar />
</div>
<div className="col s12 m8">
<Details />
... |
packages/react-router-website/modules/components/Home/Video.js | justjavac/react-router-CN | import React from 'react'
import { Block } from 'jsxstyle'
import { DARK_GRAY } from '../../Theme'
const Video = () => (
<Block
background={DARK_GRAY}
color="white"
padding="80px 0"
>
<Block
height="45vw"
width="80vw"
margin="auto"
background={DARK_GRAY}
boxShadow="0px... |
src/averageReviewTimeReport.js | Earthstar/gerrit-report-dashboard | import React from 'react';
// "Pure Function" way of declaring React classes. Useful if don't need to store state
const AverageReviewTimeReport = (props) =>
<div className="report-container">
<h2>Average Review Time</h2>
<span className="large-report">{props.averageHours} hours</span>
</div>;
export { AverageRevi... |
src/Well.js | aabenoja/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const Well = React.createClass({
mixins: [BootstrapMixin],
getDefaultProps() {
return {
bsClass: 'well'
};
},
render() {
let classes = this.getBsClassSet();
return (
<di... |
src/routes.js | korabh/quran.com-frontend | /* eslint-disable max-len, no-console */
import React from 'react';
import IndexRoute from 'react-router/lib/IndexRoute';
import Route from 'react-router/lib/Route';
import Redirect from 'react-router/lib/Redirect';
import {
isLoaded as isAuthLoaded,
load as loadAuth,
hasAccessToken
} from 'redux/actions/auth';
... |
src/js/components/Form.js | LouisDelbosc/Teleprompteur | import React from 'react'
import Store from '../store/Store'
import reactMixin from 'react-mixin'
import {Navigation} from 'react-router'
export default class Form extends React.Component {
handleClick(e) {
e.preventDefault();
let text = document.getElementById('text').value;
this.transition(text);
}
... |
src/svg-icons/maps/my-location.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsMyLocation = (props) => (
<SvgIcon {...props}>
<path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm8.94 3c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.1... |
src/pages/404.js | mudetroit/mudetroit.github.io | import React from 'react'
const NotFoundPage = () => (
<div>
<h1>NOT FOUND</h1>
<p>You just hit a route that doesn't exist... the sadness.</p>
</div>
)
export default NotFoundPage
|
src/utils/domUtils.js | johanneshilden/react-bootstrap | import React from 'react';
let canUseDom = !!(
typeof window !== 'undefined' &&
window.document &&
window.document.createElement
);
/**
* Get elements owner document
*
* @param {ReactComponent|HTMLElement} componentOrElement
* @returns {HTMLElement}
*/
function ownerDocument(componentOrElement) {
let e... |
addons/themes/photon/layouts/Home.js | rendact/rendact | import $ from 'jquery'
import React from 'react';
import gql from 'graphql-tag';
import {graphql} from 'react-apollo';
import scrollToElement from 'scroll-to-element';
import {Link} from 'react-router';
let Home = React.createClass({
componentDidMount(){
require('../assets/css/main.css')
},
handleScrolly(e)... |
server/dashboard/js/components/BenchResults.react.js | machinezone/mzbench | import React from 'react';
import BenchGraphs from './BenchGraphs.react';
import PropTypes from 'prop-types';
class BenchResults extends React.Component {
render() {
if (!this.props.bench.results) return null;
var metricValues = Object.keys(this.props.bench.results).map((key) => {
l... |
docs/app/Examples/views/Item/Variations/ItemExampleFloated.js | vageeshb/Semantic-UI-React | import React from 'react'
import { Button, Image as ImageComponent, Item } from 'semantic-ui-react'
const paragraph = <ImageComponent src='http://semantic-ui.com/images/wireframe/short-paragraph.png' />
const ItemExampleFloated = () => (
<Item.Group relaxed>
<Item>
<Item.Image size='small' src='http://sem... |
example/examples/PolylineCreator.js | palexs/react-native-maps | import React from 'react';
import {
StyleSheet,
View,
Text,
Dimensions,
TouchableOpacity,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.78825;
const LONGITUDE = -122.4324;
const LA... |
SmartLocker/Oscope.js | iot-civic-hack/iot-smart-tool-crib | import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableOpacity,
TouchableWithoutFeedback,
DeviceEventEmitter,
Image
} from 'react-native';
import Beacons from 'react-native-beacons-manager';
import BottomTab from './BottomTab';
import oscope from './tools/osco... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.