path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/index.js | zaizaiyang/gallery-by-react | 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('app'));
|
src/svg-icons/action/restore-page.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionRestorePage = (props) => (
<SvgIcon {...props}>
<path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm-2 16c-2.05 0-3.81-1.24-4.58-3h1.71c.63.9 1.68 1.5 2.87 1.5 1.93 0 3.... |
packages/material-ui-icons/src/LooksOne.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14h-2V9h-2V7h4v10z" /></g>
, 'LooksOne');
|
src/components/HornContainer.js | scaulfield01/HallHorn | import React, { Component } from 'react';
import HornButton from './HornButton';
import ReactHowler from 'react-howler';
import { BounceLoader } from 'react-spinners';
class HornContainer extends Component {
constructor(props) {
super(props);
this.state = {
playing: false,
l... |
app/jsx/external_apps/components/ConfigurationFormUrl.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/EditScheduleGrid.js | amiklosi/scheduling | import React from 'react'
import _ from 'lodash'
import styles from './EditScheduleGrid.scss'
import {codeToTime, timeToCode, days} from './date-utils'
import ClickToEditTime from './ClickToEditTime'
import onClickOutside from 'react-onclickoutside'
export default class EditScheduleGrid extends React.Component {
co... |
src/components/Report/Kind/NetIncome.js | ayastreb/money-tracker | import React from 'react';
import PropTypes from 'prop-types';
import ChartistGraph from 'react-chartist';
import Chartist from 'chartist';
import abbreviate from 'number-abbreviate';
import 'chartist-plugin-tooltips';
import 'chartist/dist/chartist.min.css';
import 'chartist-plugin-tooltips/dist/chartist-plugin-toolti... |
src/svg-icons/image/nature-people.js | w01fgang/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageNaturePeople = (props) => (
<SvgIcon {...props}>
<path d="M22.17 9.17c0-3.87-3.13-7-7-7s-7 3.13-7 7c0 3.47 2.52 6.34 5.83 6.89V20H6v-3h1v-4c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v4h1v5h16v-2h-3v-3.88c3.47-.41 ... |
frontend/src/components/SubscribeForm.js | raymestalez/django-react-blog | import React, { Component } from 'react';
import { connect } from 'react-redux';
import ReactDOM from 'react-dom';
import { Link } from 'react-router';
import FontAwesome from 'react-fontawesome';
import { FormGroup, FieldGroup, FormControl, ControlLabel, Button } from 'react-bootstrap';
import { createSubscriber } f... |
src/stores/__tests__/AppStore-test.js | bigamasta/chess-challenge | /**
* Created by BigaMasta on 3/11/16.
*/
import React from 'react';
import expect from 'expect';
import alt from '../../alt';
import AppStore from '../AppStore';
describe('AppStore', () => {
beforeEach(() => {
alt.flush();
});
it('player shall pick a color at start of the game', () => {
const chosenCol... |
src/browser/me/ProfilePage.js | xiankai/triple-triad-solver | /* @flow */
import React from 'react';
import linksMessages from '../../common/app/linksMessages';
import { FormattedMessage } from 'react-intl';
import { Block, Title, View } from '../app/components';
const ProfilePage = () => (
<View>
<Title message={linksMessages.profile} />
<Block>
<FormattedMessag... |
admin/client/Signin/components/Alert.js | Adam14Four/keystone | /**
* Renders an Alert. Pass either an isInvalid and invalidMessage prop, or set
* the signedOut prop to true to show the standard signed out message
*/
import React from 'react';
import { Alert } from 'elemental';
const AlertView = function (props) {
if (props.isInvalid) {
return <Alert key="error" type="dange... |
test/gravatar.feature.js | leobeltran/reactStarter | import React from 'react';
import { mount, shallow } from 'enzyme';
import {expect} from 'chai';
import md5 from 'md5';
import Gravatar from '../src/gravatar';
import Avatar from '../src/avatar';
import EmailForm from '../src/email';
Feature('Gravatar','', ()=>{
Scenario('user loads page',()=>{
const wrapper =... |
src/framework/react/demo/index.js | baukh789/GridManager | import ReactDOM from 'react-dom';
import React, { Component } from 'react';
import GridManagerReact from '../js/index.js';
import SearchComponent from './search';
import { ActionComponents, EmptyTemplate, TitleComponents, TypeComponents, EditComponents } from './components';
import FooterComponent from './footer';
impo... |
src/svg-icons/image/grid-on.js | spiermar/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageGridOn = (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-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6... |
app/Filters.js | KoltunovOleg/Task-React-App | import React, { Component } from 'react';
class Filters extends Component {
handleSelectChange(event) {
this.props.updateSelect(event.target.value);
}
handleFilterChange(event){
this.props.updateFilter(event.target.value);
}
render() {
return (
<form cla... |
src/elements/Segment/SegmentInline.js | Semantic-Org/Semantic-UI-React | import cx from 'clsx'
import PropTypes from 'prop-types'
import React from 'react'
import { childrenUtils, customPropTypes, getElementType, getUnhandledProps } from '../../lib'
/**
* A placeholder segment can be inline.
*/
function SegmentInline(props) {
const { children, className, content } = props
const clas... |
test/unit/client/common/components/alert.js | jmeas/finance-app | import React from 'react';
import {shallow} from 'enzyme';
import Alert from '../../../../../client/common/components/alert';
describe('Alert', function() {
beforeEach(() => {
this.animateOutAlert = stub();
this.dispatch = stub();
this.destroyFirstAlert = stub();
this.onTransitionOutAlert = stub();
... |
src/components/App.js | ImanMh/react-proto | /**
* 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 PropTypes from 'prop-... |
src/icons/DevicesOtherIcon.js | kiloe/ui | import React from 'react';
import Icon from '../Icon';
export default class DevicesOtherIcon extends Icon {
getSVG(){return <svg width="48" height="48" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path d="M6 12h36V8H6c-2.2 0-4 1.8-4 4v24c0 2.2 1.8 4 4 4h8v-4H6V12zm20 12h-8v3.56c-1.22 1.1-2 2.67-2 4.44s.78... |
src/components/icons/Checkmark.js | ericyd/gdrive-copy | import React from 'react';
import Icon from './Icon';
// Credit: https://iconmonstr.com/checkbox-22/
export default function Checkmark(props) {
return (
<Icon {...props}>
<path d="M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373... |
app/scripts/components/search-item.js | hustbill/network-verification-ui | import React from 'react';
import { connect } from 'react-redux';
import { unpinSearch } from '../actions/app-actions';
class SearchItem extends React.Component {
constructor(props, context) {
super(props, context);
this.handleClick = this.handleClick.bind(this);
}
handleClick(ev) {
ev.preventDefa... |
src/components/Header/Header.js | erichardson30/cardinal_interview_react | /**
* React Starter (https://github.com/erichardson30/react-starter)
*
* Copyright © 2016 Eric Richardson. 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 wi... |
src/common/helpers/inputs.js | itayJoseph/zeekit-practical-exam | import React from 'react';
import { Dropdown } from 'semantic-ui-react'
export const DropdownUi = ({ className, input, meta: { touched, error }, ...customProps }) => ( // eslint-disable-line no-unused-vars
<Dropdown {...input} {...customProps} onChange={(event, element) => input.onChange(element.value)} />
);
... |
__tests__/arrows.js | CondeNast/react-slick | /**
* Arrow component tests
*/
sinon.stub(console, 'error');
import {render, shallow} from 'enzyme';
import React from 'react';
import sinon from 'sinon';
import { NextArrow, PrevArrow } from '../src/arrows';
function CustomArrow(props) {
return (
<span
className="sample"
data-currentSlide={prop... |
test/components/poll_admin_component_test.js | jstoebel/voting | import React from 'react';
import {expect} from 'chai';
import {shallow, mount, render} from 'enzyme';
import {Link} from 'react-router';
import PollAdmin from '../../public/js/components/polls/poll_admin';
import factory from '../factories';
describe('<PollAdmin />', () => {
let wrapper;
let createdPolls;
bef... |
src/svg-icons/image/looks-3.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageLooks3 = (props) => (
<SvgIcon {...props}>
<path d="M19.01 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 7.5c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5V15c0 1.11-.9 2-2 2h-4v... |
app/javascript/mastodon/components/permalink.js | nonoz/mastodon | import React from 'react';
import PropTypes from 'prop-types';
export default class Permalink extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,
};
static propTypes = {
className: PropTypes.string,
href: PropTypes.string.isRequired,
to: PropTypes.string.isRequired,
... |
client/src/context/AuthContext.js | codejockie/document-manager | import React from 'react';
import PropTypes from 'prop-types';
const AuthContext = React.createContext();
// eslint-disable-next-line require-jsdoc
class AuthProvider extends React.Component {
state = { isAuth: false };
static propTypes = {
children: PropTypes.array
};
// eslint-disable-next-line requir... |
src/ButtonGroup.js | dongtong/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import CustomPropTypes from './utils/CustomPropTypes';
const ButtonGroup = React.createClass({
mixins: [BootstrapMixin],
propTypes: {
vertical: React.PropTypes.bool,
justified: React.PropTypes.b... |
client/routes/home/Home.js | kriasoft/FSharp-Server-Template | /**
* ASP.NET Core Starter Kit
*
* 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 { Layout } from '../../components';
const link = 'h... |
src/admin/client/modules/products/listFilter/components/filter.js | cezerin/cezerin | import React from 'react';
import messages from 'lib/text';
import style from './style.css';
import SelectField from 'material-ui/SelectField';
import MenuItem from 'material-ui/MenuItem';
import Toggle from 'material-ui/Toggle';
const Filter = ({
filter,
setEnabled,
setDiscontinued,
setOnSale,
setStock
}) => {
... |
Screens/Record.js | Datasilk/Dedicate | import React from 'react';
import { View, TouchableOpacity, StyleSheet, BackHandler, NativeEventEmitter } from 'react-native';
import Text from 'text/Text';
import Body from 'ui/Body';
import AppStyles from 'dedicate/AppStyles';
import DbTasks from 'db/DbTasks';
import DbCategories from 'db/DbCategories';
import IconTa... |
code-samples/js/360PhotoTour/WestLakeTowers.js | viromedia/viro | /**
* Copyright (c) 2017-present, Viro Media, 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.
*/
'use str... |
example/examples/DefaultMarkers.js | ali-alamine/react-native-maps | import React from 'react';
import {
StyleSheet,
View,
Text,
Dimensions,
TouchableOpacity,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.78825;
const LONGITUDE = -122.4324;
const LA... |
src/roles/notifs/RemoveItemFailNotif.js | dash-/netjumpio-tabs-web | ///
// Dependencies
///
import React, { Component } from 'react';
import FailRetryNotif from '../../elements/FailRetryNotif';
import * as actions from '../actions';
///
// View
///
class RemoveItemFailNotifView extends Component {
///
// Rendering
///
renderMessage(action, userMessage) {
return (
'Remov... |
fields/types/geopoint/GeoPointFilter.js | webteckie/keystone | import React from 'react';
import { FormField, FormInput, FormRow, SegmentedControl } from 'elemental';
const DISTANCE_OPTIONS = [
{ label: 'Max distance (km)', value: 'max' },
{ label: 'Min distance (km)', value: 'min' },
];
function getDefaultValue () {
return {
lat: undefined,
lon: undefined,
distance: {... |
docs-ui/components/globalModal.stories.js | beeftornado/sentry | import React from 'react';
import {withInfo} from '@storybook/addon-info';
import GlobalModal from 'app/components/globalModal';
import Button from 'app/components/button';
import {openModal} from 'app/actionCreators/modal';
export default {
title: 'Layouts/Modals',
};
export const _GlobalModal = withInfo('Call `o... |
examples/js/remote/remote-store-all.js | rolandsusans/react-bootstrap-table | /* eslint guard-for-in: 0 */
/* eslint no-console: 0 */
import React from 'react';
import RemoteAll from './remote-all';
function getProducts() {
const products = [];
const startId = products.length;
for (let i = 0; i < 12; i++) {
const id = startId + i;
products.push({
id: id,
name: 'Item n... |
src/js/app/header/index.js | ludonow/ludo-beta-react | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { browserHistory } from 'react-router';
import MediaQuery from 'react-responsive';
import styled from 'styled-components';
import TextField from 'material-ui/TextField';
import { grey300 } from 'material-ui/styles/colors';
import axio... |
src/app.js | taylorharwin/react-starter-kit | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import 'babel/polyfill';
import React from 'react';
import FastClick from 'fastclick';
import App from './components/App';
import Dispatcher from './core/Dispatcher';
import AppActions from './actions/AppActions';
import ActionTypes from './const... |
app/react-icons/fa/cc-discover.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaCcDiscover extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m5.5 17.9q0 0.9-0.7 1.5-0.5 0.4-1.5 0.4h-0.3v-3.8h0.3q1.1 0 1.5 0.5 0.7 0... |
client/node_modules/react-router/es6/Router.js | Discounty/Discounty | 'use strict';
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) {... |
src/pages/chart/Recharts/Container.js | zuiidea/antd-admin | import React from 'react'
import PropTypes from 'prop-types'
import { ResponsiveContainer } from 'recharts'
import styles from './Container.less'
const Container = ({
children,
ratio = 5 / 2,
minHeight = 250,
maxHeight = 350,
}) => (
<div className={styles.container} style={{ minHeight, maxHeight }}>
<di... |
src/AppBar/AppBar.spec.js | ichiohta/material-ui | /* eslint-env mocha */
import React from 'react';
import {spy} from 'sinon';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import AppBar, {getStyles} from './AppBar';
import getMuiTheme from '../styles/getMuiTheme';
import IconButton from '../IconButton';
import FlatButton from '../FlatButton';
describe... |
src/tabs/Tabs.js | kosiakMD/react-native-elements | /*eslint-disable no-console */
import React from 'react';
import TabNavigator from 'react-native-tab-navigator';
const Tabs = props => {
console.warn(
`Warning: Tabs has been deprecated and will be removed in a future version of React Native Elements. For a complete navigation solution that includes Tabs as well... |
src/web/forms/fields/SubformList/__mocks__/index.js | asha-nepal/AshaFusionCross | /**
* Copyright 2017 Yuichiro Tsuchiya
*
* 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 agr... |
src/components/Illustration.js | tinyx/gallery | import React from 'react';
import Gallery from 'react-grid-gallery';
import { Carousel } from 'react-responsive-carousel';
import 'react-responsive-carousel/lib/styles/main.css';
import 'react-responsive-carousel/lib/styles/carousel.css';
class Illustration extends React.Component {
render() {
const images = [... |
src/scenes/trackComments/components/Comment.js | niekert/soundify | import React from 'react';
import { string, number } from 'prop-types';
import { Link as LinkComponent } from 'react-router-dom';
import styled, { css } from 'styled-components';
import { prop } from 'styled-tools';
import TimeAgo from 'components/helpers/TimeAgo';
import { formatSeconds } from 'helpers/format';
import... |
assets/jqwidgets/demos/react/app/passwordinput/defaultfunctionality/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxExpander from '../../../jqwidgets-react/react_jqxexpander.js';
import JqxValidator from '../../../jqwidgets-react/react_jqxvalidator.js';
import JqxInput from '../../../jqwidgets-react/react_jqxinput.js';
import JqxPasswordInput from '../../../jqwi... |
client/src/components/Transition/Transition.js | timorieber/wagtail | import PropTypes from 'prop-types';
import React from 'react';
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup';
const TRANSITION_DURATION = 210;
// The available transitions. Must match the class names in CSS.
export const PUSH = 'push';
export const POP = 'pop';
/**
* Wrapper arround re... |
packages/icons/src/md/image/Crop.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdCrop(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M34 30h4V14c0-2.21-1.79-4-4-4H18v4h16v16zm-20 4V2h-4v8H2v4h8v20c0 2.21 1.79 4 4 4h20v8h4v-8h8v-4H14z" />
</IconBase>
);
}
export default MdCrop;
|
example/examples/TakeSnapshot.js | hzdg/react-native-maps | import React from 'react';
import {
StyleSheet,
View,
Text,
Dimensions,
TouchableOpacity,
Image,
} from 'react-native';
import MapView from 'react-native-maps';
import flagBlueImg from './assets/flag-blue.png';
import flagPinkImg from './assets/flag-pink.png';
const { width, height } = Dimensions.get('win... |
practices/omok/src/Board_3.js | jhwgnu/redux | import React from 'react'
const Board = ({ squares, status, onSquare, onRestart }) => (
<div>
<h3>{status}</h3>
<div className="board-row">
<button className="square" onClick={()=>onSquare(0)}>{squares[0]}</button>
<button className="square" onClick={()=>onSquare... |
tests/components/Participant.spec.js | hack-duke/hackduke-portal | import React from 'react'
import Participant from 'components/Participant'
import StackedInfo from 'components/StackedInfo'
import SpacedInfo from 'components/SpacedInfo'
import LinkInfo from 'components/LinkInfo'
import classes from 'components/Participant/Participant.scss'
import { shallow} from 'enzyme'
describe('(... |
src/components/TimeAndSalary/common/OvertimeBlock.js | goodjoblife/GoodJobShare | import React from 'react';
import PropTypes from 'prop-types';
import { Clock, Coin2 } from 'common/icons';
import { P } from 'common/base';
import styles from './OvertimeBlock.module.css';
const formatNum = num => {
if (num === 0 || num === undefined) {
return '-';
}
return num;
};
const OvertimeBlock = (... |
components/BookListApp/BookList.react.js | react-douban/douban-book-web | import '../../semantic-ui/components/button.min.css';
import '../../semantic-ui/components/icon.min.css';
import '../../semantic-ui/components/message.min.css';
import React from 'react'
import { render } from 'react-dom'
import { Link } from 'react-router'
import { List, Item, Image, Content, Text, Button, Icon, Lab... |
react-sass-webpack/src/components/NotFound.js | mypixel/web-starters | import React from 'react';
class NotFound extends React.Component {
render() {
return (
<h2>Not Found!</h2>
)
}
}
export default NotFound;
|
src/HighlightDetails.js | asandovaluniandes/asandovaluniandes.github.io | import React, { Component } from 'react';
import './App.css';
class HighlightDetails extends Component {
render() {
return (
<div className="highlightDetails fade-in">
<h4 style={{textAlign: "center", fontWeight: "bold", paddingTop: "10px", paddingBottom: "10px"}}>
<i className="fas fa-arrow... |
src/index.js | racmariano/skidom | 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();
|
examples/todomvc/containers/TodoApp.js | taylorhakes/redux-devtools | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import Header from '../components/Header';
import MainSection from '../components/MainSection';
import * as TodoActions from '../actions/TodoActions';
class TodoApp extends Component {
render(... |
app/javascript/mastodon/features/compose/components/text_icon_button.js | clworld/mastodon | import React from 'react';
import PropTypes from 'prop-types';
export default class TextIconButton extends React.PureComponent {
static propTypes = {
label: PropTypes.string.isRequired,
title: PropTypes.string,
active: PropTypes.bool,
onClick: PropTypes.func.isRequired,
ariaControls: PropTypes.s... |
assets/js/components/tweets_table.js | arineto/twitter_monitor | import _ from 'lodash';
import React from 'react';
import { Link } from 'react-router-dom';
// eslint-disable-next-line react/prefer-stateless-function
class TweetsTable extends React.Component {
renderTweets() {
return _.map(this.props.tweets, (tweet) => {
return (
<tr key={tweet.id}>
... |
src/app/presentation/view/components/UserList.js | RPallas92/GrausJS | /**
* The MIT License (MIT)
*
* Copyright (c) 2016 Ricardo Pallas
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to... |
src/client/firebase/decorate.js | steida/songary | import Component from '../components/component.react';
import React from 'react';
import create from './create';
export default function decorate(BaseComponent) {
return class Decorator extends Component {
static propTypes = {
config: React.PropTypes.object
}
componentWillMount() {
// We a... |
ajax/libs/react-instantsearch/5.0.0-beta.1/Dom.js | seogi1004/cdnjs | /*! ReactInstantSearch 5.0.0-beta.1 | © Algolia, inc. | https://community.algolia.com/react-instantsearch */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports', 'react'], facto... |
components/message/index.js | TDFE/td-ui | /**
* Created by wxy on 2017/6/7.
*/
import React from 'react';
import Notice from './notice';
import s from './style/index';
import cn from 'classnames';
let messageInstance;
let prefixCls = s.messagePrefix;
function notice(type, content, time) {
console.log(type);
messageInstance = messageInstance || Notice.... |
scripts/main.js | Haacked/todo-app | import React from 'react'
import ReactDOM from 'react-dom'
import TodoApp from '../views/main.jsx'
window.onload = () => {
ReactDOM.render(<TodoApp />, document.getElementById('app'))
}
|
src/index.js | RMCoder198/chat.susi.ai | import './index.css';
import * as ChatWebAPIUtils from './utils/ChatWebAPIUtils';
import * as Actions from './actions/';
import App from './App';
import MessageStore from './stores/MessageStore';
import React from 'react';
import ReactDOM from 'react-dom';
import UserPreferencesStore from './stores/UserPreferencesStore... |
src/components/Header/Header.js | gsumpster/calibre-ui | import React from 'react';
import { Breadcrumb, Input } from 'semantic-ui-react';
import css from './Header.css';
const Header = () => (
<div>
<div className={css.header}>
<div className={css.logo}>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" str... |
fields/components/ItemsTableCell.js | linhanyang/keystone | import React from 'react';
import classnames from 'classnames';
function ItemsTableCell ({ className, ...props }) {
props.className = classnames('ItemList__col', className);
return <td {...props} />;
};
module.exports = ItemsTableCell;
|
examples/todos/src/containers/AddTodo.js | lifeiscontent/redux | import React from 'react'
import { connect } from 'react-redux'
import { addTodo } from '../actions'
let AddTodo = ({ dispatch }) => {
let input
return (
<div>
<form onSubmit={e => {
e.preventDefault()
if (!input.value.trim()) {
return
}
dispatch(addTodo(input.v... |
test/GlobalHotKeys/ComponentLifecycle.spec.js | Chrisui/react-hotkeys | import React from 'react';
import {mount} from 'enzyme';
import {expect} from 'chai';
import sinon from 'sinon';
import simulant from 'simulant';
import {GlobalHotKeys} from '../../src';
import KeyCode from '../support/Key';
describe('Component lifecycle for GlobalHotKeys component:', () => {
before(function () {
... |
src/components/entry/EntryGoals.js | reichert621/log-book | import React from 'react'
import AddItem from './AddItem.js'
import Goal from './Goal.js'
export class EntryGoals extends React.Component {
toggleGoal (goal) {
const { goals, handleUpdate } = this.props
const params = {
goals: goals.map(g => {
if (g.text === goal.text) {
g.finished =... |
scripts/components/Order.js | BarukhOr/cuddly-giggle-reactjs | /*
Order
*/
import React from 'react';
import CSSTransitionGroup from 'react-addons-css-transition-group';
import helper from '../helpers';
import autobind from 'autobind-decorator';
class Order extends React.Component{
@autobind
renderOrder(key){
var fish = this.props.fishes[key];
var count = this.pr... |
app/javascript/mastodon/features/getting_started/components/trends.js | musashino205/mastodon | import React from 'react';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { ImmutableHashtag as Hashtag } from 'mastodon/components/hashtag';
import { FormattedMessage } from 'react-intl';
expor... |
.storybook/Text.stories.js | kylpo/kylpo-monorepo | import React from 'react'
import { storiesOf, action } from '@kadira/storybook'
import Text from '../packages/Text'
storiesOf('Text', module)
.add('default', () => (
<Text>
this is text
</Text>
))
.add('bold', () => (
<Text bold >
this is bold text
</Text>
))
.add('uppercase', () ... |
packages/react-error-overlay/src/containers/StackFrame.js | gutenye/create-react-app | /**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* @flow */
import React, { Component } from 'react';
import CodeBlock from './StackFrameCodeBlock';
import { getPrettyURL } from '../ut... |
react-boilerplate/app/components/Footer/index.js | Sakuyakun/Yorha-Experiment | import React from 'react';
import LocaleToggle from 'containers/LocaleToggle';
import Wrapper from './Wrapper';
function Footer() {
return (
<Wrapper>
<section>
<LocaleToggle />
</section>
</Wrapper>
);
}
export default Footer;
|
src/routes/home/index.js | uptive/react-starter-kit | import React from 'react';
import Home from './Home';
export default {
path: '/',
async action(context) {
return {
title: 'Uptiverse',
component: <Home loggedInUser={context.store.getState().user}/>,
};
},
};
|
site/src/components/Search.js | tkh44/emotion | // @flow
/** @jsx jsx */
import { jsx } from '@emotion/react'
import React from 'react'
import { navigate } from '@reach/router'
import { algoliaStyles } from '../utils/algolia-styles'
import { addCallback } from '../utils/async-load-search'
import { colors, mq } from '../utils/style'
type Props = {
className?: stri... |
pkg/ui/src/containers/Workloads.js | matt-deboer/kuill | import React from 'react'
import { connect } from 'react-redux'
import { requestResources } from '../state/actions/resources'
import WorkloadsPage from '../components/WorkloadsPage'
import { withRouter } from 'react-router-dom'
import LoadingSpinner from '../components/LoadingSpinner'
const mapStateToProps = function(... |
src/icons/IosCompose.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosCompose extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<polygon points="256,320 192,320 192,256 320,128 64,128 64,432 384,432 384,192 "></polygon>
<polygon points="387.927,91.... |
site/src/components/Header/index.js | leocreatini/leocreatini.github.io | import React from 'react'
import Link from 'gatsby-link'
const Header = () => (
<div>
<h1>
<Link to="/">
Leo Creatini
</Link>
</h1>
</div>
)
export default Header
|
node_modules/enzyme/src/ReactWrapper.js | Asamaha/React-Side-Project-Netflix | import React from 'react';
import cheerio from 'cheerio';
import { flatten, unique, compact } from 'underscore';
import createWrapperComponent from './ReactWrapperComponent';
import {
instHasClassName,
childrenOfInst,
parentsOfInst,
buildInstPredicate,
instEqual,
treeFilter,
getNode,
} from './MountedTrav... |
src/_store/root.js | qingweibinary/binary-next-gen | import React, { Component } from 'react';
import { addLocaleData } from 'react-intl';
import { Provider } from 'react-redux';
import { bindActionCreators } from 'redux';
import { store, rehydratedStorePromise } from './persistentStore';
import { Router } from 'react-router';
import routes from '../_routes';
import { tr... |
app/javascript/mastodon/features/keyboard_shortcuts/index.js | unarist/mastodon | import React from 'react';
import Column from '../ui/components/column';
import ColumnBackButtonSlim from '../../components/column_back_button_slim';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
import ImmutablePureComponent from 'react-immutable-pure-co... |
src/components/header.js | dstrunk/dstrunk.github.io | import { Link } from 'gatsby'
import PropTypes from 'prop-types'
import React from 'react'
const isPartiallyActive = ({ isPartiallyCurrent }) => {
return isPartiallyCurrent
? { className: 'nav__link nav__link--active' }
: { className: 'nav__link' }
}
const PartialNavLink = props => (
<Link getProps={isPar... |
src/index.js | Angelmmiguel/curso-react-app | // Styles
import './index.css';
// Importamos las distintas librerias
import React from 'react';
import ReactDOM from 'react-dom';
// Redux
import { Provider } from 'react-redux';
import store from './store';
// Importamos los componentes
import { Router, Route, hashHistory } from 'react-router';
import BaseContaine... |
frontend/app_v2/src/common/widgetIcons/About.js | First-Peoples-Cultural-Council/fv-web-ui | import React from 'react'
import PropTypes from 'prop-types'
function About({ styling }) {
return (
<svg className={styling} viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">
<path d="M600 60C301.2 60 60 301.2 60 600s241.2 540 540 540 540-241.2 540-540S898.8 60 600 60zm-36 217.2c14.398-14.398 32.... |
definitions/npm/react-testing-library_v2.0.x/flow_v0.104.x-/test_react-testing-library_v2.0.x.js | flowtype/flow-typed | // @flow
import React from 'react';
import { render, Simulate, wait } from 'react-testing-library';
import { describe, it } from 'flow-typed-test';
describe('wait()', () => {
it('should fail on invalid inputs', () => {
// $FlowExpectedError
wait(1);
// $FlowExpectedError
wait(() => {}, 1);
});
... |
ui/js/components/WebSocketStatus/WebSocketStatus.js | NitorCreations/willow-ui | import React from 'react';
import PureComponent from 'react-pure-render/component';
import { connect } from 'react-redux';
class WebSocketStatus extends PureComponent {
constructor(props) {
super(props);
}
render() {
var rows = [];
this.props.websockets.forEach(ws => {
var key = ws.getIn(['ins... |
test/client/unit/components/PrisonerProfile.spec.js | noms-digital-studio/csra-app | import React from 'react';
import { shallow } from 'enzyme';
import PrisonerProfile
from '../../../../client/javascript/components/PrisonerProfile';
describe('<PrisonerProfile />', () => {
it('renders the prisoners profile details', () => {
const prisonerDetails = {
forename: 'foo-name',
surname: ... |
content/theme/components/Pipelines/ResourceDetailEdit.js | typesettin/NativeCMS | import React, { Component } from 'react';
import { StyleSheet, ScrollView, View, Platform, ListView, Image, Dimensions, TextInput, } from 'react-native';
import * as Animatable from 'react-native-animatable';
import styles from '../../../../app/components/Styles/shared';
import layoutStyles from '../../../../app/compon... |
src/server/index.js | BeMacized/GrimoireWeb | // @flow
import { StaticRouter } from 'react-router-dom'
import React from 'react'
import express from 'express'
import session from 'express-session'
import connectRedis from 'connect-redis'
import passport from 'passport'
import { renderToString } from 'react-dom/server'
import { Provider } from 'react-redux'
import... |
test/components/Counter.spec.js | lksilva/elecash-flow | import { spy } from 'sinon';
import React from 'react';
import { shallow } from 'enzyme';
import { BrowserRouter as Router } from 'react-router-dom';
import renderer from 'react-test-renderer';
import Counter from '../../app/components/Counter';
function setup() {
const actions = {
increment: spy(),
incremen... |
app/javascript/mastodon/components/relative_timestamp.js | masarakki/mastodon | import React from 'react';
import { injectIntl, defineMessages } from 'react-intl';
import PropTypes from 'prop-types';
const messages = defineMessages({
just_now: { id: 'relative_time.just_now', defaultMessage: 'now' },
seconds: { id: 'relative_time.seconds', defaultMessage: '{number}s' },
minutes: { id: 'relat... |
test/integration/image-optimization/pages/static-head.js | JeromeFitz/next.js | import React from 'react'
import Head from 'next/head'
const Page = () => {
return (
<>
<Head>
<link
href="https://fonts.googleapis.com/css2?family=Modak"
rel="stylesheet"
/>
</Head>
<div>Hi!</div>
</>
)
}
export default Page
|
app/components/searchResult.js | andela-batolagbe/feedboard | import React from 'react';
import {Link} from 'react-router';
import spotsStore from '../stores/spotStores';
class DisplayResult extends React.Component {
constructor(props) {
super(props);
this.state = spotsStore.getState();
this.onChange = this.onChange.bind(this);
}
componentDidMount() {
cons... |
assets/javascripts/kitten/components/interaction/upload/image-drop-uploader/test.js | KissKissBankBank/kitten | import React from 'react'
import renderer from 'react-test-renderer'
import { ImageDropUploader } from './index'
describe('<ImageDropUploader />', () => {
it('should match snapshot', () => {
const component = renderer
.create(<ImageDropUploader id="ImageDropUploader" />)
.toJSON()
expect(componen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.