path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
client/src/components/AdditionalFile.js | misha-slyusarev/invoices | import React, { Component } from 'react';
import { Input, Button } from 'semantic-ui-react'
export default class AdditionalFile extends Component {
constructor() {
super()
this.state = {}
}
updateDescription = (e) => this.props.updateFileDescription(this.props.id, e.target.value)
removeAdditionalFile =... |
client/components/SignupForm/index.js | viatsko/codingbox | import React from 'react';
import { Link } from 'react-router';
export default () =>
<div>
<h3 className="col-md-12 text-center">Or sign up using your email</h3>
<div className="col-xs-offset-2 col-xs-8 col-md-offset-4 col-md-4">
<form name="userForm" className="signin" noValidate autoComplete="off">
<fi... |
samples/sample1/src/index.js | codazen/formulationjs | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import Formulation from '../../../src';
import FormulationTest from '../../src';
import formDef from './forms/formDef.json';
var form = new FormulationTest(formDef);
form.render('sample-1');
|
lib/button/index.js | andyfen/react-native-UIKit | import React from 'react';
import {
StyleSheet,
Text,
TouchableOpacity,
} from 'react-native';
import { primary, gutter } from '../variables';
const styles = StyleSheet.create({
text: {
fontSize: 18,
fontWeight: '600',
textAlign: 'center',
},
});
const Button = ({
children, radius, fontWeight... |
modules/components/__tests__/Menu-test.js | devrieda/arc-reactor | import React from 'react';
import ReactDOM from 'react-dom';
import TestUtils from 'react-addons-test-utils';
import { fromJS } from 'immutable';
import Menu from '../Menu.js';
import ConfigManager from '../../helpers/ConfigManager';
const findByClass = TestUtils.findRenderedDOMComponentWithClass;
const render = TestU... |
examples/todo/js/components/TodoApp.js | meteor/relay-runtime-query | /**
* This file provided by Facebook is for non-commercial testing and evaluation
* purposes only. Facebook reserves all rights not expressly granted.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNES... |
packages/react-examples/src/pages/indicators/index.js | ustbhuangyi/better-scroll | import React from 'react'
import './index.styl'
const examples = [
{
path: '/indicators/minimap',
name: 'minimap',
},
{
path: '/indicators/parallax-scroll',
name: 'parallax scroll',
},
]
const Indicators = (props) => {
const goPage = (path) => {
props.history.push(path)
}
return (
... |
src/components/Form/FormLabel.js | sk-iv/iva-app | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
if(process.env.WEBPACK) require('./FormLabel.css');
function FormLabel(props, context) {
const {
children,
classes,
className: classNameProp,
component: Component,
disabled: disabledProp,
error... |
app/containers/App/index.js | kathydoody/scalable-react-demo | /**
*
* App.react.js
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If... |
src/client/components/Button/__tests__/Topic.js | busyorg/busy | import React from 'react';
import { shallow } from 'enzyme';
import Topic from '../Topic';
describe('<Topic />', () => {
it('renders without exploding', () => {
const props = {
name: 'exampletopic',
favorite: true,
closable: true,
};
const wrapper = shallow(<Topic {...props} />);
ex... |
app/components/SimilarProducts.js | Byte-Code/lm-digital-store-private-test | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { List } from 'immutable';
import glamorous from 'glamorous';
import ProductBadge from './ProductBadge';
import SimilarProductsDialog from './SimilarProductsDialog';
const W... |
client/src/components/EventIndex/EventPreview.js | Stanley288/buddy-finder-app | import React from 'react'
import { graphql } from 'react-apollo'
import gql from 'graphql-tag'
import Link from 'react-router'
class EventPreview extends React.Component {
static propTypes = {
event: React.PropTypes.object,
}
render () {
return (
<Link
to={`/view/event/${this.props.event.... |
node_modules/@material-ui/core/esm/FormControl/FormControlContext.js | pcclarke/civ-techs | import React from 'react';
/**
* @ignore - internal component.
*/
var FormControlContext = React.createContext();
export default FormControlContext; |
src/mui/field/FunctionField.spec.js | matteolc/admin-on-rest | import React from 'react';
import assert from 'assert';
import { shallow } from 'enzyme';
import FunctionField from './FunctionField';
describe('<FunctionField />', () => {
it('should render using the render function', () => {
const record = { foo: 'bar' };
const wrapper = shallow(<FunctionField re... |
js/app.js | tmck2/rgrjs | import React from 'react';
import ReactDOM from 'react-dom';
import Main from "./components/Main";
ReactDOM.render(<Main />, document.getElementById('react'));
|
fields/components/NestedFormField.js | dvdcastro/keystone | import React from 'react';
import { StyleSheet, css } from 'aphrodite/no-important';
import { FormField, FormLabel } from 'elemental';
import theme from '../../admin/client/theme';
function NestedFormField ({ children, className, label, ...props }) {
return (
<FormField {...props}>
<FormLabel className={css(clas... |
actor-apps/app-web/src/app/components/modals/AddContact.react.js | hejunbinlan/actor-platform | import _ from 'lodash';
import React from 'react';
import Modal from 'react-modal';
import pureRender from 'pure-render-decorator';
import { Styles, TextField, FlatButton } from 'material-ui';
import AddContactStore from 'stores/AddContactStore';
import AddContactActionCreators from 'actions/AddContactActionCreators'... |
app/javascript/mastodon/features/status/components/action_bar.js | Craftodon/Craftodon | import React from 'react';
import PropTypes from 'prop-types';
import IconButton from '../../../components/icon_button';
import ImmutablePropTypes from 'react-immutable-proptypes';
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
import { defineMessages, injectIntl } from 'react-intl';
i... |
test/higherOrder.spec.js | naoufal/higher-order | import expect from 'expect';
import React from 'react';
import higherOrder from '../src/higherOrder';
import MyComponent from './components/MyComponent';
import HigherOrderComponent from './components/HigherOrderComponent';
import AnotherHigherOrderComponent from './components/AnotherHigherOrderComponent';
describe(... |
src/Popup/PopupElement.js | ctco/rosemary-ui | import React from 'react';
import PropTypes from 'prop-types';
class PopupElement extends React.Component {
componentDidMount() {
this.props.didMount(this._popupElement);
}
componentWillUnmount() {
this.props.onUnmount();
}
render() {
let attrForType = this.context.parentT... |
app/src/modules/User/components/TestComp/TestComp.js | betofigueiredo/homelibraries.org | import React from 'react';
// CSS
import CSSModules from 'react-css-modules';
import styles from './style.module.sass';
const TestComp = () => (
<div className="grid-container full" data-test="mybooks-render">
<div className="grid-x">
<div className="medium-12 cell">
<div styleName="top-bar">TestComp</div>
... |
src/pages/tags.js | aberkow/gatsby-blog | import React from 'react';
import Link from 'gatsby-link';
import { BlogPostContent, BlogPostContainer, TagList } from '../utils/styles';
import { arrayReducer } from '../utils/helpers';
export default function TagsPage({
data
}) {
const { edges: posts } = data.allMarkdownRemark;
const tagsArray = arrayReducer(... |
src/js/routes.js | Chandransh/hackerearth-challenge-page | import React from 'react';
import {Route, IndexRoute} from 'react-router';
import Home from './containers/Home/Home';
import ChallengePage from './connect-views/ChallengePage/ChallengePage';
import NotFoundView from './static-views/NotFoundView/NotFoundView';
export default (
<Route path="/" component={Home}>
<... |
packages/material-ui-icons/src/Landscape.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let Landscape = props =>
<SvgIcon {...props}>
<path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z" />
</SvgIcon>;
Landscape = pure(Landscape);
Landscape.muiName = 'SvgIcon';
export ... |
tests/components/Header/Header.spec.js | nskpaun/group-therapist | import React from 'react'
import { Header } from 'components/Header/Header'
import classes from 'components/Header/Header.scss'
import { IndexLink, Link } from 'react-router'
import { shallow } from 'enzyme'
describe('(Component) Header', () => {
let _wrapper
beforeEach(() => {
_wrapper = shallow(<Header/>)
... |
app/javascript/mastodon/features/ui/components/column.js | increments/mastodon | import React from 'react';
import ColumnHeader from './column_header';
import PropTypes from 'prop-types';
import { debounce } from 'lodash';
import { scrollTop } from '../../../scroll';
import { isMobile } from '../../../is_mobile';
export default class Column extends React.PureComponent {
static propTypes = {
... |
src/components/ShareExperience/InterviewStepsForm/BasicInfo/index.js | goodjoblife/GoodJobShare | import React from 'react';
import PropTypes from 'prop-types';
import subscribeValidation from 'common/subscribeValidation';
import Block from 'common/Block';
import {
companyQuery as companyQueryValidator,
jobTitle as jobTitleValidator,
region as regionValidator,
} from '../formCheck';
import CompanyQuery from... |
src/index.js | jmikrut/keen-2017 | import React from 'react';
import { hydrate, render } from 'react-dom';
import { Provider } from 'react-redux';
import { BrowserRouter as Router } from 'react-router-dom';
import store from './store';
import App from './components/App';
const rootElement = document.getElementById('root');
const Index = () => {
retu... |
addons/ondevice-knobs/src/types/Number.js | storybooks/react-storybook | import PropTypes from 'prop-types';
import React from 'react';
import { View, Slider } from 'react-native';
import styled from '@emotion/native';
const Input = styled.TextInput(({ theme }) => ({
borderWidth: 1,
borderColor: theme.borderColor,
borderRadius: 2,
fontSize: 13,
padding: 5,
color: theme.labelCol... |
src/editors/DateEditor.js | diogofcunha/react-data-grid-extensions | import React from 'react';
import PropTypes from 'prop-types';
import DayPicker from 'react-day-picker';
import editorWrapper from './editorWrapper';
import "react-day-picker/lib/style.css"
const DATE_TYPES = {
Object: 0,
string: 1
};
const isDate = date => date instanceof Date;
const parseStringToDate = value ... |
src/pages/articlesPage.js | MartinP-C/my-site | import React from 'react';
import ReactDom from 'react-dom';
import PageHeading from '../components/PageHeading';
import Article from '../components/Article';
import {articles} from '../cms/content.json';
let article;
const articlesBuilt = [];
articles.sort((a, b) => {
return Date.parse(b.date) > Date.parse(a.da... |
src/components/Footer/Footer.js | Perspicere/PerspicereMagazine | /**
* React Static Boilerplate
* https://github.com/kriasoft/react-static-boilerplate
*
* Copyright © 2015-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'
i... |
src/containers/Charts/recharts/charts/simpleBarChart.js | EncontrAR/backoffice | import React, { Component } from 'react';
import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Legend } from 'recharts';
export default class extends Component {
render() {
const { datas, width, height, colors } = this.props;
return (<div className="isoChartWrapper">
<BarChart width={width} heig... |
src/pages/404.js | meherranjan/aerosailor | import React from 'react'
import Layout from '../components/layout/default'
import SEO from '../components/includes/seo'
const NotFoundPage = () => (
<Layout>
<SEO title="404: Not found" />
<h1>NOT FOUND</h1>
<p>You just hit a route that doesn't exist... the sadness.</p>
</Layout>
)
export defaul... |
app/scripts/Widget/createRoutes.js | igr-santos/bonde-client | import React from 'react'
import { Route } from 'react-router'
import { SettingsContainer } from './containers'
import {
DonationWidgetSettings,
ExportWidgetData
} from '../pages'
import {
AutoFireFormPage
} from './settings'
import { createRoutes as matchCreateRoutes } from './plugins/Match'
import { createR... |
packages/icons/src/md/notification/Adb.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdAdb(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M10 31.11c0 7.73 6.27 14 14 14s14-6.27 14-14v-8H10v8zM32.25 7.85C35.72 10.39 38 14.47 38 19.11v2H10v-2c0-4.64 2.28-8.72 5.75-11.26l-4.2-4.2L13.2 2l4.61 4... |
client/Slides/TimeTravel.js | Dean177/jumpy-bird-react-demo | import React, { Component } from 'react';
export default class TimeTravel extends Component {
render() {
return (
<div className="text-slide">
<a href="https://github.com/gaearon/redux-devtools" target="_blank">Redux dev tools</a> & <a href="https://www.youtube.com/watch?v=xsSnOQynTHs" target="_bla... |
src/index.js | oh-my-github/registry | import React from 'react'
import ReactDOM from 'react-dom'
import { Provider, } from 'react-redux'
import { Router, browserHistory, } from 'react-router'
import routes from './routes'
import configureStore from './store/configureStore'
/** initialize */
import injectTapEventPlugin from 'react-tap-event-plugin'
injectT... |
examples/nested_reused_components/src/index.js | MrEfrem/redux-fly | //@flow
import React from 'react'
import ReactDOM from 'react-dom'
import { createStore, compose } from 'redux'
import { Provider } from 'react-redux'
import { enhanceStore } from 'redux-fly'
import Layout from './containers/page/Layout'
const composeEnhancers =
typeof window === 'object' &&
window.__REDUX_DEVTOOL... |
docs/app/Examples/behaviors/Visibility/Wireframe.js | shengnian/shengnian-ui-react | import React from 'react'
import { Divider, Image, Segment } from 'shengnian-ui-react'
export default () => (
<Segment>
<Image src='/assets/images/wireframe/centered-paragraph.png' />
<Divider />
<Image src='/assets/images/wireframe/short-paragraph.png' />
<Divider />
<Image src='/assets/images/w... |
draft-js-emoji-plugin/src/components/Emoji/index.js | koaninc/draft-js-plugins | import React from 'react';
import unionClassNames from 'union-class-names';
import emojione from 'emojione';
const Emoji = ({ theme = {}, cacheBustParam, imagePath, imageType, className, decoratedText, ...props }) => {
const shortName = emojione.toShort(decoratedText);
// short name to image url code steal from em... |
plugins/Files/js/components/app.js | NebulousLabs/New-Sia-UI | import PropTypes from 'prop-types'
import React from 'react'
import FileBrowser from '../containers/filebrowser.js'
import AllowanceDialog from '../containers/allowancedialog.js'
const FilesApp = ({ showAllowanceDialog }) => (
<div className='app'>
{showAllowanceDialog ? <AllowanceDialog /> : null}
<FileBrow... |
test/specs/collections/Breadcrumb/Breadcrumb-test.js | jcarbo/stardust | import React from 'react'
import Breadcrumb from 'src/collections/Breadcrumb/Breadcrumb'
import * as common from 'test/specs/commonTests'
describe('Breadcrumb', () => {
common.isConformant(Breadcrumb)
common.hasUIClassName(Breadcrumb)
common.rendersChildren(Breadcrumb)
it('renders a <div /> element', () => {
... |
test/fixtures/case6/input.js | kadirahq/babel-plugin-react-docgen | import React from 'react';
export function hoc (Inner) {
const C1 = (props) => <ActualC1 {...props} />
const C2 = (props) => <ActualC2 {...props} />
return {
C1,
C2
}
}
class ActualC1 extends React.Component {
render() { return <div/> }
}
class ActualC2 extends React.Component {
render() { return ... |
src/shared/components/login/login.js | hollomancer/operationcode_frontend | import React, { Component } from 'react';
import getVal from 'lodash/get';
import axios from 'axios';
import config from 'config/environment';
import PropTypes from 'prop-types';
import queryString from 'query-string';
import { Link } from 'react-router-dom';
import Form from 'shared/components/form/form';
import FormB... |
example/Header/index.js | antonKalinin/react-json-graph | import React from 'react';
import styles from './header.css';
export default () => (
<div>
<div className={styles.title}>React Json Graph</div>
<div className={styles.description}>
React component for visualizing graphs and networks
</div>
<ul className={styles.instructi... |
src/app/routes/ui/containers/icons/Glyphicons.js | backpackcoder/world-in-flames | import React from 'react'
import {Stats, BigBreadcrumbs, WidgetGrid, JarvisWidget} from '../../../../components'
export default class Glyphicons extends React.Component {
state = {
search: ''
};
shouldComponentUpdate(nextProps, nextState) {
if (this.state.search != nextState.search) {
let $conta... |
src/components/CoverInfo.js | amaralflavio/cmovies | import React from 'react';
import styled from 'styled-components';
import Text from './Text';
import Title from './Title';
import DetailList from './DetailList';
import Button from './Button';
const CoverInfo = (props) => {
const {poster_path, title, overview, vote_average, adult, release_date, id} = props.data;... |
consoles/my-joy-templates/src/mocks/theme.js | yldio/joyent-portal | import React from 'react';
import { ThemeProvider } from 'styled-components';
import {
theme,
RootContainer,
PageContainer,
ViewContainer
} from 'joyent-ui-toolkit';
export default ({ children, ss }) => (
<ThemeProvider theme={theme}>
{ss ? (
<RootContainer>
<PageContainer>
<View... |
src/shared/components/navbar/NavTab.js | sbekti/path-web-client | import React from 'react'
import { Link, IndexLink } from 'react-router'
class NavTab extends React.Component {
constructor(props) {
super(props)
}
render() {
const isActive = this.context.router.isActive(this.props.to, this.props.onlyActiveOnIndex)
const LinkComponent = this.props.onlyActiveOnInde... |
boilerplates/app/src/routes/dashboard/components/cpu.js | hexagonframework/antd-admin-cli | import React from 'react'
import PropTypes from 'prop-types'
import CountUp from 'react-countup'
import { LineChart, Line, XAxis, YAxis, CartesianGrid, ResponsiveContainer } from 'recharts'
import styles from './cpu.less'
import { color } from '../../../utils'
const countUpProps = {
start: 0,
duration: 2.75,
use... |
app/javascript/mastodon/components/status.js | rutan/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Avatar from './avatar';
import AvatarOverlay from './avatar_overlay';
import RelativeTimestamp from './relative_timestamp';
import DisplayName from './display_name';
import StatusContent fro... |
src/client/react/admin/views/FeedView/StoryCreate.js | bwyap/ptc-amazing-g-race | import React from 'react';
import PropTypes from 'prop-types';
import autobind from 'core-decorators/es/autobind';
import { graphql } from 'react-apollo';
import { Button, Intent, Dialog, Icon } from '@blueprintjs/core';
import MarkdownEditor from '../../../../../../lib/react/components/MarkdownEditor';
import { create... |
admin/src/components/PopoutBody.js | wustxing/keystone | import blacklist from 'blacklist';
import classnames from 'classnames';
import React from 'react';
var PopoutBody = React.createClass({
displayName: 'PopoutBody',
propTypes: {
children: React.PropTypes.node.isRequired,
scrollable: React.PropTypes.bool,
},
render () {
let className = classnames('Popout__body'... |
client/src/App.js | jlcanela/facebook-friends | /* eslint-disable no-unused-vars */
import React from 'react'
import Layout from './Layout'
import { Col, Table, Button } from 'react-bootstrap'
import { connect } from 'react-redux'
import { fetchData, setAdmin } from './actions'
import './App.css'
/* eslint-enable no-unused-vars */
const Header = ({
columns
}) => (... |
src/main/resources/app/scripts/app.js | pgrimard/spark-react-es6 | import React from 'react';
import HelloWorld from './components/helloworld';
React.render(<HelloWorld/>, document.body); |
Js/Core/Lib/Auth/index.js | Webiny/Webiny | import React from 'react';
import _ from 'lodash';
import Webiny from 'webiny';
class Auth {
constructor() {
this.loginRoute = 'Login';
this.forbiddenRoute = 'Forbidden';
this.routerEvent = null;
}
init() {
Webiny.Router.addRoute(new Webiny.Route(this.loginRoute, '/login', ... |
app/containers/App/index.js | dcarneiro/my-react-boilerplate | /**
*
* App.react.js
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If... |
node_modules/case-sensitive-paths-webpack-plugin/demo/src/init.js | marsinearth/decisionmaker | import AppRoot from './AppRoot.component.js';
import React from 'react';
import ReactDOM from 'react-dom';
const app = {
initialize() {
ReactDOM.render(<AppRoot/>, document.getElementById('react-app-hook'));
}
};
app.initialize();
|
src/components/Home.spec.js | brnewby602/kinects-it | import React from 'react';
import { shallow } from 'enzyme';
import { expect } from 'chai';
import { Home } from './Home';
describe('<Home />', () => {
it('contains spec with an expectation', () => {
expect(shallow(<Home />).find('h2').length).to.equal(1);
});
});
|
react/src/components/dashboard/settings/settings.appSettingsPanel.js | pbca26/EasyDEX-GUI | import React from 'react';
import { connect } from 'react-redux';
import ReactTooltip from 'react-tooltip';
import translate from '../../../translate/translate';
import Config from '../../../config';
import {
getAppConfig,
getAppInfo,
resetAppConfig,
resetSPVCache,
saveAppConfig,
skipFullDashboardUpdate,
... |
react-swipeable/src/index.js | kimown/gist | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import SimpleSlider from './SimpleSlider'
import './index.css';
ReactDOM.render(
<SimpleSlider />,
document.getElementById('root')
);
|
src/svg-icons/places/kitchen.js | hwo411/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let PlacesKitchen = (props) => (
<SvgIcon {...props}>
<path d="M18 2.01L6 2c-1.1 0-2 .89-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.11-.9-1.99-2-1.99zM18 20H6v-9.02h12V20zm0-11H6V4h12v5zM8 5h2v3H8zm0 7h2v5H8z"/>
... |
src/components/common/hocs/PeriodicContent.js | mitmedialab/MediaCloud-Web-Tools | import PropTypes from 'prop-types';
import React from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import MenuItem from '@material-ui/core/MenuItem';
import ActionMenu from '../ActionMenu';
import { calculateTimePeriods, PAST_WEEK, PAST_MONTH, PAST_YEAR, PAST_ALL } from '../../../lib/dateUtil';
... |
examples/huge-apps/routes/Course/routes/Assignments/routes/Assignment/components/Assignment.js | RobertKielty/react-router | import React from 'react';
class Assignment extends React.Component {
render () {
var { courseId, assignmentId } = this.props.params;
var { title, body } = COURSES[courseId].assignments[assignmentId]
return (
<div>
<h4>{title}</h4>
<p>{body}</p>
</div>
);
}
}
export d... |
src/js/components/Grid/stories/NColumn.js | HewlettPackard/grommet | import React from 'react';
import { Grommet, Box, Grid } from 'grommet';
import { grommet } from 'grommet/themes';
export const NColumnGrid = () => (
<Grommet theme={grommet} full>
<Grid
columns={{
count: 6,
size: 'auto',
}}
gap="small"
>
<Box background="brand">Item ... |
src/routes/dashboard/components/numberCard.js | miaoji/guojibackend | import React from 'react'
import PropTypes from 'prop-types'
import { Icon, Card } from 'antd'
import CountUp from 'react-countup'
import styles from './numberCard.less'
function NumberCard ({ icon, color, title, number, countUp }) {
return (
<Card className={styles.numberCard} bordered={false} bodyStyle={{ padd... |
test/ButtonGroupSpec.js | jesenko/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ReactDOM from 'react-dom';
import ButtonGroup from '../src/ButtonGroup';
import Button from '../src/Button';
import {shouldWarn} from './helpers';
describe('ButtonGroup', () => {
it('Should output a button group', () => {
... |
app/javascript/mastodon/components/relative_timestamp.js | koba-lab/mastodon | import React from 'react';
import { injectIntl, defineMessages } from 'react-intl';
import PropTypes from 'prop-types';
const messages = defineMessages({
today: { id: 'relative_time.today', defaultMessage: 'today' },
just_now: { id: 'relative_time.just_now', defaultMessage: 'now' },
just_now_full: { id: 'relativ... |
src/interface/icons/Megaphone.js | yajinni/WoWAnalyzer | import React from 'react';
// https://thenounproject.com/term/megaphone/1399378/
// Created by Jony from the Noun Project
const Icon = ({ ...other }) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" className="icon" {...other}>
<path d="M77.2,7c-3.5,0-6.4,2.4-7.1,5.8L28.7,27.7H14.8c-4.4,0-8,3.6... |
src/svg-icons/notification/adb.js | IsenrichO/mui-with-arrows | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAdb = (props) => (
<SvgIcon {...props}>
<path d="M5 16c0 3.87 3.13 7 7 7s7-3.13 7-7v-4H5v4zM16.12 4.37l2.1-2.1-.82-.83-2.3 2.31C14.16 3.28 13.12 3 12 3s-2.16.28-3.09.75L6.6 1.44l-.82.83 2.1 2.1C6.14... |
src/components/forging/delegateStats.js | slaweet/lisk-nano | import React from 'react';
import { Card, CardText } from 'react-toolbox/lib/card';
import CircularProgressbar from 'react-circular-progressbar';
import grid from 'flexboxgrid/dist/flexboxgrid.css';
import { translate } from 'react-i18next';
import style from './forging.css';
const identity = x => (x);
const addPercen... |
BoBoClient/app/pages/Record.js | lan-xue-xing/BoBo | /**
* Created by Administrator on 2016/11/6.
*/
import React, { Component } from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
import p from '../utils/TransForm';
export default class Record extends Component {
render() {
return (
<View style={styles.container}... |
src/main.js | viltsu/FDB | /**
* App entry point
*/
// Polyfill
import 'babel-polyfill';
// Libraries
import React from 'react';
import ReactDOM from 'react-dom';
import { Router, browserHistory } from 'react-router';
import { Provider } from 'react-redux'
import configureStore from './store'
// Routes
import Routes from './common/component... |
test/specs/collections/Form/Form-test.js | shengnian/shengnian-ui-react | import faker from 'faker'
import _ from 'lodash'
import React from 'react'
import Form from 'src/collections/Form/Form'
import FormButton from 'src/collections/Form/FormButton'
import FormCheckbox from 'src/collections/Form/FormCheckbox'
import FormDropdown from 'src/collections/Form/FormDropdown'
import FormField fro... |
packages/material-ui-icons/legacy/CellWifiSharp.js | lgollut/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fillOpacity=".3" d="M6 22h16V5.97L6 22z" /><path d="M18 9.98L6 22h12V9.98zM3.93 5.93l1.29 1.29c3.19-3.19 8.38-3.19 11.57 0l1.29-1.29c-3.91-3.91-10.25-3.91-14.15 0zm5.14 5.14L11 13l1.93-1.... |
tests/react_children/text.js | AgentME/flow | // @flow
import React from 'react';
class Text extends React.Component<{children: string}, void> {}
class TextOptional extends React.Component<{children?: string}, void> {}
class TextLiteral extends React.Component<{children: 'foo' | 'bar'}, void> {}
<Text />; // Error: `children` is required.
<TextOptional />; // O... |
server/react/components/AddEdit.js | ryordanov/hobby-collection | import React from 'react';
import PropTypes from 'prop-types';
import { Button, FormGroup, FormControl, ControlLabel, Alert } from 'react-bootstrap';
import { Link /*, withRouter */ } from 'react-router-dom';
import { getRequestToAPI, postRequestToAPI, buildUrl, concatQueryParams, setNestedValue } from '../utils';
imp... |
src/PaginationButton.js | lo1tuma/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import BootstrapMixin from './BootstrapMixin';
import createSelectedEvent from './utils/createSelectedEvent';
const PaginationButton = React.createClass({
mixins: [BootstrapMixin],
propTypes: {
className: React.PropTypes.string,
eventKey: Rea... |
node_modules/react-router/es/RouterContext.js | saltypaul/SnipTodo | var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _typeof = typeof Symbol === "function" && typeof Symbol.i... |
client/tests/components/auth/FormField.spec.js | johadi10/PostIt | import 'babel-polyfill';
import React from 'react';
import expect from 'expect';
import { mount } from 'enzyme';
import FormField from '../../../src/components/auth/FormField';
const wrapper = mount(<FormField/>);
describe('<FormField/>', () => {
it('should check the div with form-group class exists', () => {
ex... |
examples/page-transitions/pages/_document.js | giacomorebonato/next.js | import React from 'react'
import Document, { Head, Main, NextScript } from 'next/document'
// ---------------------------------------------
export default class CustomDocument extends Document {
render () {
return (<html lang='en-US'>
<Head>
<meta name='viewport' content='width=device-width, initi... |
src/examples/cats/app.js | c00kiemon5ter/react-image-lightbox | import React from 'react';
import ReactDOM from 'react-dom';
import Lightbox from '../../react-image-lightbox';
import styles from './stylesheets/app.scss';
import image1 from './images/1.jpg';
import image2 from './images/2.jpg';
import image3 from './images/3.jpg';
import image4 from './images/4.jpg';
import image1T... |
frontend/src/components/Main/Main.js | VitaC123/youTubeMixTape | import React, { Component } from 'react';
import { Route, Switch } from 'react-router-dom';
import FadeIn from '../helper/FadeIn';
import Navigation from './Navigation';
import Home from '../Home/Home';
import NoResults from '../Home/NoResults';
import Artists from '../Artists/Artists';
import Player from '../Player/P... |
src/lib/withProps.js | yeojz/react-form-addons | // @flow
import React from 'react';
import createSyntheticFormEvent from '../utils/createSyntheticFormEvent';
import getDataFromKey from '../utils/getDataFromKey';
import updateObjectData from '../utils/updateObjectData';
type Props = {
formData: Object,
formMeta: Object,
onChange: Function
};
const handleToggl... |
src/components/ExampleComponent.js | ambershen/ambershen.github.io | import React from 'react';
import Interactive from 'react-interactive';
import { Switch, Route, Link } from 'react-router-dom';
import ExampleTwoDeepComponent from './ExampleTwoDeepComponent';
import PageNotFound from './PageNotFound';
import s from '../styles/exampleComponent.style';
const ExamplePageText = () => (
... |
client/scripts/components/user/entities/new-entity-button/index.js | kuali/research-coi | /*
The Conflict of Interest (COI) module of Kuali Research
Copyright © 2005-2016 Kuali, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
Lic... |
test/mocks/FooComponent.js | fustic/hubrick-frontend-challenge | import React from 'react';
class FooComponent extends React.Component {
render() {
return <div />;
}
}
export default FooComponent;
|
src/components/FilterBySearch.js | bjacobel/cabinet | import React, { Component } from 'react';
import { filterBox, filter, filterHint, filterLabel } from '../stylesheets/filterBySearch.css';
export default class FilterbySearch extends Component {
render() {
return (
<div className={ filterBox }>
<label htmlFor="filter-input" className={ filterLabel ... |
docs/app/Examples/collections/Breadcrumb/Content/index.js | clemensw/stardust | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const BreadcrumbContentExamples = () => (
<div>
<ExampleSection title='Content'>
<ComponentExample
title='Divider'
... |
src/components/GridVideoTile.js | lishiyo/listentothis | /**
Presentational component to render a single embed, given id, URL, title, and author (author).
props: {
id: '3ybh3d',
title: 'Hello',
author: 'AdeleFan',
iframeData: <iframe src='http://..' width='350' height='250' ../>
iframeReadyCb: function
}
**/
import React from 'react'
import GridTile from 'materi... |
src/containers/App.js | FRCTools/Attendance-Client | import React, { Component } from 'react';
import { Provider } from 'react-redux';
import firebase from 'firebase';
import injectTapEventPlugin from 'react-tap-event-plugin';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import { purple400 }... |
packages/cf-component-tabs/src/TabsPanel.js | mdno/mdno.github.io | import React from 'react';
import PropTypes from 'prop-types';
import { createComponent } from 'cf-style-container';
const styles = ({ theme }) => ({
backgroundColor: theme.backgroundColor
});
class TabsPanel extends React.Component {
render() {
const selected = this.context.active === this.props.id;
ret... |
test/integration/image-component/base-path/pages/missing-src.js | JeromeFitz/next.js | import React from 'react'
import Image from 'next/image'
const Page = () => {
return (
<div>
<Image width={200}></Image>
</div>
)
}
export default Page
|
examples/basic/simple_usage/modal.js | rackt/react-modal | import React from 'react';
import Modal from 'react-modal';
export default props => {
const {
title, isOpen, askToClose,
onAfterOpen, onRequestClose, onChangeInput
} = props;
return (
<Modal
id="test"
contentLabel="modalA"
closeTimeoutMS={150}
isOpen={isOpen}
onAfterOpe... |
examples/react-redux-example/app/async/index.js | demones/react-guide | import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import App from './containers/App';
import configureStore from './store/configureStore';
const store = configureStore();
render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('layou... |
app/components/Feed/FeedEntryPlaceholder.js | yenbekbay/filmstrip-web | /* @flow */
import {css, keyframes} from 'glamor';
import React from 'react';
import {breakpoints, t} from '../../styles';
const loaderAnimation = keyframes({
'0%': {backgroundPosition: '-700px 0'},
'100%': {backgroundPosition: '800px 0'},
});
const styles = {
container: css({
...t.br2,
...t.mt2,
... |
src/components/CartInfoPane.js | longyarnz/WelFurnish-E-Commerce | import React, { Component } from 'react';
export default class CartInfoPane extends Component {
constructor(props) {
super(props);
}
render() {
return (
<div className="cart-info">
<i className="" />
<span>{this.props.content}</span>
</div>
);
}
}
|
src/test/componentsSpec/Header.spec.js | badT/Chatson | import React from 'react';
import { Provider } from 'react-redux';
import { mount } from 'enzyme';
import chai, { expect } from 'chai';
import chaiEnzyme from 'chai-enzyme';
chai.use(chaiEnzyme());
import configureStore from '../../store/configureStore';
import { Header } from '../../components/Header/index';
descri... |
server/sonar-web/src/main/js/apps/overview/gate/gate.js | joansmith/sonarqube | /*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.