path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
src/components/SettingsDictionaries.js | rsimmons/immersion-player | import React, { Component } from 'react';
import Button from './Button';
import './SettingsDictionaries.css';
export default class SettingsDictionaries extends Component {
handleMove = (idx, direction) => {
const names = [...this.props.dictionaries.keys()];
if (direction === -1) {
if (idx === 0) {
... |
src/client/components/quizz/QuizzStepHead.js | JulienPradet/quizzALJP | import React from 'react'
import StepPathForm from './StepPathForm'
import AddStepForm from './AddStepForm'
import Block from '../ui/Block'
import StepButton from '../ui/form/Step'
import { Button } from '../ui/FormBase'
import { FormGroup } from '../ui/FormLayout'
export default class QuizzStepHead extends React.Com... |
test/Relative.spec.js | itsolutions-dev/react-styled-ui | import React from 'react';
import ReactTestRenderer from 'react-test-renderer';
import 'styled-components-test-utils/lib/jest';
import theme from '../src/theme';
import Relative from '../src/Relative';
describe('Relative', () => {
test('should render a Relative', () => {
const component = ReactTestRenderer.creat... |
src/views/components/Switch.js | physiii/open-automation | import React from 'react';
import PropTypes from 'prop-types';
import './Switch.css';
export const Switch = (props) => {
const {isOn, showLabels, offLabel, onLabel, ...inputProps} = {...props};
return (
<div styleName={'container' + (props.disabled ? ' isDisabled' : '')}>
{showLabels && <span styleName="offLab... |
mxcube3/ui/components/SampleQueue/SampleQueueSearch.js | mguijarr/mxcube3 | import React, { Component } from 'react';
import { reduxForm } from 'redux-form';
import { Input, Button, Glyphicon } from 'react-bootstrap';
class SampleQueueSearch extends Component {
render() {
const { fields: { sampleName } } = this.props;
const innerSearchIcon = (
<Button><Glyphicon glyph="searc... |
ui/test/unit/components/Task-test.js | mmadej85/todo-list | import React from 'react';
import {expect} from 'chai';
import {shallow} from 'enzyme';
import Task from '../../../app/components/Task';
describe('<Task/>', function() {
it('renders html with subject and content', () => {
const taskJson = {'subject' : 'first task', 'content': 'sample content', 'id': '321'};
... |
newclient/scripts/components/dynamic-icons/plus-icon/index.js | kuali/research-coi | /*
The Conflict of Interest (COI) module of Kuali Research
Copyright © 2005-2016 Kuali, Inc.
This program 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, either version 3 of the
Lic... |
app.js | jacobhamblin/drew | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import 'babel/polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
import Location from '.... |
gallery-by-react/src/index.js | ice139999361/mohoo | 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'));
|
imports/ui/pages/Account/pages/VerifyEmail/index.js | ShinyLeee/meteor-album-app | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import ViewLayout from '/imports/ui/layouts/ViewLayout';
import PrimaryNavHeader from '/imports/ui/components/NavHeader/Primary';
import { Content } from './styles';
export default class VerifyEmailPa... |
src/components/calendarBody.js | cheeki/react-calendar | /**
* Created by 1001196 on 16. 1. 20..
*/
import React from 'react';
import CalendarLabel from './calendarLabel';
import CalendarCell from './calendarCell'
export default class CalendarBody extends React.Component {
constructor () {
super ();
}
shouldComponentUpdate (nextProps, nextState) {
... |
src/shared/components/authenticatedRoute/authenticatedRoute.js | miaket/operationcode_frontend | import React from 'react';
import PropTypes from 'prop-types';
import { Route, Redirect } from 'react-router-dom';
const AuthenticatedRoute = (props) => {
if (!props.isLoggedIn) {
return <Redirect to="/login" />;
}
return <Route component={props.component} {...props} />;
};
AuthenticatedRoute.propTypes = {
... |
app/javascript/components/conditions/DisplayLogicFormField/injector.js | thecartercenter/elmo | import React from 'react';
import PropTypes from 'prop-types';
import { Provider } from 'mobx-react';
import ConditionSetModel from '../ConditionSetFormField/model';
import { provideConditionSetStore } from '../ConditionSetFormField/utils';
import DisplayLogicFormField from './component';
let forcedResetNonce = 0;
/... |
src/components/App/setViewport.js | masterfung/react-twitter | /*
* 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 React, { Component } from 'react'; // eslint-disable-line no-unused-vars
import { ... |
pootle/static/js/admin/components/ItemTable.js | dwaynebailey/pootle | /*
* Copyright (C) Pootle contributors.
*
* This file is a part of the Pootle project. It is distributed under the GPL3
* or later license. See the LICENSE file for a copy of the license and the
* AUTHORS file for copyright and authorship information.
*/
import React from 'react';
import ItemTableRow from './It... |
client/src/components/TextField/tests/TextField-story.js | silverstripe/silverstripe-admin | import React from 'react';
// eslint-disable-next-line import/no-extraneous-dependencies
import { setAddon, storiesOf } from '@storybook/react';
import { withKnobs, number, text } from '@storybook/addon-knobs';
import JSXAddon from 'storybook-addon-jsx';
setAddon(JSXAddon);
import TextField from 'components/TextField... |
src/components/header.js | thepeted/dungeon-crawler | import React from 'react';
export default ({level}) => {
return (
<div className="strip">
<h1>
<span
className={`title title-${level}`}
>
THE GRID
</span> - Roguelike
</h1>
</div>
);
};
|
12/notes/src/App.js | nanohop/hop_into_react | import React, { Component } from 'react';
import './App.css';
import Notes from './Notes';
class App extends Component {
render() {
return (
<Notes />
)
}
}
export default App;
|
react-redux-demo/todos-flow/src/index.js | fengnovo/webpack-react | // @flow
import React from 'react'
import { render } from 'react-dom'
import { createStore } from 'redux'
import { Provider } from 'react-redux'
import App from './components/App'
import reducer from './reducers'
import type { Store } from './types'
const store: Store = createStore(reducer)
render(
<Provider store=... |
src/svg-icons/notification/no-encryption.js | andrejunges/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationNoEncryption = (props) => (
<SvgIcon {...props}>
<path d="M21 21.78L4.22 5 3 6.22l2.04 2.04C4.42 8.6 4 9.25 4 10v10c0 1.1.9 2 2 2h12c.23 0 .45-.05.66-.12L19.78 23 21 21.78zM8.9 6c0-1.71 1.39-3.1 3.1... |
ui/src/main/js/components/JobStatus.js | rdelval/aurora | import React from 'react';
import CronJobPreview from 'components/CronJobPreview';
import JobConfig from 'components/JobConfig';
import PanelGroup from 'components/Layout';
import Tabs, { Tab } from 'components/Tabs';
import TaskList from 'components/TaskList';
import { isNully, sort } from 'utils/Common';
import { i... |
src/shared/components/grid/gridItem.js | namroodinc/contentful-react-mobx-post | import React from 'react';
export default class GridItem extends React.Component {
render() {
const { col, title, align } = this.props;
const alignClassName = align === 'right' && align !== 'left' ? `grid--align-right` : `grid--align-left`;
const className = col ? `grid grid__${col} ${alignClassName}` : ... |
src/svg-icons/image/panorama-wide-angle.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePanoramaWideAngle = (props) => (
<SvgIcon {...props}>
<path d="M12 6c2.45 0 4.71.2 7.29.64.47 1.78.71 3.58.71 5.36 0 1.78-.24 3.58-.71 5.36-2.58.44-4.84.64-7.29.64s-4.71-.2-7.29-.64C4.24 15.58 4 13.78 4 12... |
docs/server.js | nickuraltsev/react-bootstrap | /* eslint no-console: 0 */
import 'colors';
import React from 'react';
import express from 'express';
import path from 'path';
import Router from 'react-router';
import routes from './src/Routes';
import httpProxy from 'http-proxy';
import metadata from './generate-metadata';
import ip from 'ip';
const development =... |
react/features/base/react/components/native/Button.js | bgrozev/jitsi-meet | /* @flow */
import React, { Component } from 'react';
import { Text, TouchableOpacity } from 'react-native';
type Props = {
/**
* React Elements to display within the component.
*/
children: React$Node | Object,
/**
* Handler called when the user presses the button.
*/
onValueCha... |
client/src/components/Tabs/Tab.js | silverstripe/silverstripe-admin | import React from 'react';
import { NavItem, NavLink } from 'reactstrap';
import classnames from 'classnames';
import PropTypes from 'prop-types';
/**
* Render an individual link for the tabset.
* @param {string} title
* @param {boolean} disabled
* @param {boolean} active
* @param {string} tabClassName
* @param ... |
cheesecakes/admin/admin/src/components/SupportUsBanner/index.js | strapi/strapi-examples | /**
*
* SupportUsBanner
*
*/
import React from 'react';
import { FormattedMessage } from 'react-intl';
import SupportUsTitle from 'components/SupportUsTitle';
import SupportUsCta from 'components/SupportUsCta';
import styles from './styles.scss';
function SupportUsBanner() {
return (
<div className={styles... |
src/components/Button/Button-test.js | joshblack/carbon-components-react | /**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import Search16 from '@carbon/icons-react/lib/search/16';
import Button from '../Button';
import Link from '../Lin... |
js/components/fab/basic.js | YeisonGomez/RNAmanda |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { View, Platform } from 'react-native';
import { Container, Header, Title, Fab, Button, IconNB, Left, Right, Body, Icon } from 'native-base';
import { Actions } from ... |
Console/app/node_modules/rc-tree-select/es/Select.js | RisenEsports/RisenEsports.github.io | import _defineProperty from 'babel-runtime/helpers/defineProperty';
import _toConsumableArray from 'babel-runtime/helpers/toConsumableArray';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-ru... |
components/search-input.js | sgmap/inspire | import {format} from 'url'
import React from 'react'
import PropTypes from 'prop-types'
import {withRouter} from 'next/router'
import {translate} from 'react-i18next'
class SearchInput extends React.PureComponent {
static propTypes = {
router: PropTypes.shape({
push: PropTypes.func.isRequired,
query... |
client/src/Game/Prototype02/Walker/index.js | hold-the-door-game/Prototypes | import React from 'react';
import bind from 'react-autobind';
import WalkerSprite from './sprite';
import Game from 'Game/index.js'
class Walker extends React.Component {
constructor(props) {
super(props);
bind(this);
this.loadAnimations();
this.createSprite();
const canOpen = false;
const co... |
src/components/Main/index.js | balintsoos/brickland | import React from 'react'
import { Link } from 'react-router'
class Main extends React.Component {
render() {
return (
<div className="nav">
<Link to="about">About</Link>
<Link to="projects">Projects</Link>
</div>
)
}
}
export default Main
|
src/px-app-nav/index.js | jonniespratley/px-components-react | import React from 'react';
import classnames from 'classnames';
import stylesheet from './style.scss';
import NavItem from './px-app-nav-item';
import BaseComponent from '../base-component';
/**
* AppNav component
*/
export default class AppNav extends BaseComponent {
constructor(props){
super(props, {name: '... |
source/components/ImportControls.js | PitchInteractiveInc/hexagon-cartograms | import React from 'react'
import commaNumber from 'comma-number'
import {OBJECT_ID} from '../file/Exporter'
const CUSTOM_LABEL = 'Upload custom tilegram'
export default class ImportControls extends React.Component {
constructor(props) {
super(props)
this.state = {
selectedIndex: 0,
usingUpload:... |
src/components/Header/Header.js | febobo/react-redux-start | import React from 'react'
import { IndexLink, Link } from 'react-router'
import NavBar from '../NavBar'
import classes from './Header.scss'
import arrowIco from '../../static/images/arrowIco.png'
import { Menu, Dropdown, Icon } from 'antd';
import {i18n} from '../../util/i18n'
import store from 'store'
import c... |
src/components/RegistrationForm/RegistrationForm.js | patchygreen/ps-react-patchygreen | import React from 'react';
import PropTypes from 'prop-types';
import TextInput from '../TextInput';
import PasswordInput from "../PasswordInput";
/** Registration form with built-in validation */
class RegistrationForm extends React.Component {
constructor(props) {
super(props);
this.state = {
user :... |
src/encoded/static/components/__tests__/browse-test.js | hms-dbmi/fourfront | 'use strict';
/* Written by Carl, used to test the experiment set browsers
Made for 1st round browse (without file selectors).*/
import React from 'react';
import _ from 'underscore';
import TestUtils, { act } from 'react-dom/test-utils';
/**
* Some test portions currently disabled re: edits. Will need to rewrite s... |
src/components/ToggleSmall/ToggleSmall-test.js | carbon-design-system/carbon-components-react | /**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import ToggleSmall from '../ToggleSmall';
import ToggleSmallSkeleton from '../ToggleSmall/ToggleSmall.Skeleton';
i... |
ui/app/components/password_field.js | leapcode/bitmask-dev | //
// A validating password field, with a label and error messages.
//
import React from 'react'
import { FormGroup, ControlLabel, FormControl, HelpBlock} from 'react-bootstrap'
import Validate from 'lib/validate'
export default class PasswordField extends React.Component {
static get defaultProps() {
return {... |
client/fragments/quizzes/controller.js | yeoh-joer/synapse | /**
* External dependencies
*/
import React from 'react'
/**
* Internal dependencies
*/
import Quizzes from './main'
import Sections from './sections'
import Stream from './stream'
import Result from './result'
import DebrisResult from './debris-result'
import PasswordProtect from './password-protect'
import { re... |
internals/templates/containers/NotFoundPage/index.js | gihrig/react-boilerplate | /**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a necessity for you then you can refactor it... |
web-ui/src/login/error/generic_error.js | pixelated-project/pixelated-user-agent | /*
* Copyright (c) 2017 ThoughtWorks, Inc.
*
* Pixelated 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, either version 3 of the License, or
* (at your option) any later version.
*
* Pixelated i... |
src/icons/ShiftIcon.js | WiaczeslawP/react-screen-keyboard | import React from 'react';
const ShiftIcon = ({viewBox = '0 0 32 32', width = 24, height = 24, fill}) =>
<svg {...{width, height, fill, viewBox}}>
<path fill="currentColor" d="M21 28h-10c-0.552 0-1-0.448-1-1v-11h-4c-0.404 0-0.769-0.244-0.924-0.617s-0.069-0.804 0.217-1.090l10-10c0.391-0.39 1.024-0.39 1.414 0l10 10c0... |
src/js/components/Fields/TextField.js | jaedb/Iris | import React from 'react';
import Icon from '../Icon';
export default class TextField extends React.Component {
constructor(props) {
super(props);
this.state = {
in_focus: false,
value: props.value || '',
saved: false,
};
}
static getDerivedStateFromProps({ value }, ... |
app/components/LoadingIndicator/tests/Circle.test..js | qiubit/lamp-experiment | import React from 'react';
import expect from 'expect';
import { mount } from 'enzyme';
import Circle from '../Circle';
describe('<Circle />', () => {
it('should render an <div> tag', () => {
const renderedComponent = mount(<Circle />);
expect(renderedComponent.find('div').length).toEqual(1);
});
it('s... |
src/dialog/dialog.js | ricsv/react-leonardo-ui | import React, { Component } from 'react';
import { createPortal } from 'react-dom';
import DIALOG_STATE from '../overlay-state';
import { luiClassName } from '../util';
const FADE_DURATION = 200;
let currentId = 0;
class Dialog extends Component {
constructor(props) {
super(props);
this.portalId = `rlui-di... |
docs/src/examples/addons/Pagination/Types/index.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'
const PaginationTypesExamples = () => (
<ExampleSection title='Types'>
<ComponentExample
title='Pagination'
descript... |
app/static/src/diagnostic/TestTypeResultForm_modules/PolymerisationDegreeTestForm.js | SnowBeaver/Vision | import React from 'react';
import FormControl from 'react-bootstrap/lib/FormControl';
import FormGroup from 'react-bootstrap/lib/FormGroup';
import Button from 'react-bootstrap/lib/Button';
import Panel from 'react-bootstrap/lib/Panel';
import {findDOMNode} from 'react-dom';
import {hashHistory} from 'react-router';
im... |
egghead.io/react_fundamentals/lessons/13-dynamic/main.js | andrisazens/learning_react | // https://jsbin.com/qubonu/edit?js,output
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById('app'));
|
docs/src/CodeExample.js | xiaoking/react-bootstrap | import React from 'react';
export default class CodeExample extends React.Component {
render() {
return (
<pre className="cm-s-solarized cm-s-light">
<code>
{this.props.codeText}
</code>
</pre>
);
}
componentDidMount() {
if (CodeMirror === undefined) {
ret... |
my-app/src/components/pages/projectpages/stars/star.js | sThig/jabbascrypt | import React from 'react';
import styled from 'styled-components';
const Starholder = styled.span`
width: 10px;
height: 10px;
top: 45%;
position: fixed;
display: inline;
`
const Star = styled.span`
position: relative;
display: block;
width: 2px;
height: 2px;
border-radius: 50%;
background: white... |
src/components/CardCity/index.js | Cirych/WeatherApp | import React from 'react';
import { Card, CardHeader } from 'material-ui/Card';
import WeatherAvatar from '../WeatherAvatar';
const styles = {
cardStyle: {
backgroundColor: 'rgba(0, 0, 0, 0.5)'
},
cardHeaderStyle: {
titleStyle: {
color: 'white'
},
subTitleStyle: {
color: 'silver'
}
}
};
export con... |
src/widgets/Loading-spec.js | Sekhmet/busy | /* eslint-disable prefer-arrow-callback, no-undef, import/no-extraneous-dependencies */
import React from 'react';
import chai from 'chai';
import chaiEnzyme from 'chai-enzyme';
import { shallow } from 'enzyme';
import Loading from './Loading';
const { expect } = chai;
chai.use(chaiEnzyme());
describe('<Loading />',... |
app/javascript/mastodon/features/compose/containers/warning_container.js | theoria24/mastodon | import React from 'react';
import { connect } from 'react-redux';
import Warning from '../components/warning';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { me } from '../../../initial_state';
const buildHashtagRE = () => {
try {
const HASHTAG_SEPARATORS = '_\\u00b7\... |
[4]. Project/DianShang/Component/Home/SJHomeMiddleView.js | knightsj/RN_Demo | import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Image,
TouchableOpacity
} from 'react-native';
var Dimentions = require('Dimensions');
var{width,height} = Dimentions.get('window');
var CommonItemView = require('../Common/SJCommonItemView')
var MiddleData = require('... |
examples/transitions/app.js | KamilSzot/react-router | import React from 'react';
import createHistory from 'history/lib/createHashHistory';
import { Router, Route, Link, Navigation } from 'react-router';
var App = React.createClass({
render() {
return (
<div>
<ul>
<li><Link to="/dashboard">Dashboard</Link></li>
<li><Link to="/form"... |
frontend/src/components/StripeReminder.js | OpenCollective/opencollective-app | import React, { Component } from 'react';
import AsyncButton from './AsyncButton';
class StripeReminder extends Component {
constructor(props) {
super(props);
this.state = { inProgress: false };
}
render() {
const { isSuccessful } = this.props;
return (
<div className='Reminder'>
... |
js/Search2.js | aurimas-darguzis/react-intro | import React from 'react'
const Search2 = React.createClass({
render () {
return (
<h1>Search page!</h1>
)
}
})
export default Search2
|
js/components/Main.js | a-omsk/Vegreact | import React from 'react';
import Map from './Map';
import Toolbar from './Toolbar';
export default class Main extends React.Component {
render() {
return (
<div>
{this.props.children}
<Toolbar />
<Map />
</div>
);
}
}
|
src/svg-icons/navigation/unfold-less.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationUnfoldLess = (props) => (
<SvgIcon {...props}>
<path d="M7.41 18.59L8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"/>
</SvgIcon>
)... |
docs/app/Examples/collections/Message/Variations/MessageExampleInfo.js | mohammed88/Semantic-UI-React | import React from 'react'
import { Message } from 'semantic-ui-react'
const MessageExampleInfo = () => (
<Message info>
<Message.Header>Was this what you wanted?</Message.Header>
<p>Did you know it's been a while?</p>
</Message>
)
export default MessageExampleInfo
|
jenkins-design-language/src/js/components/material-ui/svg-icons/social/sentiment-very-satisfied.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const SocialSentimentVerySatisfied = (props) => (
<SvgIcon {...props}>
<path d="M11.99 2C6.47 2 2 6.47 2 12s4.47 10 9.99 10S22 17.53 22 12 17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm1-10.06L14.06 11l1.06-1.06L16.18 1... |
src/js/components/__tests__/BuilCard.spec.js | alexey-ernest/ci-list |
import React from 'react';
import renderer from 'react-test-renderer';
import ThemeWrapper from '../../ThemeWrapper';
import BuildCard from '../BuildCard.react';
jest.mock('react-dom');
describe('BuildCard component', () => {
const data = {
id: 'abcd',
build: {
type: 'DEBUG',
version: '1.0.1... |
test/popup/Header.js | tegon/traktflix | import { BrowserRouter as Router } from 'react-router-dom';
import { mount } from '../../test-helpers/EnzymeHelper';
import browser from 'sinon-chrome';
import sinon from 'sinon';
import React from 'react';
import Header from '../../src/class/popup/Header';
window.browser = browser;
const logoutClicked = sinon.stub()... |
client/app/public/about/index.js | jl-/r- | import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import cns from 'classnames';
import authActionCreators from '../../../modules/auth/action-creators';
//import Deck from 'react-slide-deck';
import Deck from 'components/deck';
import LoginForm... |
client/admin/info/CommitSection.js | Sing-Li/Rocket.Chat | import React from 'react';
import Subtitle from '../../components/basic/Subtitle';
import { useTranslation } from '../../contexts/TranslationContext';
import { DescriptionList } from './DescriptionList';
export const CommitSection = React.memo(function CommitSection({ info }) {
const t = useTranslation();
const { c... |
src/ShortURLInfo.js | betoesquivel/pili_frontend | import React, { Component } from 'react';
import {Link} from 'react-router-dom';
class ShortURLInfo extends Component {
render() {
const {
shortCode,
url,
visits,
} = Object.assign({}, {
shortCode: '',
url: '',
owner: '',
visits: 0,
lastVisited: '',
}, this... |
spec/components/progress.js | showings/react-toolbox | import React from 'react';
import ProgressBar from '../../components/progress_bar';
import style from '../style.css';
const initialState = {
progress: 0,
buffer: 10,
};
class ProgressBarTest extends React.Component {
state = initialState;
componentWillMount() {
this.simulateProgress();
}
simulatePro... |
source/components/_STATELESS.react.js | elliotk/thinkreact-kleiman | import React from 'react';
const <NAME> = (parameters) => (
<div>{parameters}</div>
)
export default <NAME>;
|
src/components/video_detail.js | cij11/react-redux | import React from 'react';
//Store props.video as video
const VideoDetail = ({video}) =>{
if(!video){
return <div>Loading...</div>;
}
const videoId = video.id.videoId;
//Build the video url.
const url = 'https://www.youtube.com/embed/' + videoId;
//Rewritten with ES6 Sugar (template strings/injection)... |
website/components/features.js | jaredpalmer/razzle | import React from 'react';
export default () => (
<div>
<p className="text-lg mb-2 text-gray-600 md:text-xl">
Build modern JavaScript applications. From zero to production.
</p>
</div>
);
|
src/alert.js | HsuTing/cat-components | 'use strict';
import React from 'react';
import PropTypes from 'prop-types';
import CloseIcon from 'react-icons/lib/md/close';
import toggleStyle from 'utils/toggleStyle';
import loadAnimation from 'utils/loadAnimation';
import Template from './alert/template';
import builder from './alert/builder';
import * as styl... |
app/src/Frontend/modules/manage/components/avatar/index.js | ptphp/ptphp | 'use strict';
import React from 'react';
import { Row,Col,Icon } from 'antd';
import "./index.less";
export default React.createClass({
render(){
let {avatar,name} = this.props;
return (
<Row className="avatar-box">
<div className="avatar-col">
{
... |
node_modules/semantic-ui-react/dist/es/modules/Search/SearchResult.js | SuperUncleCat/ServerMonitoring | import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/i... |
src/MenuItem.js | xiaoking/react-bootstrap | import React from 'react';
import classnames from 'classnames';
import CustomPropTypes from './utils/CustomPropTypes';
import SafeAnchor from './SafeAnchor';
export default class MenuItem extends React.Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
hand... |
docs/app/Examples/elements/Image/States/index.js | clemensw/stardust | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const ImageStatesExamples = () => (
<ExampleSection title='States'>
<ComponentExample
title='Hidden'
description='An ... |
src/components/PeerImage.js | awentzonline/doppelchat | import React from 'react';
import {Checkbox, Paper} from 'material-ui';
import PeerActions from 'peers/PeerActions';
import CallView from 'components/CallView';
import VideoStream from 'components/VideoStream';
import ChatUserStore from 'stores/ChatUserStore';
import UserMediaStore from 'stores/UserMediaStore';
import... |
src/charts/helpers/withResponsiveness.js | Golodhros/britecharts-react | import React from 'react';
import optimizedResize from './optimizedResize.js';
export default function(Component) {
return class WithResponsiveness extends React.PureComponent {
constructor(props) {
super(props);
this.state = {
width: 500,
};
... |
tests/components/equipmentComponentTest.js | mordra/cotwmtor | import React from 'react';
import ReactDom from 'react-dom';
import {shallow} from 'enzyme';
import * as cotw from '/core/cotwContent.js';
import * as map from '/core/maps.js';
import * as Item from '/core/item.js';
import _ from 'lodash';
import * as actions from '/actions/index.js';
import {storeSetup, dispatch, ge... |
src/Components/Input/index.js | kleros/kleros-front | import React from 'react'
import './Input.css'
const Input = ({
className,
innerClassName,
input,
type,
placeholder,
children,
value,
meta = { touched: false, error: false },
...rest
}) => {
// FIXME hack. Can't specify both value and defaultValue
if (input && !input.value) delete input.value
r... |
node_modules/react-router/es6/IndexLink.js | xuan6/react-videos | 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; };
import React from 'react';
import Link from './Link';
/**
*... |
features/apimgt/org.wso2.carbon.apimgt.store.feature/src/main/resources/store/source/src/app/components/Apis/Details/Resources/Resources.js | ChamNDeSilva/carbon-apimgt | /*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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/li... |
src/components/Search/Search.js | fishmankkk/mircowater2.0 | import React from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom'
import { Input, Select, Button, Icon } from 'antd'
import styles from './Search.less'
class Search extends React.Component {
state = {
clearVisible: false,
selectValue: (this.props.select && this.props.selectProps) ... |
src/js/components/PartyLogo.js | holderdeord/hdo-cards | import React, { Component } from 'react';
export default class PartyLogo extends Component {
render() {
if (!(this.props.url || this.props.slug)) {
return null;
}
const url = this.props.url || `https://data.holderdeord.no/api/parties/${this.props.slug}/logo?version=medium`;
... |
website/src/theme/EmbeddedLayout/index.js | facebook/flipper | /**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import clsx from 'clsx';
import LayoutProviders from '@theme/LayoutProviders';
import Head from '@doc... |
examples/website/src/components/buttons/PrettierButton.js | w-y/ecma262-jison | import PropTypes from 'prop-types';
import React from 'react';
import cx from '../../utils/classnames.js';
export default function PrettierButton(props) {
return (<button type="button"
className="toggleBtn"
onClick={props.toggleFormatting}>
<i
className={cx({
... |
src/components/chips/demos/Basic.js | isogon/styled-mdl | import React from 'react'
import { Chip } from '../../../'
export default () => <Chip>Basic Chip</Chip>
|
client/src/components/billing/settings.js | hah-nan/papabear2 | import React, { Component } from 'react';
import { Link } from 'react-router';
import { connect } from 'react-redux';
import * as actions from '../../actions/billing';
import CheckoutForm from './checkout-form';
const moment = require('moment');
class BillingSettings extends Component {
constructor(props) {
su... |
app/containers/HomePage.js | innFactory/aws-session-token-gui | // @flow
import { bindActionCreators } from 'redux';
import React, { Component } from 'react';
import Home from '../components/Home';
import { connect } from 'react-redux';
import * as UserActions from '../actions/user';
import * as ConfigActions from '../actions/config';
function mapStateToProps(state) {
return ... |
src/Component.js | lama-pacos/react-copy-to-clipboard | import React from 'react';
import copy from 'copy-to-clipboard';
export const CopyToClipboard = React.createClass({
propTypes: {
text: React.PropTypes.string.isRequired,
children: React.PropTypes.element.isRequired,
onCopy: React.PropTypes.func,
options: React.PropTypes.shape({
debug: React.Pr... |
react/examples/Code/Prop_Types/src/List.js | jsperts/workshop_unterlagen | import React from 'react';
import PropTypes from 'prop-types';
import ListElement from './ListElement';
function List(props) {
return (<ul className="list-group">
{
props.list.map((elem) => <ListElement key={elem.id} {...elem} />)
}
</ul>);
}
List.propTypes = {
list: PropTypes.arrayOf(PropTypes.o... |
client/src/components/navigation.js | dstarr/sb-react-demo | import React from 'react';
import {Navbar, MenuItem, Nav, NavItem, NavDropdown } from 'react-bootstrap';
import MenuPanel from './menuPanel';
export default class Navigation extends React.Component {
constructor(...props) {
super(...props);
this.state = {
showPanel: false,
img : './images... |
modules/__tests__/Router-test.js | joeyates/react-router | /*eslint-env mocha */
/*eslint react/prop-types: 0*/
import expect from 'expect'
import React from 'react'
import createHistory from 'history/lib/createMemoryHistory'
import Router from '../Router'
import Route from '../Route'
describe('Router', function () {
let node
beforeEach(function () {
node = document.... |
src/components/link.js | michaelnyu/michaelnyu.github.io | import React from 'react';
import { Link as ReactRouterLink } from 'react-router-dom';
const styles = {
link: {
textDecoration: 'none',
},
};
const Link = ({ children, ...otherProps }) => (
<ReactRouterLink css={styles.link} {...otherProps}>
{children}
</ReactRouterLink>
);
export default Link;
|
blueocean-material-icons/src/js/components/svg-icons/image/control-point-duplicate.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const ImageControlPointDuplicate = (props) => (
<SvgIcon {...props}>
<path d="M16 8h-2v3h-3v2h3v3h2v-3h3v-2h-3zM2 12c0-2.79 1.64-5.2 4.01-6.32V3.52C2.52 4.76 0 8.09 0 12s2.52 7.24 6.01 8.48v-2.16C3.64 17.2 2 14.79 2 12zm13-9c-4.96 0-9 4.04-9 9s4.04 ... |
mine-data/src/logout/LogoutLink.js | BerlingskeMedia/nyhedsbreve | import React from 'react';
import { connect } from 'react-redux';
import { logOut } from './logOut.actions';
import './LogoutLink.scss';
const StaticLogoutLink = ({children, onClick}) => (
<a className="LogoutLink" onClick={onClick}>{children}</a>
);
const mapDispatchToProps = (dispatch) => ({
onClick: () => dis... |
src/svg-icons/image/tag-faces.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageTagFaces = (props) => (
<SvgIcon {...props}>
<path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.... |
src/components/Footer.js | apburnes/allpointsburnes | import React from 'react'
import { Flex } from 'reflexbox'
import styled from 'styled-components'
import { color, space, typography } from 'styled-system'
const H4 = styled.h4`
${color}
${space}
${typography}
${{
color: 'rgb(255,255,255)',
fontSize: '16px',
margin: '.1rem',
}}
`
const A = styled... |
src/javascripts/ComposableThis.js | robmclarty/es6-react-component | // This ComposableComponent uses Object.assign to compose a React component
// from the React.Component.prototype and a mix of custom functions, some of
// which will override the defaults of the prototype (e.g., render()).
import React from 'react'
import PropTypes from 'prop-types'
const displayName = 'MyComponent'... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.