path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
fields/types/cloudinaryimage/CloudinaryImageFilter.js | nickhsine/keystone | import React from 'react';
import { SegmentedControl } from 'elemental';
var PasswordFilter = React.createClass({
getInitialState () {
return {
checked: this.props.value || true,
};
},
toggleChecked (checked) {
this.setState({
checked: checked,
});
},
renderToggle () {
let options = [
{ lab... |
client/src/components/UtilComponents/NotFound.js | codefordenver/Circular | import React from 'react';
import { Link } from 'react-router';
const NotFound = () => (
<div className="not-found-container">
<div>
<h1>You seem to have gotten lost...</h1>
</div>
<div>
<i className="fa fa-4x fa-recycle loading-spinner slow-spin" />
</div>
<div>
<Link className... |
examples/huge-apps/routes/Profile/components/Profile.js | Dodelkin/react-router | import React from 'react'
class Profile extends React.Component {
render() {
return (
<div>
<h2>Profile</h2>
</div>
)
}
}
export default Profile
|
src/modules/keywords/components/KeywordCommentList/KeywordCommentList.js | CtrHellenicStudies/Commentary | import React from 'react';
import { Link } from 'react-router-dom';
import PropTypes from 'prop-types';
import moment from 'moment';
import { compose } from 'react-apollo';
// components
import AvatarIcon from '../../../users/components/AvatarIcon';
// lib
import createRevisionMarkup from '../../../../lib/createRevis... |
packages/material-ui-icons/src/LocalDining.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let LocalDining = props =>
<SvgIcon {...props}>
<path d="M8.1 13.34l2.83-2.83L3.91 3.5c-1.56 1.56-1.56 4.09 0 5.66l4.19 4.18zm6.78-1.81c1.53.71 3.68.21 5.27-1.38 1.91-1.91 2.28-4.65.81-6.12-1.46-1.46-4.2-1.1-... |
src/Components/RichEditor/index.js | sqhtiamo/zaro | import React, { Component } from 'react';
import { PropTypes } from 'prop-types';
import Loading from '../Loading';
class RichEditor extends Component {
static genStyle(tags = []) {
const res = {};
const styles = [
'color', 'font-size', 'font-family', 'position', 'display', 'font-weight', 'cursor',
... |
app/javascript/mastodon/features/compose/components/upload_progress.js | hugogameiro/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import { FormattedMessage } from 'react-intl';
export default class UploadProgress extends React.PureComponent {
static propTypes = {
active: PropTypes... |
app/javascript/mastodon/features/explore/results.js | koba-lab/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { expandSearch } from 'mastodon/actions/search';
import Account from 'mastodon/containers/account_contai... |
app/javascript/mastodon/features/ui/components/columns_area.js | pfm-eyesightjp/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl } from 'react-intl';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ReactSwipeableViews from 'react-swipeable-views';
import { links, getIndex, get... |
fields/types/Field.js | davibe/keystone | import _ from 'underscore';
import classnames from 'classnames';
import evalDependsOn from '../utils/evalDependsOn.js';
import React from 'react';
import { Button, FormField, FormInput, FormNote } from 'elemental';
function validateSpec(spec) {
if (!spec) spec = {};
if (!_.isObject(spec.supports)) {
spec.supports ... |
examples/todomvc/containers/Root.dev.js | alexkuz/redux-devtools | import React, { Component } from 'react';
import { Provider } from 'react-redux';
import TodoApp from './TodoApp';
import DevTools from './DevTools';
export default class Root extends Component {
render() {
const { store } = this.props;
return (
<Provider store={store}>
<div>
<TodoApp... |
example/src/screens/types/Notification.js | junedomingo/react-native-navigation | import React from 'react';
import {StyleSheet, View, Text, Dimensions, Button} from 'react-native';
class Notification extends React.Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.title}>In-App Notification</Text>
<Text style={styles.content}>You have 1... |
src/TextField/TextFieldHint.js | ichiohta/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import transitions from '../styles/transitions';
function getStyles(props) {
const {
muiTheme: {
textField: {
hintColor,
},
},
show,
} = props;
return {
root: {
position: 'absolute',
opacity: show ? 1 ... |
src/svg-icons/social/people.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialPeople = (props) => (
<SvgIcon {...props}>
<path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.... |
src/components/item/view/ItemActionPanel.js | katima-g33k/blu-react-desktop | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { ActionPanel } from '../../general';
import i18n from '../../../lib/i18n';
import StatusButton from '../../../containers/StatusButtonContainer';
export default class ItemActionPanel extends Component {
static propTypes = {
can... |
Neos.Media.Browser/packages/neos-media-browser/src/Variants/Variants.js | daniellienert/neos-development-collection | import React from 'react';
import Variant from './Variant';
export default class Variants extends React.PureComponent {
render() {
const {variants, onRequestCrop} = this.props;
const renderedVariants = variants.map((variantInformation) => <Variant onRequestCrop={onRequestCrop} key={variantInformati... |
client/src/transforms/TreeDropdownField/moveTreeDropdownField.js | open-sausages/silverstripe-asset-admin | import React from 'react';
import { connect } from 'react-redux';
import { compose } from 'redux';
import { findTreeByPath } from 'components/TreeDropdownField/TreeDropdownField';
/**
* Enables a treepdropdown field to have individually disabled items
*/
const disabledTreeDropdownField = (TreeDropdownField) => (prop... |
node_modules/@material-ui/core/es/internal/svg-icons/CheckBoxOutlineBlank.js | pcclarke/civ-techs | import React from 'react';
import createSvgIcon from './createSvgIcon';
/**
* @ignore - internal component.
*/
export default createSvgIcon(React.createElement("path", {
d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
}), 'CheckBoxOutlineBlank'); |
demo/src/index.js | insin/react-octicon | import React from 'react'
import {render} from 'react-dom'
import Demo from './Demo'
render(<Demo/>, document.querySelector('#demo'))
|
projects/react-redux/sample/app/src/index.js | stanleygomes/stanleygomes.github.io | import React from 'react';
import { render } from 'react-dom';
import router from './utils/router';
import '../styles/styles.scss';
const rootElement = document.getElementById('app');
render(router, rootElement); |
test/DropdownButtonSpec.js | egauci/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ReactDOM from 'react-dom';
import DropdownButton from '../src/DropdownButton';
import DropdownMenu from '../src/DropdownMenu';
import MenuItem from '../src/MenuItem';
describe('DropdownButton', () => {
const simpleDropdown = (... |
src/components/ControlPanel/ControlPanel.js | bocasfx/Q | import React from 'react';
import './ControlPanel.css';
import SelectorPanel from './SelectorPanel';
import EditorPanel from './EditorPanel';
import config from '../../config/config';
class ControlPanel extends React.Component {
constructor(props) {
super(props);
this.style = {
width: config.controlPan... |
src/svg-icons/content/add-circle.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentAddCircle = (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 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/>
</SvgIcon>
);
ContentAddCircle = pure(Cont... |
docs/src/examples/elements/Header/Types/HeaderExampleContent.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Header } from 'semantic-ui-react'
const HeaderExampleContent = () => (
<div>
<Header size='huge'>Huge Header</Header>
<Header size='large'>Large Header</Header>
<Header size='medium'>Medium Header</Header>
<Header size='small'>Small Header</Header>
<Header size=... |
react/features/screen-share/components/ShareAudioDialog.js | gpolitis/jitsi-meet | // @flow
import { Checkbox } from '@atlaskit/checkbox';
import React, { Component } from 'react';
import type { Dispatch } from 'redux';
import { Dialog } from '../../base/dialog';
import { translate } from '../../base/i18n';
import { connect } from '../../base/redux';
import {
updateSettings,
shouldHideShare... |
docs/app/Examples/views/Card/Content/CardExampleHeaderCard.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import { Card } from 'semantic-ui-react'
const CardExampleHeaderCard = () => (
<Card.Group>
<Card>
<Card.Content>
<Card.Header>Matthew Harris</Card.Header>
<Card.Meta>Co-Worker</Card.Meta>
<Card.Description>Matthew is a pianist living in Nashville.</Card.De... |
Console/app/node_modules/antd/es/input-number/index.js | RisenEsports/RisenEsports.github.io | import _extends from 'babel-runtime/helpers/extends';
import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possib... |
src/components/Navbar/Navbar.js | uiruson/chorongi | /*
* React.js Starter Kit
* Copyright (c) 2014 Konstantin Tarkus (@koistya), KriaSoft LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
'use strict';
import React from 'react';
var Navbar = React.createClass({
render() {... |
src/Input.js | buildo/rc-datepicker | import React from 'react';
import cx from 'classnames';
import { props } from 'tcomb-react';
import t from 'tcomb';
import View from 'react-flexview';
import skinnable from './utils/skinnable';
import pure from './utils/pure';
@pure
@skinnable()
@props({
value: t.maybe(t.String),
onInputChange: t.Function,
iconC... |
docs/src/Routes.js | SSLcom/Bootsharp | import React from 'react';
import { IndexRoute, Route } from 'react-router';
import ComponentsPage from './ComponentsPage';
import NotFoundPage from './NotFoundPage';
import Root from './Root';
export default (
<Route path="/" component={Root}>
<IndexRoute component={ComponentsPage} />
<Route path="componen... |
__tests__/index.android.js | zhuifeng740643787/gougouApp | import 'react-native';
import React from 'react';
import Index from '../index.android.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
src/logo.js | coma/spotify | import React from 'react';
import style from './logo.css';
class Logo extends React.Component {
render () {
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 45 40" className={ style.main }>
<path className={ style.a } d="M45,25c0,9.32 -10.074,15 -22.5,15c-12.426,0... |
app/javascript/mastodon/features/compose/containers/warning_container.js | WitchesTown/mastodon | import React from 'react';
import { connect } from 'react-redux';
import Warning from '../components/warning';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { me } from '../../../initial_state';
const APPROX_HASHTAG_RE = /(?:^|[^\/\)\w])#(\w*[a-zA-Z·]\w*)/i;
const mapStateT... |
src/containers/SearchFormContainer.js | blwoosky/DigCSS-Theme-v4-Redesign | import React, { Component } from 'react';
import SearchForm from "./../components/SearchForm";
import { Link,browserHistory } from 'react-router';
import { connect } from "react-redux";
import { search } from "./../actions";
export default class SearchFormContainer extends Component {
constructor(props) {
... |
src/Fade.js | mengmenglv/react-bootstrap | import React from 'react';
import Transition from 'react-overlays/lib/Transition';
import CustomPropTypes from './utils/CustomPropTypes';
import deprecationWarning from './utils/deprecationWarning';
class Fade extends React.Component {
render() {
let timeout = this.props.timeout || this.props.duration;
retu... |
src/routes.js | ProjectSunday/rooibus | import React from 'react'
import { Route, IndexRoute } from 'react-router'
import About from './components/about'
import Root from './components/root'
import FriendMap from './components/friend-map'
import Session from './components/session'
export default (
<Route path="/" component={Root}>
<IndexRoute component=... |
src/components/Copy/spec.js | hasibsahibzada/quran.com-frontend | import React from 'react';
import { shallow } from 'enzyme';
import Copy from './index';
const text = 'Some text';
let wrapper;
describe('<Copy />', () => {
beforeEach(() => {
wrapper = shallow(<Copy text={text} />);
});
it('should render', () => {
expect(wrapper).to.be.ok; // eslint-disable-line
})... |
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Listing/MoreMenu.js | Minoli/carbon-apimgt | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import Button from 'material-ui/Button';
import Grow from 'material-ui/transitions/Grow';
import Paper from 'material-ui/Paper';
import { withStyles } from 'material-ui/styles';
import { Manager, Target, Popper } from 'r... |
app/javascript/mastodon/components/status_content.js | tootcafe/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import Permalink from './permalink';
import classnames from 'classnames';
import PollContainer from 'mastodon/containers/poll_container';
import Icon ... |
__tests__/index.android.js | TrungSpy/React-Native-SampleProject | import 'react-native';
import React from 'react';
import Index from '../index.android.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
generators/app/templates/app/test/static/js/components/form.spec.js | TFarla/generator-phoenix-react | import React from 'react';
import Chai, {expect} from 'chai';
import sinon from 'sinon';
import {mount} from 'enzyme';
import sinonChai from 'sinon-chai';
import Form from '<%= atomName %>/components/form';
Chai.use(sinonChai);
describe('Form', () => {
it('submits a message', () => {
const handleSubmit = sinon.s... |
src/components/pages/PatientsSummary/patients-summary.config.js | PulseTile/PulseTile-React | import React from 'react';
import { get } from 'lodash';
import { themePatientSummaryConfig } from '../../theme/config/plugins';
import {
allergiesPrevImage,
problemsPrevImage,
contactsPrevImage,
medicationsPrevImage,
} from './ImageSources';
import { themeConfigs } from '../../../themes.config';
import { isPlu... |
node_modules/react-bootstrap/es/Table.js | xuan6/admin_dashboard_local_dev | 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 ... |
developers.diem.com/src/pages/index.js | libra/libra | import React from 'react';
import {Redirect} from '@docusaurus/router';
import useBaseUrl from '@docusaurus/useBaseUrl';
function Home() {
return <Redirect to={useBaseUrl('/docs/welcome-to-diem/')} />;
}
export default Home;
|
lib/Card.js | robbiegreiner/weathrly | import React from 'react';
const Card = ({
time,
condition,
img,
temp,
}) => {
return (
<div className='card'>
<p className='time'>{time}</p>
<div className='card-condition'>
<p>{condition}</p>
</div>
<div className='img-background'>
<img src={img} alt={condition}/... |
src/containers/layout/List/List.js | max-gram/react-saga-universal | import React from 'react'
import PropTypes from 'prop-types'
import { Grid, Row } from 'react-flexbox-grid'
import css from './List.css'
const List = ({children, className}) => {
return (
<section className={className ? className : css.section}>
<Grid fluid>
<Row middle="xs" className={css.row}>
... |
docs/Documentation/DatePickerPage.js | reactivers/react-mcw | /**
* Created by muratguney on 29/03/2017.
*/
import React from 'react';
import {Card, IconButton,CardHeader,DatePicker,Table, TableRow, TableHeaderColumn, TableHeader, TableRowColumn, TableBody} from '../../lib';
import Highlight from 'react-highlight.js'
export default class ChipPage extends React.Component {
... |
blueocean-material-icons/src/js/components/svg-icons/image/wb-sunny.js | jenkinsci/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageWbSunny = (props) => (
<SvgIcon {...props}>
<path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 ... |
tp-3/juan-pablo-gonzalez/src/components/Root.js | solp/sovos-reactivo-2017 | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import App from './App';
import { BrowserRouter as Router } from 'react-router-dom';
export default class Root extends Component {
render() {
return (
<Router>
<App />
</Router>
);
}
}
Root.propTypes = {
h... |
src/containers/LandingPage/AboutPidc/index.js | westoncolemanl/tabbr-web | import React from 'react'
import Body from './Body'
export default () => {
window.scrollTo(0, 0)
return (
<div>
<Body />
</div>
)
}
|
app/components/EarningsTableFooter/index.js | projectcashmere/web-server | /**
*
* EarningsTableFooter
*
*/
import React from 'react';
import styled from 'styled-components';
import { FormattedMessage } from 'react-intl';
import messages from './messages';
const Table = styled.table`
background-color: grey;
color: white;
height: 40px;
margin: 5px;
margin-bottom: 20px;
width: 100%;
... |
packages/react/src/components/ErrorBoundary/ErrorBoundary.js | carbon-design-system/carbon-components | /**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-types';
import { ErrorBoundaryContext } from './ErrorBoundaryContext';
/**
* React i... |
app/jsx/external_apps/components/AppDetails.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... |
src/icons/index.stories.js | resmio/mantecao | import React from 'react'
import { storiesOf } from '@storybook/react'
import AddIcon from './AddIcon'
import ArrivedIcon from './ArrivedIcon'
import ArrowIcon from './ArrowIcon'
import BlankIcon from './BlankIcon'
import BookIcon from './BookIcon'
import BookingIcon from './BookingIcon'
import CalendarIcon from './Cal... |
src/components/shell/Shell.js | ipfs/webui | import React from 'react'
import classNames from 'classnames'
const Shell = ({
title = 'Shell',
children,
className
}) => {
return (
<div className={classNames('br1 overflow-hidden', className)}>
<div className='f7 mb0 sans-serif ttu tracked charcoal pv1 pl2 bg-black-20'>{ title }</div>
<div cl... |
examples/with-clerk/pages/index.js | zeit/next.js | import React from 'react'
import Head from 'next/head'
import Link from 'next/link'
import styles from '../styles/Home.module.css'
import { SignedIn, SignedOut } from '@clerk/nextjs'
const ClerkFeatures = () => (
<Link href="/user">
<a className={styles.cardContent}>
<img src="/icons/layout.svg" />
<... |
src/components/GlobalNavigation/NavBar/BackButton.android.js | aaron-edwards/Spirit-Guide | import React from 'react';
import { I18nManager, Image, StyleSheet, TouchableNativeFeedback, View } from 'react-native'
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
export default NavigationHeaderBackButton = (props: Props) => {
return (
<TouchableNativeFeedback
style={[styles.butt... |
modules/RouteUtils.js | calebmichaelsanchez/react-router | import React from 'react'
import warning from 'warning'
function isValidChild(object) {
return object == null || React.isValidElement(object)
}
export function isReactChildren(object) {
return isValidChild(object) || (Array.isArray(object) && object.every(isValidChild))
}
function checkPropTypes(componentName, p... |
src/js/OrderSentPage.js | merlox/dapp-transactions | import React from 'react'
import Header from './Header'
import {Link} from 'react-router-dom'
import './../stylus/index.styl'
import './../stylus/ordersentpage.styl'
import LINKS from './utils.js'
class OrderSentPage extends React.Component {
constructor(props) {
super(props)
}
render(){
return (... |
src/routes/Home/components/TopicListing/TopicListing.js | spbsamuel/digg-clone | import React from 'react'
import classes from './TopicListing.scss'
import TopicCard from '../TopicCard'
import Shuffle from 'react-shuffle'
export const TopicListing = ({topics, visibleTopics, upVoteTopic, downVoteTopic}) => {
return (
<div>
<Shuffle>
{visibleTopics.map(id =>
<div key={i... |
docs/src/examples/elements/Rail/Types/RailExampleDividing.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Grid, Image, Rail, Segment } from 'semantic-ui-react'
const RailExampleDividing = () => (
<Grid centered columns={3}>
<Grid.Column>
<Segment>
<Image src='/images/wireframe/paragraph.png' />
<Rail dividing position='left'>
<Segment>Left Rail Cont... |
examples/src/components/States.js | pedroseac/react-select | import React from 'react';
import Select from 'react-select';
const STATES = require('../data/states');
var StatesField = React.createClass({
displayName: 'StatesField',
propTypes: {
label: React.PropTypes.string,
searchable: React.PropTypes.bool,
},
getDefaultProps () {
return {
label: 'States:',
sea... |
modules/__tests__/createRoutesFromReactChildren-test.js | cold-brew-coding/react-router | /*eslint-env mocha */
/*eslint react/prop-types: 0*/
import expect from 'expect'
import React from 'react'
import { createRoutesFromReactChildren } from '../RouteUtils'
import IndexRoute from '../IndexRoute'
import Route from '../Route'
describe('createRoutesFromReactChildren', function () {
const Parent = React.cr... |
examples/windows/components/navPane.js | gabrielbull/react-desktop | import React, { Component } from 'react';
import { NavPane, NavPaneItem, Text } from 'react-desktop/windows';
export default class extends Component {
static defaultProps = {
color: '#cc7f29',
theme: 'light'
};
constructor() {
super();
this.state = {
selected: 'Item 1'
}
}
render(... |
spec/javascripts/jsx/grading/AssignmentPostingPolicyTray/AssignmentPostingPolicyTraySpec.js | djbender/canvas-lms | /*
* Copyright (C) 2019 - 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/index.js | zumbara/zumbara-web | // @flow
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { ConnectedRouter } from 'react-router-redux';
import createHistory from 'history/createBrowserHistory';
import { injectGlobal } from 'styled-components';
import 'normalize.css/normalize.css';
import ... |
src/Button.story.js | prometheusresearch/react-ui | /**
* @flow
*/
import React from 'react';
import {storiesOf} from '@kadira/storybook';
import Button from './Button';
import I18N from './I18N';
export function createButtonStories(Button: any) {
storiesOf(`<${Button.displayName || Button.name} />`, module)
.add('Default state', () => <Button>Click me</Button... |
src/svg-icons/navigation/arrow-downward.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationArrowDownward = (props) => (
<SvgIcon {...props}>
<path d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"/>
</SvgIcon>
);
NavigationArrowDownward = pure(NavigationArrowDownward);
Na... |
src/page/TimePickerPage.js | jerryshew/react-uikits | import React, { Component } from 'react';
import {CN, TitleBlock} from '../util/tools';
import {TimePicker} from '../component';
import CodeView from './CodeView';
export class TimePickerPage extends Component {
constructor(props) {
super(props);
this.state = {
value: 4981
}
... |
examples/custom-grid/src/index.js | Hellenic/react-hexgrid | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
app/addons/documents/mango/components/ExecutionStats.js | popojargo/couchdb-fauxton | // 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, software
// distributed un... |
web/assets/js/detailpage-need-to-integrate/CarDetail.js | xuqiantong/NY_Auto | /**
* Created by jeanliu on 4/14/17.
*/
import React, { Component } from 'react';
import './CarDetail2.css';
var Row = require('react-bootstrap/lib/Row');
var Col = require('react-bootstrap/lib/Col');
var Button = require('react-bootstrap/lib/Button');
// const PHOTOS = [
// {id: 0, imgpath: './static/bundles... |
app/components/Icon.js | nmorel/magic-counter | import React from 'react';
import {StyleSheet, Text} from 'react-native';
export const icons = {
new: convertFontCode('e05e'),
addPlayer: convertFontCode('e7f0'),
reset: convertFontCode('e042'),
menu: convertFontCode('e3c7'),
add: convertFontCode('e147'),
remove: convertFontCode('e15c'),
};
function conve... |
src/examples/react/src/editors/InputPet.js | nikospara/egkyron | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Pet from 'model/Pet';
import Vaccination from 'model/Vaccination';
import InputText from 'controls/InputText';
import InputGender from './InputGender';
import InputArray from './InputArray';
import InputVaccination from './InputVaccina... |
src/components/google_map.js | CaseyKelly/react-redux-weather-charts | import React, { Component } from 'react';
class GoogleMap extends Component {
componentDidMount() {
new google.maps.Map(this.refs.map, {
zoom: 12,
center: {
lat: this.props.lat,
lng: this.props.lon
}
});
}
render() {
return <div ref="map" />;
}
}
export default G... |
example/src/client.js | tizmagik/react-head | import React from 'react';
import { hydrate } from 'react-dom';
import { HeadProvider } from 'react-head';
import App from '../App';
hydrate(
<HeadProvider>
<App />
</HeadProvider>,
document.getElementById('root')
);
if (module.hot) {
module.hot.accept();
}
|
packages/react-devtools-shared/src/devtools/views/ReactLogo.js | mjackson/react | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import React from 'react';
import styles from './ReactLogo.css';
type Props = {|
className?: string,
|};
export d... |
src/components/Datepicker/index.js | wiki1024/sam-bs | import React from 'react'
import moment from 'moment'
import _ from 'lodash'
import Calendar from './Calendar'
import { Collapse } from 'react-bootstrap'
import { updateMonth, selectDate, toggleOpen } from '../../actions/datePickerAction'
import { debounce } from '../../util'
import Header from './header'
import Month ... |
examples/huge-apps/routes/Course/routes/Assignments/components/Sidebar.js | cojennin/react-router | import React from 'react';
import { Link } from 'react-router';
class Sidebar extends React.Component {
render () {
var assignments = COURSES[this.props.params.courseId].assignments
return (
<div>
<h3>Sidebar Assignments</h3>
<ul>
{assignments.map(assignment => (
... |
frontend/component/TopicDetail.js | wangmuming/node-forum | import React from 'react';
import 'highlight.js/styles/github-gist.css';
import {getTopicDetail, addComment, deleteComment, deleteTopic} from '../lib/client';
import {renderMarkdown} from '../lib/utils';
import { Router, Route, Link, browserHistory } from 'react-router';
import CommentEditor from './CommentEditor';
imp... |
web/client/configdev/src/config/ScreensaverMenu.js | project-owner/Peppy | /* Copyright 2019 Peppy Player peppy.player@gmail.com
This file is part of Peppy Player.
Peppy Player is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any la... |
src/views/Components/Buttons/Buttons.js | corbinpage/react-play | import React, { Component } from 'react';
class Buttons extends Component {
render() {
return (
<div className="animated fadeIn">
<div className="row">
<div className="col-md-6">
<div className="card">
<div className="card-header">
<strong>Options... |
js/source/Customizer.js | peano-ito/giuseppe | /*********************************************************************/
/* Customizer */
/* (c) 2017 Peano System Inc. */
/*********************************************************************/
'use strict';
import React from ... |
client/node_modules/uu5g03/doc/main/client/src/components/component-loader.js | UnicornCollege/ucl.itkpd.configurator | import React from 'react';
import UU5 from 'uu5';
import './component-loader.css';
export default React.createClass({
//@@viewOn:mixins
mixins: [
UU5.Common.BaseMixin,
UU5.Common.LoadMixin,
UU5.Layout.ContainerMixin
],
//@@viewOff:mixins
//@@viewOn:statics
statics: {
tagName: 'UU5.Doc.Co... |
packages/mineral-ui-icons/src/IconPlayCircleOutline.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 IconPlayCircleOutline(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...... |
packages/wix-style-react/src/FontUpgrade/test/FontUpgrade.spec.js | wix/wix-style-react | import React from 'react';
import { createRendererWithUniDriver, cleanup } from '../../../test/utils/unit';
import FontUpgrade from '../FontUpgrade';
import { FontUpgradePrivateDriverFactory } from './FontUpgrade.private.uni.driver';
import { FontUpgradeContext } from '../context';
describe('FontUpgrade', () => {
c... |
from-zero-to-vertical/src/components/atoms/PApp/PApp2.js | Muzietto/react-playground | import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import TextField from '@material-ui/core/TextField';
// cfr. https://codeburst.io/my-journey-to-make-styling-with-material-ui-right-6a44f7c68113
const useStyles = makeStyles(() => ({
outlinedRoot: { // if the style the root, the field... |
src/components/Switch/index.js | HenriBeck/materialize-react | // @flow strict-local
import React from 'react';
import PropTypes from 'prop-types';
import getNotDeclaredProps from 'react-get-not-declared-props';
import Ripple from '../Ripple';
import {
ENTER,
SPACE_BAR,
} from '../../utils/constants';
import Sheet, { type Data } from './Sheet';
type Props = {
toggled: bo... |
src/helpers/__tests__/connectData-test.js | mattijsbliek/record-client | import { expect } from 'chai';
import React from 'react';
import { div } from 'react-dom';
import connectData from '../connectData';
describe('connectData', () => {
let fetchData;
let fetchDataDeferred;
let WrappedComponent;
let DataComponent;
beforeEach(() => {
fetchData = 'fetchDataFunction';
fetc... |
app/jsx/shared/components/CreateOrUpdateUserModal.js | djbender/canvas-lms | /*
* Copyright (C) 2017 - 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/components/vidoe_detail.js | dulik06/ReduxStarter | import React from 'react';
const VideoDetail = (props) => {
const video = props.video;
if(!video) {
return <div>Loading...</div>;
}
const videoId = video.id.videoId;
const url = `https://www.youtube.com/embed/${videoId}`;
return(
<div className='video-detail col-md-8'>
<div className='embed-... |
src/PlayerView.js | hannes-hochreiner/more-podcasts | import React, { Component } from 'react';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import PlayerPresenter from './PlayerPresenter';
import Toolbar from '@material-ui/core/Toolbar';
import AppBar from '@material-ui/core/AppBar';
import Menu from '@material-ui/core/Men... |
packages/ringcentral-widgets/components/CircleButton/index.js | u9520107/ringcentral-js-widget | import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import styles from './styles.scss';
/**
* Circle Button with SVG
*/
function CircleButton(props) {
let icon;
if (props.icon) {
const Icon = props.icon;
icon = (
<Icon
className={classnames(st... |
src/svg-icons/image/add-a-photo.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageAddAPhoto = (props) => (
<SvgIcon {...props}>
<path d="M3 4V1h2v3h3v2H5v3H3V6H0V4h3zm3 6V7h3V4h7l1.83 2H21c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V10h3zm7 9c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-... |
test/helpers/shallowRenderHelper.js | Solshal/solshal-chrome-extension | /**
* 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'... |
test/browser/time-picker/time-picker-spec.js | rolandpoulter/material-ui | import React from 'react';
import TextField from 'text-field';
import TimePicker from 'time-picker/time-picker';
import DateTime from 'utils/date-time';
import TestUtils from 'react-addons-test-utils';
describe('TimePicker', () => {
it('has to give value prop precedence over defaultTime', () => {
const initialTi... |
es/Switch/Switch.js | uplevel-technology/material-ui-next | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _objectWithoutProperties(obj, keys) { var target = {... |
app/javascript/mastodon/features/list_editor/components/account.js | MitarashiDango/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { makeGetAccount } from '../../../selectors';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Avatar from '../../../compone... |
actor-sdk/sdk-web/src/components/sidebar/HeaderSection.react.js | y0ke/actor-platform | /*
* Copyright (C) 2015-2016 Actor LLC. <https://actor.im>
*/
import React, { Component } from 'react';
import { Container } from 'flux/utils';
import classnames from 'classnames';
import ActorClient from '../../utils/ActorClient';
import { escapeWithEmoji } from '../../utils/EmojiUtils'
import confirm from '../../u... |
test/PanelSpec.js | yickli/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Panel from '../src/Panel';
import Table from '../src/Table';
describe('Panel', function () {
it('Should have class and body', function () {
let instance = ReactTestUtils.renderIntoDocument(
<Panel>Panel content</Panel>... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.