path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
app/jsx/context_cards/MetricsList.js | djbender/canvas-lms | /*
* Copyright (C) 2016 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distribut... |
local-cli/generator/templates/index.android.js | xiayz/react-native | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class <%= name %> extends Component {
render() {
return (
<View style={styles.contain... |
node_modules/react-router-dom/node_modules/react-router/es/Prompt.js | NickingMeSpace/questionnaire | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call &... |
templates/rails/spec/javascript/testHelper.js | LaunchAcademy/make_it_so | import { shallow, mount } from 'enzyme';
import jasmineEnzyme from 'jasmine-enzyme';
import React from 'react';
import fetchPonyfill from 'fetch-ponyfill';
const {fetch, Request, Response, Headers} = fetchPonyfill({});
Object.assign(global, {
jasmineEnzyme,
mount,
React,
shallow,
fetch,
Request,
Response... |
src/components/containers/navbar-layout-container.js | HuangXingBin/goldenEast | import React from 'react';
import { connect } from 'react-redux';
import { getAdmin, getUserAuthorization, getAllAuthorization, getUserFirstClassConnected } from '../../api/app-interaction-api';
import { Menu, Dropdown, Icon } from 'antd';
import ModifyPassword from '../views/modifyPassword';
import { passwordModalTogg... |
src/Notification.js | opensourcegeek/react-bootstrap-table | import React from 'react';
import Const from './Const';
import {
ToastContainer,
ToastMessage,
} from "react-toastr";
var ToastrMessageFactory=React.createFactory(ToastMessage.animation);
class Notification extends React.Component{
// allow type is success,info,warning,error
notice(type,msg,title){
this... |
app/containers/LanguageProvider/index.js | shaggyshelar/CLA | /*
*
* 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... |
src/Parser/Core/Modules/Spells/Concordance.js | hasseboulen/WoWAnalyzer | import React from 'react';
import Analyzer from 'Parser/Core/Analyzer';
import Combatants from 'Parser/Core/Modules/Combatants';
import SPELLS from 'common/SPELLS';
import SpellIcon from 'common/SpellIcon';
import { formatPercentage } from 'common/format';
import SpellLink from 'common/SpellLink';
const debug = fals... |
src/components/Loading/Loading.js | jmlweb/paskman | import React from 'react';
import LoadingWrapper from './LoadingWrapper/LoadingWrapper';
import LoadingMain from './LoadingMain/LoadingMain';
import LoadingGroups from './LoadingGroups/LoadingGroups';
import { LoadingLeftGroup, LoadingRightGroup } from './LoadingGroup/LoadingGroup';
import { LoadingPrimaryItem, Loading... |
test/__mocks__/@fortawesome/react-fontawesome.js | codeforamerica/streetmix | /**
* Mocks @fortawesome/react-fontawesome.js to return a simple, empty <svg> element
* with the correct class name for the given `icon` prop. We use this to keep full
* <svg> content out of our rendered component tests.
*/
import React from 'react'
import PropTypes from 'prop-types'
export function FontAwesomeIco... |
packages/material-ui-icons/src/IndeterminateCheckBox.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let IndeterminateCheckBox = 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-2zm-2 10H7v-2h10v2z" />
</SvgIcon>;
IndeterminateCheckBox = pure... |
docs/app/Examples/views/Statistic/Types/StatisticExampleGroup.js | shengnian/shengnian-ui-react | import React from 'react'
import { Statistic } from 'shengnian-ui-react'
const StatisticExampleGroup = () => (
<div>
<Statistic.Group>
<Statistic>
<Statistic.Value>22</Statistic.Value>
<Statistic.Label>Faves</Statistic.Label>
</Statistic>
<Statistic>
<Statistic.Value>31,... |
src/FormGroup.js | HPate-Riptide/react-bootstrap | import classNames from 'classnames';
import React from 'react';
import { bsClass, bsSizes, getClassSet, splitBsPropsAndOmit }
from './utils/bootstrapUtils';
import { Size } from './utils/StyleConfig';
import ValidComponentChildren from './utils/ValidComponentChildren';
const propTypes = {
/**
* Sets `id` on `<... |
src/components/Account/UserProfile.js | taiwoabegunde/developersmap | /**
* Created by Raphson on 10/17/16.
*/
import React from 'react';
import { Link, hashHistory } from 'react-router';
import NavBar from '../NavBar/index';
import Footer from '../Footer/Index';
import DeveloperStore from '../../stores/DeveloperStore';
import ProjectStore from '../../stores/ProjectStore';
import Devel... |
src/components/PlotSVG.js | nickooms/racing-webgl2 | import React from 'react';
import PropTypes from 'prop-types';
import muiThemeable from 'material-ui/styles/muiThemeable';
import BBOX from '../util/BBOX';
import Polygon from './Polygon';
import SVG from './SVG';
const PlotSVG = ({ plot }) => {
if (!plot) return null;
const { polygon: points } = plot;
const bbo... |
js/jqwidgets/demos/react/app/datatable/aggregates/app.js | luissancheza/sice | import React from 'react';
import ReactDOM from 'react-dom';
import JqxDataTable from '../../../jqwidgets-react/react_jqxdatatable.js';
class App extends React.Component {
render() {
let source =
{
dataType: 'xml',
dataFields: [
{ name: 'Supp... |
src/UserEditDialog.js | PSilling/StudentHubUIDevelopment | import React, { Component } from 'react';
import Dialog from 'react-toolbox/lib/dialog/Dialog.js';
import Dropdown from 'react-toolbox/lib/dropdown/Dropdown.js';
import Input from 'react-toolbox/lib/input/Input.js';
import Util from './Util.js';
/**
* Renders the add Dialog for faculties.
* @param active ... |
src/icons.js | leecade/react-i | import React from 'react'
export const up = () => <g><path d='M7.41 7.84l4.59 4.58 4.59-4.58 1.41 1.41-6 6-6-6z'/></g>
export const down = () => <g><path d='M7.41 15.41l4.59-4.58 4.59 4.58 1.41-1.41-6-6-6 6z'/></g> |
app/imports/ui/pages/Documents.js | ericvrp/GameCollie | import React from 'react';
import { Link } from 'react-router';
import { Row, Col, Button } from 'react-bootstrap';
import DocumentsList from '../components/DocumentsList';
const Documents = () => (
<div className="Documents">
<Row>
<Col xs={ 12 }>
<div className="page-header clearfix">
<... |
pages/404.js | maven-hackathon/TheQueerTour | /**
* React Static Boilerplate
* https://github.com/koistya/react-static-boilerplate
* Copyright (c) Konstantin Tarkus (@koistya) | MIT license
*/
import React, { Component } from 'react';
export default class extends Component {
render() {
return (
<div>
<h1>Not Found</h1>
<p>The pag... |
src/svg-icons/file/folder-shared.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let FileFolderShared = (props) => (
<SvgIcon {...props}>
<path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-5 3c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm4 8h-8v... |
blueocean-material-icons/src/js/components/svg-icons/social/person.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const SocialPerson = (props) => (
<SvgIcon {...props}>
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/>
</SvgIcon>
);
SocialPerson.displayName = 'SocialPerson';
SocialPerson.... |
StudyNotes/ReactNative_/tg/component/home/homedetail.js | coderZsq/coderZsq.target.swift | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Image,
TouchableOpacity,
WebView
} from 'react-native';
var HomeDetail = React.createClass({
render(){
// alert(this.props.data);
return (
<WebView
source={{uri: this.props.data}}
... |
features/head/head.component.js | nlambert/checkin | import React from 'react';
import PropTypes from 'prop-types';
import Head from 'next/head';
class HeadComponent extends React.Component {
static propTypes = {
title: PropTypes.string,
prefetchedState: PropTypes.object
};
render() {
const { title } = this.props;
return (
<Head>
<t... |
components/Header.js | FredTingaud/quick-bench-front-end | import React from 'react';
import { Navbar, Nav, NavDropdown, Dropdown, Form, Button } from 'react-bootstrap';
import AuthorDialog from './dialogs/AuthorDialog.js';
import ThanksDialog from './dialogs/ThanksDialog.js';
import PrivacyDialog from './dialogs/PrivacyDialog.js';
import patreon from 'components/resources/ico... |
app/containers/GlosorEditor.js | kaunio/gloso | // @flow
import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { withRouter, Link } from 'react-router';
import { List } from 'immutable';
import LanguagePair from '../components/LanguagePair';
import GlosaTableRow from '../components/GlosaTa... |
src/components/ExperienceDetail/ReportForm/ReportSuccessFeedback.js | WendellLiu/GoodJobShare | import React from 'react';
import PropTypes from 'prop-types';
import Checked from 'common/icons/Checked';
import Feedback from 'common/Feedback';
const ReportSuccessFeedback = ({ buttonClick }) => (
<Feedback
buttonClick={buttonClick}
heading="檢舉成功"
buttonText="回到經驗頁面"
Icon={Checked}
/>
);
Repor... |
src/components/App.js | allygator/allygator.github.io | import React from 'react';
import {Route, Switch} from 'react-router-dom';
import Main from './Main';
import '../App.css';
const App = () => (
<div className="App">
<Switch>
<Route exact path='/' component={Main}/>
</Switch>
</div>
)
export default App;
|
src/components/UnitEntry/UnitEntry.js | taylordevereaux/ppu-compare | // Package Imports
import React, { Component } from 'react';
import {
InputGroup,
InputGroupAddon,
//InputGroupButton,
Input,
FormGroup,
Form,
Button,
Col,
Label,
ButtonDropdown,
DropdownToggle,
DropdownMenu,
DropdownItem
} from 'reactstrap';
import PropTypes from 'prop-types';
import { Redire... |
packages/material-ui-icons/src/WatchLater.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let WatchLater = props =>
<SvgIcon {...props}>
<path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm4.2 14.2L11 13V7h1.5v5.2l4.5 2.7-.8 1.3z" />
</SvgIcon>;
WatchLater = pure(WatchLater);... |
example/src/pages/IconSnackbarContent/index.js | dlennox24/ricro-app-template | import Button from '@material-ui/core/Button';
import Divider from '@material-ui/core/Divider';
import Grid from '@material-ui/core/Grid';
import Portal from '@material-ui/core/Portal';
import Snackbar from '@material-ui/core/Snackbar';
import withStyles from '@material-ui/core/styles/withStyles';
import { IconSnackbar... |
src/assets/js/react/components/Template/TemplateContainer.js | blueliquiddesigns/gravity-forms-pdf-extended | import PropTypes from 'prop-types'
import React from 'react'
import TemplateCloseDialog from './TemplateCloseDialog'
/**
* Renders our Advanced Template Selector container which is shared amongst the components
*
* @package Gravity PDF
* @copyright Copyright (c) 2020, Blue Liquid Designs
* @license http... |
packages/material-ui-icons/src/CallToAction.js | AndriusBil/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let CallToAction = props =>
<SvgIcon {...props}>
<path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3v-3h18v3z" />
</SvgIcon>;
CallToAction = pure(CallToAction);
Cal... |
node_modules/react-bootstrap/es/SplitButton.js | Chen-Hailin/iTCM.github.io | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import _extends from... |
src/server.js | lordakshaya/pages | import Express from 'express';
import React from 'react';
import ReactDOM from 'react-dom/server';
import config from './config';
import favicon from 'serve-favicon';
import compression from 'compression';
import httpProxy from 'http-proxy';
import path from 'path';
import createStore from './redux/create';
import ApiC... |
docs/app/Examples/collections/Menu/States/MenuExampleActive.js | Rohanhacker/Semantic-UI-React | import React from 'react'
import { Menu } from 'semantic-ui-react'
const MenuExampleActive = () => {
return (
<Menu compact>
<Menu.Item active>
Link
</Menu.Item>
</Menu>
)
}
export default MenuExampleActive
|
app/react/components/permission/PermissionsComponent.js | NikaBuligini/whistleblower-server | // @flow
import React from 'react';
import Relay from 'react-relay';
import CreatePermissionMutation from '../../mutations/CreatePermissionMutation';
import DeletePermissionMutation from '../../mutations/DeletePermissionMutation';
import NewPermissionForm from './NewPermissionForm';
import PermissionList from './Permi... |
src/ListGroupItemHeading.js | reactstrap/reactstrap | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { mapToCssModules, tagPropType } from './utils';
const propTypes = {
tag: tagPropType,
className: PropTypes.any,
cssModule: PropTypes.object,
};
const defaultProps = {
tag: 'h5'
};
const ListGroupItemHe... |
__tests__/App.js | whysetiawan/NewApp | 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 />
);
});
|
admin/client/App/shared/Popout/PopoutFooter.js | danielmahon/keystone | /**
* Render a footer for a popout
*/
import React from 'react';
const BUTTON_BASE_CLASSNAME = 'Popout__footer__button Popout__footer__button--';
const PopoutFooter = React.createClass({
displayName: 'PopoutFooter',
propTypes: {
children: React.PropTypes.node,
primaryButtonAction: React.PropTypes.func,
pri... |
web/static/js/layouts/main.js | bigardone/phoenix-toggl | import React from 'react';
import { Link } from 'react-router';
export default class MainLayout extends React.Component {
constructor() {
super();
}
render() {
return (
<div id="main_layout">
{this.props.children}
</div>
);
}
}
|
example/react-counter/components/counter.js | justinjung04/treeful | import React, { Component } from 'react';
import Treeful from '../../../src/treeful';
export default class Counter extends Component {
constructor() {
super();
this.state = {
count: Treeful.get('count')
};
}
componentDidMount() {
this.unsubscribe = Treeful.subscribe('count', this.countUpdated.bind(this)... |
app/containers/NotFoundPage/index.js | rapicastillo/beautifulrising-client | /**
* 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... |
app/components/pokemon-name.js | mersocarlin/pokedex-app | import React from 'react';
export default React.createClass({
propTypes: {
id: React.PropTypes.number,
name: React.PropTypes.string,
},
fillPokemonId (pokemonId) {
let id = pokemonId.toString();
while (id.length < 3) {
id = `0${id}`;
}
return `#${id}`;
},
renderHeader () {... |
scripts/other/Hello.js | peletiah/goatFS-Client | /*
Hello
*/
import React from 'react';
import autobind from 'autobind-decorator';
import Log from './Log';
@autobind
class Hello extends React.Component {
renderLog(key) {
return <Log key={key} index={key} details={this.props.log} />
}
render() {
return (
<div>
{console... |
node_modules/babel-plugin-react-transform/test/fixtures/code-class-extends-component-with-render-method/actual.js | MaleSharker/Qingyan | import React, { Component } from 'react';
class Foo extends Component {
render() {}
}
|
client/components/data/theme-details/index.js | allendav/wp-calypso | /** @ssr-ready **/
/**
* External dependencies
*/
import React from 'react';
import { connect } from 'react-redux';
import omit from 'lodash/omit';
/**
* Internal dependencies
*/
import { fetchThemeDetails } from 'state/themes/actions';
import { getThemeDetails } from 'state/themes/theme-details/selectors';
/**
... |
node_modules/semantic-ui-react/src/collections/Grid/GridRow.js | mowbell/clickdelivery-fed-test | import cx from 'classnames'
import PropTypes from 'prop-types'
import React from 'react'
import {
customPropTypes,
getElementType,
getUnhandledProps,
META,
SUI,
useKeyOnly,
useOnlyProp,
useTextAlignProp,
useValueAndKey,
useVerticalAlignProp,
useWidthProp,
} from '../../lib'
/**
* A row sub-comp... |
test/field-component-spec.js | peterox/react-redux-form | /* eslint react/no-multi-comp:0 react/jsx-no-bind:0 */
import React from 'react';
import PropTypes from 'prop-types';
import ReactDOM from 'react-dom';
import { assert } from 'chai';
import { createStore, applyMiddleware, combineReducers } from 'redux';
import { Provider, connect } from 'react-redux';
import TestUtils ... |
js/components/listItems/index.js | kondoSoft/que_hacer_movil | import React, { Component } from 'react';
import { TouchableOpacity, Image, View } from 'react-native';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Button, Container, Content, Card, CardItem, Text, Icon, Right, Left, Body, Thumbnail } from 'native-ba... |
tests/components/calculator_test.js | Lawton/react-testing-example | import React from 'react';
import {shallow} from 'enzyme';
import {expect} from 'chai';
import Calculator from '../../src/components/calculator';
// import {Math2 as math} from '../../src/utils/math';
import {Math4 as math} from '../../src/utils/math';
import sinon from 'sinon';
describe('test addition component', () ... |
app/components/PlayerNew.js | simenkid/justReact | import React from 'react';
import AvPlay from 'material-ui/svg-icons/av/play-arrow';
import AvPause from 'material-ui/svg-icons/av/pause';
import AvStop from 'material-ui/svg-icons/av/stop';
import AvLoop from 'material-ui/svg-icons/av/loop';
import { blue500, grey300, tealA400} from 'material-ui/styles/colors';
cons... |
src/browser/submit/SubmitPage.js | reedlaw/read-it | // @flow
import type { State } from '../../common/types';
import NewPost from './NewPost';
import React from 'react';
import SubmitError from './SubmitError';
import linksMessages from '../../common/app/linksMessages';
import { Box, PageHeader } from '../../common/components';
import { FormattedMessage } from 'react-in... |
src/Pagination.js | IveWong/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import PaginationButton from './PaginationButton';
import CustomPropTypes from './utils/CustomPropTypes';
import SafeAnchor from './SafeAnchor';
const Pagination = React.createClass({
mixins: [BootstrapMixi... |
src/entypo/HairCross.js | cox-auto-kc/react-entypo | import React from 'react';
import EntypoIcon from '../EntypoIcon';
const iconClass = 'entypo-svgicon entypo--HairCross';
let EntypoHairCross = (props) => (
<EntypoIcon propClass={iconClass} {...props}>
<path d="M10,0.4c-5.303,0-9.601,4.298-9.601,9.6c0,5.303,4.298,9.601,9.601,9.601c5.301,0,9.6-4.298,9.6-9.... |
app/js/components/CommentThread.js | niksoc/srmconnect | import React from 'react';
import {pullRight, Image} from 'react-bootstrap';
import axios from 'axios';
import Markdown from '../components/Markdown';
import PageTitle from '../components/PageTitle';
import LoadingIndicator from '../components/LoadingIndicator';
import UserThumb from '../components/UserThumb';
import T... |
src/components/Feedback/Feedback.js | 24v/player-sankey | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import withStyles from 'isom... |
test/box-test.js | AnnaBlackwell/sudoku-react | import { expect } from 'chai'
import { shallow, render, mount } from 'enzyme'
import React from 'react'
import Box from '../app/components/Box'
const props = {
cells: [
'cell-1',
'cell-2',
'cell-3',
'cell-4',
'cell-5',
'cell-6',
'cell-7',
'cell-8',
'cell-9'
... |
app/containers/LanguageProvider/index.js | prudhvisays/newsb | /*
*
* 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... |
src/components/layout/Banner.js | expositor/universal-react | import React, { Component } from 'react';
class Banner extends Component {
render() {
return (
<div className="contact-banner">
<p>Contact me at <em>callum(at)deadtrendy.co.uk</em> or call <em>07919 411 405</em></p>
</div>
);
}
}
export default Banner; |
transitions/app/SharedItems.js | lintonye/react-native-diary | // @flow
import React from 'react';
export type Metrics = {
x: number,
y: number,
width: number,
height: number,
}
export class SharedItem {
name: string;
containerRouteName: string;
reactElement: React.Element<*>;
nativeHandle: any;
metrics: ?Metrics;
constructor(name: string,... |
app/jsx/shared/ErrorBox.js | sfu/canvas-spaces | import React from 'react';
import PropTypes from 'prop-types';
const ErrorBox = ({ error }) => {
if (!error) {
return <div />;
}
return (
<div className="alert alert-error">
<strong>Error:</strong>
<span> {error}</span>
</div>
);
};
ErrorBox.propTypes = {
error: PropTypes.string,
};
... |
src/svg-icons/hardware/keyboard-voice.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let HardwareKeyboardVoice = (props) => (
<SvgIcon {...props}>
<path d="M12 15c1.66 0 2.99-1.34 2.99-3L15 6c0-1.66-1.34-3-3-3S9 4.34 9 6v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 15 6.7 12H5c0 3.42 2.72 6.... |
src/containers/EditableBookmarksList.js | dan-f/mark | import React from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import * as Actions from '../actions'
import BookmarksList from '../components/BookmarksList'
import { buttonSelected } from '../utils'
export class EditableBookmarksList extends React.Component {
constructor ... |
app/javascript/mastodon/features/ui/components/column_loading.js | Ryanaka/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Column from '../../../components/column';
import ColumnHeader from '../../../components/column_header';
import ImmutablePureComponent from 'react-immutable-pure-component';
export default class ColumnLoading extends ImmutablePureComponent {
stat... |
src/components/SidebarFooter/SidebarFooter.js | expdevelop/ultrastore | import React from 'react'
import s from './SidebarFooter.sass'
const SidebarFooter = ({className, children, ...rest}) => {
return (
<footer className={s.footer + (className ? ` ${className}` : '')} {...rest}>
{children}
</footer>
)
};
export default SidebarFooter;
|
src/components/pages/EditPostPage.js | Iktwo/readable | import React, { Component } from 'react';
import HeaderNav from "../HeaderNav";
import { connect } from 'react-redux';
import { withRouter } from "react-router-dom";
import * as Actions from "../../actions";
import PostsForm from "../PostsForm";
import * as API from "../../utils/api";
class EditPostPage extends Compon... |
reloby-app-client/src/containers/Login.js | hwclass/reloby | import React, { Component } from 'react';
import { withRouter } from 'react-router-dom';
import {
Button,
FormGroup,
FormControl,
ControlLabel
} from 'react-bootstrap';
import LoaderButton from '../components/LoaderButton';
import {
CognitoUserPool,
AuthenticationDetails,
CognitoUser
} from 'amazon-cognit... |
src/svg-icons/maps/person-pin-circle.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsPersonPinCircle = (props) => (
<SvgIcon {...props}>
<path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm0 2c1.1 0 2 .9 2 2 0 1.11-.9 2-2 2s-2-.89-2-2c0-1.1.9-2 2-2zm0 10c-1.67 0... |
src/component/SVG.js | IceEnd/ice-video | import React from 'react';
const SVG = () => (
<svg display="none" version="1.1" xmlns="http://www.w3.org/2000/svg" >
<symbol id="video_play" viewBox="0 0 36 36">
<path d="M25.8 18c0 .6-.3 1.1-.8 1.3L12.5 27c-.2.1-.5.2-.8.2-.8 0-1.5-.6-1.5-1.5V10c0-.8.7-1.5 1.5-1.5.3 0 .5.1.8.2l12.7 7.9c.4.5.6.9.6 1.4z" />... |
tests/layouts/CoreLayout.spec.js | markkohdev/corndog | 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... |
src/_common/__tests__/SelectGroup-test.js | qingweibinary/binary-next-gen | import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import SelectGroup from '../SelectGroup';
describe('<SelectGroup />', () => {
it('renders with no properties', () => {
const wrapper = shallow(<SelectGroup />);
expect(wrapper.type()).to.equal('fieldset');
... |
app/javascript/spec/toast-list/toast-list.spec.js | ManageIQ/manageiq-ui-classic | import React from 'react';
import { act } from 'react-dom/test-utils';
import fetchMock from 'fetch-mock';
import { mount } from 'enzyme';
import toJson from 'enzyme-to-json';
import configureStore from 'redux-mock-store';
import { Provider } from 'react-redux';
import thunk from 'redux-thunk';
import ToastList from '.... |
src/components/CardContainer.js | gabrielzzarate/portfolio-2017 | import React, { Component } from 'react';
import Card from './Card';
class CardContainer extends Component {
render() {
const { projects, projectLinks, projectFirst } = this.props;
const projectCards = projects.map((project, i) => {
return (
<Card
playHomeAnimation={this.props.playHo... |
app/scripts/components/popup/templates/conus-stations/component.js | resource-watch/prep-app | import React, { Component } from 'react';
import PropTypes from 'prop-types';
class ConusStations extends Component {
static propTypes = {
onModal: PropTypes.func.isRequired
};
render() {
const { onModal } = this.props;
return (
<div className="c-conus-stations">
<button
cl... |
ui/src/main/js/components/UpdateConfig.js | apache/aurora | import React from 'react';
import PanelGroup, { Container, StandardPanelTitle } from 'components/Layout';
import TaskConfig from 'components/TaskConfig';
import UpdateDiff from 'components/UpdateDiff';
import { isNully } from 'utils/Common';
export default function UpdateConfig({ update }) {
if (isNully(update.upd... |
src/views/BootCard/BootCardText.js | shengnian/shengnian-ui-react | import React from 'react'
import PropTypes from 'prop-types'
import cx from 'classnames'
import { mapToCssModules } from '../../lib/'
const propTypes = {
tag: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
className: PropTypes.string,
cssModule: PropTypes.object,
}
const defaultProps = {
tag: 'p',
}... |
src/scripts/views/image.js | sharnee/instaClone | import React from 'react'
var Image = React.createClass({
render: function() {
var detailData = this.props.model
return (
<div className="image-wrapper">
<img src={ detailData.get('imageURL') } />
</div>
)
}
})
export default Image |
src/pages/kandi.js | vitorbarbosa19/ziro-online | import React from 'react'
import BrandGallery from '../components/BrandGallery'
export default () => (
<BrandGallery brand='Kandi' />
)
|
packages/create-subscription/src/createSubscription.js | kaushik94/react | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import React from 'react';
import invariant from 'shared/invariant';
import warningWithoutStack from 'shared/warningWi... |
app/components/atoms/Ink/index.js | altiore/webpack_config_example | import React from 'react'
import Ink from 'react-ink'
const MyInk = props => <Ink background={false} {...props} />
export default MyInk
|
app/resources/hello/es6.js | shiminghua/front_end_practice | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
class Hello extends React.Component {
/***************
* 在最初渲染时设置组件 state 对象,仅在组件渲染前调用一次
* 返回一个对象
*/
constructor(props) {
super(props);
this.state = {
thing: props.thingy
};
}
... |
docs/src/app/components/pages/components/DatePicker/ExampleDisableDates.js | w01fgang/material-ui | import React from 'react';
import DatePicker from 'material-ui/DatePicker';
function disableWeekends(date) {
return date.getDay() === 0 || date.getDay() === 6;
}
function disableRandomDates() {
return Math.random() > 0.7;
}
/**
* `DatePicker` can disable specific dates based on the return value of a callback.
*... |
src/svg-icons/action/shop-two.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionShopTwo = (props) => (
<SvgIcon {...props}>
<path d="M3 9H1v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2H3V9zm15-4V3c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H5v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5h-5zm-6-2h4... |
actor-apps/app-web/src/app/components/dialog/TypingSection.react.js | changjiashuai/actor-platform | import React from 'react';
import { PureRenderMixin } from 'react/addons';
import classNames from 'classnames';
import DialogStore from 'stores/DialogStore';
export default React.createClass({
mixins: [PureRenderMixin],
getInitialState() {
return {
typing: null,
show: false
};
},
compon... |
app/index.js | dfucci/Borrowr | import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, hashHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import routes from './routes';
import configureStore from './store/configureStore';
import './app.global.c... |
jenkins-design-language/src/js/components/material-ui/svg-icons/communication/call-missed.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const CommunicationCallMissed = (props) => (
<SvgIcon {...props}>
<path d="M19.59 7L12 14.59 6.41 9H11V7H3v8h2v-4.59l7 7 9-9z"/>
</SvgIcon>
);
CommunicationCallMissed.displayName = 'CommunicationCallMissed';
CommunicationCallMissed.muiName = 'SvgI... |
source/js/components/sticky-container.js | mehan/nsf-challenge | import React from 'react';
import classnames from "classnames";
var StickyButton = React.createClass({
getInitialState: function() {
return {
sticky: this.props.initialState || false
};
},
checkSticky: function() {
var position = window.scrollY;
if (this.props.stickyTo) {
return posi... |
node_modules/react-native/Libraries/Image/ImageBackground.js | jasonlarue/react-native-flashcards | /**
* 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... |
src/containers/scenes/Profile/index.js | MarvinAmador7/rn-profile | import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import {
View,
Text,
} from 'react-native';
import { fetchWelcomeMessage } from '../../../actions/welcome';
// import styles from './styles';
function mapStateToProps (state) {
return sta... |
packages/wix-style-react/stories/Introduction/Cheatsheet/componentsFamilies/LayoutFamily/LayoutFamily.js | wix/wix-style-react | import React from 'react';
import { FamilyStructure } from '../../sharedComponents';
import PageExamples from './examples/PageExamples';
import MarketingPageLayoutExample from './examples/MarketingPageLayoutExample';
import CardExamples from './examples/CardExamples';
import TableExamples from './examples/TableExamples... |
analysis/rogueoutlaw/src/modules/features/Checklist/Component.js | yajinni/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import SPELLS from 'common/SPELLS';
import { SpellLink } from 'interface';
import Checklist from 'parser/shared/modules/features/Checklist';
import Rule from 'parser/shared/modules/features/Checklist/Rule';
import Requirement from 'parser/shared/modules/fe... |
src/svg-icons/communication/textsms.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationTextsms = (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-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/>
</SvgIcon>
);
Communica... |
src/svg-icons/maps/person-pin-circle.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsPersonPinCircle = (props) => (
<SvgIcon {...props}>
<path d="M12 2C8.14 2 5 5.14 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm0 2c1.1 0 2 .9 2 2 0 1.11-.9 2-2 2s-2-.89-2-2c0-1.1.9-2 2-2zm0 10c-1.67 0... |
pnpm-cached/.pnpm-store/1/registry.npmjs.org/react-youtube/7.4.0/es/YouTube.js | JamieMason/npm-cache-benchmark | var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, des... |
components/BackgroundSelect.js | dawnlabs/carbon | import React from 'react'
import colornames from 'colornames'
import ImagePicker from './ImagePicker'
import ColorPicker from './ColorPicker'
import Button from './Button'
import Popout, { managePopout } from './Popout'
import { COLORS, DEFAULT_BG_COLOR } from '../lib/constants'
import { capitalize, stringifyRGBA } fr... |
lib/site/help/sidebar/component.js | DemocracyOS/app | import React from 'react'
import { Link } from 'react-router'
import t from 't-component'
import config from 'lib/config'
const Sidebar = () => (
<div id='help-sidebar-container'>
<div className='help-sidebar'>
{Sidebar.articles.map((article, i) => (
<Link key={i} to={article.path}>{article.label}<... |
modules/gui/src/widget/floatingBox.js | openforis/sepal | import {compose} from 'compose'
import {connect} from 'store'
import {selectFrom} from 'stateUtils'
import BlurDetector from 'widget/blurDetector'
import Portal from 'widget/portal'
import PropTypes from 'prop-types'
import React from 'react'
import _ from 'lodash'
import styles from './floatingBox.module.css'
import w... |
app/components/Home.js | ikafire/OpenObjectMarker | import React from 'react';
import HomeStore from '../stores/HomeStore';
import cookie from 'react-cookie';
class Home extends React.Component {
constructor(props) {
super(props);
this.state = HomeStore.getState();
}
renderAuth() {
if (!this.state.user) {
this.state.user = cookie.load('use... |
src/scripts/components/captcha/Captcha.component.js | ModuloM/kodokojo-ui | /**
* Kodo Kojo - Software factory done right
* Copyright © 2016 Kodo Kojo (infos@kodokojo.io)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.