path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/App.js | jckfa/img.silly.graphics | import React from 'react'
import Gutters from './components/utils/Gutters'
import Header from './components/header/Header'
import Main from './components/main/Main'
import Footer from './components/footer/Footer'
const App = () => (
<div>
<Gutters>
<Header />
<Main />
<Footer />
</Gutters>
... |
src/pages/contact/Contact.js | hinzed1127/fayraysite | import React from 'react';
import './contact.css';
export default function Contact() {
return (
<div className='contact-container'>
<h1>Booking/Press/General Inquiries</h1>
<h3>fayrayband@gmail.com</h3>
</div>
);
} |
src/main/js/my-app/src/components/InsertPaymentRegistersModal.js | myapos/ClientManagerSpringBoot | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import * as actions from '../actions/';
class InsertPaymentRegistersModal extends Component {
static propTypes = {
isLoading: PropTypes.bool,
initRegistrations: PropTypes.array,
initDataSt... |
test/browser/lists/list-item-spec.js | pradel/material-ui | import React from 'react';
import ListItem from 'List/ListItem';
import Checkbox from 'Checkbox';
import injectTheme from '../fixtures/inject-theme';
import TestUtils from 'react-addons-test-utils';
describe('ListItem', () => {
let ThemedListItem;
beforeEach(() => {
ThemedListItem = injectTheme(ListItem);
}... |
src/blocks/embeds/youtube.js | brijeshb42/kattappa | import React from 'react';
import BaseEmbed from './base';
class Youtube extends BaseEmbed {
constructor(props) {
super(props);
this.start = null;
this.end = null;
this.onChange = this.onChange.bind(this);
this.renderInput = this.renderInput.bind(this);
}
onChange (e) {
if (e.preventDe... |
example/src/Layout.js | istarkov/pbl | import React from 'react';
import { themr } from 'react-css-themr';
import compose from 'recompose/compose';
import { Link } from 'react-router';
import MatchWithProps from './enhancers/MatchWithProps';
import AsyncMatch from './enhancers/AsyncMatch';
import Container from './Container';
import Content from './Content'... |
src/containers/IntroContainer.js | nikolay-radkov/EBudgie | import React from 'react';
import { Component } from 'react';
import {
AsyncStorage,
View,
Text,
Image,
StyleSheet
} from 'react-native';
import AppIntro from 'react-native-app-intro';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import i18n from 'react-native-i18n';
impo... |
src/docs/ComponentPage.js | nreoch25/react-package-dev | import React from 'react';
import PropTypes from 'prop-types';
import Example from './Example';
import Props from './Props';
const ComponentPage = ({component}) => {
const {name, description, props, examples} = component;
return (
<div className="componentpage">
<h2>{name}</h2>
<p>{description}</p... |
docs/build.js | 15lyfromsaturn/react-materialize | import fsp from 'fs-promise';
import path from 'path';
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import {match, RoutingContext} from 'react-router';
import Root from './src/Root';
import routes from './src/Routes';
import metadata from './generate-metadata';
const docsBuilt = path.joi... |
app/background_context.js | minifast/broadcast | import React from 'react';
import Cursor from './cursor';
import Atom from './atom';
const BackgroundContext = React.createClass({
getDefaultProps: function() {
return {
source: `context.${Date.now()}`
};
},
getInitialState: function() {
return chrome.extension.getBackgroundPage().background.g... |
docs/src/app/components/pages/components/BottomNavigation/Page.js | pancho111203/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import bottomNavigationReadmeText from './README';
import BottomNavigationExampl... |
src/routes/error/index.js | FamilyPlanerTeam/family-planner | /**
* 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 ErrorPage from './Err... |
demo/menu/menu.js | Graf009/react-mdl | import React from 'react';
import ReactDOM from 'react-dom';
import IconButton from '../../src/IconButton';
import Menu, { MenuItem } from '../../src/Menu';
class Demo extends React.Component {
render() {
return (
<div style={{width: '300px', margin: 'auto', position: 'relative'}}>
... |
components/source-code.js | skidding/illustrated-algorithms | import PropTypes from 'prop-types';
import React from 'react';
import PureLayoutComponent from '../utils/pure-layout-component';
const { min, max } = Math;
const renderLineNum = num => (
<span className="line-num">
{num < 10 && ' '}{`${num}. `}
<style jsx>{`
.line-num {
opacity: 0.3;
}
... |
artificial-intelligence/lab1/src/App.js | Drapegnik/bsu | import React, { Component } from 'react';
import WelcomePage from 'components/WelcomePage';
import GamePage from 'components/GamePage';
import KnowledgeBase from 'components/KnowledgeBase';
import Footer from 'components/Footer';
import 'bulma/css/bulma.css';
const pages = {
welcome: <WelcomePage />,
game: <Game... |
src/Pagination.js | AlexKVal/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import PaginationButton from './PaginationButton';
import CustomPropTypes from './utils/CustomPropTypes';
import SafeAnchor from './SafeAnchor';
const Pagination = React.createClass({
mixins: [BootstrapMixi... |
examples/counter/index.js | AprilArcus/redux | import React from 'react';
import App from './containers/App';
React.render(
<App />,
document.getElementById('root')
);
|
tests/components/CalculatorUI.spec.js | Vargentum/react-redux-apps | import React from 'react'
import CalculatorUI from 'components/CalculatorUI/CalculatorUI'
describe('(Component) CalculatorUI', () => {
it('should exist', () => {
})
})
|
test/slider.js | n7best/react-weui | /*global before*/
import React from 'react';
import ReactDOM from 'react-dom';
import { mount } from 'enzyme';
import assert from 'assert';
import WeUI from '../src/index';
var jsdom = require('jsdom');
const { Slider } = WeUI;
describe('<Slider></Slider>', ()=>{
before(() => {
global.document = jsdom.jsdom('... |
src/app/views/include/header.js | grvsooryen/mern-stack | import React from 'react';
import { Navbar, NavDropdown, MenuItem, Nav, NavItem } from 'react-bootstrap';
import { Link } from 'react-router-dom';
import Navmenu from "../../components/navmenu";
import RouteNavItem from "../../components/route-nav-item";
export default class Header extends React.Component {
render... |
examples/huge-apps/routes/Profile/components/Profile.js | leeric92/react-router | import React from 'react';
class Profile extends React.Component {
render () {
return (
<div>
<h2>Profile</h2>
</div>
);
}
}
export default Profile;
|
module/form.js | ytase/react-multistep-form | import React from 'react'
import { Step } from './step'
const getStepsFromChildren = children => {
return React.Children.map(children, child => child.type === Step ? child.props.name || null : null).filter(value => value !== null)
}
class MultiStepForm extends React.Component {
constructor(props) {
super(props)... |
ngiiedu-client/src/components/admin/school/sync/common/SampleCheckList.js | jinifor/branchtest | import React, { Component } from 'react';
import {
Table,
TableBody,
TableHeader,
TableHeaderColumn,
TableRow,
TableRowColumn,
} from 'material-ui/Table';
//redux
//store에 연결
import { connect } from 'react-redux';
//action 객체사용
import * as actions from '../../../../../actions/in... |
src/icons/PhoneLockedIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class PhoneLockedIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M40 31c-2.49 0-4.9-.4-7.14-1.14-.69-.22-1.48-.06-2.03.49l-4.4 4.41c-5.67-2.88-10.29-7.51-13.18-13.17l4... |
src/components/BComponents/BImagePost/BImagePost.js | bryanlelliott/bryan_site_react | import './BImagePost.less';
import React from 'react'; // eslint-disable-line no-unused-vars
class BImagePost {
render() {
return (
<div className='b-img-post'>
<div className='text-img-content'>
<div className='img-post-img'><img src="images/background-example.jpg"/></div>
<di... |
src/containers/Filter.js | irla/react-cv | // @flow
import React, { Component } from 'react';
import { Button, Container, Input, InputGroup, InputGroupButton, Form, Collapse, Navbar, NavbarToggler, Nav, NavItem, NavLink } from 'reactstrap';
import FontAwesome from 'react-fontawesome';
import '../styles/filter.scss';
class Filter extends Component {
timeoutId... |
src/Shepherd.js | famousgarkin/shepherd | import React from 'react'
import ItemFactory from './ItemFactory'
export default class Shepherd extends React.Component {
constructor(props) {
super(props)
this.state = {
itemFactory: new ItemFactory(props.config.items),
title: props.config.title,
navigation: [],
url: null,
}
this.navigate = thi... |
fixtures/kitchensink/src/features/webpack/ImageInclusion.js | altiore/webpack-react | /**
* 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';
import tiniestCat from './assets/tiniest-cat.jpg';
export default () => (
<img id="feature-image-inclusion... |
components/Internship/InternshipTimeline.js | uclaacm/website | import React from 'react';
import styles from '../../styles/components/Internship/InternshipTimeline.module.scss';
function InternshipTimeline(props) {
const { items } = props;
const totalItems = items.length;
const numberOfActiveItems = items.filter(item => item.active).length;
const progressBarWidth = totalItem... |
packages/react-router-native/examples/RouteConfig.js | justjavac/react-router-CN | import React from 'react'
import { StyleSheet, Text, AppRegistry, View } from 'react-native'
import { NativeRouter, Route, Link } from 'react-router-native'
// Some folks find value in a centralized route config.
// A route config is just data. React is great at mapping
// data into components, and <Route> is a compon... |
client/src/app/components/mediaSigninButtons.js | FrontSmith/FSFramework | import _ from 'lodash';
import React from 'react';
import {Link} from 'react-router';
import authActions from 'actions/auth';
export default React.createClass({
getInitialState() {
return {
disabledButtons: {
facebook: false,
google: true,
github... |
app/js/components/Container.js | yukiB/Splarm | "use strict";
import React from 'react'
import Match from './Match'
const electron = window.require('electron');
const {ipcRenderer} = electron;
export default class Container extends React.Component {
constructor(props) {
super(props)
this.state = {
loading: false,
error: false,
data: {}
... |
server/renderer/renderer-controller.js | sharvit/my-blog-react | import React from 'react';
import reactCookie from 'react-cookie';
import { Provider } from 'react-redux';
import { match, RouterContext, createMemoryHistory } from 'react-router';
import { renderToString } from 'react-dom/server';
import { configure } from 'redux-auth';
import routes from '../../client/routes';
impor... |
client/test/components/NotFound.spec.js | enodi/PostIt | import React from 'react';
import { shallow } from 'enzyme';
import NotFound from '../../src/components/Common/NotFound.jsx';
describe('Not Found Component', () => {
it('should render NotFound Component', () => {
const wrapper = shallow(<NotFound />);
expect(wrapper).toMatchSnapshot();
});
});
|
docs/lib/UI/Layout.js | video-react/video-react | import React from 'react';
import Helmet from 'react-helmet';
import Footer from './Footer';
import Nav from './Nav';
export default props => {
return (
<div className="wrapper">
<Helmet
titleTemplate="Video-React - %s"
title="React Video Component"
defaultTitle="React Video Compone... |
app/static/src/diagnostic/AddEquipmentForm.js | vsilent/Vision | import React from 'react';
import FormControl from 'react-bootstrap/lib/FormControl';
import FormGroup from 'react-bootstrap/lib/FormGroup';
import Button from 'react-bootstrap/lib/Button';
import Panel from 'react-bootstrap/lib/Panel';
import Modal from 'react-bootstrap/lib/Modal';
import HelpBlock from 'react-bootstr... |
src/interface/Alert/index.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
const Alert = props => {
const { kind, children, className, ...others } = props;
return (
<div className={`alert alert-${kind} ${className || ''}`} {...others}>
{children}
</div>
);
};
Alert.propTypes = {
kind: PropTypes.oneOf(['dan... |
src/js/components/App.react.js | mirandagithub/reactflux_try |
import React from 'react';
var AppActions = require('../actions/AppActions.react.js');
var AppStore = require('../stores/AppStore.react.js');
var WaitForStore = require('../stores/WaitForStore.react.js');
var GreetingBtn = require('../components/GreetingBtn.react.js');
function getMessage(){
return {
... |
app/components/BigButton/index.js | omeryagmurlu/algoriv | import React from 'react';
import PropTypes from 'prop-types';
import FlatButton from 'material-ui/FlatButton';
import { getEvents, themedStyle } from 'app/utils';
import style from './style.scss';
import { margin } from './variables.json';
const css = themedStyle(style);
const BigButton = props => (
<div
classNam... |
src/svg-icons/av/remove-from-queue.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvRemoveFromQueue = (props) => (
<SvgIcon {...props}>
<path d="M21 3H3c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h5v2h8v-2h5c1.1 0 1.99-.9 1.99-2L23 5c0-1.11-.9-2-2-2zm0 14H3V5h18v12zm-5-7v2H8v-2h8z"/>
</SvgIcon>
);... |
src/components/TrendHeader/TrendHeader.js | Zoomdata/nhtsa-dashboard | import React from 'react';
const TrendHeader = () => {
return (
<div className="trend-header">
By <b>Model Year</b>
</div>
);
};
export default TrendHeader;
|
05、componentapi/src/main.js | mqy1023/react-with-es6 | import React from 'react';
import ReactDOM from 'react-dom';
//1、for setState()
//import App from './jsx/SetStateApp.jsx';
//ReactDOM.render(<App />, document.getElementById('app'))
//2、for ForceUpdate
//import App from './jsx/PropsApp.jsx';
//import App from './jsx/ForceUpdateApp.jsx';
//ReactDOM.render(<App />, doc... |
src/svg-icons/image/exposure-neg-2.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageExposureNeg2 = (props) => (
<SvgIcon {...props}>
<path d="M15.05 16.29l2.86-3.07c.38-.39.72-.79 1.04-1.18.32-.39.59-.78.82-1.17.23-.39.41-.78.54-1.17s.19-.79.19-1.18c0-.53-.09-1.02-.27-1.46-.18-.44-.44-.81... |
src/demos/components/DemoPage.js | moarwick/react-mt-svg-lines | import React from 'react';
// import { hot } from 'react-hot-loader';
import { version } from '../../../package.json';
import MtSvgLines from '../../index';
// import MtSvgLines from '../../../lib/' // NOTE: uncomment to test built lib
import SvgCheckmark from './SvgCheckmark';
import SvgSignature from './SvgSignatur... |
src/server.js | vivekhnz/today-in-destiny | import dotenv from 'dotenv';
if (process.env.NODE_ENV !== 'production') {
dotenv.config();
}
if (!process.env.BUNGIE_API_KEY) {
console.error("The 'BUNGIE_API_KEY' environment variable has not been set.");
process.exit(1);
}
import Express from 'express';
import React from 'react';
import ReactDOM from 're... |
test/todos/components/TodoList_spec.js | nnance/react-backbone-flux-example | import { expect } from 'chai';
import React from 'react';
import bro from 'jsdom-test-browser';
import TestUtils from 'react-addons-test-utils';
import Backbone from 'backbone';
import TodoList from '../../../src/todos/components/TodoList';
describe('TodoList component', function() {
let instance;
let filter = ne... |
src/svg-icons/hardware/tablet-android.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareTabletAndroid = (props) => (
<SvgIcon {...props}>
<path d="M18 0H6C4.34 0 3 1.34 3 3v18c0 1.66 1.34 3 3 3h12c1.66 0 3-1.34 3-3V3c0-1.66-1.34-3-3-3zm-4 22h-4v-1h4v1zm5.25-3H4.75V3h14.5v16z"/>
</SvgIcon... |
modules/IndexRoute.js | zipongo/react-router | import React from 'react'
import warning from 'warning'
import invariant from 'invariant'
import { createRouteFromReactElement } from './RouteUtils'
import { component, components, falsy } from './PropTypes'
const { func } = React.PropTypes
/**
* An <IndexRoute> is used to specify its parent's <Route indexRoute> in
... |
src/main/jsx/client/BuildPageActions.js | groupon/DotCi | import ReactDOM from 'react-dom';
import React from 'react';
import {build as fetchBuild, buildLog as fetchBuildLog,cancelBuild as cancelBuildApi} from './../api/Api.jsx';
import BuildPage from './../pages/BuildPage.jsx';
import Drawer from './../Drawer.jsx';
import page from 'page';
import {Build as AutoRefreshCompone... |
src/components/event_page/chat/chat_component.js | decaster3/hikester_redux | import React, { Component } from 'react';
import moment from 'moment';
import Message from './message';
import { Nav, NavItem } from 'react-bootstrap';
import axios from 'axios';
// import * as firebase from 'firebase';
// require("firebase/firestore");
const firebase = require("firebase")
require("firebase/firestore"... |
fields/types/geopoint/GeoPointField.js | Adam14Four/keystone | import Field from '../Field';
import React from 'react';
import { FormRow, FormField, FormInput } from 'elemental';
module.exports = Field.create({
displayName: 'GeopointField',
statics: {
type: 'Geopoint',
},
focusTargetRef: 'lat',
handleLat (event) {
const { value = [], path, onChange } = this.props;
c... |
packages/slate-html-serializer/benchmark/html-serializer/deserialize.js | ashutoshrishi/slate | /** @jsx h */
/* eslint-disable react/jsx-key */
import Html from '../..'
import React from 'react'
import { JSDOM } from 'jsdom' // eslint-disable-line import/no-extraneous-dependencies
const html = new Html({
parseHtml: JSDOM.fragment,
rules: [
{
serialize(obj, children) {
switch (obj.object) ... |
src/components/App/setViewport.js | skw/test-react-backbone | /*
* 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, { Component } from 'react';
import { canUseDOM } from 'react... |
docs/app/Examples/elements/Button/GroupVariations/ButtonExampleGroupColored.js | koenvg/Semantic-UI-React | import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleGroupColored = () => (
<Button.Group color='blue'>
<Button>One</Button>
<Button>Two</Button>
<Button>Three</Button>
</Button.Group>
)
export default ButtonExampleGroupColored
|
node_modules/react-router-dom/es/Link.js | raheelhassan1214/tanveerhospital | 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 = {... |
src/svg-icons/action/account-box.js | tan-jerene/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAccountBox = (props) => (
<SvgIcon {...props}>
<path d="M3 5v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2zm12 4c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zm-9 8c0-2 4-3... |
components/Footer/index.js | joaojusto/jose-gomes-landing-page | import React from 'react';
import './index.scss';
import TwitterLogo from './twitter.svg';
import FacebookLogo from './facebook.svg';
import MusicTalent from './musictalent.png';
const Footer = ({ translate }) => (
<section className="Footer" id="Contactar">
<div className="Footer-column">
<h2 className="... |
src/entypo/Battery.js | cox-auto-kc/react-entypo | import React from 'react';
import EntypoIcon from '../EntypoIcon';
const iconClass = 'entypo-svgicon entypo--Battery';
let EntypoBattery = (props) => (
<EntypoIcon propClass={iconClass} {...props}>
<path d="M15.408,10c0-2.766,1.277-4.32,2.277-4.32c0.363,0,1.315,0,1.315,0C18.332,4.621,17.779,4,15.342,4H5.3... |
src/components/common/svg-icons/editor/strikethrough-s.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorStrikethroughS = (props) => (
<SvgIcon {...props}>
<path d="M7.24 8.75c-.26-.48-.39-1.03-.39-1.67 0-.61.13-1.16.4-1.67.26-.5.63-.93 1.11-1.29.48-.35 1.05-.63 1.7-.83.66-.19 1.39-.29 2.18-.29.81 0 1.54.11 ... |
test/fixtures/spread/actual.js | layershifter/babel-plugin-transform-react-handled-props | import PropTypes from 'prop-types';
import React from 'react';
const someProps = {
active: PropTypes.boolean
};
function Example() {
return <div />;
}
Example.propTypes = {
...someProps,
children: PropTypes.node,
className: PropTypes.string
};
export default Example;
|
stories/components/noRef.js | wcastand/okami | import React from 'react'
import {Div} from 'glamorous'
import DailyCalendar from '../../src/components/daily'
import Navigation from '../../src/components/navigation'
import HoursLabels from '../../src/components/hoursLabels'
import {
Container,
HourLabel,
CalendarContainer,
Cell,
DayLabel,
Event,
Date... |
test/Checkbox.spec.js | react-materialize/react-materialize | import React from 'react';
// import { shallow, mount } from 'enzyme';
import Checkbox from '../src/Checkbox';
describe.skip('<Checkbox />', () => {
let wrapper;
test('renders', () => {
wrapper = shallow(<Checkbox value="red" label="red" />);
expect(wrapper).toMatchSnapshot();
});
test('renders disab... |
src/components/ReplOutputInteger.js | princejwesley/Mancy | import React from 'react';
import _ from 'lodash';
const mode = {
'bin' : 2,
'oct' : 8,
'dec' : 10,
'hex' : 16
};
export default class ReplOutputInteger extends React.Component {
constructor(props) {
super(props);
this.state = {
mode: 'dec',
type: 'signed',
collapse: 'true'
};
... |
client/pages/todoReact/todoListView.js | bishopZ/DavinciJS-project | var $ = require('jquery');
import React from 'react';
import ReactDOM from 'react-dom';
import Backbone from 'backbone';
import todoModel from 'pages/todoReact/todoModel';
import TodoItemView from 'pages/todoReact/todoView';
import dispatcher from 'pages/todoReact/todoDispatcher';
// Controller View
var TodoListView ... |
src/components/Feedback/Feedback.js | shawnrmoss/react-material-ui-starter | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 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, { Component } from 'react';
import s from '.... |
src/LinearProgress/LinearProgress.spec.js | ichiohta/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import LinearProgress from './LinearProgress';
import getMuiTheme from '../styles/getMuiTheme';
describe('<LinearProgress />', () => {
const muiTheme = getMuiTheme();
const shallowWithContext = (node) => ... |
docs/src/pages/system/basics/Variant.js | lgollut/material-ui | import React from 'react';
import styled, { ThemeProvider } from 'styled-components';
import NoSsr from '@material-ui/core/NoSsr';
import { style, typography } from '@material-ui/system';
const variant = style({
prop: 'variant',
cssProperty: false,
themeKey: 'typography',
});
// ⚠ Text is already defined in the... |
ballot-maker/src/Choice.js | OnVelocity/ov-ballot | /**
* Created by onvelocity on 4/8/17.
*/
import React from 'react'
import PropTypes from 'prop-types'
import './Choice.css'
const choice = ({text, removeChoice}) => {
return (
<li className="Choice">
<span>{text}</span>
<button onClick={() => removeChoice()}>✕</button>
</li>
);
};
choice.default... |
src/routes/privacy/index.js | machix/mm-inventory | /**
* 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... |
src/PuppetStage.js | mikekellyio/svg_playground | import React, { Component } from 'react';
import GrassBlade from './GrassBlade'
export default class PuppetStage extends Component {
render() {
var a = 1,b = 2,c = 3;
return (
<svg {...this.props}>
<GrassBlade a={a} b={b} c={c}/>
</svg>
);
}
}
|
src/svg-icons/content/inbox.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentInbox = (props) => (
<SvgIcon {...props}>
<path d="M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"/>
<... |
03-todoapp/src/index.js | HerX121/ReactJsExamples | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import './index.css';
ReactDOM.render(
<App />,
document.getElementById('root')
);
|
src/dashboard/routes/index.js | bulletcms/bullet-tracer | import React from 'react';
import {Router, Route, IndexRoute, Redirect, hashHistory} from 'react-router';
import {DashApp, Home, Pages, Config, User} from 'dashboard/containers';
import {Dne} from 'containers';
const routes = <Router history={hashHistory}>
<Route path="/" component={DashApp}>
<IndexRoute compo... |
src/svg-icons/image/image.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageImage = (props) => (
<SvgIcon {...props}>
<path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"/>
</SvgIcon>
);
ImageImage = p... |
app/components/bill/CompactBill.js | btg5679/portalReact | import React from 'react';
import {Link} from 'react-router';
export default class CompactBill extends React.Component {
render() {
const data = this.props.data;
const amount = `$${data.amount}`;
const link = this.calculateLink(data);
return (
<div className="bill compa... |
client/src/index.js | clembou/github-requests | // Polyfill needed by ie 11
import 'string.prototype.startswith';
// ie 10
import 'location-origin';
import 'font-awesome/css/font-awesome.css';
import 'react-bootstrap-table/dist/react-bootstrap-table-all.min.css';
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router } from '... |
src/svg-icons/av/loop.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvLoop = (props) => (
<SvgIcon {...props}>
<path d="M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.... |
src/Table/index.js | reactivers/react-material-design | /**
* Created by muratguney on 03/04/2017.
*/
import React from 'react';
import classnames from 'classnames'
import '../index.scss'
class Table extends React.Component{
render(){
return(
<table className="rmd-table" style={{width:"100%"}}>
{this.props.children}
</... |
examples/kitchensink/app-counter/test/components/Root.spec.js | Travix-International/frint | /* eslint-disable import/no-extraneous-dependencies, func-names, react/react-in-jsx-scope */
/* globals describe, document, it, sinon, expect */
import React from 'react';
import { createApp } from 'frint';
import {
getMountableComponent,
RegionService,
} from 'frint-react';
import { createStore } from 'frint-store... |
packages/material-ui-icons/src/LibraryBooks.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9H9V9h10v2zm-4 4H9v-2h6v2zm4-8H9V5h10v2z" /></g>
, 'LibraryBooks');
|
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/State.js | AgentME/flow | // @flow
import React from 'react';
class MyComponent extends React.Component {
props: Props;
state: State = {};
defaultProps: T;
static props: T;
static state: T;
a: T;
b = 5;
c: T = 5;
method() {}
}
const expression = () =>
class extends React.Component {
props: Props;
state: State = {... |
components/Animate/Roll.js | rdjpalmer/bloom | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { spring, TransitionMotion } from 'react-motion';
const DEFAULT_SPRINT_CONFIG = { stiffness: 250, damping: 25 };
export default class Roll extends Component {
static propTypes = {
children: PropTypes.any,
width: PropTypes.s... |
src/routes/login/index.js | rowinf/robertirwin.me-v2 | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 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 Login from './Login';
c... |
app/javascript/mastodon/features/compose/index.js | sylph-sin-tyaku/mastodon | import React from 'react';
import ComposeFormContainer from './containers/compose_form_container';
import NavigationContainer from './containers/navigation_container';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
import { mountCom... |
stories/TimeGraph.js | jrfferreira/react-cubedb | import React from 'react' // eslint-disable-line no-unused-vars
import * as d3 from 'd3'
import { TimeGraph } from '../src'
import { action } from '@storybook/addon-actions'
const mock = require('./_mock.json')
const display = d3.timeFormat('%a %Y-%m-%d %H:00')
const formatter = d3.timeFormat('%Y-%m-%d %H')
export ... |
web/src/js/__tests__/components/EventLogSpec.js | StevenVanAcker/mitmproxy | jest.mock('../../components/EventLog/EventList')
import React from 'react'
import renderer from 'react-test-renderer'
import TestUtils from 'react-dom/test-utils'
import EventLog, { PureEventLog } from '../../components/EventLog'
import { Provider } from 'react-redux'
import { TStore } from '../ducks/tutils'
window.a... |
client/modules/SharedComponents/VIP.js | tranphong001/BIGVN | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import styles from '../../main.css';
import grid from '../../grid.css';
import { getServerTime } from '../App/AppReducer';
import numeral from 'numeral';
import cuid from 'cuid';
class Home extends Comp... |
app/components/settings/Avatar.js | Atamas1llya/Flerse | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Button } from 'react-bootstrap';
import { updateProfile, changeAvatar, getProfile } from '../../actions/user/profile';
class Avatar extends Component {
constructor() {
super();
this.state = {};
}
loadImage() {
... |
src/svg-icons/maps/directions-walk.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsDirectionsWalk = (props) => (
<SvgIcon {...props}>
<path d="M13.5 5.5c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zM9.8 8.9L7 23h2.1l1.8-8 2.1 2v6h2v-7.5l-2.1-2 .6-3C14.8 12 16.8 13 19 13v-2c-1.9 0-3.5-1-4.3-... |
pages/index/components/layout.js | hschlichter/react-redux-pages-demo | import React, { Component } from 'react';
import { connect } from 'react-redux';
import Snip from './snip';
export default class Layout extends Component {
render() {
return (
<div>
<header className="c-box c-box--dark">
<a className="c-box--dark" href="/"><strong>React Redux Pages Demo</strong></a>
... |
app/javascript/mastodon/features/ui/components/block_modal.js | tootsuite/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { injectIntl, FormattedMessage } from 'react-intl';
import { makeGetAccount } from '../../../selectors';
import Button from '../../../components/button';
import { closeModal } from '../../../actions/modal';
impo... |
app/jsx/conditional_release_stats/components/student-ranges-view.js | djbender/canvas-lms | /*
* Copyright (C) 2016 - 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... |
site/src/components/BannerRow.js | appbaseio/reactivesearch | import React from 'react';
import { BannerRow, H2, Button } from '@appbaseio/designkit';
import PropTypes from 'prop-types';
import { css } from 'react-emotion';
import { SecondaryLink } from '../styles';
const style = css`
p {
color: #ffffff;
font-weight: 300;
}
`;
const button = {
fontSize: '14px',
lineHeigh... |
docs/src/pages/component-demos/buttons/ButtonBases.js | dsslimshaddy/material-ui | // @flow weak
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
import ButtonBase from 'material-ui/ButtonBase';
import Typography from 'material-ui/Typography';
import breakfastImage from 'docs/src/assets/images/grid-list/breakfast.jpg';
import burgersImag... |
src/viewfinder.js | postmates/viewfinder | import React from 'react';
import ReactDOM from 'react-dom';
import DropZone from './views/drop-zone.js';
import EventTravel from './lib/event-travel.js';
import ImageHandler from './lib/image-handler.js';
import velocity from 'velocity-animate';
class Viewfinder extends React.Component {
static defaultProps = {
... |
demo-react/src/App.js | devonhackley/reacttt | import React, { Component } from 'react';
import './assets/css/base.min.css';
//components
import Header from './components/header/header';
import Home from './components/pages/home/homepage';
class App extends Component {
render() {
return (
<div className="App">
<Header />
<Home />
... |
scripts/MainView.js | sonicsmith/InformedNutrition | // This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
import React from 'react';
import ReactDOM from 'react-dom';
import MainView from '../views/MainView.jsx';
window.onload = () => {
ReactDOM.rend... |
docs/app/Examples/elements/Header/Content/index.js | aabustamante/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const HeaderContentExamples = () => (
<ExampleSection title='Content'>
<ComponentExample
title='Image'
description='A... |
packages/cp-frontend/test/unit/components/manifest/manifest.js | yldio/copilot | /**
* @jest-environment jsdom
*/
import React from 'react';
import ShallowRenderer from 'react-test-renderer/shallow';
import 'jest-styled-components';
import { Store } from '../../mocks';
import { reduxForm } from 'redux-form';
import { Manifest } from '@components/manifest';
const ManifestTestForm = reduxForm({ ... |
src/components/DataTable/stories/with-boolean-column.js | joshblack/carbon-components-react | /**
* 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 Checkbox from '../../Checkbox';
import DataTable, {
Table,
TableBody,
TableCell,
TableContainer,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.