path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/icons/ArrowUpB.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class ArrowUpB extends React.Component {
render() {
if(this.props.bare) {
return <g>
<path d="M413.1,327.3l-1.8-2.1l-136-156.5c-4.6-5.3-11.5-8.6-19.2-8.6c-7.7,0-14.6,3.4-19.2,8.6L101,324.9l-2.3,2.6
C97,330,96,333,... |
src/views/About.js | Nek/react-redux-universal-hot-example | import React from 'react';
import MiniInfoBar from '../components/MiniInfoBar';
export default class SignUp {
render() {
return (
<div>
<h1>About Us</h1>
<div>Hey! You found the mini info bar! The following component is display-only.</div>
<MiniInfoBar/>
</div>
);
}
}
|
node_modules/@material-ui/core/es/TableSortLabel/TableSortLabel.js | pcclarke/civ-techs | import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import ArrowDownwardIcon from '../internal/svg-icons/ArrowDownward';
import with... |
examples/huge-apps/routes/Course/routes/Assignments/components/Assignments.js | mattydoincode/react-router | import React from 'react'
class Assignments extends React.Component {
render() {
return (
<div>
<h3>Assignments</h3>
{this.props.children || <p>Choose an assignment from the sidebar.</p>}
</div>
)
}
}
module.exports = Assignments
|
src/js/components/meter/Bar.js | davrodpin/grommet | // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React from 'react';
import {baseUnit, baseDimension} from './utils';
import Graphic from './Graphic';
const BAR_LENGTH = baseDimension;
const BAR_THICKNESS = baseUnit;
const MID_BAR_THICKNESS = BAR_THICKNESS / 2;
export default class Bar ext... |
src/components/options/OptionsButton.js | m0sk1t/react_email_editor | import React from 'react';
const OptionsButton = ({ block, language, onPropChange }) => {
const fontSize = block.options.container.fontSize.match(/\d+/)?block.options.container.fontSize.match(/\d+/)[0]: '16';
return (
<div>
<div>
<label>{language["Custom style"]}: <input type="checkbox" checked={block.optio... |
packages/slate-html-serializer/test/serialize/inline-with-mark.js | ashutoshrishi/slate | /** @jsx h */
import React from 'react'
import h from '../helpers/h'
export const rules = [
{
serialize(obj, children) {
if (obj.object == 'block' && obj.type == 'paragraph') {
return React.createElement('p', {}, children)
}
if (obj.object == 'inline' && obj.type == 'link') {
... |
stories/Input/ExampleRoundInput.js | nirhart/wix-style-react | import React from 'react';
import Input from 'wix-style-react/Input';
const style = {
display: 'inline-block',
padding: '0 5px',
width: '200px',
lineHeight: '22px',
verticalAlign: 'top'
};
const defaultProps = {
size: 'normal',
magnifyingGlass: true,
placeholder: 'They did not know it was impossible, ... |
server/middlewares/routes.js | kairatz/resource-frontend-server | import React from 'react';
import { createStore, applyMiddleware } from 'redux';
import { match } from 'react-router';
import thunk from 'redux-thunk';
import reducers from '../../src/reducers';
import routes from '../../src/routes';
import getLayout from '../layout';
import { requestLogin } from '../../src/actions/aut... |
blueprints/form/files/__root__/forms/__name__Form/__name__Form.js | joyvuu-dave/comeals-ui-react | import React from 'react'
import { reduxForm } from 'redux-form'
export const fields = []
const validate = (values) => {
const errors = {}
return errors
}
type Props = {
handleSubmit: Function,
fields: Object,
}
export class <%= pascalEntityName %> extends React.Component {
props: Props;
defaultProps = ... |
react-flux-mui/js/material-ui/src/svg-icons/file/folder.js | pbogdan/react-flux-mui | 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... |
docs/app/Examples/elements/Label/Groups/LabelExampleGroupColored.js | clemensw/stardust | import React from 'react'
import { Icon, Label } from 'semantic-ui-react'
const LabelExampleGroupSize = () => (
<Label.Group color='blue'>
<Label as='a'>
Fun
<Icon name='close' />
</Label>
<Label as='a'>
Happy
<Label.Detail>22</Label.Detail>
</Label>
<Label as='a'>Smart</L... |
tests/react_children/text.js | samwgoldman/flow | // @flow
import React from 'react';
class Text extends React.Component<{children: string}, void> {}
class TextOptional extends React.Component<{children?: string}, void> {}
class TextLiteral extends React.Component<{children: 'foo' | 'bar'}, void> {}
<Text />; // Error: `children` is required.
<TextOptional />; // O... |
stack/src/components/NotFoundPage.js | isabellewei/deephealth | 'use strict';
import React from 'react';
import { Link } from 'react-router';
export default class NotFoundPage extends React.Component {
render() {
return (
<div className="not-found">
<h1>404</h1>
<h2>Page not found!</h2>
<p>
<Link to="/">Go back to the main page</Link>... |
test/helpers/shallowRenderHelper.js | IvanDart1001/C_gallery | /**
* Function to get the shallow output for a given component
* As we are using phantom.js, we also need to include the fn.proto.bind shim!
*
* @see http://simonsmith.io/unit-testing-react-components-without-a-dom/
* @author somonsmith
*/
import React from 'react';
import TestUtils from 'react-addons-test-utils'... |
src/svg-icons/communication/email.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationEmail = (props) => (
<SvgIcon {...props}>
<path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/>
</SvgIcon>
);
CommunicationEmai... |
frontend/src/components/eois/modals/compareApplications/compareApplicationsModal.js | unicef/un-partner-portal | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ControlledModal from '../../../common/modals/controlledModal';
import CompareApplicationsContentContainer from './compareApplicationsContentContainer';
const messages = {
title: 'Compare concept notes',
};
class CompareApplication... |
src/layout/common/NotFoundPage.js | IveWong/uiams | import React, { Component } from 'react';
class NotFoundPage extends Component {
render() {
return (
<h2>Sorry, but the page you were trying to view does not exist.</h2>
);
}
}
export default NotFoundPage;
|
client/src/core-components/loading.js | ivandiazwm/opensupports | import React from 'react';
import classNames from 'classnames';
class Loading extends React.Component {
static propTypes = {
backgrounded: React.PropTypes.bool,
size: React.PropTypes.oneOf(['small', 'medium', 'large'])
};
static defaultProps = {
size: 'small',
backgrounded:... |
src/components/Part/Part.js | MaksimMartyn/LAZARUS | 'use strict';
import React from 'react';
import ImgSlider from './ImgSlider';
import SpecSlider from './SpecSlider';
import Spec from './Spec';
import Description from './Description';
import Popup from './Popup/Popup';
import Name from './Name';
const Part = ({
preview,
popup,
togglePreview,
togglePopup,
... |
views/articles.js | tmn/tmn.io | import fs from 'fs';
import path from 'path';
import React from 'react';
import marked from 'marked';
const Article = ({ article }) => (
<article>
<header>
<span className="article-meta">{ article.date }</span>
<a href={ article.url }><h1>{ article.title }</h1></a>
</header>
<div dangerously... |
src/parser/deathknight/unholy/modules/features/VirulentPlagueEfficiency.js | FaideWW/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import Enemies from 'parser/shared/modules/Enemies';
import Analyzer from 'parser/core/Analyzer';
import StatisticBox, { STATISTIC_ORDER } from 'interface/others/Statistic... |
src/svg-icons/maps/local-phone.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPhone = (props) => (
<SvgIcon {...props}>
<path d="M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-... |
app/containers/LocaleToggle/index.js | ParAnton/ngps-gui-core | /*
*
* LanguageToggle
*
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import Toggle from 'components/Toggle';
import Wrapper from './Wrapper';
import messages from './messages';
import { appLocales } from '../../i18n';
import { changeLocale } from ... |
src/svg-icons/editor/insert-invitation.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorInsertInvitation = (props) => (
<SvgIcon {...props}>
<path d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"/>
... |
app/jsx/announcements/components/RSSFeedList.js | djbender/canvas-lms | /*
* Copyright (C) 2018 - 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... |
src/js/components/icons/base/FormTrash.js | odedre/grommet-final | /**
* @description FormTrash SVG Icon.
* @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon.
* @property {string} colorIndex - The color identifier to use for the stroke color.
* If not specified, this component will default to muiTheme.palette.textColor.
* @... |
src/client/order/orderStepper.js | r3dDoX/geekplanet | import Step from '@material-ui/core/Step';
import StepButton from '@material-ui/core/StepButton';
import StepContent from '@material-ui/core/StepContent';
import Stepper from '@material-ui/core/Stepper';
import PropTypes from 'prop-types';
import React from 'react';
import { Helmet } from 'react-helmet';
import { Forma... |
src/components/MaintainTransactionalReportRepository/TransSecColumnRule.js | RegOpz/RegOpzWebApp | import React, { Component } from 'react';
import { FormGroup, FormControl, Button } from 'react-bootstrap';
class TransSecColumnRule extends Component {
constructor(props) {
super(props);
}
componentWillMount() {
// TODO
// console.log("TransSecColumnRule componentWillMount",this.props... |
app/jsx/epub_exports/App.js | djbender/canvas-lms | /*
* Copyright (C) 2015 - 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... |
app/containers/ServicesPage/Services/Websites.js | ESTEBANMURUZABAL/bananaCatReact | import React from 'react';
import { FormattedMessage } from 'react-intl';
import './styles.scss';
import messages from '../messages';
import { Link } from 'react-router';
const Websites = function() {
return (
<div>
<h1><FormattedMessage {...messages.webTitle} /></h1>
<p><FormattedMessage {...message... |
src/components/Home/Home.js | lemonCMS/react-redux-universal-hot-example | import React from 'react';
export default class Home extends React.Component {
render() {
return (
<div>
<h1>Test dd</h1>
</div>
);
}
}
|
src/layout/Column.js | HarvestProfit/harvest-profit-ui | import React from 'react';
import PropTypes from 'prop-types';
const verticalAlignClass = (align) => {
if (align && align.length > 0) {
return `v-${align}`;
}
return '';
};
const horizontalAlignClass = (align) => {
if (align && align.length > 0) {
return `h-${align}`;
}
return '';
};
/**
* Rend... |
src/js/index.js | rulingfong/blog | var React = require('react');
// import React from 'react';
var ReactDOM = require('react-dom');
var { Router, Route, hashHistory, IndexRoute } = require('react-router');
var Navi = require('./components/Navi');
// var Home = require('./components/Home');
import Home from './components/Home';
import Reg from './comp... |
src/icons/SocialTwitch.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class SocialTwitch extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<path d="M80,32l-32,80v304h96v64h64l64-64h80l112-112V32H80z M256,272h-48V143h48V272z M368,272h-48V143h48V272z"></path>
<... |
src/js/components/icons/base/Bus.js | odedre/grommet-final | /**
* @description Bus SVG Icon.
* @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon.
* @property {string} colorIndex - The color identifier to use for the stroke color.
* If not specified, this component will default to muiTheme.palette.textColor.
* @proper... |
react-native-life/ReactNativeLife/js/APIs/Vibration/VibrationExample.js | CaMnter/front-end-life | /**
* @author CaMnter
*/
import React from 'react';
import {
StyleSheet,
View,
Text,
TouchableHighlight,
Vibration,
Platform
} from 'react-native';
let pattern, patternLiteral, patternDescription;
if (Platform.OS === 'android') {
pattern = [0, 500, 200, 500];
patternLiteral = '[0, 50... |
examples/with-graphql-hooks/components/submit.js | azukaru/next.js | import React from 'react'
import { useMutation } from 'graphql-hooks'
const CREATE_POST = `
mutation createPost($title: String!, $url: String!) {
createPost(title: $title, url: $url) {
id
title
votes
url
createdAt
}
}`
export default function Submit({ onSubmission }) {
const [createPost, sta... |
src/containers/ui/DrawerContainer.js | BrownEPTech/brown-ep-startup-ideas-app | /**
* Whole App Container
*
* React Native Starter App
* https://github.com/mcnamee/react-native-starter-app
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { View } from 'react-native';
import { connect } from 'react-redux';
import SideMenu from 'react-native-side-menu';
im... |
src/PostDetailScene.js | tjkang/react-native-sample | import React from 'react';
import {
StyleSheet,
Text,
ScrollView,
} from 'react-native';
const PostDetailScene = ({ navigation }) => {
const { content } = navigation.state.params;
return (
<ScrollView style={styles.containerStyle}>
<Text style={styles.contentTextStyle}>
{content}
</Te... |
src/svg-icons/notification/more.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationMore = (props) => (
<SvgIcon {...props}>
<path d="M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.97.89 1.66.89H22c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 13.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5... |
docs/src/examples/elements/Image/Types/ImageExampleImage.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Image } from 'semantic-ui-react'
const ImageExampleImage = () => (
<Image src='/images/wireframe/image.png' size='small' />
)
export default ImageExampleImage
|
cliente/src/components/users/edit.js | mariomoren00/mern-stack | import React, { Component } from 'react';
import './style.css';
export default class EditUsers extends Component {
render() {
return (
<div >
<h1>
EditUsers
</h1>
</div>
);
}
} |
assets/javascripts/kitten/components/layout/container/stories.js | KissKissBankBank/kitten | import React from 'react'
import { Container } from './index'
import { COLORS } from 'kitten'
import { DocsPage } from 'storybook/docs-page'
export default {
title: 'Layout/Container',
component: Container,
parameters: {
docs: {
page: () => <DocsPage filepath={__filename} importString="Container" />,
... |
blueocean-material-icons/src/js/components/svg-icons/action/cached.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ActionCached = (props) => (
<SvgIcon {...props}>
<path d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.... |
src/cms/preview-templates/post-preview.js | saegeullee/saegeullee.github.io | // @flow strict
import React from 'react';
import type { Entry, WidgetFor } from '../../types';
type Props = {
entry: Entry,
widgetFor: WidgetFor
};
const PostPreview = ({ entry, widgetFor }: Props) => {
const body = widgetFor('body');
const title = entry.getIn(['data', 'title']);
return (
<div classNa... |
app/viewControllers/components/Spread.js | Evyy/cffs-ui | import React from 'react';
import classnames from 'classnames';
import Waypoint from "react-waypoint";
import {Element as ScrollElement} from "react-scroll";
class Spread extends React.Component {
constructor (props) {
super(props);
this._handleWaypointEnter = this
._handleWaypointEnt... |
src/components/DataEntry/Switch/components/Switch.js | Aus0049/react-component | /**
* Created by Aus on 2017/4/11.
*/
import React from 'react'
import classNames from 'classnames'
import Touchable from 'rc-touchable'
import '../style/index.scss'
// 滑动开关组件
class Switch extends React.Component {
constructor (props) {
super(props);
let checked = true;
// 如果传入checked 说... |
blueocean-material-icons/src/js/components/svg-icons/communication/contact-phone.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const CommunicationContactPhone = (props) => (
<SvgIcon {...props}>
<path d="M22 3H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.... |
client/src/StudentProfile.js | mit-teaching-systems-lab/swipe-right-for-cs | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import './StudentProfile.css';
// Renders a student profile.
class StudentProfile extends Component {
render() {
const {profileText, profileImageSrc, style} = this.props;
return (
<div className="StudentProfile" style={style... |
src/index.js | hp-mobile/react-bootstrap-select | import 'bootstrap-select';
import $ from 'jquery';
import PropTypes from 'prop-types';
import React from 'react';
const events = [
'show',
'shown',
'hide',
'hidden',
'loaded',
'rendered',
'refreshed',
'changed'
];
const capitalizeFirstLetter = str => str.charAt(0).toUpperCase() + str.slice(1);
const ... |
src/visualization/ProbabilityChart.js | VasilyShelkov/scikic-app | import React, { Component } from 'react';
import d3 from 'd3';
class ProbabilityChart extends Component {
componentDidMount() {
const margin = this.props.margin;
const width = $(this.refs.mountPoint).width() - margin.left - margin.right;
const height = this.props.height - margin.top - margin.bottom;
... |
lib/cli/test/snapshots/react_project/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/image/colorize.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageColorize = (props) => (
<SvgIcon {...props}>
<path d="M20.71 5.63l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3... |
components/gallery.js | vnovick/react-redux-editor | import React from 'react';
import {connect} from 'react-redux';
import { dragStart, updateGalleryImageList, dragEnd } from 'actions/galleryActions'
import jsonp from 'jsonp';
export const Gallery = class Editor extends React.Component {
componentDidMount(){
updateGalleryImageList(this.props.store, [{
... |
components/Register.js | Crazy50/FluxBug | import React from 'react';
import {register} from '../actions/UserActions';
var Register = React.createClass({
contextTypes: {
executeAction: React.PropTypes.func
},
handleSubmit(e) {
e.preventDefault();
this.context.executeAction(register, {
email: React.findDOMNode(this.refs.email).value,
... |
src/Radio/index.js | narqo/react-islands | import React from 'react';
import Control from '../Control';
import Button from '../Button';
class Radio extends Control {
constructor(props) {
super(props);
this.onButtonClick = this.onButtonClick.bind(this);
this.onButtonFocusChange = this.onButtonFocusChange.bind(this);
this.onB... |
index.ios.js | abiduzz420/learn-anything-mobile | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class learnAnythingUI extends Component {
render() {
return (
<View style={styles.con... |
src/components/notfound/notfound.js | dingzhang/OpenDay | import React from 'react';
import { Button } from 'antd';
import styles from './notfound.less';
const NotFoundPage = () => {
return (
<div className={styles.normal}>
<div className={styles.container}>
<h1 className={styles.title}>404</h1>
<p className={styles.des... |
common/routes/Home/components/Home.js | witt86/ERE | import React from 'react'
import { StyleSheet, css } from 'aphrodite'
import data from '../data'
// This is a static page. It uses an array to hold data about the resources
// and maintain DRY
const Home = (props) => (
<div>
<h2 className={css(styles.header)}>About</h2>
<p className={css(styles.lead)}>
... |
lib/components/Bootstrap.js | codevlabs/filepizza | import React from 'react'
export default class Bootstrap extends React.Component {
render() {
return <script
id="bootstrap"
type="application/json"
dangerouslySetInnerHTML={{ __html: this.props.data}} />
}
}
|
src/components/search/SearchResults.js | zebras-filming-videos/streamr-web | import React from 'react'
import TrendingStreams from '../streams/TrendingStreams'
export default ({
streams
}) => (
<div className='container'>
<TrendingStreams {...{ streams }} />
</div>
)
|
packages/mineral-ui-icons/src/IconClearAll.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconClearAll(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconProps... |
src/layout/NavItem.js | petertrotman/critrolemoments | import React from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import { Link, withRouter } from 'react-router-dom';
import { lighten } from 'polished';
import { mobileView, desktopView } from './util';
const StyledLi = styled.li`
color: ${props => (props.active ? props.theme.... |
app/src/components/Navigation.js | open-austin/budgetparty | import React from 'react'
import { Link } from 'react-router-dom'
import PropTypes from 'prop-types';
import TotalFundAvailable from './TotalFundAvailable'
import ServiceFundsAvailable from './ServiceFundsAvailable'
import avatar from '../images/avatar.svg'
import back from '../images/back.svg'
import close from '../... |
examples/official-storybook/stories/addon-contexts.stories.js | storybooks/react-storybook | import React from 'react';
import { withContexts } from '@storybook/addon-contexts/react';
// Example A: Simple CSS Theming
const topLevelContexts = [
{
title: 'CSS Themes',
components: ['div'],
params: [
{
name: 'Desert',
props: {
style: { color: 'brown', background: '#F4... |
src/components/abstract_form.js | TouchBistro/frig | import React from 'react'
import ReactDOM from 'react-dom'
// Note about eslint rule below:
// AbstractForm does not have a render() method (Form and FieldsetNestedForm do).
// ESLint complains about render "not having a return statement", when really
// there is no render method at all.
export default class AbstractF... |
app/javascript/mastodon/features/status/components/action_bar.js | PlantsNetwork/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import IconButton from '../../../components/icon_button';
import ImmutablePropTypes from 'react-immutable-proptypes';
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
import { defineMessages, injectIntl } from 'react-intl';
i... |
developers.diem.com/src/components/docs/Cards/SDKCard/index.js | libra/libra | import React from 'react';
import PropTypes from 'prop-types';
import BaseContainer from '../BaseContainer';
import Link from 'src/components/Link';
import {WithBackgroundImage} from 'diem-docusaurus-components';
import classnames from 'classnames';
import styles from './styles.module.css';
const SDKCard = ({bolded,... |
app/javascript/mastodon/features/ui/components/embed_modal.js | pinfort/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { defineMessages, FormattedMessage, injectIntl } from 'react-intl';
import api from 'mastodon/api';
import IconButton from 'mastodon/components/icon_button';
const messages = defin... |
modules/ScrollManagementMixin.js | leeric92/react-router | import React from 'react';
import { canUseDOM, setWindowScrollPosition } from './DOMUtils';
import NavigationTypes from './NavigationTypes';
var { func } = React.PropTypes;
function getCommonAncestors(branch, otherBranch) {
return branch.filter(route => otherBranch.indexOf(route) !== -1);
}
function shouldUpdateSc... |
packages/bonde-styleguide/src/content/IconColorful/svg/People.js | ourcities/rebu-client | import React from 'react'
const Icon = () => (
<svg xmlns='http://www.w3.org/2000/svg' width='41' height='41' viewBox='0 0 41 41'>
<g fill='none' fillRule='evenodd'>
<g fill='#E09' transform='translate(.6)'>
<ellipse cx='20' cy='19.907' opacity='.297' rx='20' ry='19.907' />
<ellipse c... |
src/PhotoLayoutEditor/Container/Body/GridLayout/index.js | RedgooseDev/react-photo-layout-editor | import React from 'react';
import { connect } from 'react-redux';
import ReactGridLayout from 'react-grid-layout';
import classNames from 'classnames';
import Cropper from '../../Cropper';
import * as actions from '../../../actions';
import * as libs from '../../../lib';
let timeStamp = [];
class GridLayout extends... |
libs/component/index.js | eleme/element-react | import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
export default class Component extends React.Component {
classNames(...args) {
return classnames(args);
}
className(...args) {
const { className } = this.props;
return this.classNames.apply(this, args... |
stories/SingleDatePicker.js | agupta93/react-dates | import React from 'react';
import moment from 'moment';
import { storiesOf } from '@kadira/storybook';
import SingleDatePickerWrapper from '../examples/SingleDatePickerWrapper';
import { VERTICAL_ORIENTATION } from '../constants';
storiesOf('SingleDatePicker', module)
.add('default', () => (
<SingleDatePickerW... |
www/src/components/SubNavbar.js | haneev/react-widgets | import React from 'react';
import LinkContainer from 'react-router-bootstrap/lib/LinkContainer';
const _ = less`
.app-subnavbar {
display: flex;
align-items: center;
justify-content: center;
background: #6b7080; //#0273a3;
padding: 10px 5px;
font-size: 90%;
& > * {
&,
&:focus... |
src/components/blog/Separator.js | kbariotis/kostasbariotis.com | import React from 'react';
const Separator = () => (
<div
css={{
height: '2px',
width: '100%',
marginBottom: '0.5em',
marginTop: '0.5em',
display: 'block',
background:
'linear-gradient(to right, #e52f45 0%, #e52f45 25%, #b42b3e 25%, #b42b3e 50%, #8ab2ff 50%, #8ab2ff 75... |
fields/types/color/ColorField.js | brianjd/keystone | import { SketchPicker } from 'react-color';
import { css, StyleSheet } from 'aphrodite/no-important';
import Field from '../Field';
import React from 'react';
import {
Button,
FormInput,
InlineGroup as Group,
InlineGroupSection as Section,
} from '../../../admin/client/App/elemental';
import transparentSwatch from ... |
src/svg-icons/action/backup.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionBackup = (props) => (
<SvgIcon {...props}>
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z... |
node_modules/react-bootstrap/es/InputGroupAddon.js | vitorgomateus/NotifyMe | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
src/interface/icons/Performance.js | anom0ly/WoWAnalyzer | import React from 'react';
// https://thenounproject.com/term/performance/952795/
// performance by pictohaven from the Noun Project
const Icon = ({ ...other }) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" className="icon" {...other}>
<path d="M 50 6 C 25.723154 6 6 25.72312 6 50 C 6 74.276... |
app/javascript/mastodon/features/follow_recommendations/index.js | abcang/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
import { FormattedMessage } from 'react-intl';
import { fetchSuggestions } from 'mastodon... |
frontend/app/components/DialectTile/DialectTilePresentation.js | First-Peoples-Cultural-Council/fv-web-ui | import React from 'react'
import PropTypes from 'prop-types'
// Material UI
import Card from '@material-ui/core/Card'
import CardContent from '@material-ui/core/CardContent'
import CardMedia from '@material-ui/core/CardMedia'
import LockIcon from '@material-ui/icons/Lock'
import Dialog from '@material-ui/core/Dialog'
... |
src/swipedeck/SwipeDeck.js | kosiakMD/react-native-elements | /*eslint-disable no-console */
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import {
View,
Animated,
PanResponder,
Dimensions,
StyleSheet,
LayoutAnimation,
UIManager,
} from 'react-native';
const SCREEN_WIDTH = Dimensions.get('window').width;
const SWIPE_THRESHOLD = 0.4 *... |
src/templates/project-page.js | michaeltmiller/michaelmiller.io | import React from 'react';
import Carousel from '../components/carousel';
import Iphone from '../components/iphone';
import Macbook from '../components/macbook';
import OutboundLink from '../components/outbound-link';
import Wrapper from '../components/wrapper';
import { ProjectDescription, ProjectIntro, ProjectPage }... |
aaf-enrollment/src/components/enrollment/test-authenticator/method-tests/CardTest.js | MicroFocus/CX | import React from 'react';
import CommonCardHandler from '../../../../api/devices/common-card-devices.api';
class CardTest extends React.PureComponent {
constructor(props) {
super(props);
this.props.setTestButtonAvailability(false);
this.commonCardHandler = new CommonCardHandler(CommonCar... |
app/templates/src/routes.js | jermspeaks/generator-react-redux | import React from 'react';
import {Route, DefaultRoute, IndexRoute} from 'react-router';
import App from './containers/App';
import LandingPage from './containers/LandingPage';
import AboutPage from './containers/AboutPage';
import NotFoundPage from './containers/NotFoundPage';
export default (
<Route path='/' compo... |
docs/Documentation/AcordionPage.js | reactivers/react-mcw | /**
* Created by muratguney on 29/03/2017.
*/
import React from 'react'
import {Card, Acordion,CardHeader, CardBody,Table,TableRow, TableHeaderColumn, TableHeader, TableRowColumn, TableBody} from '../../lib';
import HighLight from 'react-highlight.js'
const data2 = [
{dsc: "List 7",id:1},
{dsc: "List 8",id:... |
public/assets/js/index.js | ngocson8b/6jar | // import React from 'react';
// import ReactDOM from 'react-dom';
// function formatDate(date) {
// return date.toLocaleDateString();
// }
// var Test = React.createClass({
// render: function(){
// return (
// <div>
// <h3> Click the button</h3>
// <input type="submit" />
/... |
src/svg-icons/device/widgets.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceWidgets = (props) => (
<SvgIcon {...props}>
<path d="M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"/>
</SvgIcon>
);
DeviceWidgets = pure(DeviceWidgets);
... |
src/svg-icons/content/font-download.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentFontDownload = (props) => (
<SvgIcon {...props}>
<path d="M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13... |
src/stories/stories.js | ryanbaer/busy | // NOTE: storybook installs to devDependencies and it should stay there
/* eslint-disable import/no-extraneous-dependencies */
import React from 'react';
import { MemoryRouter } from 'react-router';
import { addDecorator, storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { ... |
src/client/components/Navigation/Notifications/NotificationTransfer.js | busyorg/busy | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { FormattedMessage, FormattedRelative } from 'react-intl';
import { Link } from 'react-router-dom';
import Avatar from '../../Avatar';
import { epochToUTC } from '../../../helpers/formatter';
import './Notificatio... |
examples/shopping-cart/index.js | conorhastings/redux | import React from 'react'
import { render } from 'react-dom'
import { createStore, applyMiddleware } from 'redux'
import { Provider } from 'react-redux'
import logger from 'redux-logger'
import thunk from 'redux-thunk'
import reducer from './reducers'
import { getAllProducts } from './actions'
import App from './contai... |
tests/react_children/spread.js | facebook/flow | // @flow
import React from 'react';
class Foo extends React.Component<{children: Array<string>}, void> {}
<Foo>{...["a", "b"]}</Foo>
|
app/routes.js | adamsome/electron-nav | /* eslint flowtype-errors/show-errors: 0 */
import React from 'react'
import { Switch, Route } from 'react-router'
import App from './containers/App'
import StepPage from './containers/StepPage'
import CounterPage from './containers/CounterPage'
export default () => (
<App>
<Switch>
<Route path="/counter" ... |
examples/universal/server/server.js | Halama/redux | /* eslint-disable no-console, no-use-before-define */
import path from 'path';
import Express from 'express';
import qs from 'qs';
import webpack from 'webpack';
import webpackDevMiddleware from 'webpack-dev-middleware';
import webpackHotMiddleware from 'webpack-hot-middleware';
import webpackConfig from '../webpack.... |
src/controls/Emoji/Component/index.js | jpuri/react-draft-wysiwyg | /* @flow */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { stopPropagation } from '../../../utils/common';
import Option from '../../../components/Option';
import './styles.css';
class LayoutComponent extends Component {
static propTypes:... |
src/routes/about/index.js | chunkiat82/rarebeauty-ui | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import Layout from '../../co... |
packages/react-scripts/fixtures/kitchensink/template/src/features/env/FileEnvVariables.js | facebookincubator/create-react-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
const FileEnvVariables = () => (
<span>
<span id="feature-file-env-original-1">
{process.env.REA... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.