path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
frontend/src/app/containers/OnboardingPage.js | 6a68/idea-town | import React from 'react';
import View from '../components/View';
export default class OnboardingPage extends React.Component {
render() {
return (
<View spaceBetween={true} showNewsletterFooter={false} {...this.props}>
<div className="centered-banner">
<div id="onboarding" className="m... |
views/blocks/CommentForm/CommentForm.js | urfu-2016/team5 | import React from 'react';
import './CommentForm.css';
import b from 'b_';
import './../Input.css';
import {CommentFormStrings} from './../../constants/strings';
import {CommentFormConstants} from './../../constants/constants';
import Button from './../Button/Button';
const commentForm = b.lock('comment-form');
expor... |
mapDesigner/containers/App.js | vishaljoshi/Beacon-IndoorMapping | import React, { Component } from 'react';
import { createStore, combineReducers, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import thunkMiddleware from 'redux-thunk'
import IndoorMapApp from './indoorMapApp';
import indoorMapReducers from '../reducers/indoorMapReducer';
const reducer = co... |
src/components/task-filters/index.js | chuckharmston/testpilot-contribute | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import './index.css';
class TaskFilter extends Component {
static propTypes = {
available: PropTypes.array,
change: PropTypes.func.isRequired,
current: PropTypes.string,
getTitle: P... |
desktop-application/app/containers/DevTools.js | santosh-surya/pcb-cnc-machine | import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
export default createDevTools(
<DockMonitor
toggleVisibilityKey="ctrl-h"
changePositionKey="ctrl-q"
>
<LogMonitor />
... |
app/index.js | iicoom/react-music-player | import React from 'react'
import { render } from 'react-dom';
import Root from './root';
render(
<Root />,
document.getElementById('root')
) |
src/views/icons/ShieldIcon.js | physiii/open-automation | import React from 'react';
import PropTypes from 'prop-types';
import IconBase from './IconBase.js';
export const ShieldIcon = ({shieldChecked, ...props}) => (
<IconBase {...props} viewBox="0 0 20 20">
{shieldChecked
? <path d="M10.2 20h-.4-.1C.9 16.3 1.8 11 2.2 3.1c0-.3.2-.5.5-.5 2.6-.1 4.9-1 7-2.5.2-.1.4-.1.6 ... |
ajax/libs/react-instantsearch/5.0.2/Connectors.js | sashberd/cdnjs | /*! ReactInstantSearch 5.0.2 | © Algolia, inc. | https://community.algolia.com/react-instantsearch */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :... |
app/javascript/mastodon/features/ui/components/bundle.js | tri-star/mastodon | import React from 'react';
import PropTypes from 'prop-types';
const emptyComponent = () => null;
const noop = () => { };
class Bundle extends React.PureComponent {
static propTypes = {
fetchComponent: PropTypes.func.isRequired,
loading: PropTypes.func,
error: PropTypes.func,
children: PropTypes.fu... |
app/components/shared/UserAvatar.js | fotinakis/buildkite-frontend | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
export default class UserAvatar extends React.PureComponent {
static propTypes = {
user: PropTypes.shape({
name: PropTypes.string.isRequired,
avatar: PropTypes.shape({
url: PropTypes.string.isR... |
client/modules/Post/tests/components/PostListItem.spec.js | caleb272/ProjectAccent | import React from 'react';
import test from 'ava';
import sinon from 'sinon';
import PostListItem from '../../components/PostListItem/PostListItem';
import { mountWithIntl, shallowWithIntl } from '../../../../util/react-intl-test-helper';
const post = { name: 'Prashant', title: 'Hello Mern', slug: 'hello-mern', cuid: ... |
src/js/components/icons/base/DocumentDownload.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/TextField/TextFieldLabel.js | hwo411/material-ui | import React from 'react';
import PropTypes from 'prop-types';
import transitions from '../styles/transitions';
function getStyles(props) {
const defaultStyles = {
position: 'absolute',
lineHeight: '22px',
top: 38,
transition: transitions.easeOut(),
zIndex: 1, // Needed to display label above Chr... |
example/src/views/ratings.js | kosiakMD/react-native-elements | import Expo from 'expo';
import React from 'react';
import { StyleSheet, Text, View, Platform } from 'react-native';
import { Rating } from 'react-native-elements';
const WATER_IMAGE = require('../images/water.png');
class Ratings extends React.Component {
ratingCompleted(rating) {
console.log('Rating is: ' + r... |
index.ios.js | vijanny/react-native-DemoPrj | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
export default class nativeBace extends Component {
render() {
return (
<View style={styles.containe... |
test/helpers/shallowRenderHelper.js | vivijind/gallary-by-react | /**
* Function to get the shallow output for a given component
* As we are using phantom.js, we also need to include the fn.proto.bind shim!
*
* @see http://simonsmith.io/unit-testing-react-components-without-a-dom/
* @author somonsmith
*/
import React from 'react';
import TestUtils from 'react-addons-test-utils'... |
src/index.js | wkwiatek/dm-react-mobx | import React from 'react'
import ReactDom from 'react-dom'
import Root from './containers/Root'
import { useStrict } from 'mobx'
useStrict(true)
ReactDom.render(<Root />, document.getElementById('root'))
|
src/docs/examples/TextInputStyledComponents/ExampleError.js | miker169/ps-react-miker169 | import React from 'react';
import TextInputStyledComponents from 'ps-react/TextInputStyledComponents';
/** Required TextBox with error */
export default class ExampleError extends React.Component {
render() {
return (
<TextInputStyledComponents
htmlId="example-optional"
name="firstname"
... |
src/interface/icons/More.js | FaideWW/WoWAnalyzer | import React from 'react';
// https://thenounproject.com/search/?q=Misc&i=932100
// more by K Ξ L L Ξ R from the Noun Project
const Icon = ({ ...other }) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" {...other}>
<path d="M470,36 C461.163444,36 454,28.836556 454,20 C454,11.163444 461.163444,4 4... |
lib/javascript/editor-webview.ios.js | nt-team/react-native-editor | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* Copyright (c) 2017-present, Huang Qi.
* 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... |
src/pages/pensieve/index.js | mding5692/mding5692.github.io | import React from 'react';
import { graphql, Link } from 'gatsby';
import kebabCase from 'lodash/kebabCase';
import PropTypes from 'prop-types';
import { Helmet } from 'react-helmet';
import styled from 'styled-components';
import { Layout } from '@components';
import { IconBookmark } from '@components/icons';
const S... |
src/parser/druid/guardian/modules/features/GuardianOfElune.js | sMteX/WoWAnalyzer | import React from 'react';
import { formatPercentage } from 'common/format';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import StatisticBox, { STATISTIC_ORDER } from 'interface/others/StatisticBox';
import Analyzer from 'parser/core/Analyzer';
import SPELLS from 'common/SPELLS';... |
webpack/scenes/RedHatRepositories/helpers.js | Katello/katello | import React from 'react';
import { ListView } from 'patternfly-react';
import { sprintf, translate as __ } from 'foremanReact/common/I18n';
import Pagination from 'foremanReact/components/Pagination';
import RepositorySet from './components/RepositorySet';
import EnabledRepository from './components/EnabledRepository... |
src/components/LoadingScreen.js | iovar/sleep_cycle_alarm | import React from 'react';
import { View, Text } from 'react-native';
import { appBgColor, textColor } from '../Colors';
const LoadingScreen = () => (
<View style={styles.containerStyle}>
<Text style={styles.textStyle}>Please wait...</Text>
</View>
);
const styles = {
containerStyle: {
flex: 1,
pad... |
src/ReactBoilerplate/Scripts/components/ExternalLogin/ExternalLogin.js | theonlylawislove/react-dot-net | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { authenticate } from 'redux/modules/externalLogin';
import { ExternalLoginButton } from 'components';
class ExternalLogin extends Component {
constructor(props) {
super(props);
this.loginClick = this.loginClick.bind(this... |
spec/javascripts/jsx/editor/SwitchEditorControlSpec.js | djbender/canvas-lms | /*
* Copyright (C) 2016 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distribut... |
src/client/sidebars/components/PlayerList.stories.js | leagueofcake/Project-Resistance | import React from 'react';
import { withKnobs, object } from '@storybook/addon-knobs';
import PlayerList from './PlayerList';
export default {
component: PlayerList,
title: 'Sidebars/Components/PlayerList',
decorators: [withKnobs],
excludeStories: /.*Data$/,
};
export const userData = [
{
username: 'U... |
pages/about.js | turntwogg/final-round | import React from 'react';
import Page from '../components/Page';
import PageContent from '../components/PageContent';
const About = () => {
return (
<Page title="About Us">
<PageContent>About Us</PageContent>
</Page>
);
};
export default About;
|
src/js/components/DataTable/stories/GroupedOnSelect.js | HewlettPackard/grommet | import React from 'react';
import { Grommet, Box, DataTable } from 'grommet';
import { grommet } from 'grommet/themes';
// Source code for the data can be found here
// https://github.com/grommet/grommet/blob/master/src/js/components/DataTable/stories/data.js
import { columns, DATA } from './data';
const groupColumns... |
node_modules/react-bootstrap/es/Pagination.js | chenjic215/search-doctor | import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
app/javascript/mastodon/features/notifications/components/column_settings.js | robotstart/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ColumnCollapsable from '../../../components/column_collapsable';
import SettingToggle from './setting_toggle';
con... |
build-bench/src/App.js | FredTingaud/quick-bench-front-end | import React, { Component } from 'react';
import { Dropdown } from 'react-bootstrap';
import Benchmark from './BuildBenchmark.js';
import Header from 'components/Header.js';
import 'components/resources/css/Shared.css';
import { BrowserRouter, Route, Redirect } from 'react-router-dom';
import AboutDialog from './dialog... |
app/image.react.js | eddiezane/es6-jspm-react-example | import React from 'react';
export default class Image extends React.Component {
render() {
return <img src={this.props.value} />
}
}
|
js/components/CitiesList.js | a-omsk/Vegreact | import React from 'react';
import City from './City';
const CitiesList = ({ list, switchCity }) => {
const listStyle = {
padding: 0,
};
return (
<ul style={listStyle}>
{ list.map(city => <City switchCity={switchCity} key={city.code} {...city} />) }
</ul>
);
};
Citi... |
web/src/components/login-form-error.js | nzchicken/sf-project-planner | import React from 'react'
const LoginFormError = (props) => {
const { errorMessage } = props
return <div className="slds-m-vertical--small slds-text-color--error">{errorMessage}</div>
}
export default LoginFormError
|
components/CategoryTable.js | hutsi/bookkeeping | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import Table from '@material-ui/core/Table';
import TableHead from '@material-ui/core/TableHead';
import TableRow from '@material-ui/core/TableRow';
import TableCell from '@material-ui/co... |
examples/todos-with-undo/containers/UndoRedo.js | leoasis/redux | import React from 'react'
import { ActionCreators as UndoActionCreators } from 'redux-undo'
import { connect } from 'react-redux'
let UndoRedo = ({ canUndo, canRedo, onUndo, onRedo }) => (
<p>
<button onClick={onUndo} disabled={!canUndo}>
Undo
</button>
<button onClick={onRedo} disabled={!canRedo}>... |
App/Components/ButtonDefault.spec.js | okmttdhr/YoutuVote | // @flow
import test from 'ava';
import React from 'react';
import { shallow } from 'enzyme';
import { spy } from 'sinon';
import {ButtonDefault} from './ButtonDefault';
const wrapper = shallow(<ButtonDefault onPress={() => {}} text="hi" />);
test('component structure', (t) => {
t.is(wrapper.name(), 'TouchableHighl... |
src/esm/components/graphics/icons/flag-icon/index.js | KissKissBankBank/kitten | import React from 'react';
import styled from 'styled-components';
import { pxToRem } from '../../../../helpers/utils/typography';
var FlagContainer = styled.div.withConfig({
displayName: "flag-icon__FlagContainer",
componentId: "sc-s8btak-0"
})(["width:", ";height:", ";background-repeat:no-repeat;box-sizing:border... |
views/blocks/Sender/Sender.js | AlSoEdit/team5 | import React from 'react';
import states from './states';
import request from './Request';
export default function Sender(Component) {
return class Sender extends React.Component {
constructor(props) {
super(props);
this.state = states.defaultState;
this.handleSuccessf... |
Mr.Mining/MikeTheMiner/dist/Santas_helpers/Sia_wallet/resources/app/plugins/Files/js/components/file.js | patel344/Mr.Miner | import PropTypes from 'prop-types'
import React from 'react'
import RedundancyStatus from './redundancystatus.js'
const File = ({filename, type, selected, filesize, available, redundancy, uploadprogress, onDoubleClick, onClick}) => (
<li onClick={onClick} onDoubleClick={onDoubleClick} className={selected ? 'filebrows... |
src/components/Task/TaskBase.js | Charlie9830/pounder | import React, { Component } from 'react';
import Divider from './Divider';
import { withTheme } from '@material-ui/core';
import withMouseOver from '../Hocs/withMouseOver';
import TaskSecondaryActions from './TaskSecondaryActions';
import { DragSource } from 'react-dnd';
class TaskBase extends Component {
render(... |
packages/flow-upgrade/src/upgrades/0.53.0/ReactComponentExplicitTypeArgs/__tests__/fixtures/Props.js | AgentME/flow | // @flow
import React from 'react';
class MyComponent extends React.Component {
props: Props;
defaultProps: T;
static props: T;
static state: T;
a: T;
b = 5;
c: T = 5;
method() {}
}
const expression = () =>
class extends React.Component {
props: Props;
defaultProps: T;
static props: T... |
src/components/pulldown-close.js | YPlan/react-pulldown | import React from 'react';
const PulldownClose = React.createClass({
propTypes: {
children: React.PropTypes.any,
className: React.PropTypes.string,
},
contextTypes: {
close: React.PropTypes.func,
},
_handleClick() {
const {close} = this.context;
close();
},
render() {
const {... |
src/desktop/apps/consign/components/uploaded_image/index.js | kanaabe/force | import Alert from '../../../../components/main_layout/public/icons/alert.svg'
import Close from '../../../../components/main_layout/public/icons/close.svg'
import PropTypes from 'prop-types'
import React from 'react'
import block from 'bem-cn-lite'
import { connect } from 'react-redux'
import { contains } from 'undersc... |
src/controls/filefield/filefield.js | thinktopography/reframe | import Resumable from 'resumablejs'
import PropTypes from 'prop-types'
import Preview from './preview'
import React from 'react'
import _ from 'lodash'
class FileField extends React.Component {
static propTypes = {
action: PropTypes.string,
defaultValue: PropTypes.oneOfType([
PropTypes.number,
P... |
app/components/counter.js | meddle0x53/react-webpack-koa-postgres-passport-example | import React from 'react';
import request from 'superagent';
import { Button, Badge } from 'react-bootstrap';
const get = (url, cb) => {
request.get(url)
.set('Content-Type', 'application/json')
.end(cb);
};
export default class Counter extends React.Component {
static displayName = 'Counter';
static propT... |
packages/material-ui-icons/src/Stars.js | cherniavskii/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23L16.23 18z" /></g>
, 'Star... |
test/react-test/piece-of-text.js | clbn/freefeed-react-client | import test from 'tape'
import React from 'react'
import PieceOfText from 'src/components/piece-of-text'
import sd from 'skin-deep'
const renderText = (text) => {
const tree = sd.shallowRender(React.createElement(PieceOfText, {text}))
return tree.getRenderOutput().props.children
}
test('multiline texts are corre... |
resources/apps/frontend/src/components/Form/Select/ServiceSelect.js | johndavedecano/PHPLaravelGymManagementSystem | import React from 'react';
import AsyncSelect from 'react-select/lib/Async';
import Select from 'react-select';
import {loadServices, showService} from 'requests/services';
export default class ServiceSelect extends React.Component {
state = {
defaultValue: null,
defaultOptions: [],
};
static defaultPr... |
src/Parser/Paladin/Protection/Modules/Features/Abilities.js | enragednuke/WoWAnalyzer | //import React from 'react';
import SPELLS from 'common/SPELLS';
import ITEMS from 'common/ITEMS';
import ISSUE_IMPORTANCE from 'Parser/Core/ISSUE_IMPORTANCE';
import CoreAbilities from 'Parser/Core/Modules/Abilities';
//import SpellLink from 'common/SpellLink';
class Abilities extends CoreAbilities {
spellbook()... |
src/routes/Projects/components/ProjectSelector.js | mjchamoures/personalPortfolio | /* ProjectSelector component, which will hold links to all the projects
*
* author : michael chamoures
* created date : 3/27/17
* last updated date : 3/28/17
*/
import React from 'react';
import {Nav, NavItem, Navbar, NavDropdown, MenuItem, Glyphicon, Col} from 'react-bootstrap';
import './styles/ProjectSelector.... |
src/components/WeatherView.js | viruschidai/ReactNativeWeather | 'use strict';
import React, { Component } from 'react';
import {
ActivityIndicatorIOS,
Text,
View,
Image
} from 'react-native';
import weathericons from 'react-native-iconic-font/weathericons';
import moment from 'moment';
import ForecastView from './ForecastView';
import styles from './WeatherView-styles';
... |
src/components/layout/content/snippet/Comments.js | Gisto/Gisto | import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { get, isEmpty, map, size, orderBy } from 'lodash/fp';
import styled, { withTheme } from 'styled-components';
import Icon from 'components/common/Icon';
import TextArea from 'components/common/controls/TextArea... |
src/components/Menu/MenuItem.js | propertybase/react-lds | import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import isString from 'lodash-es/isString';
import { IconSVG } from '../Icon';
const nonCapturing = { pointerEvents: 'none' };
/* eslint-disable react/prop-types */
const leftIconElem = ({ alwaysDisplay, sprite, icon }) => {
... |
src/components/Main.js | Arkinsaal/tracks | 'use strict';
import React from 'react';
import 'whatwg-fetch';
const headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
};
const baseUrl = window.location.hostname == 'localhost' ? 'http://localhost:4000' : 'https://tracks23.herokuapp.com';
const indexOfDeep = (array, check) => {
c... |
lib/SortHandler.js | eddyson-de/react-grid | import React from 'react';
import PropTypes from 'prop-types';
import { ASCENDING, DESCENDING } from './constants';
import { sortConfigSingle } from './proptypes';
import warning from 'warning';
const sortConfigFromProp = (sortProp) => {
let sortColumn;
let order = ASCENDING;
if (sortProp === undefined){
... |
src/scenes/Home/Home.js | constelation/native-starter | // @flow
// Imports {{{
import { Animate } from 'constelation-animate_'
import { Col } from 'constelation-view'
import React from 'react'
import Space from 'constelation-space'
import Button from 'shared/Button'
import Logo from './_/Logo'
// }}}
type Props = {
onShowFromRight: Function,
onShowFromBottom: Func... |
src/encoded/static/components/cart/manager.js | ENCODE-DCC/encoded | /**
* Display the Cart Manager page that lets users rename and delete any of the carts they own, and
* to create new carts.
*/
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Modal, ModalHeader, ModalBody, ModalFooter } from '../../libs/ui/modal';
import... |
react-flux-mui/js/material-ui/src/svg-icons/communication/email.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationEmail = (props) => (
<SvgIcon {...props}>
<path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/>
</SvgIcon>
);
CommunicationEmai... |
src/components/DocsSplit.js | grommet/grommet-docs | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import { findDOMNode } from 'react-dom';
import { Link } from 'react-router';
import Split from 'grommet/components/Split';
import Sidebar from 'grommet/components/Sidebar';
import Header from 'grommet/compon... |
app/javascript/mastodon/features/ui/components/onboarding_modal.js | pixiv/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import ReactSwipeableViews from 'react-swipeable-views';
import classNames from 'cl... |
docs/src/pages/premium-themes/onepirate/SignIn.js | lgollut/material-ui | import withRoot from './modules/withRoot';
// --- Post bootstrap -----
import React from 'react';
import { Field, Form, FormSpy } from 'react-final-form';
import { makeStyles } from '@material-ui/core/styles';
import Link from '@material-ui/core/Link';
import Typography from './modules/components/Typography';
import Ap... |
vendor/htmlburger/carbon-fields/assets/js/fields/components/color/picker.js | Apiki/gb-plugin-api | /**
* The external dependencies.
*/
import React from 'react';
import PropTypes from 'prop-types';
import onClickOutside from 'react-onclickoutside';
import { SketchPicker } from 'react-color';
import { compose, withHandlers } from 'recompose';
/**
* Render a colorpicker popover.
*
* @param {Object} props... |
actor-apps/app-web/src/app/components/dialog/TypingSection.react.js | mitchellporter/actor-platform | import React from 'react';
import { PureRenderMixin } from 'react/addons';
import classNames from 'classnames';
import DialogStore from 'stores/DialogStore';
export default React.createClass({
mixins: [PureRenderMixin],
getInitialState() {
return {
typing: null,
show: false
};
},
compon... |
src/room/RoomList.js | jollyromp/Charplay | import React, { Component } from 'react';
import RoomListItem from './RoomListItem';
import { getRelativeTime, getDateFromObjectId } from '../api';
class RoomList extends Component {
render() {
return(
<ul className='room-list'>
{getRelativeTime(getDateFromObjectId("599684a989ccdb4e64aedd... |
src/components/error-boundary/index.js | rognan/chrome-extension-custom-new-tab | import React from 'react';
import PropTypes from 'prop-types';
class ErrorBoundary extends React.Component {
constructor(props) {
super(props);
this.state = {hasError: false};
}
// eslint-disable-next-line no-unused-vars
static getDerivedStateFromError(ignored) {
return { hasError: true };
}
re... |
src/components/Navbar/Navbar.js | skw/test-react-backbone | /*
* 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, { Component } from 'react';
class Navbar extends Component ... |
client/src/Components/SearchJob.js | teamcrux/EmploymentOptions | import React from 'react';
import {Field, reduxForm} from 'redux-form';
class SearchJob extends React.Component {
constructor(props) {
super(props);
this.state = {
jobArr:[],
searchResults: [],
displayResults: false,
noResults: false,
}
this.jobSearch = this.jobSearch.bind(thi... |
analysis/warlockdestruction/src/modules/talents/Cataclysm.js | yajinni/WoWAnalyzer | import React from 'react';
import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer';
import AbilityTracker from 'parser/shared/modules/AbilityTracker';
import Events from 'parser/core/Events';
import SPELLS from 'common/SPELLS';
import { formatThousands, formatNumber, formatPercentage } from 'common/format';
... |
src/js/UserPage/UserPage.js | o-d-i-n/nsit-fest | 'use strict'
import React, { Component } from 'react';
export default class UserPage extends Component {
render() {
return (
<div>
<h1>UserPage</h1>
<p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad mi... |
src/svg-icons/image/brightness-3.js | kittyjumbalaya/material-components-web | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageBrightness3 = (props) => (
<SvgIcon {...props}>
<path d="M9 2c-1.05 0-2.05.16-3 .46 4.06 1.27 7 5.06 7 9.54 0 4.48-2.94 8.27-7 9.54.95.3 1.95.46 3 .46 5.52 0 10-4.48 10-10S14.52 2 9 2z"/>
</SvgIcon>
);
I... |
src/views/agenda/ListRow.js | anysome/objective | /**
* Created by Layman(http://github.com/anysome) on 16/2/29.
*/
import React from 'react';
import {StyleSheet, View, Text, TouchableOpacity, Image} from 'react-native';
import moment from 'moment';
import TouchableBounce from 'TouchableBounce';
import {colors, styles} from '../../app';
import objective from '../..... |
examples/js/column/column-align-table.js | rolandsusans/react-bootstrap-table | /* eslint max-len: 0 */
import React from 'react';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
const products = [];
function addProducts(quantity) {
const startId = products.length;
for (let i = 0; i < quantity; i++) {
const id = startId + i;
products.push({
id: id,
... |
src/config/router.js | kevingatera/Eseness | // Import the usual stuff
import React from 'react';
import { TabNavigator } from 'react-navigation';
import { icon } from 'react-native-elements';
// Import relevant screens
import Login from '../screens/users/Login';
import Workout from '../screens/workout/workout';
import Statistics from '../screens/stats/statistic... |
app/jsx/grading/SpecificSections.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... |
client/omnichannel/realTimeMonitoring/counter/CounterRow.stories.js | iiet/iiet-chat | import React from 'react';
import CounterRow from './CounterRow';
import CounterItem from './CounterItem';
export default {
title: 'omnichannel/RealtimeMonitoring/Counter',
component: CounterRow,
};
export const Default = () => <CounterRow>
<CounterItem title='total conversations' count={10}/>
<CounterItem title... |
test-harness/app/components/list_item.js | bugsnag/bugsnag-react-native | import React from 'react';
import { StyleSheet } from 'react-native';
import { ListItem } from 'react-native-elements';
const styles = StyleSheet.create({
subtitle: {
color: '#ccc',
fontWeight: 'normal',
},
});
const CustomListItem = (props) => <ListItem subtitleStyle={styles.subtitle} {...props} />
expo... |
client/component/rest-api-status/index.js | johngodley/redirection | /**
* External dependencies
*/
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { translate as __ } from 'i18n-calypso';
import classnames from 'classnames';
/**
* Internal dependencies
*/
import ApiResult from './api-result';
import { Spinner } from 'w... |
src/products/FilteredProducts.js | sateesh2020/letshop | import React, { Component } from 'react';
import Product from './Product';
export default class FilteredProducts extends Component{
render(){
var products = this.props.products;
var productsHtml = products.map(function(product){
return (
... |
docs-ui/components/formatters.stories.js | ifduyue/sentry | import React from 'react';
import {storiesOf} from '@storybook/react';
// import {action} from '@storybook/addon-actions';
import {withInfo} from '@storybook/addon-info';
import FileSize from 'app/components/fileSize';
import Duration from 'app/components/duration';
import DateTime from 'app/components/dateTime';
impo... |
src/containers/NotFound/NotFound.js | PhilNorfleet/pBot | import React from 'react';
export default function NotFound() {
return (
<div className="container">
<h1>Doh! 404!</h1>
<p>These are <em>not</em> the droids you are looking for!</p>
</div>
);
}
|
app/views/AboutUs.js | rhinos-app/rhinos-app-dev | import React from 'react'
import {
View,
Text
} from 'react-native'
import { WideButton } from 'components'
import baseStyles from '../baseStyles'
export default class AboutView extends React.Component {
render () {
return (
<View style={baseStyles.view}>
<Text style={baseStyles.h3}>
... |
views/decoration_toggle.js | ammaroff/black-screen | import React from 'react';
export default React.createClass({
getInitialState() {
return {enabled: this.props.invocation.state.decorate};
},
handleClick(event) {
stopBubblingUp(event);
var newState = !this.state.enabled;
this.setState({enabled: newState});
this.prop... |
client/scripts/containers/DevTools.js | magnus-bergman/react-redux-starter | /*
* This file is part of the React Redux starter repo.
*
* (c) Magnus Bergman <hello@magnus.sexy>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import React from 'react'
import { createDevTools } from 'redux-devtools'
import Lo... |
scripts/MenuBar.js | MarshalW/react-proto | 'use strict';
import React from 'react';
export default class MenuBar extends React.Component {
render() {
return (
<div id="topBar"></div>
);
}
} |
src/components/BookList.js | vivshaw/my-reads | // @flow
// Vendor
import React from 'react';
import styled from 'styled-components';
// Components
import Book from './Book';
// Utils/Common
import type { BookType } from '../common/flowTypes';
/* ------------------------------------------------------------------
----------------------------- STYLES ----------... |
src/container/router/SearchInfoRoute.js | shiyunjie/react-web-template-master | /**
* @since 2017-04-20 11:40
* @author chenyiqin
*/
import React from 'react'
import SearchInfoContainer from '../SearchInfoContainer'
const SearchInfoRouteContainer = (props) => {
const {
router,
} = props
return (
<SearchInfoContainer router={router}/>
)
}
export default Search... |
src/containers/ValidDemoPage/ValidDemoPage.js | armaniExchange/work-genius | // Libraries
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { InputValidNumber, InputValidCharacter } from '../../components/A10-UI/Valid/';
class ValidDemoPage extends Component {
constructor(props) {
super(props);
this.state = {
pkvalue1:'kk', pkvalue2:'kk@',... |
server/priv/js/components/TimelineFilter.react.js | avasenin/mzbench | import React from 'react';
import MZBenchRouter from '../utils/MZBenchRouter';
import BenchStore from '../stores/BenchStore';
class TimelineFilter extends React.Component {
constructor(props) {
super(props);
this._onKeyDown = this._onKeyDown.bind(this);
this._onChange = this._onChange.bind(... |
packages/vx-demo/components/charts/SimpleBar.js | Flaque/vx | import React from 'react';
import { Bar } from '@vx/shape';
import { Group } from '@vx/group';
import { PatternLines } from '@vx/pattern';
import { letterFrequency } from '@vx/mock-data';
import { scaleBand, scaleLinear } from '@vx/scale';
import { extent, max } from 'd3-array';
const data = letterFrequency;
function... |
src/ModalFooter.js | yickli/react-bootstrap | import React from 'react';
import classnames from 'classnames';
class ModalFooter extends React.Component {
render() {
return (
<div {...this.props} className={classnames(this.props.className, this.props.modalClassName)}>
{this.props.children}
</div>
);
}
}
ModalFooter.propTypes = {
... |
examples/snapshot/Clock.react.js | skovhus/jest | // Copyright 2004-present Facebook. All Rights Reserved.
import React from 'react';
export default class Clock extends React.Component {
constructor() {
super();
this.state = {seconds: Date.now() / 1000};
}
componentDidMount() {
this.timerID = setInterval(() => this.tick(), 1000);
}
component... |
client/header/components/landing-page-header.js | jmeas/moolah | import React from 'react';
import {Link} from 'react-router';
export default function LandingPageHeader() {
return (
<header className="appHeader">
<div className="container padded-container appHeader-container">
<h1 className="appHeader-appLogo appHeader_appLogo-persistent">
<Link to="/"... |
src/parser/druid/restoration/modules/features/AverageHots.js | sMteX/WoWAnalyzer | import React from 'react';
import StatisticBox, { STATISTIC_ORDER } from 'interface/others/StatisticBox';
import SpellIcon from 'common/SpellIcon';
import SPELLS from 'common/SPELLS';
import Analyzer from 'parser/core/Analyzer';
import Mastery from '../core/Mastery';
class AverageHots extends Analyzer {
static depe... |
docs/src/examples/elements/Image/Variations/ImageExampleFluid.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Image } from 'semantic-ui-react'
const ImageExampleFluid = () => (
<Image src='/images/wireframe/image.png' fluid />
)
export default ImageExampleFluid
|
web/static/js/components/FollowersPage.js | ryo33/Yayaka19 | import React from 'react'
import { connect } from 'react-redux'
import { Segment, Menu, Icon, Label, Header } from 'semantic-ui-react'
import UserButton from './UserButton.js'
import UserID from './UserID.js'
import Time from './Time.js'
import FollowButton from './FollowButton.js'
import { userPage } from '../pages.j... |
assets/jqwidgets/demos/react/app/knob/infiniteknob/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxKnob from '../../../jqwidgets-react/react_jqxknob.js';
class App extends React.Component {
componentDidMount() {
let lastValue;
let newValue = 0;
let min = 0;
let max = 100;
this.refs.myKnob.on('change'... |
examples/with-apollo-and-redux/components/PostUpvoter.js | kevmannn/next.js | import React from 'react'
import { gql, graphql } from 'react-apollo'
function PostUpvoter ({ upvote, votes, id }) {
return (
<button onClick={() => upvote(id, votes + 1)}>
{votes}
<style jsx>{`
button {
background-color: transparent;
border: 1px solid #e4e4e4;
c... |
src/components/App.js | sleinadsanoj/react-starter-project | import React from 'react';
require('normalize.css/normalize.css');
require('../styles/App.scss');
function AppComponent(props) {
return (<div className="app-container">
{props.children}
</div>);
}
AppComponent.propTypes = {
children: React.PropTypes.any,
};
export default AppComponent;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.