path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
docs/components/home/HomeFeature.js | casesandberg/react-color | 'use strict' /* eslint import/no-unresolved: 0 */
import React from 'react'
import reactCSS from 'reactcss'
import { ChromePicker, CompactPicker, MaterialPicker, PhotoshopPicker,
SketchPicker, SliderPicker, SwatchesPicker, BlockPicker,
GithubPicker, TwitterPicker, HuePicker, AlphaPicker, CirclePicke... |
stories/Button/index.js | nirhart/wix-style-react | import React from 'react';
import {storiesOf} from '@kadira/storybook';
import Markdown from '../utils/Components/Markdown';
import CodeExample from '../utils/Components/CodeExample';
import Readme from '../../src/Button/README.md';
import ExampleControlled from './ExampleControlled';
import ExampleControlledRaw from ... |
src/utils/createRenderTextField.js | karmapa17/garchen-panel | import React from 'react';
import TextField from 'material-ui/TextField';
export default function createRenderTextField(f) {
return function renderTextField({input, label, meta: {touched, error}, ...custom}) {
let errorText = touched && error;
// handle i18n
if (touched && error && ('string' !== typeof... |
Example/blog/src/pages/404.js | EvKylin/Kylin | import React from 'react'
const NotFoundPage = () => (
<div>
<h1>NOT FOUND</h1>
<p>You just hit a route that doesn't exist... the sadness.</p>
</div>
)
export default NotFoundPage
|
src/components/App/__tests__/App-test.js | henryhuang/appshowpub | jest.unmock('../App');
import App from '../App';
import React from 'react';
import { shallow } from 'enzyme';
describe('App', () => {
it('renders children correctly', () => {
const wrapper = shallow(
<App context={{ insertCss: () => {} }}>
<div className="child" />
</App>
);
expect(w... |
src/svg-icons/maps/add-location.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsAddLocation = (props) => (
<SvgIcon {...props}>
<path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm4 8h-3v3h-2v-3H8V8h3V5h2v3h3v2z"/>
</SvgIcon>
);
MapsAddLocation = pure(Map... |
tools/template/list/root/Root.hot.js | SteamerTeam/steamer-react | import { AppContainer } from 'react-hot-loader';
import React from 'react';
import { render } from 'react-dom';
import App from './Root.dev';
const rootEl = document.getElementById('pages');
render(
<AppContainer>
<App />
</AppContainer>,
rootEl
);
if (module.hot) {
module.hot.accept('./Root.dev', () => ... |
examples/react-redux/src/components/ui/FormLabel.js | rangle/redux-segment | import React from 'react';
const FormLabel = ({ children, style = {} }) => {
return (
<label style={{ ...styles.base, ...style }}>
{ children }
</label>
);
};
const styles = {
base: {},
};
export default FormLabel;
|
App.js | lautapercuspain/jest-presentation | import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
<Text>Changes you make will automatically reload... |
src/components/FoodList.js | chrnobyl/react-fridge-frontend | import React from 'react'
import { Link } from 'react-router-dom'
import '../index.css'
export default function FoodList(props){
return (
<div className="container-fluid">
<div className="foodlist">
<div className="btn-group">
<div className="row">
<h1>Foods:</h1>
{p... |
assets/js/pages/App.js | chocoelho/twitter-activities-monitor | import React from 'react';
import ReactDOM from 'react-dom';
import TweetTimelineContainer from '../containers/TweetTimelineContainer'
export default class App extends React.Component {
constructor(props) {
super(props);
this.twitterApiUrl = '/timeline/';
}
render() {
const twitterApiUrl = this.twit... |
docs/src/app/components/pages/components/Table/Page.js | ichiohta/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 tableReadmeText from './README';
import TableExampleSimple from './Exampl... |
app/src/routes/ask/components/answers/answers.spec.js | sproogen/itsgoingto.be | import React from 'react'
import { render } from '@testing-library/react'
import Answers from './answers'
const defaultProps = {
answers: [],
onAnswerChange: jest.fn(),
onRemoveAnswer: jest.fn()
}
describe('(Route) Ask', () => {
describe('(Component) Answers', () => {
describe('(Render)', () => {
de... |
client/verification-portal/components/service-fields.js | HelpAssistHer/help-assist-her | import React from 'react'
import _ from 'lodash'
import { Field } from 'redux-form'
import ServicesCheckbox from './services-checkbox'
const ServiceFields = ({ listOfServices }) => (
<div>
{_.map(listOfServices, (service) => {
return (
<div key={service.id}>
<Field
label={service.name}
name... |
Libraries/Modal/Modal.js | htc2u/react-native | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
app/components/StarVoteList.js | ufv-js/ru-now | import React, { Component } from 'react';
import Avatar from 'material-ui/Avatar';
import {List, ListItem} from 'material-ui/List';
import Subheader from 'material-ui/Subheader';
import ActionGrade from 'material-ui/svg-icons/action/grade';
export default ({userVotes}) => {
return (
<div>
<List>
<S... |
js-old/src/modals/Shapeshift/shapeshift.spec.js | destenson/ethcore--parity | // Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity 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 lat... |
src/components/appfooter.js | rajatsharma305/eldritch | import React from 'react'
import Footer from 'grommet/components/Footer'
import Title from 'grommet/components/Title'
import Box from 'grommet/components/Box'
import Paragraph from 'grommet/components/Paragraph'
import Anchor from 'grommet/components/Anchor'
import { Link } from 'react-router'
export default props => ... |
src/scotch-night/app/events/screens/EventDetail.js | SeattleScotchSociety/ScotchNight | // @flow
import React, { Component } from 'react';
import { ScrollView, View, Text, StyleSheet } from 'react-native';
import { List, ListItem, Button } from 'react-native-elements';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { SimpleLineIcons } from '@expo/vector-icons';
i... |
src/components/NotFoundPage/NotFoundPage.js | sulibautista/live-poll | /*
* 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.
*/
//import './NotFoundPage.less';
import React from 'react'; // eslint-disable-line no-unus... |
website/src/components/markdown.js | netlify/netlify-cms | import React from 'react';
import styled from '@emotion/styled';
import theme from '../theme';
const StyledMarkdown = styled.div`
> :first-of-type {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
line-height: ${theme.lineHeight[1]};
margin-top: 2em;
... |
techCurriculum/ui/solutions/3.3/src/index.js | AnxChow/EngineeringEssentials-group | /**
* Copyright 2017 Goldman Sachs.
* 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 writ... |
src/svg-icons/editor/border-style.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderStyle = (props) => (
<SvgIcon {...props}>
<path d="M15 21h2v-2h-2v2zm4 0h2v-2h-2v2zM7 21h2v-2H7v2zm4 0h2v-2h-2v2zm8-4h2v-2h-2v2zm0-4h2v-2h-2v2zM3 3v18h2V5h16V3H3zm16 6h2V7h-2v2z"/>
</SvgIcon>
);
E... |
test/CarouselSpec.js | Cellule/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Carousel from '../src/Carousel';
import CarouselItem from '../src/CarouselItem';
describe('Carousel', function () {
it('Should show the correct item', function () {
let instance = ReactTestUtils.renderIntoDocument(
<C... |
src/components/RegisterForm/RegisterForm.js | TackleboxBeta/betabox-seed | import React, { Component } from 'react';
import { reduxForm, Field, propTypes } from 'redux-form';
import registerValidation from './registerValidation';
// eslint-disable-next-line react/prop-types
const Input = ({ input, label, type, meta: { touched, error } }) => (
<div className={`form-group ${error && touched ... |
test/FormControlsSpec.js | adampickeral/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import * as FormControls from '../src/FormControls';
describe('Form Controls', function () {
describe('Static', function () {
it('renders a p element wrapped around the given value', function () {
const instance = ReactTestUt... |
src/svg-icons/device/gps-not-fixed.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceGpsNotFixed = (props) => (
<SvgIcon {...props}>
<path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06C6.83 3.52 3.52 6.83 3.06 11H1v2h2.06c.46 4.17 3.77 7.48 7.94 7.94V23h2v-2.06c4.17-.46 7.48-3.77 7... |
site/src/components/MyApps.js | ishanthukral/ishan.me | import React, { Component } from 'react';
import MyApp from './MyApp';
import { Col } from 'react-bootstrap';
var request = require('request')
class MyApps extends Component {
constructor() {
super();
this.state = { apps: [] };
}
componentDidMount() {
var that = this;
request.get('https://api.i... |
src/components/CountDown/CountDown.js | febobo/react-redux-start | import React from 'react'
type Props = {
};
export class CountDown extends React.Component {
props: Props;
state = {}
render () {
const { time } = this.props.geetest;
// console.log(time)
return (
<span>
{
time && time.time
? time.time
: null
}... |
test/checkbox-spec.js | arkxu/material-ui | import React from 'react';
import Checkbox from 'checkbox';
import injectTheme from './fixtures/inject-theme';
const TestUtils = require('react-addons-test-utils');
describe('Checkbox', () => {
const CHECKMARK_PATH = 'M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-... |
src/client.js | jxzly229190/react-redux-universal-hot-example | /**
* THIS IS THE ENTRY POINT FOR THE CLIENT, JUST LIKE server.js IS THE ENTRY POINT FOR THE SERVER.
*/
import 'babel/polyfill';
import React from 'react';
import BrowserHistory from 'react-router/lib/BrowserHistory';
import Location from 'react-router/lib/Location';
import queryString from 'query-string';
import cre... |
src/app.js | mikeharty/react-redux-webpack | require('./stylesheets/import.scss');
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import todoApp from './reducers';
import App from './components/App';
let store = createStore(todoApp);
render(
<Provider store={store}>
... |
public/client/routes/changePassword/containers/changePassword.js | nearform/concorda-dashboard | 'use strict'
import React from 'react'
import {connect} from 'react-redux'
import {reduxForm} from 'redux-form'
import {forceChangePassword} from '../../../modules/user/actions/index'
import {validateSetNewPassword} from '../../../lib/validations'
export let ChangePassword = React.createClass({
propTypes: {
ha... |
components/Dropdown.js | hamzasurti/git-started | import React, { Component } from 'react';
export default class Dropdown extends Component {
buildLessonList(lessonInfo, clickFunction) {
const styles = {};
styles.li = {
padding: '15px 15px 15px 15px',
border: '1px solid #F9F9F9',
backgroundColor: 'white',
fontFamily: 'sans-serif',
... |
app/components/sidebar.js | sigle-io/sigle | import React from 'react';
import styled from 'styled-components';
import { Menu } from 'semantic-ui-react';
import Router from 'next/router';
const StyledSidebar = styled(Menu)`
position: fixed;
top: 0px;
bottom: 0px;
left: 0px;
width: 200px !important;
background-color: #F0F0F0 !important;
overflow-y: ... |
src/lib/gui/app/configureApp.js | xclix/chan | import React from 'react';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import configureRoutes from './routing/configureRoutes';
export default store => {
const history = syncHistoryWithStore(browserHistory, ... |
example/DummyNetworkContext.js | rauliyohmc/react-native-offline-utils | import React from 'react';
const DummyNetworkContext = React.createContext();
export default DummyNetworkContext;
|
src/components/pagination/pagination.js | bokuweb/re-bulma | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styles from '../../../build/styles';
import { getCallbacks } from '../../helper/helper';
export default class Pagination extends Component {
static propTypes = {
style: PropTypes.object,
children: PropTypes.any,
classNam... |
examples/with-dynamic-import/components/Counter.js | callumlocke/next.js | import React from 'react'
let count = 0
export default class Counter extends React.Component {
add () {
count += 1
this.forceUpdate()
}
render () {
return (
<div>
<p>Count is: {count}</p>
<button onClick={() => this.add()}>Add</button>
</div>
)
}
}
|
src/client/components/ConsoleLoggerView.js | IUnknown68/karma-live-reporter | //==============================================================================
import React, { Component } from 'react';
import attachListener from 'attachListener';
import autoScroll from 'autoScroll';
import { BROWSER_LOG, BROWSER_START } from 'app-constants';
//====================================================... |
docs/src/pages/examples/BsEditorPage.js | gocreating/redux-draft | import React, { Component } from 'react';
import { Helmet } from 'react-helmet';
import Tabs from 'react-bootstrap/lib/Tabs';
import Tab from 'react-bootstrap/lib/Tab';
import { reduxDraft } from '../../../../lib';
import PageLayout from '../../utils/PageLayout';
import Preview from '../../editors/utils/Preview';
impor... |
client/components/widgets/side-nav.js | zhenyulin/ultimate-hot-boilerplate | import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import BasicButton from 'components/elements/basic-button';
export class SideNav extends React.PureComponent {
static propTypes = {
className: PropTypes.string,
func: PropTypes.func,
list: PropTypes.ar... |
server/sonar-web/src/main/js/apps/web-api/components/Domain.js | Builders-SonarSource/sonarqube-bis | /*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License... |
app/javascript/mastodon/containers/domain_container.js | kazh98/social.arnip.org | import React from 'react';
import { connect } from 'react-redux';
import { blockDomain, unblockDomain } from '../actions/domain_blocks';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import Domain from '../components/domain';
import { openModal } from '../actions/modal';
const messages = d... |
docs/app/Examples/elements/Step/Variations/StepExampleSizeTiny.js | shengnian/shengnian-ui-react | import React from 'react'
import { Icon, Step } from 'shengnian-ui-react'
const StepExampleSizeTiny = () => (
<Step.Group size='tiny'>
<Step>
<Icon name='truck' />
<Step.Content>
<Step.Title>Shipping</Step.Title>
<Step.Description>Choose your shipping options</Step.Description>
... |
test/AlertSpec.js | xuorig/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Alert from '../src/Alert';
describe('Alert', function() {
it('Should output a alert with message', function() {
let instance = ReactTestUtils.renderIntoDocument(
<Alert>
<strong>Message</strong>
</Alert>
... |
src/svg-icons/action/dns.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionDns = (props) => (
<SvgIcon {...props}>
<path d="M20 13H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 19c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM20 3H4c-.55 0-1 .45-1 1v... |
client/reactapp/components/IndexPage.js | TribeMedia/loopback-example-react | import React from 'react';
export default class IndexPage extends React.Component {
static contextTypes = {
router: React.PropTypes.func
}
constructor ( props, context ) {
super( props, context );
this.props = props;
this.state = { };
this.context = context;
}
componentWillReceiveProps ( nextProps ... |
react-app/src/components/Legends.js | tanykim/swimmers-history | import React, { Component } from 'react';
class LegendsComponent extends Component {
render() {
const { type } = this.props;
return (<div className="legends">
<div className="legend-wrapper">
<span className="cursor-icon" />
<span className="legend">
<div className="legend-ite... |
app/src/server.js | orYoffe/myFullstackJsNetwork | import express from 'express'
import path from 'path'
import helmet from 'helmet'
import morgan from 'morgan'
import cookieParser from 'cookie-parser'
import bodyParser from 'body-parser'
import hbs from 'express-handlebars'
import config from './config'
import {renderFullPage, normalizePort, onError} from './config/in... |
docs/src/app/components/pages/components/Popover/ExampleConfigurable.js | nathanmarks/material-ui | import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import RadioButton from 'material-ui/RadioButton';
import Popover from 'material-ui/Popover/Popover';
import {Menu, MenuItem} from 'material-ui/Menu';
const styles = {
h3: {
marginTop: 20,
fontWeight: 400,
},
block: {
dis... |
src/js/components/MaskedInput/__tests__/MaskedInput-test.js | HewlettPackard/grommet | import React from 'react';
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import 'jest-styled-components';
import { fireEvent, render, waitFor } from '@testing-library/react';
import { getByText, screen } from '@testing-library/dom';
import { axe } from 'jest-axe';
import 'jest-axe/extend-expect';
impo... |
src/components/svg/Dog.js | JoeTheDave/onitama | import PropTypes from 'prop-types';
import React from 'react';
export const Dog = ({ fillColor }) => (
<svg width="130px" height="130px" viewBox="0 0 499 500" preserveAspectRatio="xMidYMid meet">
<g transform="translate(0, 500) scale(0.1, -0.1)" fill={fillColor} stroke="none">
<path d="M3005 4833 c-86 -21 ... |
reactjs/basic/src/app.js | joaolourenco/lab-nodejs | import React from 'react';
import ReactDOM from 'react-dom';
class Hello extends React.Component {
render() {
var place = "World";
return (
<h1>Hello {place}</h1>
);
}
}
//Composing Components
//A key factor to make components reusable and composable
//is the ability to con... |
modules/tribes/client/components/TribesList.js | Trustroots/trustroots | import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import Tribe from './Tribe';
import SuggestTribe from './SuggestTribe';
const List = styled.ul.attrs({ className: 'list-unstyled tribes-grid' })`
margin: -5px -5px 15px -5px;
`;
const Item = styled.li`
padding... |
packages/react-router-native/__tests__/Link-test.js | DelvarWorld/react-router | import React from 'react'
import ShallowRenderer from 'react-test-renderer/shallow'
import Link from '../Link'
const createContext = () => ({
router: {
history: {
push: jest.fn(),
replace: jest.fn()
}
}
})
class EventStub {
preventDefault() {
this.defaultPrevented = true
}
}
describe(... |
src/components/Header.js | dhruv-kumar-jha/react-static-complete-website | 'use strict';
import React from 'react';
import { Link } from 'react-router';
const Header = (props) => {
return (
<header className="main">
<div className="container">
<div className="logo">
<Link to="/">Productivity Application</Link>
</div>
<nav>
<Link to="/" activeClassName="active">Home... |
client/src/lib-app/stats-utils.js | opensupports/opensupports | import React from 'react';
import API from 'lib-app/api-call';
import i18n from 'lib-app/i18n';
import StatCard from 'app-components/stat-card';
import { Bar, HorizontalBar } from 'react-chartjs-2';
import date from 'lib-app/date';
export default {
renderStatistics({showStatCards, showStatsByHours, showStatsByDays... |
lib/index.js | bebraw/react-ellipsify | /* eslint-disable jsx-a11y/no-static-element-interactions, react/no-unused-prop-types */
import React from 'react';
const ellipsify = ({
visible, visibleItems,
separator,
more = '…',
moreClass,
atFront,
onShow,
children
}) => {
if (visible) {
return <div>{children}</div>;
}
const moreElement =... |
src/index.js | Syut/gallery | import 'core-js/fn/object/assign';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/Main';
// Render the main component into the dom
ReactDOM.render(<App />, document.getElementById('content'));
|
screens/Top250Screen.js | flyerq/movie-list | import React from 'react';
import {
View,
Text,
StyleSheet,
Platform,
} from 'react-native';
// import Expo, { Constants } from 'expo';
import Colors from '../constants/Colors';
import MovieList from '../components/MovieList';
import OfflineMessage from '../components/OfflineMessage';
const API_URL = 'https://a... |
fields/types/color/ColorColumn.js | asifiqbal84/keystone | import React from 'react';
import ItemsTableCell from '../../../admin/src/components/ItemsTableCell';
import ItemsTableValue from '../../../admin/src/components/ItemsTableValue';
var ColorColumn = React.createClass({
displayName: 'ColorColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.obje... |
src/svg-icons/device/nfc.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceNfc = (props) => (
<SvgIcon {...props}>
<path d="M20 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-2zm0 18H4V4h16v16zM18 6h-5c-1.1 0-2 .9-2 2v2.28c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2... |
geonode/monitoring/frontend/monitoring/src/containers/main.js | tomkralidis/geonode | /*
#########################################################################
#
# Copyright (C) 2019 OSGeo
#
# This program 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
# ... |
src/components/photos.js | Mweeden36/react-app | import React, { Component } from 'react';
export default class Photos extends Component {
render() {
return (
<div>Photos</div>
);
}
} |
src/components/posts/single.js | plastical/react-theme | /* global PlasticalSettings */
// External dependencies
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { injectIntl } from 'react-intl';
import classNames from 'classnames';
// Internal dependencies
import { getTitle, getEditLink, getCon... |
packages/reactor-kitchensink/src/examples/Charts/Bar/BasicBar/BasicBar.js | markbrocato/extjs-reactor | import React, { Component } from 'react';
import { Container } from '@extjs/ext-react';
import { Cartesian } from '@extjs/ext-react-charts';
import ChartToolbar from '../../ChartToolbar';
Ext.require([
'Ext.chart.series.Bar',
'Ext.chart.axis.Numeric',
'Ext.chart.axis.Category'
]);
export default class Bas... |
src/components/Reel.js | tehfailsafe/portfolioReact | import React from 'react';
import {Link} from 'react-router'
const Reel = React.createClass({
render(){
return(
<div className="video reel-wrapper">
<div className="reel">
<Link to="/" ref="back" className="back">
<img src="assets/images/back.png" className="back"/>
... |
app/index.js | dothanhlam/kanbanboard | /*import React from 'react';
import ReactDOM from 'react-dom';
import KanbanBoardContainer from './KanbanBoardContainer.jsx';
import './css/main.css';
main();
function main() {
let app = document.createElement('div');
document.body.appendChild(app);
// ReactDOM.render(<KanbanBoard cards={cardsList}/>, a... |
src/react-chart-line.js | javascriptiscoolpl/react-chart-line | import React from 'react';
import ReactDOM from 'react-dom';
export default class ChartLine extends React.Component {
constructor(props) {
super(props);
this.state = { chr: "init" };
}
render() {
return (
<div className="ReactChart">
<canvas id="canvas"></canvas>
</div>
);
... |
test/GlyphiconSpec.js | erictherobot/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Glyphicon from '../src/Glyphicon';
describe('Glyphicon', function () {
it('Should have correct class', function () {
let instance = ReactTestUtils.renderIntoDocument(
<Glyphicon glyph='star' />
);
assert.ok(Rea... |
app/containers/CommoditiesCornerContainer.js | MutatedBread/binary-academy-rn | import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import CommoditiesCorner from './../components/views/videoTabs/CommoditiesCorner.js';
const mapStateToProps = state => ({
isLoading: state.video.commoditiescorner.isLoading,
videoArrayStore:... |
src/components/Feedback/Feedback.js | BankaiMikeH/HackWSU2017_AirRands | /**
* 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 withStyles from 'isom... |
react-webpack/src/index.js | hzzly/react-getting-started | import React from 'react'
import ReactDom from 'react-dom'
import CommentBox from './CommentBox'
import './assets/style.css'
//测试数据 放到 json 文件里
// let comments = [
// {author: 'hzzly', date: '5 分钟前', text: 'this is a comment'},
// {author: 'hzzly2', date: '2 分钟前', text: '哈哈哈哈'}
// ]
ReactDom.render(
... |
packages/veritone-react-common/src/components/FormBuilder/FormConfiguration/items/createTextInput.js | veritone/veritone-sdk | import React from 'react';
import { string, func, number, oneOfType } from 'prop-types';
import _ from 'lodash';
import TextField from '@material-ui/core/TextField';
export default function createTextInput({
type = 'text',
itemType,
label
}) {
function TextInputComponent({ value, onChange, className }) {
c... |
client/modules/App/components/Footer/Footer.js | eantler/google | import React from 'react';
import { FormattedMessage } from 'react-intl';
// Import Style
import styles from './Footer.css';
// Import Images
export function Footer() {
return (
<div style={{ background: `transparent` }} className={styles.footer}>
<p>© 2016 · Hashnode · LinearBytes In... |
packages/icons/src/md/av/FiberDvr.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdFiberDvr(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M35 21h4v2h-4v-2zM9 21h4v6H9v-6zM42 6c2.21 0 4 1.79 4 4v28c0 2.21-1.79 4-4 4H6c-2.21 0-4-1.79-4-4V10c0-2.21 1.79-4 4-4h36zM16 27v-6c0-1.7-1.3-3-3-3H... |
src/svg-icons/action/favorite-border.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFavoriteBorder = (props) => (
<SvgIcon {...props}>
<path d="M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 2... |
__tests__/index.ios.js | alvloureiro/Manager | import 'react-native';
import React from 'react';
import Index from '../index.ios.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
app/components/Slider/index.js | SakuB/Individual_website | import React, { Component } from 'react';
import {
SliderBox,
SliderBar,
SliderFullBar,
Slide,
TipNum,
DragBar,
} from './components';
class Slider extends Component {
state = {
progress: 0,
down: false,
}
componentDidMount() {
document.addEventListener('mouseup', () => {
this.hand... |
frontend/src/Movie/Index/Overview/Options/MovieIndexOverviewOptionsModal.js | Radarr/Radarr | import PropTypes from 'prop-types';
import React from 'react';
import Modal from 'Components/Modal/Modal';
import MovieIndexOverviewOptionsModalContentConnector from './MovieIndexOverviewOptionsModalContentConnector';
function MovieIndexOverviewOptionsModal({ isOpen, onModalClose, ...otherProps }) {
return (
<Mo... |
src/svg-icons/image/brightness-6.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageBrightness6 = (props) => (
<SvgIcon {...props}>
<path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18V6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"/>... |
client/components/home.js | andela-ksolomon/DocumentManagementSys | import React from 'react';
/**
* @class HomePage
* @classdesc Hompage component
*/
const HomePage = () => (<hi>Hello Welcome to my HomePage</hi>);
export default HomePage;
|
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Shared/Confirm.js | dewmini/carbon-apimgt | import React from 'react'
import Dialog, {
DialogActions,
DialogContent,
DialogContentText,
DialogTitle,
} from 'material-ui/Dialog';
class Confirm extends React.Component{
constructor(props){
super(props);
this.state(
{
open: false
}
... |
blueprints/form/files/__root__/forms/__name__Form/__name__Form.js | llukasxx/school-organizer-front | 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 = ... |
client/src/components/FormWiget/FormInput.js | Nonsoft/crdweb | import React from 'react';
import PropTypes from 'prop-types';
import {Input, Form} from 'antd';
const FormItem = Form.Item;
const FormInput = (props) => (
<FormItem label={props.label}>
{props.getFieldDecorator(props.name)(
<Input placeholder={props.label} size="default"/>
)}
</FormItem>
)
FormInpu... |
examples/passing-props-to-children/app.js | Jonekee/react-router | import React from 'react';
import { Router, Route, Link, History } from 'react-router';
var App = React.createClass({
mixins: [ History ],
getInitialState() {
return {
tacos: [
{ name: 'duck confit' },
{ name: 'carne asada' },
{ name: 'shrimp' }
]
};
},
addTaco() {... |
app/javascript/mastodon/features/compose/components/upload_form.js | blackle/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import UploadProgressContainer from '../containers/upload_progress_container';
import ImmutablePureComponent from 'react-immutable-pure-component';
import UploadContainer from '../containers/upload_container';
export default class U... |
src/containers/pages/create-deck/after-class-selection/create-deck-mobile/deck-list/decklist-wrapper.js | vFujin/HearthLounge | import React from 'react';
import PropTypes from 'prop-types';
import DeckSidebar from '../../left-container/deck-sidebar';
const DecklistWrapper = ({deck, playerClass}) => {
return (
<div className="decklist__wrapper">
<DeckSidebar playerClass={playerClass}/>
</div>
)
};
DecklistWrapper.propT... |
src/Radar.js | shauns/react-d3-radar | // @flow
import React from 'react';
import {schemeCategory10} from 'd3-scale';
import {voronoi} from 'd3-voronoi';
import _ from 'lodash';
import {
flatMapDeepArray,
forEachArray,
radarPoints,
radiusScales,
} from './utils';
import type {RadarPoint, RadarData} from './types';
import RadarWrapper from './RadarWr... |
src/svg-icons/action/change-history.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionChangeHistory = (props) => (
<SvgIcon {...props}>
<path d="M12 7.77L18.39 18H5.61L12 7.77M12 4L2 20h20L12 4z"/>
</SvgIcon>
);
ActionChangeHistory = pure(ActionChangeHistory);
ActionChangeHistory.display... |
src/documentation/Maps/Maps-story.js | wfp/ui | /* eslint-disable no-console */
import React from 'react';
import { storiesOf } from '@storybook/react';
import Page from '../Page';
import Link from '../../components/Link';
import { List, ListItem } from '../../components/List';
storiesOf('Design|Guidelines', module)
.addParameters({ options: { showPanel: false, ... |
src/svg-icons/image/view-comfy.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageViewComfy = (props) => (
<SvgIcon {...props}>
<path d="M3 9h4V5H3v4zm0 5h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zM8 9h4V5H8v4zm5-4v4h4V5h-4zm5 9h4v-4h-4v4zM3 19h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zm5 0h4v-... |
web/src/components/Bookmarks.js | blinard/better-bookmarks | import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { actionCreators } from '../store/Bookmarks';
import Auth from '../services/Auth';
class Bookmarks extends Component {
auth = new Auth();
constructor(props) {
super(props);
... |
app/javascript/mastodon/features/ui/components/bundle_column_error.js | ambition-vietnam/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import Column from './column';
import ColumnHeader from './column_header';
import ColumnBackButtonSlim from '../../../components/column_back_button_slim';
import IconButton from '../../../components/... |
components/news/NewsCard.js | BDE-ESIEE/mobile | import React, { Component } from 'react';
import {
Text,
View,
Image,
TouchableHighlight,
Linking
} from 'react-native';
import moment from 'moment';
import 'moment/locale/fr';
import { Actions } from 'react-native-router-flux';
import styles from '../styles/news.js';
import { Button, Card } from 'react-nati... |
src/AppTestContext.js | hannes-hochreiner/more-notes | import React, { Component } from 'react';
import { default as PouchDb } from "pouchdb";
import { default as PubSub } from "pubsub-js";
import { RepoMock } from "./RepoMock";
class AppContext extends Component {
constructor(props) {
super(props);
let repo = new RepoMock();
this.state = {
repo: rep... |
examples/universal/client/index.js | chicoxyzzy/redux | import 'babel-core/polyfill';
import React from 'react';
import { Provider } from 'react-redux';
import configureStore from '../common/store/configureStore';
import App from '../common/containers/App';
const initialState = window.__INITIAL_STATE__;
const store = configureStore(initialState);
const rootElement = do... |
old/cppcon-2017-web-service/example/client/strawpoll/src/index.js | Voultapher/Presentations | import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(<App />, document.getElementById('root'));
//registerServiceWorker();
|
src/svg-icons/av/web.js | mtsandeep/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvWeb = (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-2zm-5 14H4v-4h11v4zm0-5H4V9h11v4zm5 5h-4V9h4v9z"/>
</SvgIcon>
);
AvWeb = pur... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.