path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/js/components/input/datefilter/input_datefilter_body.js | working-minds/realizejs | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import PropTypes from '../../../prop_types';
import i18n from '../../../i18n';
import { autobind, mixin } from '../../../utils/decorators';
import { compact } from 'lodash';
import {
Button,
Input,
} from '../../../components';
import { C... |
src/components/EventPage/EventPage.js | RetroGameNight/rgn-ui | /*
* Retro Game Night
* Copyright (c) 2015 Sasha Fahrenkopf, Cameron White
*
* 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' // eslint-disable-line no-unused-vars
import flux from '../../flux/flux'
import... |
public/js/components/activityfeed/activityMain.react.js | TRomesh/Coupley | import React from 'react';
import StatusBox from './activityBox.react';
import ActivityContainer from './activityContainer.react';
import ActivityList from './activityListComp.react';
const ActivityMain = React.createClass({
render: function () {
return (
<div>
<div>
... |
website-prototyping-tools/playground.js | vedmalex/relay | import 'babel/polyfill';
import React from 'react'; window.React = React;
import ReactDOM from 'react/lib/ReactDOM';
import RelayPlayground from './RelayPlayground';
import queryString from 'query-string';
var queryParams = queryString.parse(location.hash);
if (
/^https?:\/\/facebook.github.io\//.test(document.re... |
Lab9/solution.js | prpatel/react-workshop-day1 | import React from 'react';
import ReactDOM from 'react-dom';
import moment from 'moment';
import Bootstrap from 'react-bootstrap';
import Jumbotron from 'react-bootstrap/lib/Jumbotron';
import Panel from 'react-bootstrap/lib/Panel';
import Input from 'react-bootstrap/lib/Input';
import Label from 'react-bootstrap/lib/L... |
front/src/wdyr.js | EcrituresNumeriques/stylo | import React from 'react';
if (import.meta.env.DEV) {
const {default: whyDidYouRender} = await import('@welldone-software/why-did-you-render');
const ReactRedux = await import('react-redux/lib')
whyDidYouRender(React, {
trackAllPureComponents: true,
trackExtraHooks: [
[ReactRedux, 'useSelector'],
... |
src/components/ResponsiveText.js | w01fgang/elemental | import React from 'react';
import blacklist from 'blacklist';
import E from '../constants';
module.exports = React.createClass({
displayName: 'ResponsiveText',
propTypes: {
hiddenLG: React.PropTypes.string,
hiddenMD: React.PropTypes.string,
hiddenSM: React.PropTypes.string,
hiddenXS: React.PropTypes.string,
... |
src/ButtonToolbar.js | modulexcite/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const ButtonToolbar = React.createClass({
mixins: [BootstrapMixin],
getDefaultProps() {
return {
bsClass: 'button-toolbar'
};
},
render() {
let classes = this.getBsClassSet();
... |
graph_ui/__tests__/ExportURL-test.js | rwhite226/Graphalyzer | 'use strict';
jest.unmock('../js/ExportURL');
import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import ExportURL from '../js/ExportURL';
describe('ExportURL', () => {
var URL = "http://graphalyzer.wk-dev.wdesk.org/"
const exportURL = TestUtils.renderI... |
src/web/components/Header.js | TeodorKolev/Help | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
Nav,
Navbar,
Collapse,
DropdownMenu,
DropdownItem,
NavbarToggler,
DropdownToggle,
UncontrolledDropdown,
} from 'reactstrap';
import { Link, withRouter } from 'react-router-dom';
import Config from '../../constants/con... |
src/views/StatsView.js | todvora/extrade | import React from 'react'
import Product from 'components/Product'
import ProductNavigation from 'components/ProductNavigation'
import { connect } from 'react-redux'
import { actions as apiActions } from '../redux/modules/api'
const mapStateToProps = (state) => ({
progress: state.api.progress,
products: state.api... |
packages/material-ui-icons/src/EventSeat.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let EventSeat = props =>
<SvgIcon {...props}>
<path d="M4 18v3h3v-3h10v3h3v-6H4zm15-8h3v3h-3zM2 10h3v3H2zm15 3H7V5c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v8z" />
</SvgIcon>;
EventSeat = pure(EventSeat);
EventSeat.m... |
app/components/elements/PopoverLabel.js | tidepool-org/blip | import React from 'react';
import PropTypes from 'prop-types';
import InfoRoundedIcon from '@material-ui/icons/InfoRounded';
import { Text, Flex, FlexProps } from 'rebass/styled-components';
import {
usePopupState,
bindHover,
bindPopover,
bindToggle,
} from 'material-ui-popup-state/hooks';
import Popover from... |
src/components/shared/information-modal.js | gabrielecker/animapp | import React, { Component } from 'react';
import { Button, Modal, Icon } from 'semantic-ui-react';
class InformationModal extends Component {
render() {
const { open, confirmButton, informationButton, cancelButton, information } = this.props;
return (
<Modal open={open}>
<Modal.Header><Icon nam... |
app/components/UsersActions/ActionsDirectionFilter.js | CaptainFact/captain-fact-frontend | import React from 'react'
import { Trans, withNamespaces } from 'react-i18next'
import UserAppellation from '../Users/UserAppellation'
import { Link } from 'react-router'
const ActionsDirectionFilter = ({ user, value, t }) => {
const baseLink = `/u/${user.username}/activity`
const getLinkProps = (filterValue) => (... |
docs/src/examples/elements/Image/Groups/ImageExampleGroupSize.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Divider, Image } from 'semantic-ui-react'
const src = '/images/wireframe/image.png'
const ImageExampleGroupSize = () => (
<div>
<Image.Group size='tiny'>
<Image src={src} />
<Image src={src} />
<Image src={src} />
<Image src={src} />
</Image.Group>
... |
components/GoogleAnalytics/GoogleAnalytics.js | cable729/react-blog | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import React, { Component } from 'react';
import { googleAnalyticsId } from '../../config';
const trackingCode = { __html:
`(function(b,o,i,l,e,r){b.GoogleAnalyticsO... |
app/javascript/mastodon/features/compose/components/character_counter.js | Kirishima21/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { length } from 'stringz';
export default class CharacterCounter extends React.PureComponent {
static propTypes = {
text: PropTypes.string.isRequired,
max: PropTypes.number.isRequired,
};
checkRemainingText (diff) {
if (diff < 0)... |
docs/src/app/components/pages/components/Snackbar/Page.js | ngbrown/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 SnackbarReadmeText from './README';
import SnackbarExampleSimple from './... |
actor-apps/app-web/src/app/components/Deactivated.react.js | webwlsong/actor-platform | import React from 'react';
class Deactivated extends React.Component {
render() {
return (
<div className="deactivated row center-xs middle-xs">
<div className="deactivated__window">
<h2>Tab deactivated</h2>
<p>
Oops, you have opened another tab with Actor, so we had... |
app/addons/fauxton/notifications/components/NotificationPanelWithTransition.js | michellephung/couchdb-fauxton | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed un... |
src/containers/Sales/CustomDetail/Business/Usage.js | UncleYee/crm-ui | import React from 'react';
import Highcharts from 'highcharts';
import {connect} from 'react-redux';
import {queryKeyFunc} from 'redux/modules/custom';
const styles = {
root: {
width: '100%',
padding: '18px 14px',
height: 435,
},
title: {
margin: 0,
padding: 0,
fontSize: 16,
marginBot... |
src/browser/cards/Turns.js | xiankai/triple-triad-solver | import React from 'react';
import {
Text,
} from '../app/components';
const Turns = ({
isPlayerTurn,
}) => (
<Text
bold
style={{
color: isPlayerTurn ? '#4AC8E6' : '#E27062',
transform: 'scale(2,1)',
}}
>
{ isPlayerTurn ? 'YOUR TURN' : 'OPPONENT\'S TURN' }
</Text>
);
export defau... |
packages/mineral-ui-icons/src/IconOndemandVideo.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconOndemandVideo(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...icon... |
test/checkbox-spec.js | 2947721120/material-ui | import React from 'react';
import Checkbox from 'checkbox';
import injectTheme from './fixtures/inject-theme';
import TestUtils from 'react-addons-test-utils';
describe('Checkbox', () => {
/* eslint-disable max-len */
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... |
WebDev/BE/JS/electron/chatApp/src/Components/UserList/UserList.js | ParkDyel/practice | import React, { Component } from 'react';
export default class UserListComponent extends Component{
render(){
return(
<div className={this.props.isActive?'active':'deactive'}>
<h2>UserList</h2>
<ul>
{
this.props.users.map((user) => {
return <li key={user.... |
client/src/app/components/common/Header.js | zraees/sms-project | /**
* Created by griga on 11/17/15.
*/
import React from 'react'
import FullScreen from './FullScreen'
import ToggleMenu from './ToggleMenu'
import SpeechButton from '../voice-control/components/SpeechButton'
import SearchMobile from './SearchMobile'
import Activities from '../activities/components/Activities'
imp... |
simul/app/components/enter.js | sf-red-pandas-2016/simul-react-native | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Image,
TouchableHighlight,
} from 'react-native';
import Home from './home.js'
import General from '../styles/general.js'
import I18n from 'react-native-i18n'
class Enter extends Component{
constructor(props) {
super(props);
... |
src/modules/textNodes/components/TextNodesEditor/TextNodesEditor.js | CtrHellenicStudies/Commentary | import React from 'react';
import PropTypes from 'prop-types';
import { compose } from 'react-apollo';
import Select from 'react-select';
import autoBind from 'react-autobind';
import {
ControlLabel,
FormGroup,
} from 'react-bootstrap';
import TextField from 'material-ui/TextField';
// graphql
import { editionsQuery... |
src/components/Inputs/Checkbox/CheckBox.js | macdja38/pvpsite | /**
* 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 PropTypes... |
Libraries/Image/Image.ios.js | Bhullnatik/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... |
photos/static/js/components/album.js | dpetzold/django-react-djangocon2015 | import React from 'react'
import {Grid, Col, Row} from 'react-bootstrap'
import PhotoPanel from './photo-panel'
import FavoritePanel from './favorite-panel'
const Album = React.createClass({
render() {
return (
<Grid>
<Row>
<Col md={10} sm={10}>
<PhotoPanel
ph... |
tests/views/HomeView.spec.js | danieljwest/ExamGenerator | import React from 'react'
import TestUtils from 'react-addons-test-utils'
import { bindActionCreators } from 'redux'
import { HomeView } from 'views/HomeView/HomeView'
import { mount } from 'enzyme'
function shallowRender (component) {
const renderer = TestUtils.createRenderer()
renderer.render(component)
retur... |
example/DoneContent/index.js | srankmeng/react-wizard-step | import React from 'react'
import WizardStep from 'react-wizard-step'
import Check from './check.png'
const TestComponent = ({ children }) => (<div>{ children }</div>)
const DoneComponent = () => (
<div style={{ textAlign: 'center' }}>
<img width="100" src={Check} />
<h4>Success</h4>
</div>
)
const DoneCont... |
__tests__/index.ios.js | mironiasty/GdziesikTramwajka | 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 />
);
});
|
client/pages/user/ResetPassword.js | collectiveidea/rails_relay_authentication | /* eslint-disable */
import React from 'react'
import PropTypes from 'prop-types'
import { routerShape } from 'found/lib/PropTypes'
import { createFragmentContainer, graphql } from 'react-relay'
import Formsy from 'formsy-react'
import { FormsyText } from 'formsy-material-ui'
import RaisedButton from 'material-ui/Rais... |
src/rating/__tests__/Rating.js | fengshanjian/react-native-komect-uikit | import React from 'react';
import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import Rating from '../Rating';
describe('Rating Component', () => {
it('should render without issues', () => {
const component = shallow(<Rating />);
expect(component.length).toBe(1);
expect(toJson(compone... |
examples/05 Customize/Handles and Previews/Container.js | zetkin/react-dnd | import React, { Component } from 'react';
import { DragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd/modules/backends/HTML5';
import BoxWithImage from './BoxWithImage';
import BoxWithHandle from './BoxWithHandle';
@DragDropContext(HTML5Backend)
export default class Container extends Component {
... |
examples/todomvc/test/components/Header.spec.js | ide/redux | import expect from 'expect'
import React from 'react'
import TestUtils from 'react-addons-test-utils'
import Header from '../../components/Header'
import TodoTextInput from '../../components/TodoTextInput'
function setup() {
const props = {
addTodo: expect.createSpy()
}
const renderer = TestUtils.createRend... |
src/Send.js | Chatnbook/react-native-gifted-chat | import PropTypes from 'prop-types';
import React from 'react';
import {
StyleSheet,
Text,
TouchableOpacity,
View,
ViewPropTypes,
} from 'react-native';
export default class Send extends React.Component {
// shouldComponentUpdate(nextProps, nextState) {
// if (this.props.text.trim().length === 0 && next... |
stories/index.js | n1207n/guess-the-sentence | import React from 'react';
import { storiesOf, action, linkTo } from '@kadira/storybook';
import { withKnobs, text, boolean, number } from '@kadira/storybook-addon-knobs';
import { WithNotes } from '@kadira/storybook-addon-notes';
import { muiTheme } from 'storybook-addon-material-ui';
import Button from './Button';
... |
packages/icons/src/md/editor/FormatLineSpacing.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdFormatLineSpacing(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M13 14h5l-7-7-7 7h5v20H4l7 7 7-7h-5V14zm8-4v4h24v-4H21zm0 28h24v-4H21v4zm0-12h24v-4H21v4z" />
</IconBase>
);
}
export default MdForm... |
apps/react/components/App.js | router5/examples | import React from 'react';
import Nav from './Nav';
import Main from './Main';
export default function App(props) {
return (
<div className='mail-client'>
<aside>
<Nav />
</aside>
<main>
<Main />
</main>
</div>
);
... |
assets/jqwidgets/demos/react/app/progressbar/righttoleftlayout/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxProgressBar from '../../../jqwidgets-react/react_jqxprogressbar.js';
class App extends React.Component {
render() {
return (
<JqxProgressBar ref='horizontalProgressBar'
rtl={true}
width={250}... |
src/components/common/svg-icons/hardware/headset-mic.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareHeadsetMic = (props) => (
<SvgIcon {...props}>
<path d="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8H5v-2c0-3.87 3.13-7 7-7s7 3.13 7 7v2h-4v8h4v1h-7v2h6c1.66 0 3-1.34 3-3V10c0-4.97-4.03-9-9-9z"/>
... |
Calcuman/__tests__/index.android.js | antonfisher/game-calcuman | import 'react-native';
import React from 'react';
import Index from '../index.android.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
app/javascript/mastodon/features/ui/components/focal_point_modal.js | dwango/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { connect } from 'react-redux';
import ImageLoader from './image_loader';
import classNames from 'classnames';
import { changeUploadCompose } from '../../../... |
src/components/common/MessageInput/index.js | kcliu/chatroom-frontend | import React, { Component } from 'react';
import moment from 'moment';
import './styles.css';
export default class MessageBox extends Component {
state = {
text: '',
}
handleKeyPress = (e) => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault()
if (this.state.text === '') { return }... |
stories/Icons/RTLIcon.js | skyiea/wix-style-react | import React from 'react';
import {Duplicate2} from 'wix-style-react/Icons';
import s from './style.scss';
export default () => {
return (
<div className="rtl">
<div className={s.iconList}>
<div className={s.singleIconView}>
<span><Duplicate2 size="3em"/></span>
<span className=... |
src/components/modal/ModalHeader.js | ProAI/react-essentials | import React from 'react';
import PropTypes from 'prop-types';
import BaseView from '../../utils/rnw-compat/BaseView';
const propTypes = {
children: PropTypes.node.isRequired,
titleId: PropTypes.string,
};
const ModalHeader = React.forwardRef((props, ref) => (
<BaseView {...props} ref={ref} essentials={{ classN... |
src/components/Pagination/index.js | calpa/blog | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'gatsby';
import Dropdown from './Dropdown';
import { getPages } from '../../api';
import { handlePreviousPage, handleNextPage } from '../../api/url';
const PageItem = ({ number, content }) => (
<li className={`page-item${number < ... |
examples/with-grommet/pages/index.js | BlancheXu/test | import React from 'react'
import { Anchor, Box, Heading, Paragraph } from 'grommet'
export default () => (
<Box align='center' margin='large'>
<Heading>Grommet is awesome!</Heading>
<Paragraph>
Find out more at{' '}
<Anchor href='https://v2.grommet.io/'>https://v2.grommet.io/</Anchor>
</Parag... |
src/index.js | rogeliog/react-filters | import React from 'react';
import { App } from './App';
React.render(<App />, document.getElementById('root'));
|
modules/react-router-2.5.2/modules/__tests__/_bc-History-test.js | nanyou-environment/enBackEnd | import expect from 'expect'
import React from 'react'
import { render, unmountComponentAtNode } from 'react-dom'
import History from '../History'
import Router from '../Router'
import Route from '../Route'
import createHistory from 'history/lib/createMemoryHistory'
import shouldWarn from './shouldWarn'
describe('v1 Hi... |
exercises/isomorphic/solution/app.js | marocchino/learnyoureact | import React from 'react';
import ReactDOM from 'react-dom';
import TodoBox from './views/index.jsx';
let data = JSON.parse(document.getElementById('initial-data').getAttribute('data-json'));
ReactDOM.render(<TodoBox data={data} />, document.getElementById("app")); |
Frontend/src/index/invite_list.js | zsefvlol/threedegrees |
"use strict";
import React from 'react';
import { render } from 'react-dom';
import WeUI from 'react-weui';
import Ajax from '../lib/Ajax';
const {Cells, CellsTitle, CellBody, Cell, Button, CellFooter} = WeUI;
export default class InviteList extends React.Component {
state = {
invite_list : this.props.u... |
packages/netlify-cms-core/src/components/Editor/EditorPreviewPane/EditorPreview.js | netlify/netlify-cms | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import styled from '@emotion/styled';
function isVisible(field) {
return field.get('widget') !== 'hidden';
}
const PreviewContainer = styled.div`
font-family: Roboto, 'Helvetica Neue', Helvet... |
packages/bonde-admin/src/mobilizations/widgets/components/finish-message-custom.js | ourcities/rebu-client | import PropTypes from 'prop-types'
import React from 'react'
// Global module dependencies
import EditorDraft from '@/components/editor-draft-js'
import { EditorSlate } from '@/mobilizations/widgets/__plugins__/content/components'
const FinishMessageCustom = ({ readOnly, widget }) => {
const {
settings: {
... |
client/src/app/install/install-step-1-language.js | opensupports/opensupports | import React from 'react';
import {connect} from 'react-redux';
import history from 'lib-app/history';
import i18n from 'lib-app/i18n';
import ConfigActions from 'actions/config-actions';
import LanguageSelector from 'app-components/language-selector';
import Button from 'core-components/button';
import Header from '... |
server/sonar-web/src/main/js/apps/quality-profiles/home/PageHeader.js | lbndev/sonarqube | /*
* SonarQube
* Copyright (C) 2009-2017 SonarSource SA
* mailto:info 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, o... |
test/ListGroupItemSpec.js | justinanastos/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ListGroupItem from '../src/ListGroupItem';
describe('ListGroupItem', function () {
it('Should output a "span" with the class "list-group-item"', function () {
let instance = ReactTestUtils.renderIntoDocument(
<ListGro... |
src/infopages/EmailModal.js | VasilyShelkov/scikic-app | import React from 'react';
const EmailModal = () => {
let sender, content;
return (
<div className="ui modal" style={{ right: 'auto', bottom: 'auto' }}>
<div className="header">Drop us an Email</div>
<div className="content">
<div className="ui form">
<input placeholder="Your Email Address" ref={n... |
backend/dynamic-web-apps/voting-app/client/src/components/App.js | mkermani144/freecodecamp-projects | import React, { Component } from 'react';
import { Route, Link } from 'react-router-dom';
import AppBar from 'material-ui/AppBar';
import FlatButton from 'material-ui/FlatButton';
import { blue500, blue600, grey50, grey600 } from 'material-ui/styles/colors';
import HomeContainer from './HomeContainer';
import Dashboard... |
src/post/Post.js | ryanbaer/busy | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import VisibilitySensor from 'react-visibility-sensor';
import { getPostContent, getIsFetching, getIsPostEdited } from '../reducers';
import { getContent } from './postActions';
import Comments from '../comments/Commen... |
src/stories/lottie-control.js | chenqingspring/react-lottie | import React from 'react';
import Lottie from '../index';
import * as animationDataA from './pinjump.json';
import * as animationDataB from './TwitterHeart.json';
export default class LottieControl extends React.Component {
constructor(props) {
super(props);
this.state = {
isStopped: false,
isP... |
app/js/seed/views/_seedconfirm.js | blockstack/blockstack-browser | import React from 'react'
import { ShellScreen, Type, Button, Buttons } from '@blockstack/ui'
import PropTypes from 'prop-types'
import { Box, Inline, Flex } from '@components/ui/components/primitives'
import { Trail, config, animated } from 'react-spring'
function getRandomInt(min, max, exclude) {
min = Math.ceil(m... |
lib/components/MapLocalTile.js | zigbang/react-native-maps | import PropTypes from 'prop-types';
import React from 'react';
import {
ViewPropTypes,
View,
} from 'react-native';
import decorateMapComponent, {
USES_DEFAULT_IMPLEMENTATION,
SUPPORTED,
} from './decorateMapComponent';
// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
cons... |
transforms/__testfixtures__/undecorate/with-param.input.js | tizmagik/undecorate-codemod | import React from 'react';
import hoc1 from 'hoc1';
@hoc1('my-param')
export default class Thing extends React.Component {
render() {
return <div>Thing</div>;
}
}
|
app/client/layouts/components/Breadcrumbs.js | jmdesiderio/swan-cms | import React from 'react'
import styled from 'styled-components'
const Wrapper = styled.div`
border-bottom: 1px solid ${p => p.theme.colors.gainsboro};
padding: 1rem;
`
const Breadcrumbs = () => <Wrapper>Breadcrumbs</Wrapper>
export default Breadcrumbs
|
redux-distributed/todomvc-peerjs/src/components/TodoItem.spec.js | jurassix/react-examples | import React from 'react'
import TestUtils from 'react-addons-test-utils'
import TodoItem from './TodoItem'
import TodoTextInput from './TodoTextInput'
const setup = ( editing = false ) => {
const props = {
todo: {
id: 0,
text: 'Use Redux',
completed: false
},
editTodo: jest.fn(),
d... |
modules/__tests__/Redirect-test.js | cgrossde/react-router | /*eslint-env mocha */
import expect from 'expect'
import React from 'react'
import createHistory from 'history/lib/createMemoryHistory'
import Redirect from '../Redirect'
import Router from '../Router'
import Route from '../Route'
describe('A <Redirect>', function () {
let node
beforeEach(function () {
node =... |
src/components/Header/Header.js | remoteportal/widgets-spa-react | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react';
import styles from './Header.css';
import withStyles from '../../decorators/withStyles';
import Link from '../Link';
import Navigation from '../Navigation';
@withStyles(styles)
class Header extends Compo... |
client/components/menu/banks.js | bnjbvr/kresus | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { get } from '../../store';
import BankListItemComponent from './bank';
const BankListComponent = props => {
let { currentAccessId, currentAccountId } = props;
let banks = props.accessIds.map(accessId ... |
packages/mineral-ui-icons/src/IconPageview.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconPageview(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconProps... |
packages/mineral-ui-icons/src/IconCollectionsBookmark.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconCollectionsBookmark(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {.... |
components/Layout/Header.js | Zetoff/react-flexbox-grid-jss-demo | /**
* React Static Boilerplate
* https://github.com/kriasoft/react-static-boilerplate
*
* Copyright © 2015-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';
... |
examples/universal/client/index.js | arusakov/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... |
index/components/LinkButton.js | JDRomano2/VenomKB | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Link } from 'react-router';
class LinkButton extends React.Component {
constructor(props) {
super(props);
this.state = {
linkedId: props.linkedId,
};
}
render() {
return (
... |
src/svg-icons/communication/call-merge.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationCallMerge = (props) => (
<SvgIcon {...props}>
<path d="M17 20.41L18.41 19 15 15.59 13.59 17 17 20.41zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5 7.5 8z"/>
</SvgIcon>
);
CommunicationCallMerge... |
app/containers/LanguageProvider/index.js | wellingtonsampaio/react-kanban-board | /*
*
* LanguageProvider
*
* this component connects the redux state language locale to the
* IntlProvider component and i18n messages (loaded from `app/translations`)
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { IntlProvider } from 'reac... |
catalog/app/utils/string.js | quiltdata/quilt | /* String utils */
import * as R from 'ramda'
import React from 'react'
export function printObject(obj) {
return JSON.stringify(obj, null, ' ')
}
const suffixes = ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']
const splitNumber = (n) => {
const exp = n === 0 ? 0 : Math.log10(n)
const index = Math.min(Math.floo... |
src/index.js | gilbox/elegant-react-hot-demo | import 'core-js/shim'; // for Array.fill
import React from 'react';
import App from './App';
import {fromJS} from 'immutable';
import Atom from './atom';
import timeTravelPlugin from './time-travel-plugin/'
import TimeTravelControlPanel from './time-travel-plugin/ControlPanel';
// initial app state
const state = modu... |
step5-forms/node_modules/react-router/modules/Lifecycle.js | jintoppy/react-training | import warning from './routerWarning'
import React from 'react'
import invariant from 'invariant'
const { object } = React.PropTypes
/**
* The Lifecycle mixin adds the routerWillLeave lifecycle method to a
* component that may be used to cancel a transition or prompt the user
* for confirmation.
*
* On standard ... |
viewer/core/static/js/app/components/containers/chart-container.js | openjck/distribution-viewer | import React from 'react';
import { connect } from 'react-redux';
import * as d3Scale from 'd3-scale';
import * as d3Array from 'd3-array';
import Chart from '../views/chart';
import * as metricApi from '../../api/metric-api';
import { debounce } from '../../utils';
class ChartContainer extends React.Component {
c... |
client/components/charts/index.js | bnjbvr/kresus | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { get, actions } from '../../store';
import { translate as $t } from '../../helpers';
import InOutChart from './in-out-chart';
import BalanceChart from './balance-chart';
import CategoryCharts from './category... |
src/components/messages/message_entry.js | obie-obie-oh/obie | import React from 'react'
const MessageEntry = ({
message
}) => (
<section className="message-entry list-entry" style={{ display: 'block' }}>
<img src={message.user_image_url} width="50px" />
<div className="username">
<p>{message.name}</p>
</div>
<div className="message-text">
<p>{mess... |
test/TransitionSpec.js | simonliubo/react-ui | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import { render } from './helpers';
import Transition, {UNMOUNTED, EXITED, ENTERING, ENTERED, EXITING} from
'../src/Transition';
describe('Transition', function () {
it('should not transition on mount', function(){
let instance =... |
src/svg-icons/device/brightness-high.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBrightnessHigh = (props) => (
<SvgIcon {...props}>
<path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 ... |
fields/types/boolean/BooleanFilter.js | tanbo800/keystone | import React from 'react';
import { SegmentedControl } from 'elemental';
const TOGGLE_OPTIONS = [
{ label: 'Is Checked', value: true },
{ label: 'Is NOT Checked', value: false }
];
var BooleanFilter = React.createClass({
getInitialState () {
return {
checked: this.props.value || TOGGLE_OPTIONS[0].value
};
... |
client/tests/components/headers/MainHeader.spec.js | johadi10/PostIt | import 'babel-polyfill';
import React from 'react';
import expect from 'expect';
import { mount } from 'enzyme';
import MainHeader from '../../../src/components/headers/MainHeader';
const wrapper = mount(<MainHeader/>);
describe('<MainHeader/>', () => {
it('should check the div with navbar class exists', () => {
... |
src/client/tests/layouts/CoreLayout.spec.js | aquibm/Research-Engine | import React from 'react'
import TestUtils from 'react-addons-test-utils'
import CoreLayout from 'layouts/CoreLayout/CoreLayout'
function shallowRender (component) {
const renderer = TestUtils.createRenderer()
renderer.render(component)
return renderer.getRenderOutput()
}
function shallowRenderWithProps (props... |
assets/jqwidgets/demos/react/app/datetimeinput/timeinput/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxDateTimeInput from '../../../jqwidgets-react/react_jqxdatetimeinput.js';
class App extends React.Component {
render() {
return (
<JqxDateTimeInput
width={250} height={25} formatString={'T'}
s... |
public/js/cat_source/es6/components/modals/CreateTeam.js | matecat/MateCat | import React from 'react'
import ManageActions from '../../actions/ManageActions'
import CommonUtils from '../../utils/commonUtils'
import {ModalWindow} from './ModalWindow'
class CreateTeam extends React.Component {
constructor(props) {
super(props)
this.state = {
errorInput: false,
errorDropdo... |
src/client/story_list.js | codevlabs/hacker-menu | import React from 'react'
import Story from './story.js'
import _ from 'lodash'
export default class StoryList extends React.Component {
render () {
var onUrlClick = this.props.onUrlClick
var onMarkAsRead = this.props.onMarkAsRead
var storyNodes = _.map(this.props.stories, function (story, index) {
... |
src/components/mensaje-commit.js | ReactJS-BA/meetup-2016-04-05 | import React from 'react';
var defaultGravatar = 'http://www.gravatar.com/avatar/205e460b479e2e5b48aec07710c08d50?f=y';
class MensajeCommit extends React.Component {
render() {
var avatar = this.props.commit.author ? this.props.commit.author.avatar_url : defaultGravatar,
d = new Date(this.props.co... |
routes.js | housseindjirdeh/git-point | /* eslint-disable react/prop-types */
import React from 'react';
import {
StackNavigator,
TabNavigator,
TabBarBottom,
NavigationActions,
} from 'react-navigation';
import { Icon } from 'react-native-elements';
import { colors } from 'config';
// Auth
import {
SplashScreen,
LoginScreen,
WelcomeScreen,
... |
src/components/MiniInput/MiniInput.stories.js | austinknight/ui-components | import React from "react";
import styled from "styled-components";
import { storiesOf, action } from "@storybook/react";
import MiniInput from "./MiniInput";
import {
renderThemeIfPresentOrDefault,
wrapComponentWithContainerAndTheme,
colors
} from "../styles";
const Wrapper = styled.div`
background-color: ${... |
wrappers/html.js | philipnilsson/Badness10k | import React from 'react'
import Helmet from 'react-helmet'
import { config } from 'config'
module.exports = React.createClass({
propTypes () {
return {
router: React.PropTypes.object,
}
},
render () {
const page = this.props.route.page.data
return (
<div>
<Helmet
ti... |
node_modules/react-bootstrap/src/Label.js | gitoneman/react-home | import React from 'react';
import classSet from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const Label = React.createClass({
mixins: [BootstrapMixin],
getDefaultProps() {
return {
bsClass: 'label',
bsStyle: 'default'
};
},
render() {
let classes = this.getBsClassSet(... |
src/components/NavBar/NavBar.js | patrickfatrick/audio-book-react | import React from 'react';
import PropTypes from 'prop-types';
import c from 'classnames';
import truncate from '../../utils/truncate';
import useResizeObserver from '../../hooks/useResizeObserver';
import Controls from '../Controls';
import Chapters from '../Chapters';
import infoShape from '../../shapes/infoShape';
i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.