path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
test/AlertSpec.js | coderstudy/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import Alert from '../src/Alert';
describe('Alert', function () {
it('Should output a alert with message', function () {
let instance = ReactTestUtils.renderIntoDocument(
<Alert>
<strong>Message</strong>
</Alert... |
app/react-icons/fa/hand-o-up.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaHandOUp extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m31.6 35.7q0-0.6-0.5-1t-1-0.4-1 0.4-0.4 1 0.4 1 1 0.4 1-0.4 0.5-1z m2.8-17q0... |
src/svg-icons/editor/border-horizontal.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderHorizontal = (props) => (
<SvgIcon {...props}>
<path d="M3 21h2v-2H3v2zM5 7H3v2h2V7zM3 17h2v-2H3v2zm4 4h2v-2H7v2zM5 3H3v2h2V3zm4 0H7v2h2V3zm8 0h-2v2h2V3zm-4 4h-2v2h2V7zm0-4h-2v2h2V3zm6 14h2v-2h-2v2z... |
src/__tests__/spreadsheet-test.js | felixrieseberg/React-Spreadsheet-Component | 'use strict';
jest.dontMock('../spreadsheet');
import React from 'react';
import renderer from 'react-test-renderer';
import SpreadsheetComponent from '../spreadsheet';
const testVars = {
initialData: {
rows: [
['', '', '', '', '', '', '', ''],
['', 1, 2, 3, 4, 5, 6, 7],
['', 1, '', 3,... |
client/components/alert.js | mickael-kerjean/nuage | import React from 'react';
import PropTypes from 'prop-types';
import { Input, Button, Modal, NgIf } from './';
import { alert } from '../helpers/';
import { Popup } from './popup';
export class ModalAlert extends Popup {
constructor(props){
super(props);
}
componentDidMount(){
alert.subs... |
src/render.js | dominikwilkowski/cuttlebelle | /***************************************************************************************************************************************************************
*
* Render partials or even whole pages
*
* RelativeURL - Resolve two paths relative to each other
* RenderReact - Render a react component to str... |
src/imageSearch/imageSearchRouter.js | AInoob/NooBox | import React from 'react';
import { Router, Route, Switch } from 'dva/router';
import ImageSearchResult from './routes/ImageSearchResult.jsx';
function RouterConfig({ history }) {
return (
<Router history={history}>
<Switch>
<Route path="/:id" component={ImageSearchResult} />
</Switch>
</... |
src/svg-icons/action/flight-takeoff.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionFlightTakeoff = (props) => (
<SvgIcon {...props}>
<path d="M2.5 19h19v2h-19zm19.57-9.36c-.21-.8-1.04-1.28-1.84-1.06L14.92 10l-6.9-6.43-1.93.51 4.14 7.17-4.97 1.33-1.97-1.54-1.45.39 1.82 3.16.77 1.33 1.6-.... |
src/svg-icons/image/timer-off.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageTimerOff = (props) => (
<SvgIcon {...props}>
<path d="M19.04 4.55l-1.42 1.42C16.07 4.74 14.12 4 12 4c-1.83 0-3.53.55-4.95 1.48l1.46 1.46C9.53 6.35 10.73 6 12 6c3.87 0 7 3.13 7 7 0 1.27-.35 2.47-.94 3.49l1.... |
src/main/app/src/containers/AppMeta.js | pugnascotia/spring-react-boilerplate | /* @flow */
import React from 'react';
import Helmet from 'react-helmet';
/**
* Renders nothing directly, but updates the DOM with the specified data. Note that
* we don't have script tags in here, because we want these to appear at the bottom
* of our page, and we don't want Helmet re-inserting them at the top!
*... |
app/javascript/mastodon/features/compose/components/navigation_bar.js | pointlessone/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ActionBar from './action_bar';
import Avatar from '../../../components/avatar';
import Permalink from '../../../components/permalink';
import IconButton from '../../../components/icon_button... |
src/AffixMixin.js | AlexKVal/react-bootstrap | import React from 'react';
import domUtils from './utils/domUtils';
import EventListener from './utils/EventListener';
const AffixMixin = {
propTypes: {
offset: React.PropTypes.number,
offsetTop: React.PropTypes.number,
offsetBottom: React.PropTypes.number
},
getInitialState() {
return {
a... |
src/components/posts_show.js | ftoresan/react-redux-course | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { fetchPost, deletePost } from '../actions';
class PostsShow extends Component {
componentDidMount() {
const { id } = this.props.match.params;
this.props.fetchPost(id);
}
onDe... |
scripts/ItemManager.js | krulmacius/sdasdasdasfgasdawsdwadawd | import React from 'react';
import axios from 'axios';
import Alert from 'react-s-alert';
import LazyLoad from 'react-lazyload';
import 'react-s-alert/dist/s-alert-default.css';
import 'react-s-alert/dist/s-alert-css-effects/jelly.css';
class ItemManager extends React.Component {
constructor(props) {
super(pro... |
Demo1/components/BookDetail.js | Quxiaolei/Study_RN | 'use strict';
import React, { Component } from 'react';
import {
StyleSheet,
View,
Text,
Image,
ListView,
TouchableHighlight,
ActivityIndicator,
ScrollView,
} from 'react-native';
class BookDetail extends Component {
render() {
let book = this.props.book;
let imageURI = (typeof book.image !... |
client/react/panel/ActionTable.js | uclaradio/uclaradio | // ActionTable.js
import React from 'react';
import {
Table,
Button,
ButtonGroup,
Glyphicon,
OverlayTrigger,
Tooltip,
} from 'react-bootstrap';
/**
* ButtonGroup with one or two actions (reject, accept/reject)
*
* @prop value: value to submit on actions
* @prop actionsDisabled: should disable buttons
*... |
app/static/src/diagnostic/TestList.js | vsilent/Vision | import React from 'react';
import FormGroup from 'react-bootstrap/lib/FormGroup';
import FormControl from 'react-bootstrap/lib/FormControl';
import Accordion from 'react-bootstrap/lib/Accordion';
import Panel from 'react-bootstrap/lib/Panel';
import {Link} from 'react-router';
import NewTestForm from './NewTestForm';
i... |
Libraries/Image/Image.ios.js | wenpkpk/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... |
actor-apps/app-web/src/app/components/activity/UserProfileContactInfo.react.js | bradparks/actor-platform___im_client_cross_platform | import _ from 'lodash';
import React from 'react';
import { PureRenderMixin } from 'react/addons';
const UserProfileContactInfo = React.createClass({
propTypes: {
phones: React.PropTypes.array
},
mixins: [PureRenderMixin],
render: function () {
let phones = this.props.phones;
let contactPhones ... |
packages/material-ui-icons/src/DeveloperMode.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let DeveloperMode = props =>
<SvgIcon {...props}>
<path d="M7 5h10v2h2V3c0-1.1-.9-1.99-2-1.99L7 1c-1.1 0-2 .9-2 2v4h2V5zm8.41 11.59L20 12l-4.59-4.59L14 8.83 17.17 12 14 15.17l1.41 1.42zM10 15.17L6.83 12 10 8.... |
components/Calendar/CalendarMonth/CalendarMonth.story.js | NGMarmaduke/bloom | import React from 'react';
import { storiesOf } from '@storybook/react';
import CalendarMonth from './CalendarMonth';
storiesOf('CalendarMonth', module)
.add('Default', () => (
<CalendarMonth />
))
.add('with external dates', () => (
<CalendarMonth showOutOfRange />
))
.add('with custom heading forma... |
src/main/app/src/component/layout/Header.js | p632-sp-2017/microservice-catalog-frontend | import React from 'react';
import logo from '../../logo.svg';
/**
* Renders the branded Header at the top of the page
*/
const Header = () => (
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Micro Service Catalog</h2>
</div>
);
Header.displayName = 'Header'
export d... |
Calcuman/__tests__/index.ios.js | antonfisher/game-calcuman | 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 />
);
});
|
src/svg-icons/image/photo-filter.js | pancho111203/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImagePhotoFilter = (props) => (
<SvgIcon {...props}>
<path d="M19.02 10v9H5V5h9V3H5.02c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zM17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7l2.06.94zm-3.75.... |
src/SplitToggle.js | laran/react-bootstrap | import React from 'react';
import DropdownToggle from './DropdownToggle';
export default class SplitToggle extends React.Component {
render() {
return (
<DropdownToggle
{...this.props}
useAnchor={false}
noCaret={false}
/>
);
}
}
SplitToggle.defaultProps = DropdownToggle... |
src/select.js | knledg/react-blur-admin | import _ from 'lodash';
import React from 'react';
export class Select extends React.Component {
static propTypes = {
placeholder: React.PropTypes.string,
maxHeight: React.PropTypes.string,
onChange: React.PropTypes.func,
onRenderValue: React.PropTypes.func,
options: React.PropTypes.arrayOf(
... |
13. ReactJS Fundamentals - Feb 2019/03. Events and Forms/Fog-App/src/DynamicForm/LoginForm.js | zrusev/SoftwareUniversity2016 | import React from 'react';
import './login.css';
class LogInForm extends React.Component {
constructor(props) {
super(props);
this.state = {
usernameLogin: '',
passwordLogin: ''
}
}
handleChange = event => {
this.setState({
[event.target.i... |
src/icons/Aperture.js | fbfeix/react-icons | import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class Aperture extends React.Component {
render() {
if(this.props.bare) {
return <g>
<g>
<path d="M256,32C132.288,32,32,132.288,32,256s100.288,224,224,224s224-100.288,224-224S379.712,32,256,32z M391.765,391.765
... |
jekyll-strapi-tutorial/api/plugins/content-type-builder/admin/src/components/RelationBox/index.js | strapi/strapi-examples | /**
*
* RelationBox
*
*/
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { get, isEmpty, map, startCase } from 'lodash';
import pluralize from 'pluralize';
import { ButtonDropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
impo... |
jsSrc/index.js | k206i/tupichok | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import App from './Components/app';
import configureStore from './Store/configureStore';
import '../cssSrc/index.styl';
if (process.env.NODE_ENV !== 'production') {
console.log('development mode');
} e... |
webpack/components/extensions/about/SystemStatuses.js | mccun934/katello | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { translate as __ } from 'foremanReact/common/I18n';
import { LoadingState } from 'patternfly-react';
class SystemStatuses extends Component {
componentDidMount() {
this.props.getSystemStatuses('/katello/api/ping');
}
rende... |
src/defaults/DefaultLinkFactory.js | woodenconsulting/react-js-diagrams | import React from 'react';
import { LinkWidgetFactory } from '../WidgetFactories';
import { DefaultLinkWidget } from './DefaultLinkWidget';
export class DefaultLinkFactory extends LinkWidgetFactory {
constructor() {
super('default');
}
generateReactWidget(diagramEngine, link) {
return (
<DefaultLi... |
tests/boilerplate_test.js | efegurkan/interval-picker | // import React from 'react';
// import {
// renderIntoDocument,
// findRenderedDOMComponentWithClass,
// findRenderedDOMComponentWithTag,
// Simulate
//} from 'react-addons-test-utils';
describe('Boilerplate', function() {
it('should do boilerplate things', function() {
// TODO: test something now
e... |
components/AR/ViroARScene.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.
*/
import { ... |
examples/src/BasicExample/BasicExample.js | approots/react-autosuggest | import React, { Component } from 'react';
import utils from '../utils';
import Autosuggest from '../../../src/Autosuggest';
import SourceCodeLink from '../SourceCodeLink/SourceCodeLink';
import suburbs from 'json!../suburbs.json';
function getSuggestions(input, callback) {
const escapedInput = utils.escapeRegexChara... |
src/components/common/svg-icons/action/code.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionCode = (props) => (
<SvgIcon {...props}>
<path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"/>
</SvgIcon>
);
ActionCode = pure(ActionCode);
ActionCode.di... |
components/view/src/story.js | fi11/uikit | import React from 'react';
import { storiesOf } from '@storybook/react';
import styled, { withTag, StyledProvider, createRegistry } from '@uikit/styled-react';
import View from './View';
const Link = styled('a.Link', {
root: {
color: '#61dafb',
fontSize: '16px',
},
});
const BlackSquare = styled(View, {
... |
docs/src/app/components/pages/components/GridList/ExampleComplex.js | manchesergit/material-ui | import React from 'react';
import {GridList, GridTile} from 'material-ui/GridList';
import IconButton from 'material-ui/IconButton';
import StarBorder from 'material-ui/svg-icons/toggle/star-border';
const styles = {
root: {
display: 'flex',
flexWrap: 'wrap',
justifyContent: 'space-around',
},
gridLi... |
fields/types/relationship/RelationshipFilter.js | pr1ntr/keystone | import async from 'async';
import React from 'react';
import { findDOMNode } from 'react-dom';
import xhr from 'xhr';
import { FormField, FormInput, SegmentedControl } from 'elemental';
import PopoutList from '../../../admin/client/App/shared/Popout/PopoutList';
const INVERTED_OPTIONS = [
{ label: 'Linked To', valu... |
src/frontend/components/admin/index.js | ChVince/new-record | import React from 'react'
import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'
import cookie from '../../utils/cookie'
import {
addClip,
removeClip,
changePresentationClip,
getClipList,
getClipListPageNumByTag
} from '../../actions/clip'
import {
clearAddClipForm,
val... |
app/react-icons/fa/language.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaLanguage extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m17.6 24.1q0 0-0.3 0t-0.7-0.3l-0.4-0.2q-1-0.5-2-1.1-0.1-0.1-0.9-0.7t-0.8-0.... |
RN_TestApp/__tests__/App.js | canhphong/canhphong.github.io | import 'react-native';
import React from 'react';
import App from '../App';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<App />
);
});
|
client/src/components/Header/components/NavLogo.js | BhaveshSGupta/FreeCodeCamp | import React from 'react';
import FreeCodeCampLogo from '../../../assets/icons/freeCodeCampLogo';
function NavLogo() {
return <FreeCodeCampLogo />;
}
NavLogo.displayName = 'NavLogo';
export default NavLogo;
|
app/pages/project/components/ProjectNavbar/components/StyledHeader/Header.spec.js | zooniverse/Panoptes-Front-End | /* eslint
func-names: 0,
import/no-extraneous-dependencies: ["error", { "devDependencies": true }]
prefer-arrow-callback: 0,
"react/jsx-boolean-value": ["error", "always"]
*/
import React from 'react';
import { shallow } from 'enzyme';
import { expect } from 'chai';
import Header from './Header';
describe('He... |
tutorials08/src/app.js | Ivanwangcy/webpack-react-tutorials | import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App';
// 可以使用箭头函数创建无状态组件
// let App = () => {
// return (
// <div>
// <h1>Hello hjs-webpack!!!!!!!</h1>
// hot load...aaaaaaa
// <p>sdfasdfasdfasdf</p>
// </div>
// );
// };
ReactDOM.render(
<Ap... |
client/app/containers/ComposeBox/index.js | Kielan/onDemanager | import React from 'react';
import ReactDOM from 'react-dom';
import autobind from 'react-autobind';
import { connect } from 'react-redux';
import { ButtonInput } from 'react-bootstrap';
import { createSelector } from 'reselect';
import composeBoxContentSelector from 'composeBoxContentSelector';
import usernameSelecto... |
client/utils/viewUtils.js | Cellarise/cell-cycle | import R from 'ramda';
import React from 'react'; //eslint-disable-line
import PropTypes from 'prop-types';
import {logger} from '../globals';
import * as recordUtils from '../utils/recordUtils';
import {createSyntheticEvent} from '../utils/domDriverUtils';
export let contextTypes = {
"actions": PropTypes.object.is... |
lib/codemod/src/transforms/__testfixtures__/storiesof-to-csf/basic.input.js | storybooks/react-storybook | /* eslint-disable */
import React from 'react';
import Button from './Button';
import { storiesOf, configure } from '@storybook/react';
import { action } from '@storybook/addon-actions';
storiesOf('Button', module)
.add('story1', () => <Button label="Story 1" />)
.add('second story', () => <Button label="Story 2"... |
packages/react-router-native/examples/CustomLink.js | react-translate-team/react-router-CN | import React from 'react'
import { StyleSheet, Text, View } from 'react-native'
import { NativeRouter, Route, Link } from 'react-router-native'
const CustomLink = ({ children, to, activeOnlyWhenExact }) => (
<Route path={to} exact={activeOnlyWhenExact} children={({ match }) => (
<Link
style={styles.navItem... |
react/javascript/demo-extension-sdk/src/__mocks__/render_with_extension.js | looker-open-source/extension-examples | /*
MIT License
Copyright (c) 2022 Looker Data Sciences, Inc.
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 use, copy, modi... |
src/packages/@ncigdc/components/Modals/NoAccessModal.js | NCI-GDC/portal-ui | // @flow
import React from 'react';
import { connect } from 'react-redux';
import BaseModal from '@ncigdc/components/Modals/BaseModal';
import LoginButton from '@ncigdc/components/LoginButton';
import { setModal } from '@ncigdc/dux/modal';
class LoginModal extends React.Component {
componentWillReceiveProps(nextPro... |
src/views/layouts/index.js | amiuhle/kasisto | import React from 'react'
export default ({ children }) => (
<div className='o-app'>
{ children }
</div>
)
|
docs-ui/components/dropdownLink.stories.js | looker/sentry | import React from 'react';
import {storiesOf} from '@storybook/react';
// import {action} from '@storybook/addon-actions';
import {withInfo} from '@storybook/addon-info';
import DropdownLink from 'app/components/dropdownLink';
import MenuItem from 'app/components/menuItem';
storiesOf('Links/DropdownLink', module)
.... |
src/components/ExperienceDetail/ReportForm/ApiErrorFeedback.js | WendellLiu/GoodJobShare | import React from 'react';
import PropTypes from 'prop-types';
import Feedback from 'common/Feedback';
const ApiErrorFeedback = ({ buttonClick, message }) => (
<Feedback
buttonClick={buttonClick}
heading="Oops 有些錯誤發生"
info={message}
buttonText="好,我知道了"
/>
);
ApiErrorFeedback.propTypes = {
butto... |
src/index.js | balaabhinav/htm-niseko | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import './index.css';
import App from './Containers/App/App';
import registerServiceWorker from './registerServiceWorker';
import store from './store';
ReactDOM.render(
<Provider store={ store }>
<App />
... |
src/containers/HotDetail/container/HotDetail.js | MeetDay/dreampark-web | import React from 'react';
import PropTypes from 'prop-types';
import { Helmet } from 'react-helmet';
import { message } from 'antd';
import classNames from 'classnames';
import { Carousel } from 'antd';
import { bindActionCreators } from 'redux';
import { push } from 'react-router-redux';
import { asyncConnect } from ... |
app/components/Layout/Title/index.js | hlex/vms | import React, { Component } from 'react';
import PropTypes from 'prop-types';
export default class Title extends Component {
render() {
return (
<div className="title-wrapper">
{
this.props.children
}
</div>
);
}
}
|
StarterRNP/src/screens/common/LoginInput.js | khanhqd/ProjectOT1 | /**
* @file LoginInput.js
*
* @author Nguyen Thanh Trung
* @version 1.0.0
*
* @DESCRIPTION
*
* Just a PlayGround for react-native
* @flow
*/
import React from 'react';
import { TextInput, View } from 'react-native';
import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome';
const LoginInput = ({
... |
demo/src/App.js | ilxanlar/cathode | import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import styled from 'styled-components';
import { GlobalStyle, Theme, variables } from '../../src';
import Nav from './Nav';
import containers from './containers';
variables.fonts.prim... |
src/svg-icons/action/speaker-notes.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionSpeakerNotes = (props) => (
<SvgIcon {...props}>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 14H6v-2h2v2zm0-3H6V9h2v2zm0-3H6V6h2v2zm7 6h-5v-2h5v2zm3-3h-8V9h8v2zm0-... |
src/routes/home/index.js | AntonyKwok/bookshelf | import React from 'react';
import Home from './Home';
import Layout from '../../components/Layout';
export default {
path: '/',
async action() {
return {
title: 'Bookshelf',
component: <Layout><Home /></Layout>,
};
},
};
|
test/helpers/shallowRenderHelper.js | stanferly/new-gallery | /**
* Function to get the shallow output for a given component
* As we are using phantom.js, we also need to include the fn.proto.bind shim!
*
* @see http://simonsmith.io/unit-testing-react-components-without-a-dom/
* @author somonsmith
*/
import React from 'react';
import TestUtils from 'react-addons-test-utils'... |
clients/packages/admin-client/src/mobilizations/components/settings-menu.js | nossas/bonde-client | import PropTypes from 'prop-types';
import React from 'react';
import { FormattedMessage } from 'react-intl';
import * as paths from '../../paths';
import { Tabs, Tab } from '../../components/navigation/tabs';
import { SettingsPageMenuLayout } from '../../components/layout';
const SettingsMenu = ({ mobilization, locat... |
src/js/Containers/BoardContainer.js | RoyalSix/Eagle-Connect | import { connect } from 'react-redux'
import React, { Component } from 'react';
import {
View,
Text,
Keyboard,
Alert
} from 'react-native';
import * as boardActions from '../Actions/boardActions';
import Board from '../Components/Board';
import * as API from '../API'
import * as homeActions ... |
test/ButtonInputSpec.js | modulexcite/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ButtonInput from '../src/ButtonInput';
import {shouldWarn} from './helpers';
describe('ButtonInput', () =>{
it('renders an input button element with type=button', function () {
const instance = ReactTestUtils.renderIntoDocum... |
ui/src/pages/login.js | yahoo/athenz | /*
* Copyright 2020 Verizon Media
*
* 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 t... |
src/parser/warrior/arms/modules/core/SweepingStrikes.js | fyruna/WoWAnalyzer | import React from 'react';
import { formatPercentage } from 'common/format';
import SpellLink from 'common/SpellLink';
import SPELLS from 'common/SPELLS';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import Abilities from 'parser/core/modules/Abilities';
import Events from 'parser/core/Events';
imp... |
client/src/components/ResultsGroup.js | harpojaeger/vanity-callsigns | import React from 'react'
import PropTypes from 'prop-types'
import Callsign from './Callsign'
import '../style/ResultsGroup.css'
function ResultsGroup(props) {
return(
<div>
{Object.keys(props.results).length > 0 && <h2 className='resultsGroupHeading'>{props.title}</h2>}
<ul className='resultsGroup'... |
dispatch/static/manager/src/js/components/VideoPreview.js | ubyssey/dispatch | import React from 'react'
import YouTube from 'react-youtube'
export default function VideoPreview(props) {
function haveVideo(props) {
if (props.videos && props.value) {
let vid = props.videos[props.value]
return props.value !== null &&
vid !== undefined &&
vid.url !== ''
... |
thingmenn-frontend/src/widgets/search-input/index.js | baering/thingmenn | import React from 'react'
import PropTypes from 'prop-types'
import './styles.css'
export default class SearchInput extends React.Component {
render() {
return (
<input
placeholder="Sía"
value={this.props.value}
className="Search-input"
onChange={this.props.handleSearchInpu... |
js/src/Snackbar/snackbar.js | destenson/ethcore--parity | // Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any lat... |
app/react-icons/fa/object-group.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaObjectGroup extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m39.8 10.1h-2.5v19.8h2.5v7.5h-7.5v-2.5h-24.8v2.5h-7.5v-7.5h2.5v-19.8h-2.... |
src/components/splitPane/Pane.js | ZackLeonardo/nw-react-hexo-blog-client | 'use strict';
import React from 'react';
import VendorPrefix from 'react-vendor-prefix';
export default React.createClass({
getInitialState() {
return {};
},
render() {
const split = this.props.split;
const classes = ['Pane', split];
let style = {
flex: 1,... |
src/containers/Ecommerce/checkout/order-info.js | EncontrAR/backoffice | import React, { Component } from 'react';
import { connect } from 'react-redux';
import Button from '../../../components/uielements/button';
import SingleOrderInfo from './single-order';
let totalPrice;
class OrderInfo extends Component {
constructor(props) {
super(props);
this.renderProducts = this.renderP... |
client/src/templates/Challenges/classic/Show.js | jonathanihm/freeCodeCamp | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { createStructuredSelector } from 'reselect';
import { connect } from 'react-redux';
import Helmet from 'react-helmet';
import { graphql } from 'gatsby';
import { first } from 'lodash';
impor... |
src/admin/components/tabs/tests/tabs_test.js | ccetc/platform | import React from 'react'
import { expect } from 'chai'
import { shallow } from 'enzyme'
import { spy } from 'sinon'
import reducer from '../reducer'
import * as actionTypes from '../action_types'
import { Tabs } from '../index'
import Tab from '../tab'
describe('tabs', () => {
describe('reducer', () => {
it('... |
techCurriculum/ui/starter_code/src/components/Message.js | AnxChow/EngineeringEssentials-group | /**
* Copyright 2017 Goldman Sachs.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
src/client/components/modals/ListSettingsModal.container.js | DBCDK/content-first | import React from 'react';
import {connect} from 'react-redux';
import Modal from './Modal/Modal.component';
import Text from '../base/Text';
import Button from '../base/Button';
import Icon from '../base/Icon';
import {CLOSE_MODAL} from '../../redux/modal.reducer';
import {
updateList,
storeList,
getListByIdSele... |
client/src/app/routes/settings/containers/FeeCollections/FeeCollectionForm.js | zraees/sms-project | import React from 'react'
import {reset} from 'redux-form';
import axios from 'axios';
import classNames from 'classnames';
import isEmpty from 'lodash/isEmpty';
import {connect} from 'react-redux'
import {Field, reduxForm, formValueSelector, getFormValues} from 'redux-form'
import {required, email, number} from '../.... |
src/visualization/Visualization.js | VasilyShelkov/scikic-app | import React from 'react';
import { connect } from 'react-redux';
import d3 from 'd3';
import ProbabilityChart from './ProbabilityChart';
import FeatureNetwork from './FeatureNetwork';
import Typist from 'react-typist';
let Visualization = ({ questionInference, currentQuestionVisualizing, isDoingInference }) => (
<d... |
src/components/contemporary/ConsultationDetailsForm.js | bharney/YogaMarieMills | import React from 'react';
import TextInput from '../common/TextInput';
import TextAreaInput from '../common/TextAreaInput';
import RemoveRowButton from '../common/RemoveRowButton';
const ConsultationDetailsForm = ({ updateTitleState, updateCostState, updateSessionTimeState, updateShortState, updateConsultationDescSta... |
js/src/modals/VaultAccounts/vaultAccounts.spec.js | nipunn1313/parity | // Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any lat... |
rating/components/QRRatingComponent.js | kuip/meteor-packs | import React from 'react';
import QRCode from 'qrcodejs2';
import { parseQuery } from '../utils.js';
import { ImageComponent } from './ImageComponent';
import { NotSignedInComponent } from './NotSignedInComponent';
import './QRRatingComponent.css';
const QRRatingComponent = React.createClass({
componentWillMount()... |
src/scenes/home/scholarship/preview/preview.js | NestorSegura/operationcode_frontend | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styles from './preview.css';
class Preview extends Component {
snip = (description) => {
const str = `${description.substr(0, 300)}...`;
return str;
}
render() {
const { scholarship } = this.props;
return (
... |
app/javascript/mastodon/features/compose/containers/warning_container.js | 5thfloor/ichiji-social | 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 APPROX_HASHTAG_RE = /(?:^|[^\/\)\w])#(\w*[a-zA-Z·]\w*)/i;
const mapStateT... |
src/components/Login.js | mknudsen01/today | import React, { Component } from 'react';
class Login extends Component {
constructor(props) {
super(props);
this.state = {
isLogin: false,
}
this.loginUser = this.loginUser.bind(this);
this.createUser = this.createUser.bind(this);
}
loginUser(e) {
e.preventDefault();
const e... |
src/routes/UIElement/dataTable/index.js | zhouchao0924/SLCOPY | import React from 'react'
import { DataTable } from '../../../components'
import { Table, Row, Col, Card, Select } from 'antd'
class DataTablePage extends React.Component {
constructor (props) {
super(props)
this.state = { filterCase: {
gender: '',
} }
}
handleSelectChange = (gender) => {
... |
src/index.js | pebie/ecodex | import './stylesheets/_main.scss';
import React from 'react';
import Router from 'react-router';
import routes from './routes';
Router.run(routes, Router.HistoryLocation, function (Handler) {
React.render(<Handler />, document.getElementById('root'));
});
|
test/Slides.spec.js | pietraszekl/slideshow-react | import mocha from 'mocha';
import chai, {expect} from 'chai';
import chaiEnzyme from 'chai-enzyme';
import {render, mount, shallow } from 'enzyme';
import React from 'react';
import Slides from '../components/Slideshow/Slides';
import * as SlideshowActions from "../components/Slideshow/SlideshowActions";
import Slides... |
admin/lib/post/components/postFeed.js | synthesis-js/react-synthesis | import React from 'react';
import Post from './Post';
import PostFeedItem from './PostFeedItem';
export default class PostFeed extends React.Component {
render() {
let postDataObj = this.props.postData;
let postData = [];
for(let post in postDataObj) {
postData.push(postDataObj[post]);
}
l... |
fixtures/ssr/server/render.js | jorrit/react | import React from 'react';
import {renderToString} from 'react-dom/server';
import App from '../src/components/App';
let assets;
if (process.env.NODE_ENV === 'development') {
// Use the bundle from create-react-app's server in development mode.
assets = {
'main.js': '/static/js/bundle.js',
'main.css': '',... |
App/ui/views/Collection.preview.js | CaipiLabs/caipi |
/*
* Copyright (c) 2018. Wise Wild Web
*
* This File is part of Caipi and under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License
* Full license at https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
*
* @author : Nathanael Braun
* @contact : caipilabs@gmail.co... |
docs/src/app/components/pages/discover-more/Contributing.js | rhaedes/material-ui | import React from 'react';
import Title from 'react-title-component';
import MarkdownElement from '../../MarkdownElement';
import contributingText from '../../../../../../CONTRIBUTING.md';
const Contributing = () => (
<div>
<Title render={(previousTitle) => `Contributing - ${previousTitle}`} />
<MarkdownEle... |
test/specs/modules/Accordion/AccordionTitle-test.js | jcarbo/stardust | import React from 'react'
import * as common from 'test/specs/commonTests'
import { sandbox } from 'test/utils'
import Accordion from 'src/modules/Accordion/Accordion'
import AccordionTitle from 'src/modules/Accordion/AccordionTitle'
describe('AccordionTitle', () => {
common.isConformant(AccordionTitle)
common.re... |
fields/types/cloudinaryimage/CloudinaryImageField.js | jacargentina/keystone | import xhr from 'xhr';
import React from 'react';
import ReactDOM from 'react-dom';
import Field from '../Field';
import Select from 'react-select';
import { Button, FormField, FormInput, FormNote } from 'elemental';
import Lightbox from '../../components/Lightbox';
import classnames from 'classnames';
const SUPPORTE... |
08/js/app.js | arcthur/react-book-examples | import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import LineChart from './LineChart';
import BarChart from './BarChart';
import { generateData } from './Helper';
import '../css/style.scss';
class App extends Component {
state = {
data: generateData(Math.floor(8 + 8 * Math.random())),
... |
node_modules/enzyme/test/ComplexSelector-spec.js | PanJ/SimplerCityGlide | import { describeWithDOM } from './_helpers';
import React from 'react';
import { expect } from 'chai';
import {
mount,
shallow,
} from '../src/';
const tests = [
{
name: 'mount',
renderMethod: mount,
describeMethod: describeWithDOM,
},
{
name: 'shallow',
renderMethod: shallow,
descri... |
src/svg-icons/action/assessment.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAssessment = (props) => (
<SvgIcon {...props}>
<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-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/>
</SvgIcon>
);
ActionA... |
public/js/cat_source/es6/components/projects/Header.js | riccio82/MateCat | import React from 'react'
import ReactDOM from 'react-dom'
class DasboardHeader extends React.Component {
render() {
const headerMountPoint = document.getElementsByTagName('header')[0]
return ReactDOM.createPortal(this.props.children, headerMountPoint)
}
}
export default DasboardHeader
|
src/components/Header.js | baandyfuo/hanstock | import React, { Component } from 'react';
export default class Header extends Component {
render() {
return (
<div className="ui header">
<h1><a className="ui red circular massive label">涵</a><span className="title">股票</span></h1>
</div>
);
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.