path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
client/components/ProfilePic.js | gut-js/gut | import React from 'react';
import { Modal, Button } from 'react-bootstrap';
class ProfilePic extends React.Component {
constructor(){
super();
this.handleSubmit = this.handleSubmit.bind(this);
}
handleSubmit(){ //start here
// const { resetPoll, fetchYelpData } = this.props.pollActions;
// const... |
client/src/components/dashboard/profile/view-profile.js | iNeedCode/mern-starter | import React, { Component } from 'react';
import cookie from 'react-cookie';
import { connect } from 'react-redux';
import { fetchUser } from '../../../actions/index';
import UserInfo from './user-info';
class ViewProfile extends Component {
componentWillMount() {
// Fetch user data prior to component mounting
... |
src/index.js | djeebus/retroroms | import {remote} from 'electron';
import 'babel-polyfill'; // generators
import React from 'react';
import { render as renderReact } from 'react-dom';
import { Provider } from 'react-redux';
import configureStore from './redux/store';
import Settings from './components/settings';
const store = configureStore(remote.app... |
src/GridList/GridList.spec.js | pradel/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import GridList from './GridList';
import getMuiTheme from '../styles/getMuiTheme';
describe('<GridList />', () => {
const muiTheme = getMuiTheme();
const shallowWithContext = (node) => shallow(node, {con... |
src/components/BrandName.js | alexravs/midgar | import React from 'react';
import { Link } from 'react-router';
import '../../css/brand-name.scss';
const BrandName = () => (
<Link to='/'>
<span id='brand-name'>Midgar</span>
</Link>
);
export default BrandName;
|
examples/huge-apps/routes/Calendar/components/Calendar.js | chunwei/react-router | import React from 'react';
class Calendar extends React.Component {
render () {
var events = [{
id: 0, title: 'essay due'
}];
return (
<div>
<h2>Calendar</h2>
<ul>
{events.map(event => (
<li key={event.id}>{event.title}</li>
))}
</ul>
... |
src/app/containers/AddSkipassButton.js | blobor/buka | import React from 'react'
import classNames from 'classnames'
import { connect } from 'react-redux'
import { FloatingActionButton } from 'material-ui'
import { ContentAdd } from 'material-ui/svg-icons'
import { storeSkipass } from '../core/actions/stored-skipasses.actions'
const AddSkipassButton = ({ canBeAdded, stor... |
native/tv_gridview/index.ios.js | ycinfinity/react-tv-gridview | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import { AppRegistry, View } from 'react-native';
import GridView from './ios_component/GridView/GridView';
const Config = GridView.Config;
const Layout = GridView.Layout;
const rowConfi... |
components/SlideShow/src/index.js | geoffdavis92/react-utilities | import React from 'react';
class Component extends React.Component {
render() {
return (
<div />
);
}
}
export default Component;
|
app/components/admin-dashboard.js | sirbrillig/voyageur-js-client | import React from 'react';
import { connect } from 'react-redux';
import timeago from 'lib/timeago';
import { fetchEvents } from 'lib/actions/admin.js';
import classNames from 'classnames';
import debugFactory from 'debug';
const debug = debugFactory( 'voyageur:admin-dashboard' );
class AdminDashboard extends React.C... |
src/components/NavLinks/index.js | fathomlondon/fathomlondon.github.io | import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'gatsby';
export function NavLinks({ onLinkClick }) {
const links = [
{
path: '/',
name: 'Home',
},
{
path: '/about',
name: 'About',
},
{
path: '/what-we-do',
name: 'What we do',
},
{
path: '/how-we-... |
ui/js/pages/event/EventDates.js | ericsoderberg/pbc-web |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import moment from 'moment-timezone';
import { getUnavailableDates } from '../../actions';
import Button from '../../components/Button';
const NUMBER_OF_WEEKS = 52;
export default class EventDates extends Component {
constructor() {
... |
src/routes/login/index.js | cuijiaxu/react-front | import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'dva'
import { Button, Row, Form, Input } from 'antd'
import { config } from '../../utils'
import styles from './index.less'
const FormItem = Form.Item
const Login = ({
login,
dispatch,
form: {
getFieldDecorator,
valida... |
src/client/react/user/components/menus/PostRaceMenu.js | bwyap/ptc-amazing-g-race | import React from 'react';
import autobind from 'core-decorators/es/autobind';
import { withRouter } from 'react-router-dom';
import { Position, Spinner, Menu, MenuItem, MenuDivider, Intent } from '@blueprintjs/core';
import { connect } from 'react-redux';
import { logout } from '../../../../actions/authActions';
impor... |
src/scripts/views/leaderboardPage.js | TayLang/IronPong | import React from 'react'
import ACTIONS from '../actions.js'
import STORE from '../store.js'
import NavBar from './components/navBar'
import Header from './components/header'
var LeaderboardPage = React.createClass({
componentWillMount: function() {
ACTIONS.fetchUsers()
STORE.on('dataUpdated', () => {
this.se... |
__tests__/index.android.js | Chandler-Sun/react-native-app-template | import 'react-native';
import React from 'react';
import Index from '../index.android.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
admin/src/components/MobileNavigation.js | geminiyellow/keystone | import blacklist from 'blacklist';
import classnames from 'classnames';
import React from 'react';
import { Container } from 'elemental';
const Transition = React.addons.CSSTransitionGroup;
var MobileListItem = React.createClass({
displayName: 'MobileListItem',
propTypes: {
className: React.PropTypes.string,
chi... |
src/components/forms/FormCheckbox.js | ProAI/react-essentials | import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import Field from './Field';
import useIdentifier from '../../hooks/useIdentifier';
import useFormField from './useFormField';
import FieldPropTypes from './FieldPropTypes';
const propTypes = {
...FieldPropTypes,
label: Pro... |
fixtures/ssr/server/render.js | empyrical/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': '',... |
addons/info/src/components/markdown/text.js | enjoylife/storybook | import React from 'react';
import PropTypes from 'prop-types';
import { baseFonts } from '../theme';
const defaultProps = { children: null };
const propTypes = { children: PropTypes.node };
export function P(props) {
const style = {
...baseFonts,
fontSize: '15px',
};
return <p style={style}>{props.child... |
packages/forms/src/UIForm/fields/MultiSelectTag/displayMode/TextMode.component.js | Talend/ui | import PropTypes from 'prop-types';
import React from 'react';
import Badge from '@talend/react-components/lib/Badge';
import { TextMode as FieldTemplate } from '../../FieldTemplate';
import theme from './TextMode.scss';
function getLabel(titleMap, value) {
const itemConf = titleMap.find(item => item.value === value... |
mod10/man/src/demo.js | mauricedb/mwd-2017-02-20 |
import React from 'react';
import ReactDOM from 'react-dom';
// class Hello extends React.Component {
// render(){
// return React.createElement('h1', null, 'Hello')
// }
// }
class Clock extends React.Component {
constructor() {
super();
this.state = {
now: new Date().toLocaleTimeSt... |
src/svg-icons/action/card-travel.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionCardTravel = (props) => (
<SvgIcon {...props}>
<path d="M20 6h-3V4c0-1.11-.89-2-2-2H9c-1.11 0-2 .89-2 2v2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zM9 4h6v2H9V4zm11 15H... |
src/components/Become/Student/Student.js | edgarallanglez/foxacademia_frontend | /**
* 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... |
src/routes/Processes/components/InstanceList.js | sljuka/buzzler-ui | import InstanceListItem from './InstanceListItem'
import Radium from 'radium'
import React from 'react'
import { mediaQueries } from '../../../styles/global'
const InstanceList = (props) => {
const {
process,
showInstance
} = props
return (
<ul style={style}>
{process.instances.map(instance =>... |
jenkins-design-language/src/js/components/material-ui/svg-icons/hardware/keyboard-arrow-right.js | alvarolobato/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const HardwareKeyboardArrowRight = (props) => (
<SvgIcon {...props}>
<path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/>
</SvgIcon>
);
HardwareKeyboardArrowRight.displayName = 'HardwareKeyboardArrowRight';
HardwareKeyboardArrowRight.muiNa... |
examples/with-redux-wrapper/components/AddCount.js | JeromeFitz/next.js | import React from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { addCount } from '../store/count/action'
const AddCount = ({ count, addCount }) => {
return (
<div>
<style jsx>{`
div {
padding: 0 0 20px 0;
}
`}</style>
... |
app/javascript/mastodon/features/compose/components/favourite_tags.js | masarakki/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Link from 'react-router-dom/Link';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
const messages = defineMessages({
favourite_tags: { id: 'compose_form.favourite_tags', defaultM... |
docs/src/NotFoundPage.js | apisandipas/react-bootstrap | import React from 'react';
import NavMain from './NavMain';
import PageHeader from './PageHeader';
import PageFooter from './PageFooter';
const NotFoundPage = React.createClass({
render() {
return (
<div>
<NavMain activePage='' />
<PageHeader
title='404'
subT... |
src/index.js | sateez/salestracker | /* eslint-disable import/default */
import React from 'react';
import {render} from 'react-dom';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import routes from './routes';
import configureStore from './store/configureStore';
import { loadCars } from './actions... |
components/Layout.js | nickaugust/dwmjs | import React from 'react'
const style = {
horizontal: {
display: 'flex',
flexDirection: 'row',
height: '100%',
flexGrow: 1
},
vertical: {
display: 'flex',
flexDirection: 'column',
height: '100%',
flexGrow: 1
}
}
/**
* A <Layout> component is a container for a variable number ... |
docs/app/Examples/modules/Progress/Content/ProgressExampleProgressPercent.js | aabustamante/Semantic-UI-React | import React from 'react'
import { Progress } from 'semantic-ui-react'
const ProgressExampleProgressPercent = () => (
<Progress value='4' total='5' progress='percent' />
)
export default ProgressExampleProgressPercent
|
src/react/JSONTree/JSONBooleanNode.js | bloodyowl/redux-devtools | import React from 'react';
import reactMixin from 'react-mixin';
import { SquashClickEventMixin } from './mixins';
import hexToRgb from '../../utils/hexToRgb';
const styles = {
base: {
paddingTop: 3,
paddingBottom: 3,
paddingRight: 0,
marginLeft: 14
},
label: {
display: 'inline-block',
ma... |
app/javascript/mastodon/features/getting_started/index.js | musashino205/mastodon | import React from 'react';
import Column from '../ui/components/column';
import ColumnLink from '../ui/components/column_link';
import ColumnSubheading from '../ui/components/column_subheading';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import Prop... |
src/daypicker/DayPickerBody.js | buildo/rc-datepicker | import React from 'react';
import range from 'lodash/range';
import t from 'tcomb';
import { props } from 'tcomb-react';
import View from 'react-flexview';
import { pure, skinnable } from '../utils';
import { Value, Mode, MomentDate } from '../utils/model';
import InvalidDate from '../InvalidDate';
import Picker from '... |
view/dva/src/components/admin/Tags/TagForm.js | xuzhenyang/ZeroCola | import React from 'react';
import { Button, Form, Input } from 'antd';
const FormItem = Form.Item;
const TagForm = Form.create()((props) => {
const {
onSubmit,
form: {
getFieldDecorator,
getFieldsValue,
validateFields,
resetFields
}
} = p... |
src/pages/order.js | OpenCollective/frontend | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import OrderWithData from '../apps/expenses/components/OrderWithData';
import Header from '../components/Header';
import Body from '../components/Body';
import Footer from '../components/Footer';
import Colle... |
ui/js/dfv/src/fields/website/index.js | pods-framework/pods | import React from 'react';
import PropTypes from 'prop-types';
import BaseInput from 'dfv/src/fields/base-input';
import { toBool } from 'dfv/src/helpers/booleans';
import { FIELD_COMPONENT_BASE_PROPS } from 'dfv/src/config/prop-types';
const Website = ( props ) => {
const { fieldConfig = {} } = props;
const {
... |
ui/src/main/js/components/Time.js | medallia/aurora | import moment from 'moment';
import React from 'react';
export function RelativeTime({ ts }) {
return <span>{moment(ts).fromNow()}</span>;
}
|
src/Fabric/Type/StringType.js | reactmob/dos-filter | import React from 'react';
import { TextField } from 'office-ui-fabric-react/lib/TextField';
import BaseStringType from '../../Type/StringType';
import AbstractRenderer from './AbstractRenderer';
export default class StringType extends BaseStringType {
static defaultProps = {
doRenderOperatorList: Abstract... |
react-redux/public/app/index.js | react-scott/react-learn | /**
*
* 在入口文件中,我们需要把App和redux建立起联系。Provider是react-redux提供的组件,
* 它的作用是把store和视图绑定在了一起,这里的Store就是那个唯一的State树。
* 当Store发生改变的时候,整个App就可以作出对应的变化。
* 这里的会传进Provider的props.children里。
*
* */
import '../scss/pure.scss'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import App... |
examples/piechart/index.js | joshblack/react-d3 | import React from 'react';
import App from './components/App';
window.React = React;
React.render(
<App />,
document.getElementById('root')
);
|
src/svg-icons/editor/pie-chart-outlined.js | ngbrown/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorPieChartOutlined = (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 2zm1 2.07c3.61.45 6.48 3.33 6.93 6.93H13V4.07zM4 12c0-4.06 3.07-7.44 7-7.93v15.87c-... |
src/components/App/NavigationMixin.js | joshwcomeau/framework.js | /*
* 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.
*/
'use strict';
import React from 'react';
import ExecutionEnvironment from 'react/lib/Exe... |
tests/react/useRef_hook.js | gabelevi/flow | // @flow
import React from 'react';
class Foo extends React.Component<{}, void> {}
class Bar extends React.Component<{}, void> {}
{
const stringValue: {current: string} = React.useRef("abc"); // Ok
const numberValue: {current: number} = React.useRef(123); // Ok
const booleanValue: {current: boolean} = React.us... |
src/svg-icons/device/sd-storage.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSdStorage = (props) => (
<SvgIcon {...props}>
<path d="M18 2h-8L4.02 8 4 20c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-6 6h-2V4h2v4zm3 0h-2V4h2v4zm3 0h-2V4h2v4z"/>
</SvgIcon>
);
DeviceSdStorage ... |
node_modules/react-bootstrap/es/CarouselCaption.js | firdiansyah/crud-req | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
src/ChessboardOptionEditor.js | yo35/rpb-chessboard | /******************************************************************************
* *
* This file is part of RPB Chessboard, a WordPress plugin. *
* Copyright (C) 2013-2022 Yoann Le Montagner <yo35 -at- melix.net> *
... |
react-ui/src/components/about/Skill.js | MaGuangChen/resume-maguangchen | import React from 'react';
import Percentage from './Percentage';
import react from '../../images/react.svg';
import redux from '../../images/redux.svg';
import scss from '../../images/scss.svg';
import graphQL from '../../images/graphQL.svg';
import webpack from '../../images/webpack.svg';
import node from '../../im... |
client/node_modules/uu5g03/doc/main/client/src/data/source/uu5-bricks-ul-ol.js | UnicornCollege/ucl.itkpd.configurator | import React from 'react';
import {BaseMixin, ElementaryMixin, SectionMixin, Tools} from '../common/common.js';
import Factory from './factory.js';
import './ul-ol.less';
Factory.createList = function (tag) {
return React.createClass({
//@@viewOn:mixins
mixins: [
BaseMixin,
ElementaryMixin,
... |
KDReactNative/KDClass/MainPage/KDOldIndexIos.js | csyibei/KDReactNative | /**
* Created by kaidi on 2016/10/12.
*/
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Image,
Navigator,
DeviceEventEmitter
} from 'react-native';
var tabBar... |
week3/react/express-react/views/bootstrap/Button.js | jfhinchcliffe/Coderfactory_Term3_Notes | import React from 'react'
export default function Button({ type = 'default', name="name" }){
return (
<div className={ ` btn btn-${ type }` }>
{ name }
</div>
)
} |
src/components/theme-giraffe/thanks.js | MoveOnOrg/mop-frontend | import React from 'react'
import PropTypes from 'prop-types'
import ThanksNextPetition from '../../containers/thanks-next-petition'
const Thanks = ({
sharedSocially,
isCreator,
renderRawLink,
renderTwitter,
renderFacebook,
renderMessenger,
renderMail,
renderCopyPaste,
nextPetition
}) => (
<div cla... |
wrappers/json.js | WanderlandTravelers/wanderlandtravelers.github.io | import React from 'react'
import Helmet from 'react-helmet'
import { config } from 'config'
module.exports = React.createClass({
propTypes () {
return {
route: React.PropTypes.object,
}
},
render () {
const data = this.props.route.page.data
return (
<div>
<Helmet
tit... |
pages/projects/atmist/index.js | DarcyChan/darcychan.com | import React from 'react';
import { Artwork, ArtworkBrand } from 'components/artwork';
import { PageContent } from 'components/page';
import { Image } from 'components/common';
/* eslint-disable quotes */
exports.data = {
id: 1,
path: `/projects/atmist/`,
category: `project`,
type: `artwork`,
titl... |
src/app/components/shared/sider.js | rujianwang/ant-design-aspnetzero | import React from 'react';
import { Menu, Icon } from 'antd';
import { Link } from 'dva/router';
import styles from './main.less';
import { config } from '../../../utils';
function getMenus(menuArray) {
return menuArray.map((item) => {
if (!!item.items && item.items.length > 0) {
return (
<Menu.Sub... |
src/components/Footer.js | rabbotio/minemark | import React from 'react'
// Styles
import styled from 'styled-components'
const Divz = styled.div`
ul {
list-style: none;
padding: 0;
}
ul li{
display: inline;
}
`
const facebook = () => {
window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(document.URL)}&t=${encodeURIComponent(... |
js/components/SidebarItem.react.js | abroder/puppycat | import React from 'react'
import AppDispatcher from '../dispatcher/AppDispatcher'
var styles = {
display: 'flex',
flexDirection: 'column',
padding: '10px',
borderBottom: '1px solid #DFDFDF'
}
var titleStyles = {
margin: '0px',
fontWeight: 'bold',
width: '100%',
whiteSpace: 'nowrap',
overflow: 'hid... |
packages/react-scripts/fixtures/kitchensink/src/features/webpack/SvgInclusion.js | bttf/create-react-app | /**
* 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.
*/
import Rea... |
src/client/auth/requireauth.react.js | langpavel/react-svg-path-editor | import Component from '../components/component.react';
import React from 'react';
import User from '../users/user';
export default function requireAuth(BaseComponent) {
return class RequireAuth extends Component {
static displayName = `${BaseComponent.name}RequireAuth`;
static willTransitionTo(transition)... |
react_class/setup.js | devSC/react-native | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
import Student from './Student'
import MiStudent from './MiStudent'
export default class setup extends Component {
co... |
src/svg-icons/maps/traffic.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsTraffic = (props) => (
<SvgIcon {...props}>
<path d="M20 10h-3V8.86c1.72-.45 3-2 3-3.86h-3V4c0-.55-.45-1-1-1H8c-.55 0-1 .45-1 1v1H4c0 1.86 1.28 3.41 3 3.86V10H4c0 1.86 1.28 3.41 3 3.86V15H4c0 1.86 1.28 3.41... |
src/app/container/checkout-payment-partial.js | all3dp/printing-engine-client | import React from 'react'
import compose from 'recompose/compose'
import withProps from 'recompose/withProps'
import withState from 'recompose/withState'
import withHandlers from 'recompose/withHandlers'
import {connect} from 'react-redux'
import * as coreActions from '../action/core'
import * as navigationActions fro... |
example/App.js | kis/react-native-air-progress-bar | import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import ProgressBar from 'react-native-air-progress-bar';
export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>... |
src/container/NewTopic/index.js | ztplz/CNode-react-native | /**
* React Native App
* https://github.com/ztplz/CNode-react-native
* email: mysticzt@gmail.com
*/
// import React, { Component, PropTypes } from 'react';
import React, { Component } from 'react';
import {
View,
Text,
TextInput,
Alert,
TouchableWithoutFeedback,
ActivityIndicator,
KeyboardAvoidingVie... |
src/routes/searchTable/SearchModal.js | zhangjingge/sse-antd-admin | import React from 'react'
import PropTypes from 'prop-types'
import { Modal, Button } from 'antd';
import ConditionList from './ConditionList';
class MoreChecks extends React.Component {
state = {
visible: false,
checkedListTexts: []
}
showModal = () => {
this.setState({
visible: true,
});... |
admin/client/App/screens/List/components/ItemsTable/ItemsTableDragDropZoneTarget.js | matthieugayon/keystone | /**
* THIS IS ORPHANED AND ISN'T RENDERED AT THE MOMENT
* THIS WAS DONE TO FINISH THE REDUX INTEGRATION, WILL REWRITE SOON
* - @mxstbr
*/
import React from 'react';
import { DropTarget } from 'react-dnd';
import { setCurrentPage } from '../../actions';
let timeoutID = false;
// drop target
var ItemsTableDragDro... |
src/CollapsibleMixin.js | PeterDaveHello/react-bootstrap | import React from 'react';
import TransitionEvents from './utils/TransitionEvents';
import deprecationWarning from './utils/deprecationWarning';
let warned = false;
const CollapsibleMixin = {
propTypes: {
defaultExpanded: React.PropTypes.bool,
expanded: React.PropTypes.bool
},
getInitialState(){
l... |
examples/huge-apps/components/App.js | kurayama/react-router | /*globals COURSES:true */
import React from 'react'
import Dashboard from './Dashboard'
import GlobalNav from './GlobalNav'
class App extends React.Component {
render() {
return (
<div>
<GlobalNav />
<div style={{ padding: 20 }}>
{this.props.children || <Dashboard courses={COURSES... |
app/javascript/mastodon/components/icon.js | yukimochi/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
export default class Icon extends React.PureComponent {
static propTypes = {
id: PropTypes.string.isRequired,
className: PropTypes.string,
fixedWidth: PropTypes.bool,
};
render () {
const { id, c... |
src/components/svg/icon/Person-Boxed.js | ryanabragg/VanguardLARP | import React from 'react';
import PropTypes from 'prop-types';
const PersonBoxed = (props) => {
const color = props.color == 'inherit' ? undefined : props.color;
const aria = props.title ? 'svg-person-boxed-title' : '' +
props.title && props.description ? ' ' : '' +
props.description ? 'svg-person-boxed-de... |
src/svg-icons/notification/confirmation-number.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationConfirmationNumber = (props) => (
<SvgIcon {...props}>
<path d="M22 10V6c0-1.11-.9-2-2-2H4c-1.1 0-1.99.89-1.99 2v4c1.1 0 1.99.9 1.99 2s-.89 2-2 2v4c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-4c-1.1 0-2-.9-2-2... |
views/main.js | littlecodeshop/black-screen | import React from 'react';
import _ from 'lodash';
import Rx from 'rx';
import {TerminalLayout} from './compiled/src/views/TerminalLayout.js';
var keys = {
goUp: event => (event.ctrlKey && event.keyCode === 80) || event.keyCode === 38,
goDown: event => (event.ctrlKey && event.keyCode === 78) || event.keyCode ... |
renderer/components/preferences/categories/index.js | wulkano/kap | import React from 'react';
import PropTypes from 'prop-types';
import {ipcRenderer as ipc} from 'electron-better-ipc';
import {connect, PreferencesContainer} from '../../../containers';
import General from './general';
import Plugins from './plugins';
const CATEGORIES = [
{
name: 'general',
Component: Gene... |
docs/src/pages/components/bottom-navigation/LabelBottomNavigation.js | lgollut/material-ui | import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import BottomNavigation from '@material-ui/core/BottomNavigation';
import BottomNavigationAction from '@material-ui/core/BottomNavigationAction';
import FolderIcon from '@material-ui/icons/Folder';
import RestoreIcon from '@material-ui/ic... |
src/common/ReplOutput.js | boneskull/Mancy | import _ from 'lodash';
import ReplConstants from '../constants/ReplConstants';
import ReplCommon from './ReplCommon';
import util from 'util';
import ReplEntryOutputError from '../components/ReplEntryOutputError';
import {EOL} from 'os';
import React from 'react';
import ReplDOM from '../common/ReplDOM';
import ReplCo... |
fixtures/fiber-debugger/src/Fibers.js | wmydz1/react | import React from 'react';
import {Motion, spring} from 'react-motion';
import dagre from 'dagre';
// import prettyFormat from 'pretty-format';
// import reactElement from 'pretty-format/plugins/ReactElement';
function getFiberColor(fibers, id) {
if (fibers.currentIDs.indexOf(id) > -1) {
return 'lightgreen';
}... |
app/components/AddUser/TeamSelect/index.js | prudhvisays/newsb | import React from 'react';
import Select, { Option } from 'rc-select';
import 'rc-select/assets/index.css';
function onSelect() {
console.log(arguments);
}
function onDeselect() {
console.log(arguments);
}
export default class UserSelect extends React.Component { //eslint-disable-line
constructor(props) {
s... |
packages/@vega/article-state-tool/src/components/ArticleFeatures.js | VegaPublish/vega-studio | // @flow
import React from 'react'
import {has} from 'lodash'
import {map, switchMap} from 'rxjs/operators'
import FeatureStateProvider from '@vega/components/FeatureStateProvider'
import {materializePaths} from 'part:@vega/datastores/document-preview'
import withPropsStream from '@vega/utils/withPropsStream'
import Wi... |
test/FormGroupSpec.js | zanjs/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import FormGroup from '../src/FormGroup';
import {shouldWarn} from './helpers';
describe('FormGroup', function() {
it('renders children', function() {
let instance = ReactTestUtils.renderIntoDocument(
<FormGroup>
<spa... |
frontend/src/Album/Details/AlbumDetailsMedium.js | lidarr/Lidarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Icon from 'Components/Icon';
import Label from 'Components/Label';
import IconButton from 'Components/Link/IconButton';
import Link from 'Components/Link/Link';
import Table from 'Components/Table/Table';
import TableBody from 'Compone... |
packages/cp-frontend/test/unit/components/manifest/name.js | yldio/copilot | /**
* @jest-environment jsdom
*/
import React from 'react';
import renderer from 'react-test-renderer';
import 'jest-styled-components';
import { Store } from '../../mocks';
import { reduxForm } from 'redux-form';
import { Name } from '@components/manifest';
const TestNameForm = reduxForm({ form: 'testNameForm' })... |
src/client/auth/requireauth.js | cazacugmihai/este | import Component from '../components/component.react';
import React from 'react';
import User from '../users/user';
export default function requireAuth(BaseComponent) {
return class RequireAuth extends Component {
static willTransitionTo(transition) {
if (User.isLoggedIn) return;
transition.redirec... |
packages/material-ui-icons/src/PhotoFilter.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let PhotoFilter = 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.75L... |
plugins/react/frontend/components/common/SavingLabel/index.js | pure-ui/styleguide | /**
* Saving
*
* Shows a label indicating something is being saved
*/
import React from 'react';
import styles from './styles.css';
const SavingLabel = () => (<div className={styles.label}>Saving...</div>);
export default SavingLabel;
|
YEAR 3/SEM 1/MOBILE/mobile_exam_prep/screens/Experiment/Lesson/Lesson.js | Zephyrrus/ubb | import React, { Component } from 'react';
import {
Animated,
Image,
ImageBackground,
Platform,
ScrollView,
StyleSheet,
Text,
View,
} from 'react-native';
import {
TabBar,
TabViewAnimated,
TabViewPagerPan,
TabViewPagerScroll,
} from 'react-native-tab-view';
import PropTypes from 'prop-types';
... |
test/unit/client/components/PageWrapperTest.js | scopevale/carpers-paradise | import sinon from 'sinon';
import chai from 'chai';
import subset from 'chai-subset';
import { shallow, mount } from 'enzyme';
import React from 'react';
import ReactDom from 'react-dom';
import dataService from './../../../../src/client/js/utils/DataService';
import dataFilter from './../../../../src/client/js/utils... |
src/index.js | lincolnphu/zzdi | import React from 'react';
import ReactDOM from 'react-dom';
import Zdd from './Zdd';
ReactDOM.render(<Zdd />, document.getElementById('root'));
|
node_modules/react-bootstrap/es/HelpBlock.js | ivanhristov92/bookingCalendar | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
docs/src/js/prettify.js | pandoraui/react-ui | 'use strict'
import React from 'react'
import ReactDOM from 'react-dom'
export default function prettify (Component) {
class Prettify extends React.Component {
static displayName = 'Prettify'
static propTypes = {
children: React.PropTypes.array
}
componentDidMount () {
window.prettyPri... |
src/js/components/chatInterface/interfaceFooter.js | ShiningZeng/EasyChat | import React, { Component } from 'react';
import {socket, NAME, PHOTO} from '../../main';
export class InterfaceFooter extends Component {
constructor(props) {
super(props);
}
componentDidMount() {
this.showFile();
this.hideEmoji();
this.initEmoji();
//初始化表情点击事件
const emoji = this.refs.emoji;
this.... |
src/components/create-element.js | mozilla/copyright | import React from 'react';
import { IntlProvider } from 'react-intl';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import reducer from '../reducers';
var createElement = React.createClass({
propTypes: {
locale: React.PropTypes.string.isRequired,
messages: React.PropTypes.objec... |
.storybook/preview.js | dsmjs/components | import React from 'react';
import {addDecorator} from '@storybook/react';
import {fontFamily, fontSize} from '../src/styles';
global.__PATH_PREFIX__ = ''; // eslint-disable-line no-underscore-dangle
global.__BASE_PATH__ = ''; // es... |
stories/index.js | sunilj0lly/gitrospective | import React from 'react'
import { storiesOf, action } from '@kadira/storybook'
import GitReposList from '../src/components/GitReposList'
// import '../src/index.css';
// import 'bootstrap/dist/css/bootstrap.css'
const authButtonClicked = action('authenticate with Github button clicked');
const reposLinkClicked = ac... |
app/containers/LanguageProvider/index.js | giko/mcb-react-task | /*
*
* 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... |
examples/async-data/app.js | zoeabryant/react-autocomplete | import React from 'react'
import Autocomplete from '../../lib/index'
import { getStates, matchStateToTerm, sortStates, styles, fakeRequest } from '../utils'
let App = React.createClass({
getInitialState () {
return {
unitedStates: getStates(),
loading: false
}
},
render () {
return (
... |
src/components/PersonInfo.js | mleonard87/chapp-client | import React from 'react';
import PureRenderMixin from 'react-addons-pure-render-mixin';
export default React.createClass({
render: function() {
return (
<div className="person-info">
<h3>{this.props.name}</h3>
</div>
);
}
});
|
ui/src/components/enquiries/composeModal.js | jollopre/mps | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Modal } from 'react-bootstrap';
import { Typeahead } from 'react-bootstrap-typeahead';
import 'react-bootstrap-typeahead/css/Typeahead.css';
export class ComposeModal extends Component {
constructor(props) {
super(props);
... |
src/Label.js | IveWong/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
const Label = React.createClass({
mixins: [BootstrapMixin],
getDefaultProps() {
return {
bsClass: 'label',
bsStyle: 'default'
};
},
render() {
let classes = this.getBsClassSe... |
dashboard-ui/app/components/payment/planDetails.js | CloudBoost/cloudboost | import React from 'react';
import PropTypes from 'prop-types';
import planList from './plans';
import Popover from 'material-ui/Popover';
import ReactTooltip from 'react-tooltip';
import ReactDOM from 'react-dom';
class PlanDetails extends React.Component {
static propTypes = {
selectPlan: PropTypes.any,
sel... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.