path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
app/jsx/assignments_2/student/components/LoginActionPrompt.js | djbender/canvas-lms | /*
* Copyright (C) 2019 - 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... |
packages/material-ui-icons/src/PermPhoneMsg.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7... |
components/RefreshableList.js | goominc/goommerce-seller-native | 'use strict';
import React from 'react';
import { ListView, RefreshControl } from 'react-native';
export default React.createClass({
getInitialState() {
return { isRefreshing: false };
},
_onRefresh() {
this.setState({isRefreshing: true});
const { onRefresh } = this.props;
Promise.resolve(onRefr... |
test/regressions/tests/Dialog/AlertDialog.js | AndriusBil/material-ui | // @flow
import React from 'react';
import { DialogActions, DialogContent, DialogContentText, DialogTitle } from 'material-ui/Dialog';
import Paper from 'material-ui/Paper';
import Button from 'material-ui/Button';
export default function AlertDialog() {
return (
<Paper
elevation={8}
style={{
... |
docs/app/Examples/views/Comment/Types/index.js | mohammed88/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const CommentTypes = () => (
<ExampleSection title='Types'>
<ComponentExample
title='Comments'
description='A basic ... |
views/status_line.js | jonadev95/black-screen | import React from 'react';
export default React.createClass({
render() {
return (
<div className="status-line">
<CurrentDirectory currentWorkingDirectory={this.props.currentWorkingDirectory}/>
<VcsData data={this.props.vcsData}/>
</div>
)
... |
src/svg-icons/social/group-add.js | rhaedes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialGroupAdd = (props) => (
<SvgIcon {...props}>
<path d="M8 10H5V7H3v3H0v2h3v3h2v-3h3v-2zm10 1c1.66 0 2.99-1.34 2.99-3S19.66 5 18 5c-.32 0-.63.05-.91.14.57.81.9 1.79.9 2.86s-.34 2.04-.9 2.86c.28.09.59.14.91.... |
imports/client/components/About/ProjectsBand.js | evancorl/skate-scenes | import React from 'react';
import Scroll from 'react-scroll';
import ProjectListContainer from '../../containers/ProjectListContainer';
const ScrollElement = Scroll.Element;
class ProjectsBand extends React.Component {
shouldComponentUpdate() {
return false;
}
render() {
return (
<ScrollElement ... |
src/js/components/icons/base/DocumentRtf.js | linde12/grommet | // (C) Copyright 2014-2015 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import CSSClassnames from '../../../utils/CSSClassnames';
import Intl from '../../../utils/Intl';
import Props from '../../../utils/Pro... |
src/articles/2018-01-31-1st-Anniversary/index.js | sMteX/WoWAnalyzer | import React from 'react';
import PropTypes from 'prop-types';
import * as CONTRIBUTORS from 'CONTRIBUTORS';
import SpellLink from 'common/SpellLink';
import ItemLink from 'common/ItemLink';
import Icon from 'common/Icon';
import SPELLS from 'common/SPELLS';
import ITEMS from 'common/ITEMS';
import SPECS from 'game/SP... |
src/main.js | ssohjiro/react_inline_with_webpack_starter | import React from 'react';
import Button from 'component/Button';
class Main extends React.Component {
render() {
return (
<div>
<Button />
<br />
<Button />
<br />
<Button />
<br />
<Button />
<br />
</div>
);
}
}
React.render( <Main />, document.body );
|
docs-ui/components/getDynamicText.stories.js | mvaled/sentry | import React from 'react';
import {storiesOf} from '@storybook/react';
import {withInfo} from '@storybook/addon-info';
import getDynamicText from 'app/utils/getDynamicText';
storiesOf('Utility|getDynamicText', module).add(
'getDynamicText',
withInfo(
`
Use this to wrap dynamic content (i.e. dates) for acc... |
js/App/Components/AppNavigatorRenderer.ios.js | telldus/telldus-live-mobile-v3 | /**
* Copyright 2016-present Telldus Technologies AB.
*
* This file is part of the Telldus Live! app.
*
* Telldus Live! app is free : 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
*... |
src/svg-icons/device/signal-cellular-null.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalCellularNull = (props) => (
<SvgIcon {...props}>
<path d="M20 6.83V20H6.83L20 6.83M22 2L2 22h20V2z"/>
</SvgIcon>
);
DeviceSignalCellularNull = pure(DeviceSignalCellularNull);
DeviceSignalCellularN... |
examples/huge-apps/routes/Messages/components/Messages.js | ArmendGashi/react-router | import React from 'react';
class Messages extends React.Component {
render () {
return (
<div>
<h2>Messages</h2>
</div>
);
}
}
export default Messages;
|
src/components/Divider.js | lightningboss/cashier | import React from 'react';
const Divider = () => (
<div>
<hr />
</div>
);
export default Divider;
|
app/components/FilteredImage.js | klikstermkd/image-filter | import React from 'react';
const FilteredImage = ({filters}) => (
<img src="./images/cat.jpg" style={filters} className="hw-accelerate" />
);
export default FilteredImage; |
fields/types/textarea/TextareaFilter.js | stosorio/keystone | import _ from 'underscore';
import classNames from 'classnames';
import React from 'react';
import { FormField, FormInput, FormSelect } from 'elemental';
const CONTROL_OPTIONS = [
{ label: 'Matches', value: 'matches' },
{ label: 'Contains', value: 'contains' },
{ label: 'Begins with', value: 'beginsWith' },
{ lab... |
docs/src/pages/components/pagination/PaginationRounded.js | lgollut/material-ui | import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Pagination from '@material-ui/lab/Pagination';
const useStyles = makeStyles((theme) => ({
root: {
'& > *': {
marginTop: theme.spacing(2),
},
},
}));
export default function PaginationRounded() {
const classes ... |
src/components/Section.js | raiss/componentized | import React from 'react';
import './Section.scss';
export const Section = ({title, children}) => {
return (
<fieldset className="section-container">
<legend>{title}</legend>
{children}
</fieldset>
);
}
Section.propTypes = {
title: React.PropTypes.string.isRequired
}
|
example/src/components/Navigation.js | BradEstey/react-controller | import React from 'react'
import { Link } from 'react-router'
export default () => (
<nav>
<ul>
<li><Link to="/features">List of Features</Link></li>
<li><Link to="/foo-bar">Page Not Found</Link></li>
<li><Link to="/static">Static Components</Link></li>
</ul>
</nav>
)
|
src/components/common/svg-icons/editor/vertical-align-center.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorVerticalAlignCenter = (props) => (
<SvgIcon {...props}>
<path d="M8 19h3v4h2v-4h3l-4-4-4 4zm8-14h-3V1h-2v4H8l4 4 4-4zM4 11v2h16v-2H4z"/>
</SvgIcon>
);
EditorVerticalAlignCenter = pure(EditorVerticalAlig... |
app/jsx/epub_exports/CourseList.js | venturehive/canvas-lms | /*
* Copyright (C) 2015 - 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... |
client/modules/Product/pages/ProductListPage/ProductListPage.js | SwanCourses/example-app | /**
* Created by alex on 27.09.16.
*/
import React, { Component } from 'react';
import { connect } from 'react-redux';
import ProductListItem from '../../components/ProductListItem/ProductListItem';
import { Link } from 'react-router';
import styles from './ProductListPage.css';
// Import Selectors
import { getPro... |
src/CollapsibleMixin.js | roderickwang/react-bootstrap | import React from 'react';
import TransitionEvents from './utils/TransitionEvents';
import deprecationWarning from './utils/deprecationWarning';
const CollapsibleMixin = {
propTypes: {
defaultExpanded: React.PropTypes.bool,
expanded: React.PropTypes.bool
},
getInitialState(){
const defaultExpanded ... |
public/js/components/profile/Password.react.js | MadushikaPerera/Coupley | import React from 'react';
import TextField from 'material-ui/lib/text-field';
import RaisedButton from 'material-ui/lib/raised-button';
import DropDownMenu from 'material-ui/lib/DropDownMenu';
import MenuItem from 'material-ui/lib/menus/menu-item';
import Paper from 'material-ui/lib/paper';
import CardTitle from 'mate... |
docs-ui/components/navTabs.stories.js | beeftornado/sentry | import React from 'react';
import {withInfo} from '@storybook/addon-info';
import NavTabs from 'app/components/navTabs';
export default {
title: 'Core/NavTabs',
};
export const Default = withInfo('NavTabs')(() => {
return (
<NavTabs>
<li className="active">
<a href="#">link one</a>
</li>
... |
src/components/Main.js | ShellyZzzzzzz/photoGallery-react | require('normalize.css/normalize.css');
require('styles/App.scss');
import React from 'react';
import ReactDOM from 'react-dom';
//获取图片相关的数据
let imageData = require('../data/imageData.json');
//利用自执行函数,将图片信息转成图片URL路径信息
imageData = (function getImageURL(imageDataArr) {
for(var i = 0, j = imageDataArr.length; i < j; ... |
test/integration/basic/pages/async-props.js | nikvm/next.js | import React from 'react'
export default class AsyncProps extends React.Component {
static async getInitialProps () {
return await fetchData()
}
render () {
return <p>{this.props.name}</p>
}
}
function fetchData () {
const p = new Promise(resolve => {
setTimeout(() => resolve({ name: 'Diego Mil... |
packages/components/src/GridLayout/Tile/Header/TileHeader.component.js | Talend/ui | import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import theme from './TileHeader.scss';
function Header(props) {
return (
<div className={classnames(theme['tc-tile-header'], 'tc-tile-header')}>{props.children}</div>
);
}
Header.propTypes = {
children: PropTypes.... |
src/react/puppeteer/src/js/views/DevicesView.js | nicholastmosher/pa_puppeteer | /**
* @author Nick Mosher <nicholastmosher@gmail.com>
*/
import React from 'react';
import { connect } from 'react-redux';
import { Route } from 'react-router-dom';
import ListView from './ListView';
import DeviceListElement from './DeviceListElement';
const DevicesView = (props) => {
const id = props.match.params... |
src/components/FacebookLogin/FacebookLogin.js | prakash-u/react-redux | import React, { Component } from 'react';
import PropTypes from 'prop-types';
class FacebookLogin extends Component {
static propTypes = {
onLogin: PropTypes.func.isRequired,
appId: PropTypes.string.isRequired,
xfbml: PropTypes.bool,
cookie: PropTypes.bool,
scope: PropTypes.string,
autoLoad: ... |
Tests/Components/FullButtonTest.js | infinitered/ChainReactApp | // // https://github.com/airbnb/enzyme/blob/master/docs/api/shallow.md
import test from 'ava'
// import React from 'react'
// import FullButton from '../../App/Components/FullButton'
// import { shallow } from 'enzyme'
// // Basic wrapper
// const wrapper = shallow(<FullButton onPress={() => {}} text='hi' />)
// test... |
js/Search.js | JRFrazier/complete-intro-to-react | import React from 'react'
import ShowCard from './ShowCard'
import preload from '../public/data.json'
const Search = React.createClass({
render () {
return (
<div className='search'>
{preload.shows.map((show) => {
return (
<ShowCard key={show.imdbID} {...show} />
)
... |
src/pages/HomeScreen.js | LinDing/two-life | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
Image
} from 'react-native';
import TabNavigator from 'react-native-tab-navigator';
import BottomTabs from '../common/BottomTabs';
import AgendaScreen from "./AgendaScreen";
import ProfileScreen from "./ProfileScreen";
import Notificatio... |
app/javascript/mastodon/features/compose/components/upload_progress.js | abcang/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import Icon from 'mastodon/components/icon';
export default class UploadProgress extends React.PureComponent {
static propTypes = {
active: PropTypes.b... |
src/components/ArticleList.js | cfilby/react-mobx-realworld-example-app | import ArticlePreview from './ArticlePreview';
import ListPagination from './ListPagination';
import LoadingSpinner from './LoadingSpinner';
import React from 'react';
const ArticleList = props => {
if (props.loading && props.articles.length === 0) {
return (
<LoadingSpinner />
);
}
if (props.arti... |
react/mgr/src/components/SiderMenu.js | ouzhigang/thinkphp-ozgweb | import React from 'react';
import { Menu, Icon } from 'antd';
import { Link } from 'react-router-dom';
const renderMenuItem = item => ( // item.route 菜单单独跳转的路由
<Menu.Item
key={item.key}
>
<Link to={item.route || item.key}>
{item.icon && <Icon type={item.icon} />}
<spa... |
docs/src/examples/modules/Accordion/Usage/index.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/src/components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/src/components/ComponentDoc/ExampleSection'
const AccordionUsageExamples = () => (
<ExampleSection title='Usage'>
<ComponentExample
title='Active Index'
descrip... |
src/components/Modal/components/SearchPlugin.js | jaruba/PowderPlayer | import React from 'react';
import {
clipboard
} from 'electron';
import ModalActions from '../actions';
import ModalStore from '../store';
import MessageActions from '../../Message/actions';
import PlayerActions from '../../Player/actions';
import linkUtil from '../../../utils/linkUtil';
import _ from 'lodash';
... |
src/client/components/preview/previewId.component.js | DBCDK/dbc-ufo | import React from 'react';
export default class PreviewId extends React.Component {
constructor(props) {
super(props);
this.state = {
currentValue: props.value
};
}
onSubmit = (e) => {
e.preventDefault();
this.props.onSubmit(this.input.value);
this.setState({currentValue: this.inpu... |
frontend/src/components/poll/results/options.js | 1905410/Misago | // jshint ignore:start
import React from 'react';
import Modal from './modal';
import * as poll from 'misago/reducers/poll';
import * as thread from 'misago/reducers/thread';
import ajax from 'misago/services/ajax';
import modal from 'misago/services/modal';
import posting from 'misago/services/posting';
import snackba... |
app/components/LoadingIndicator/index.js | mhoffman/CatAppBrowser | import React from 'react';
import Circle from './Circle';
import Wrapper from './Wrapper';
const LoadingIndicator = () => (
<Wrapper>
<Circle />
<Circle rotate={30} delay={-1.1} />
<Circle rotate={60} delay={-1} />
<Circle rotate={90} delay={-0.9} />
<Circle rotate={120} delay={-0.8} />
<Cir... |
app/jsx/bundles/react_outcome_alignment.js | djbender/canvas-lms | /*
* Copyright (C) 2015 - 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... |
src/filters/Regex.js | prajapati-parth/react-bootstrap-table | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Const from '../Const';
class RegexFilter extends Component {
constructor(props) {
super(props);
this.filter = this.filter.bind(this);
this.timeout = null;
}
filter(event) {
if (this.timeout) {
clearTimeout... |
src/containers/Experiments.js | pjkarlik/ReactUI | import React from 'react';
const Experiments = () => {
const content = (
<span>
<h2>Experiments with code</h2>
<p>
Sed quis mattis turpis. Ut vitae finibus sem. Donec scelerisque nec nisi non malesuada. Praesent mattis
lacus quis diam imperdiet rhoncus. Ut porta efficitur magna, quis pr... |
src/main/internal/adaption/react/Fragment.js | mcjazzyfunky/js-surface | // external import
import React from 'react'
// --- Fragment -----------------------------------------------------
const Fragment = React.Fragment
// --- exports ------------------------------------------------------
export default Fragment
|
react-flux-mui/js/material-ui/src/svg-icons/alert/error.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AlertError = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>
</SvgIcon>
);
AlertError = pure(AlertError);
AlertEr... |
test/integration/react-18/app/pages/suspense/backpressure.js | JeromeFitz/next.js | import React from 'react'
import { useCachedPromise } from '../../components/promise-cache'
export default function Backpressure() {
const elements = []
for (let i = 0; i < 2000; i++) {
elements.push(
<React.Suspense key={i} fallback={<span>loading...</span>}>
<Item idx={i} />
</React.Suspe... |
src/routes/Home/components/HomeView.js | rojasmi1/ArtCR | import React from 'react'
import classes from './HomeView.scss'
import MaxImage from '../assets/maxrojas-home-image.jpg'
import WelcomeMessage from '../../../components/WelcomeMessage'
import PreviewNavigationBox from '../../../components/PreviewNavigationBox'
import * as Messages from '../../../static/messages_en'
... |
src/js/components/meter/utils.js | odedre/grommet-final | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React from 'react';
import PropTypes from 'prop-types';
import { baseUnit } from '../../utils/Graphics';
import CSSClassnames from '../../utils/CSSClassnames';
const CLASS_ROOT = CSSClassnames.METER;
export var baseDimension = baseUnit * 8;
... |
app/components/dashboard/Settings.js | OldFresco/web-app-kiwwi | import React from 'react';
const Settings = () => (
<article>
<div className='container-fluid'>
<div className='main-display tabs col-md-8'>
<h1><font color='#1B3628'>Welcome</font></h1>
<h1 className='plan-style'><font color='antiquewhite'>To</font> Your</h1>
... |
admin/client/components/ListColumnsForm.js | mikaoelitiana/keystone | import React from 'react';
import ReactDOM from 'react-dom';
import CurrentListStore from '../stores/CurrentListStore';
import Popout from './Popout';
import PopoutList from './PopoutList';
import { Button, InputGroup } from 'elemental';
var ListColumnsForm = React.createClass({
displayName: 'ListColumnsForm',
prop... |
src/components/tap/TapMessages.js | Sawtaytoes/Ghadyani-Framework-Webpack-React-Redux | import PropTypes from 'prop-types'
import React from 'react'
import { connect } from 'react-redux'
import TapLineItem from './TapLineItem'
const styles = { marginTop: '1em' }
export const TapMessages = ({ messages }) => (
<div style={styles}>
{
messages
.map((_, index) => (
<TapLineItem key={index} id={... |
packages/ringcentral-widgets-docs/src/app/pages/Components/CallItem/Demo.js | u9520107/ringcentral-js-widget | import React from 'react';
// eslint-disable-next-line
import CallItem from 'ringcentral-widgets/components/CallItem';
const props = {};
props.call = {
direction: 'Inbound',
startTime: 0,
activityMatches: [],
fromMatches: [],
toMatches: [],
from: {
phoneNumber: '+1234567890'
},
to: {},
};
props.are... |
thinking-in-react/02_build_static_part_1/program.js | kwpeters/workshopper-solutions | import React from 'react';
export const FilterableProductTable = React.createClass(
{
render() {
return (<div></div>);
}
}
);
|
packages/cf-component-table/src/TableHead.js | koddsson/cf-ui | import React from 'react';
import PropTypes from 'prop-types';
class TableHead extends React.Component {
render() {
let className = 'cf-table__head';
if (this.props.className.trim())
className += ' ' + this.props.className.trim();
return (
<thead className={className}>
{this.props.c... |
react/lib/home.js | tomarus/gosyslogd | import React from 'react'
import {connect} from 'react-redux'
import {Col, Navbar, Nav, Row} from 'react-bootstrap'
import Monitor from 'lib/panels/monitor'
const mapStateToProps = (state) => ({
})
const Navigation = () =>
<Navbar fluid>
<Navbar.Header>
<Navbar.Brand>
<span>
<i className='fa fa-fw fa... |
src/components/Feedback/Feedback.js | utage2002/mm | /**
* 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/svg-icons/social/group-add.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialGroupAdd = (props) => (
<SvgIcon {...props}>
<path d="M8 10H5V7H3v3H0v2h3v3h2v-3h3v-2zm10 1c1.66 0 2.99-1.34 2.99-3S19.66 5 18 5c-.32 0-.63.05-.91.14.57.81.9 1.79.9 2.86s-.34 2.04-.9 2.86c.28.09.59.14.91.... |
pages/consulting.js | markhker/newCyK |
import React, { Component } from 'react';
import './scss/service-single.scss';
import Link from '../components/Link';
import Card from 'material-ui/lib/card/card';
import CardTitle from 'material-ui/lib/card/card-title';
import CardText from 'material-ui/lib/card/card-text';
import MyRawTheme from '../components/the... |
react/gameday2/components/embeds/EmbedYoutube.js | tsteward/the-blue-alliance | import React from 'react'
import { webcastPropType } from '../../utils/webcastUtils'
const EmbedYoutube = (props) => {
const src = `//www.youtube.com/embed/${props.webcast.channel}?autoplay=1`
return (
<iframe
width="100%"
height="100%"
src={src}
frameBorder="0"
allowFullScreen
... |
application/components/accounts/Register.js | buildreactnative/assemblies-tutorial | import React, { Component } from 'react';
import Config from 'react-native-config';
import { Text, View, TextInput, TouchableOpacity, ScrollView } from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import NavigationBar from 'react-native-navbar';
import { GooglePlacesAutocomplete } from 'react-... |
frontend/src/app/index.js | the-invoice/nab | import React, { Component } from 'react';
import { Link, IndexLink } from 'react-router';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { pushPath } from 'redux-simple-router';
import { Route, IndexRoute } from 'react-router';
import { Root, View } from 'ui/layout.js';
impor... |
src/shared/DetailsGrouping.js | cityofasheville/simplicity2 | import React from 'react';
import PropTypes from 'prop-types';
import DetailsFormGroup from './DetailsFormGroup';
import styles from './detailsGrouping.css';
const DetailsGrouping = (props) => {
const numArrays = Math.floor(12 / props.colWidth); // step one, determine number of subArrays needed
const subArraySize ... |
src/components/icons/HelpBoxIcon.js | InsideSalesOfficial/insidesales-components | import React from 'react';
const HelpBoxIcon = props => (
<svg {...props.size || { width: '24px', height: '24px' }} {...props} viewBox="0 0 24 24">
{props.title && <title>{props.title}</title>}
<path d="M0 0h24v24H0z" fill="none" />
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12... |
src/components/Location.js | leoasis/redux-state-router | import React from 'react';
import { connect } from 'react-redux';
import { createHistory } from 'history';
class Route extends React.Component {
static childContextTypes = {
renderUrl: React.PropTypes.func
};
render() {
return this.props.children();
}
getChildContext() {
return { renderUrl: th... |
src/index.js | Outc4sted/Pairadice | import React from 'react';
import { render } from 'react-dom';
import Root from './containers/Root';
import { browserHistory } from 'react-router';
import { syncHistoryWithStore } from 'react-router-redux';
import configureStore from './store/configureStore';
import injectTapEventPlugin from 'react-tap-event-plugin';
... |
app/javascript/mastodon/features/getting_started/components/announcements.js | lindwurm/mastodon | import React from 'react';
import ImmutablePureComponent from 'react-immutable-pure-component';
import ReactSwipeableViews from 'react-swipeable-views';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import IconButton from 'mastodon/components/icon_button';
import Icon f... |
fixtures/nesting/src/modern/AboutPage.js | billfeller/react | import React from 'react';
import {useContext} from 'react';
import {connect} from 'react-redux';
import ThemeContext from './shared/ThemeContext';
import lazyLegacyRoot from './lazyLegacyRoot';
// Lazy-load a component from the bundle using legacy React.
const Greeting = lazyLegacyRoot(() => import('../legacy/Greeti... |
index.es6.js | Stonelinks/react-toggle | import React from 'react'
import classNames from 'classnames'
export default React.createClass({
displayName: 'Toggle',
propTypes: {
checked: React.PropTypes.bool,
defaultChecked: React.PropTypes.bool,
onChange: React.PropTypes.func,
name: React.PropTypes.string,
value: React.PropTypes.string... |
react-music-player/app/helloworld/Root.js | zhongshanxian/SUM | import React from 'react';
import Button from './components/button';
class Root extends React.Component {
constructor(props) {
super(props);
this.state = {
count: 4
};
//函数需要绑定,否则报错'setState'undefined
this.counterHandler = this.counterHandler.bind(this);
}
counterHandler () {
this.setState({
... |
test/components/Test.js | loggur/react-redux-provide-history | import React from 'react';
import PropTypes from 'prop-types';
import Title from './Title';
const Test = () => (
<Title />
);
export default Test;
|
src/js/Containers/error404.js | 7sleepwalker/addicted-to-mnt | import React, { Component } from 'react';
import logo from '../../img/logo.svg';
import '../../styles/App.css';
class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h1 classNa... |
src/components/Header.js | ksco/reblog | import React from 'react';
import { Header, Segment } from 'semantic-ui-react';
import { Link } from 'redux-little-router';
import { BLOG_NAME, BLOG_SLOGAN } from '../constants/config';
export default ({ backToHome }) => (
<div>
<Header
as='h1'
attached='top'
style={{
cursor: 'point... |
client/apps/print-test-label/view.js | Automattic/woocommerce-services | /**
* External dependencies
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { translate as __ } from 'i18n-calypso';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
/**
* Internal dependencies
*/
import { getPaperSizes } from 'lib/pdf-label... |
src/components/CarSalesInfo.js | sateez/salestracker | import React from 'react';
const CarSalesInfo = ({car,cars,totalCarsSold,totalRevenue,carInfo}) => {
console.log('CarSalesInfo of car:--->', car,cars,totalCarsSold,totalRevenue,carInfo);
return (
<div className='col-sm-4 col-sm-offset-1 car-sales-info'>
<div className='col-sm-12'>
... |
components/switch/index.js | bebeanan/monkey-ui | import RcSwitch from 'rc-switch';
import React from 'react';
import classNames from 'classnames';
export default class Switch extends React.Component {
static defaultProps = {
prefixCls: 'ant-switch',
}
render() {
const { prefixCls, size, className } = this.props;
const cls = classNames({
[cla... |
src/ProjectTile.js | MFry/me | import React from 'react';
import PropTypes from 'prop-types';
import './style/scss/card.scss';
const ProjectTile = ({ projectTitle, summary, imgLink }) =>
(<div className="card">
<div className="card-image">
<img className="img-responsive" src={imgLink} alt={`${projectTitle}`} />
<span className="ca... |
scripts/index.js | somebody32/react-svg-example | import React from 'react';
import App from './App';
import data from './data';
React.render(<App datasets={data}/>, document.getElementById('root'));
|
src/components/Layout/Layout.js | poeschko/ask-refugeescode | // @flow
import React from 'react';
import { graphql, compose } from 'react-apollo';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
// external-global styles must be imported in your JS.
import normalizeCss from 'normalize.css';
import s from './Layout.css';
import Header from '../Header';
import Fo... |
src/svg-icons/action/play-for-work.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPlayForWork = (props) => (
<SvgIcon {...props}>
<path d="M11 5v5.59H7.5l4.5 4.5 4.5-4.5H13V5h-2zm-5 9c0 3.31 2.69 6 6 6s6-2.69 6-6h-2c0 2.21-1.79 4-4 4s-4-1.79-4-4H6z"/>
</SvgIcon>
);
ActionPlayForWork ... |
app/android/containers/movie/components/overview/index.js | GilbertLS/MovieCircle | import React, { Component } from 'react';
import { ActionButton } from 'react-native-material-ui';
import Icon from 'react-native-vector-icons/MaterialIcons';
import {
StyleSheet,
View,
Image,
Text,
ScrollView,
Linking,
} from 'react-native';
export default class Overview extends Component {
constructor... |
src/components/Heatmap.js | opiskelija-dashboard/dashboard | import React from 'react';
import CalendarHeatmap from "react-calendar-heatmap";
import ReactTooltip from 'react-tooltip';
export const Heatmap = props => {
const averageText = props.user ? '' : 'keskimäärin';
const customTooltipDataAttrs = value => (
{ 'data-tip':
`Tehtäviä tehty ${averageText} ${valu... |
src/parser/monk/mistweaver/modules/talents/JadeSerpentStatue.js | sMteX/WoWAnalyzer | import React from 'react';
import { STATISTIC_ORDER } from 'interface/others/StatisticBox';
import TalentStatisticBox from 'interface/others/TalentStatisticBox';
import { formatPercentage } from 'common/format';
import SpellLink from 'common/SpellLink';
import AbilityTracker from 'parser/shared/modules/AbilityTracker';... |
packages/ringcentral-widgets-docs/src/app/components/Markdown/index.js | u9520107/ringcentral-js-widget | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import marked from 'marked';
import hl from 'highlight.js';
import styles from './styles.scss';
class Markdown extends Component {
componentWillMount() {
marked.setOptions({
gfm: true,
... |
ui/src/components/NewFilterButton.js | lucifurtun/myquotes | import React from 'react'
import { connect } from "react-redux";
import { showModal } from "../redux/ui";
import { FaPlus } from "react-icons/fa";
import { upperFirst } from "lodash";
import FilterForm from "./FilterForm";
const getAddFilterModal = (type) => {
return {
title: upperFirst(type),
cont... |
src/components/Certificate.js | jalcantara90/cv | import React from 'react';
const Certificate = (props) => {
const myCertificates = (
<div>
{props.certificate.map((cert) =>
<div className='item' key={cert.name}>
<h3>{cert.name} @ {cert.institution} <span>{cert.date}</span> <a className="certification" href={cert.certificateUrl}>
... |
src/svg-icons/editor/border-right.js | xmityaz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderRight = (props) => (
<SvgIcon {...props}>
<path d="M7 21h2v-2H7v2zM3 5h2V3H3v2zm4 0h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2v-2H3v2zm8 0h2v-2h-2v2zm-8-8h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm8 8h2v-2h-2v2zm4-4h... |
app/javascript/mastodon/components/column.js | tootcafe/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { supportsPassiveEvents } from 'detect-passive-events';
import { scrollTop } from '../scroll';
export default class Column extends React.PureComponent {
static propTypes = {
children: PropTypes.node,
label: PropTypes.string,
bindToDoc... |
dev/dispenseManager/pages/mainSearch.js | Thr1ve/Dispense | import React from 'react'
import Router from 'react-router'
import FilterableProductTable from '../../components/molecules/filterableProductTable.js'
let ReactRethinkdb = require('react-rethinkdb')
let r = ReactRethinkdb.r
let { RouteHandler } = Router
var MainSearch = React.createClass({
mixins: [ReactRethinkdb.... |
src/components/common/svg-icons/image/straighten.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageStraighten = (props) => (
<SvgIcon {...props}>
<path d="M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z"/>
</SvgIcon>
);
ImageStr... |
src/svg-icons/maps/local-printshop.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPrintshop = (props) => (
<SvgIcon {...props}>
<path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"... |
src/SearchBox/components/__tests__/SearchBox-test.js | jmcriffey/react-ui | import Mingus from 'mingus';
import React from 'react';
import SearchBox from '../SearchBox';
import {KEY_CODES, request} from '../../../utils';
Mingus.createTestCase('SearchBoxTest', {
testRender() {
const rendered = this.renderComponent(<SearchBox />);
this.assertIsType(rendered, 'div');
}... |
src/components/login/form.login.js | guzmonne/mcp | import React from 'react'
import DivisibleInput from '../form/divisible_input.form.js'
import Radios from '../form/radios.form.js'
import RowColXS12 from '../bootstrap/row.col-xs-12.js'
const genderRadioOptions = [
{name: 'Hombre', value: 'male'},
{name: 'Mujer', value: 'female'}
]
export default class LoginForm ex... |
src/components/ChatBox/ChatBoxControls/ChatBoxControls.js | renesansz/react-chat | import React from 'react';
import './ChatBoxControls.css';
class ChatBoxControls extends React.Component {
constructor(props) {
super(props);
this.handleChange = this.handleChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
this.state = {
message: ''
... |
src/containers/AddUser.js | AliaksandrZahorski/contacts | import React from 'react'
import { connect } from 'react-redux'
import { addUser } from '../actions'
let AddUser = ({ dispatch }) => {
let inputName, inputData
return (
<div>
<form onSubmit={e => {
e.preventDefault()
if (!inputName.value.trim()) {
return
}
dispatch(addUser(... |
stories/Breadcrubms/ExampleWithNodes.js | nirhart/wix-style-react | import React from 'react';
import styles from './ExampleBreadcrumbs.scss';
import Breadcrumbs from '../../src/Breadcrumbs/Breadcrumbs';
const itemsWithNode = [{id: '1', value: <span style={{color: 'red'}}>I'm a span with styles</span>}, {
id: '2',
value: 'I\'m a regular string'
}, {id: '3', value: <a href="http:/... |
src/router/App.js | lixiaoyang1992/react-native-starter-kit | import React from 'react';
import { connect } from 'react-redux';
import { Platform, View, StatusBar, StyleSheet } from 'react-native';
import { Router, Scene, ActionConst, Actions } from 'react-native-router-flux';
import WelcomeContainer from '../containers/welcome/Container';
import LoginContainer from '../containe... |
web-ui/src/common/input_field/input_field.js | pixelated-project/pixelated-user-agent | /*
* Copyright (c) 2017 ThoughtWorks, Inc.
*
* Pixelated is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Pixelated i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.