path
stringlengths
5
296
repo_name
stringlengths
5
85
content
stringlengths
25
1.05M
src/client/gameInvite/GameInvite.js
ThomasBrekelmans/stratego
import React from 'react'; import localUser from '../user/localUser'; const INITIAL_STATE = { inviter: null, inviterCancelled: false, invitee: null, inviteeAccepted: false, inviteeDeclined: false }; class GameInvite extends React.Component { constructor (props) { super(props); this.state = INITIAL_S...
demo/demo.js
synapsestudios/react-autocomplete
import React from 'react'; import Autocomplete from '../src/Autocomplete'; require('./demo.scss'); const autocompleteOptions = [ { option : 'Apple' }, { option : 'Banana' }, { option : 'Carrot' }, { option : 'Delicious Apple' }, { option : 'E...
src/index.js
anitrack/anitrack-web
import React from 'react'; import ReactDOM from 'react-dom'; import Root from 'containers/Root'; import { configureStore, history } from './store'; import 'bootstrap/dist/css/bootstrap.css'; import 'font-awesome/css/font-awesome.min.css'; // Start websocket import { setupWebsocket } from 'websocket'; setupWebsocket();...
packages/material-ui-icons/src/Replay5.js
AndriusBil/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let Replay5 = props => <SvgIcon {...props}> <path d="M12 5V1L7 6l5 5V7c3.3 0 6 2.7 6 6s-2.7 6-6 6-6-2.7-6-6H4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8zm-1.3 8.9l.2-2.2h2.4v.7h-1.7l-.1.9s.1 0 .1-.1.1 0 .1-.1.1 0 .2...
collect-webapp/frontend/src/datamanagement/components/recordeditor/fields/TextField.js
openforis/collect
import React from 'react' import { connect } from 'react-redux' import MuiTextField from '@mui/material/TextField' import { TextAttributeDefinition } from 'model/Survey' import Objects from 'utils/Objects' import AbstractField from './AbstractField' import * as FieldsSizes from './FieldsSizes' import DirtyFieldSpinn...
packages/react-ui-components/src/SelectBox/index.story.js
grebaldi/PackageFactory.Guevara
import React from 'react'; import {storiesOf, action} from '@storybook/react'; import {withKnobs, text} from '@storybook/addon-knobs'; import {StoryWrapper} from './../_lib/storyUtils'; import SelectBox from '.'; import DropDown from './../DropDown'; const optionsWithoutGroups = [ {value: 'opt1', label: 'Option 1'...
src/js/components/CheckBox.js
linde12/grommet
// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP import React, { Component } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import CSSClassnames from '../utils/CSSClassnames'; const CLASS_ROOT = CSSClassnames.CHECK_BOX; export default class CheckBox extends...
components/Field/stories.js
insane-ux/rebulma
// @flow import React from 'react' import { storiesOf } from '@kadira/storybook' import Label from 'components/Label' import Input from 'components/Input' import Select from 'components/Select' import Field from './' const options = [ { label: 'Rr', value: 'dr', }, { label: 'Mr', value: 'mr', ...
src/Fade.js
chilts/react-bootstrap
import React from 'react'; import Transition from 'react-overlays/lib/Transition'; import CustomPropTypes from './utils/CustomPropTypes'; import deprecationWarning from './utils/deprecationWarning'; class Fade extends React.Component { render() { let timeout = this.props.timeout || this.props.duration; retu...
docs/app/containers/Home/Home.js
react-fabric/react-fabric
import React from 'react' import cssm from 'react-css-modules' import Icon from 'react-fabric/Icon' import { Link, Logo } from '../../components' import style from './Home.scss' const DUMB_LINK = 'https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0' const ghEmbedUrl = ({ user, repo, type }) => ( ...
src/components/SideMenu.js
shunito/daisyconv
// jshint esversion:6 import React, { Component } from 'react'; import ReactDOM, { render } from 'react-dom'; class SideMenuDaisy extends Component { constructor(props) { super(props); } _isActive( m ) { return this.props.mode === m; } _onMenuSelect( e ) { const menu = e.cu...
src/components/prompts/PredictionsWarning.js
knod/cliff-effects-1
import React, { Component } from 'react'; import { withRouter } from 'react-router-dom'; import { Button, Checkbox, Form, Modal, } from 'semantic-ui-react'; /** * Displays a model that requires the user to accept the terms and conditions before using the app * @extends React.Component * @param {boolean} te...
src/views/components/VideoPlayer.js
physiii/home-gateway
import React from 'react'; import PropTypes from 'prop-types'; import VideoStream from './VideoStream.js'; import Toolbar from './Toolbar.js'; import PlayButtonIcon from '../icons/PlayButtonIcon.js'; import StopButtonIcon from '../icons/StopButtonIcon.js'; import ExpandIcon from '../icons/ExpandIcon.js'; import fscreen...
lib/client/components/TransferRate.react.js
imsnif/wtorrent
"use strict"; import React from 'react'; export default class TransferRate extends React.Component { render () { let uploadSpeed = Math.round(this.props.uploadSpeed / 1000); let downloadSpeed = Math.round(this.props.downloadSpeed / 1000); return ( <span> Rate (U/D): {uploadSpeed} / {down...
packages/material-ui-icons/src/Report.js
dsslimshaddy/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from 'material-ui/SvgIcon'; let Report = props => <SvgIcon {...props}> <path d="M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM12 17.3c-.72 0-1.3-.58-1.3-1.3 0-.72.58-1.3 1.3-1.3.72 0 1.3.58 1.3 1.3 0 .72-.58 1.3-1.3 1.3z...
test/components/ProductInfoNOCAB.spec.js
Byte-Code/lm-digital-store-private-test
import React from 'react'; import { shallow } from 'enzyme'; import { List, fromJS } from 'immutable'; import ProductInfoNOCAB from '../../app/components/ProductInfoNOCAB'; const emptyDescriptions = List(); const descriptions = fromJS([ [ { label: 'label00', value: 'value00' }, { label: 'label01', value: 'v...
node_modules/radium/src/__tests__/visited-test.js
HasanSa/hackathon
/* eslint-disable react/prop-types */ import Radium, {StyleRoot} from 'index'; import React from 'react'; import TestUtils from 'react-addons-test-utils'; import {expectCSS, getElement} from 'test-helpers'; describe('visited plugin tests', () => { it('renders visited styles as css', () => { const ChildComponent...
Tests/Components/FullButtonTest.js
littletimo/beer-counter
import 'react-native' import React from 'react' import FullButton from '../../App/Components/FullButton' import { shallow } from 'enzyme' import renderer from 'react-test-renderer' test('FullButton component renders correctly', () => { const tree = renderer.create(<FullButton onPress={() => {}} text='hi' />).toJSON(...
src/js/components/DataTable/stories/Tunable.js
grommet/grommet
import React from 'react'; import { Box, DataTable } from 'grommet'; // 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'; export const TunableDataTable = () => ( // Uncomment <Grommet> line...
app/javascript/mastodon/features/notifications/index.js
res-ac/mstdn.res.ac
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import Column from '../../components/column'; import ColumnHeader from '../../components/column_header'; import { expandNotifications, scrollTopNotifications ...
test/ngettext-spec.js
bholloway/react-i18n-interpolation
import test from 'tape'; import sinon from 'sinon'; import React from 'react'; import {check, gen} from 'tape-check'; import {times, requireSrc} from './helpers'; import { anyPrimitive, anyValue, anyUnkeyedComplexSubstitution, anyKeyedPrimitiveSubstitutionKV, anyKeyedComplexSubstitutionKV, anyIllegalPrimitiveSub...
app/javascript/mastodon/features/ui/components/column_subheading.js
amazedkoumei/mastodon
import React from 'react'; import PropTypes from 'prop-types'; const ColumnSubheading = ({ text }) => { return ( <div className='column-subheading'> {text} </div> ); }; ColumnSubheading.propTypes = { text: PropTypes.string.isRequired, }; export default ColumnSubheading;
src/svg-icons/action/delete.js
kasra-co/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionDelete = (props) => ( <SvgIcon {...props}> <path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/> </SvgIcon> ); ActionDelete = pure(ActionDelete); ActionDelete.display...
Web/src/modules/App/Html.spec.js
lepsalex/Mansplaining
/* eslint-env mocha */ /* global expect, sinon */ import React from 'react' import { render } from 'enzyme' import Html from './Html' describe('<Html />', () => { function setup(props = {}) { props = { markup: '', state: {}, assets: { styles: {}, javascript: {}, assets...
src/routes/groups/Groups.js
fixjs/user-management-app
import React from 'react'; import * as actionCreators from '../../actions/groups'; import {getUserGroupsSuccess} from '../../actions/groups'; import { DataTable, TableHeader, FABButton, Icon, Dialog, DialogTitle, DialogContent, DialogActions, Textfield, Button } from 'react-mdl'; import Link from '....
components/product-page/top-container.js
dwest-teo/wattos-spaceship-emporium
import React from 'react'; import PropTypes from 'prop-types'; import { Flex, config } from '../../components/base'; const { breakpoints } = config.get(); const styles = { flexDirection: 'column', [breakpoints[0]]: { flexDirection: 'row !important', }, [breakpoints[1]]: { flexDirection: 'column !impor...
src/components/common/FanPageBlock/index.js
goodjoblife/GoodJobShare
import React from 'react'; import PropTypes from 'prop-types'; import cn from 'classnames'; import { P } from 'common/base'; import { FacebookWrapper } from 'common/facebook'; import styles from './FanPageBlock.module.css'; class FanPageBlock extends React.Component { static propTypes = { className: PropTypes....
frontend/src/Settings/Notifications/Notifications/Notification.js
Radarr/Radarr
import PropTypes from 'prop-types'; import React, { Component } from 'react'; import Card from 'Components/Card'; import Label from 'Components/Label'; import ConfirmModal from 'Components/Modal/ConfirmModal'; import { kinds } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; import EditNotifica...
examples/BasicExample/app.js
thegamenicorus/react-native-flexi-radio-button
import React, { Component } from 'react'; import { StyleSheet, Text, View } from 'react-native'; import {RadioGroup, RadioButton} from 'react-native-flexi-radio-button' class App extends Component{ constructor(){ super() this.state = { text: '' } this.onSelect = ...
src/components/Label/Label.js
MallikarjunaMG/react-components
import React from 'react' import PropTypes from 'prop-types' /** * label with => * @param {htmlFor, label, required} */ const Label = ({htmlFor, label, required}) => { return( <label style={{display: 'block'}} htmlFor={htmlFor}> {label} {required && <span style={{color: 'red'}}>*</span>} </label> ...
fields/components/DateInput.js
naustudio/keystone
import moment from 'moment'; import DayPicker from 'react-day-picker'; import React from 'react'; import { findDOMNode } from 'react-dom'; import Popout from '../../admin/client/App/shared/Popout'; import { FormInput } from '../../admin/client/App/elemental'; let lastId = 0; module.exports = React.createClass({ disp...
frontend/test/app/containers/RetirePage-test.js
mathjazz/testpilot
import React from 'react'; import { expect } from 'chai'; import sinon from 'sinon'; import { shallow, mount } from 'enzyme'; import RetirePage from '../../../src/app/containers/RetirePage'; describe('app/containers/RetirePage', () => { let props, subject; beforeEach(function() { props = { hasAddon: tr...
app/src/interfaces/tonal.js
piercefrawley/lights
import React from 'react'; import { connect } from 'react-redux'; import getAudioContext from '../utils/getAudioContext'; import mapDispatchToProps from '../redux/dispatch/seizure'; import mapStateToProps from '../redux/selectors/seizure'; const generateTone = audioContext => n => { let oscillator = audioContext.cr...
src/components/layout/layout.js
flexbox/webcitation
import React from 'react' import PropTypes from 'prop-types' import { StaticQuery, graphql } from 'gatsby' import Head from 'components/head' import Sidebar from 'components/sidebar' import styled, { ThemeProvider } from 'styled-components' import { Box } from 'rebass/styled-components' import GlobalStyle from 'global....
src/Image/__tests__/ImageCropper.spec.js
ClarityMovement/clarity-components
/* eslint-env jest */ import React from 'react'; import enzymeToJson from 'enzyme-to-json'; import { shallow } from 'enzyme'; import ImageCropper, { ImageCropperRenderer } from '../ImageCropper'; const defaultProps = { ...ImageCropperRenderer.defaultProps, image: { preview: 'http://pic.example.com/200/200' }, }; ...
docs/app/Examples/elements/Segment/Variations/SegmentExampleBasic.js
aabustamante/Semantic-UI-React
import React from 'react' import { Segment } from 'semantic-ui-react' const SegmentExampleBasic = () => ( <Segment basic> Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu li...
src/components/LoginWindow.js
janimattiellonen/renoirc
import React from 'react'; import {Button} from 'react-bootstrap'; export default class LoginWindow extends React.Component { constructor(props) { super(props); const {nick, host, port} = props; this.state = { nick: nick, host: host, port: port ...
src/Chart.js
curious-containers/cc-ui
import React from 'react'; import PropTypes from 'prop-types'; import createReactClass from 'create-react-class'; import Chartist from 'chartist'; import 'chartist-plugin-tooltips'; import './chartist.css'; export default createReactClass({ propTypes: { data: PropTypes.object.isRequired, options: PropTypes...
src/index.js
zahnster/minesweep
import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; ReactDOM.render( <App />, document.getElementById('root') );
imports/ui/components/OAuthLoginButton/OAuthLoginButton.js
lazygalaxy/lazybat-seed-meteorjs
import React from 'react'; import PropTypes from 'prop-types'; import { Meteor } from 'meteor/meteor'; import { Bert } from 'meteor/themeteorchef:bert'; import Icon from '../Icon/Icon'; import './OAuthLoginButton.scss'; const handleLogin = (service, callback) => { const options = { facebook: { requestPerm...
tests/layouts/PageLayout.spec.js
khanhhua/jukebox-tctl
import React from 'react' import PageLayout from 'layouts/PageLayout/PageLayout' import { shallow } from 'enzyme' describe('(Layout) PageLayout', () => { it('renders as a <div>', () => { shallow(<PageLayout />).should.have.tagName('div') }) it('renders a project title', () => { shallow(<PageLayout />).f...
app/containers/FeaturePage/index.js
rlagman/raphthelagman
/* * FeaturePage * * List all the features */ import React from 'react'; import { Helmet } from 'react-helmet'; import { FormattedMessage } from 'react-intl'; import H1 from 'components/H1'; import messages from './messages'; import List from './List'; import ListItem from './ListItem'; import ListItemTitle from '...
examples/src/index.js
chibicode/react-json-tree
import { render } from 'react-dom'; import React from 'react'; import App from './App'; render(<App />, document.getElementById('root'));
src/svg-icons/hardware/security.js
spiermar/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let HardwareSecurity = (props) => ( <SvgIcon {...props}> <path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm0 10.99h7c-.53 4.12-3.28 7.79-7 8.94V12H5V6.3l7-3.11v8.8z"/> </SvgIcon> ); Hardwa...
src/svg-icons/action/speaker-notes.js
pradel/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionSpeakerNotes = (props) => ( <SvgIcon {...props}> <path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 14H6v-2h2v2zm0-3H6V9h2v2zm0-3H6V6h2v2zm7 6h-5v-2h5v2zm3-3h-8V9h8v2zm0-...
src/svg-icons/image/panorama-wide-angle.js
pomerantsev/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ImagePanoramaWideAngle = (props) => ( <SvgIcon {...props}> <path d="M12 6c2.45 0 4.71.2 7.29.64.47 1.78.71 3.58.71 5.36 0 1.78-.24 3.58-.71 5.36-2.58.44-4.84.64-7.29.64s-4.71-.2-7.29-.64C4.24 15.58 4 13.78 4 12...
app/javascript/spec/cloud-object-store-container-form/cloud-object-store-container-form.spec.js
ManageIQ/manageiq-ui-classic
import React from 'react'; import toJson from 'enzyme-to-json'; import fetchMock from 'fetch-mock'; import { mount } from '../helpers/mountForm'; import CloudObjectStoreContainerForm from '../../components/cloud-object-store-container-form'; require('../helpers/miqSparkle.js'); require('../helpers/miqAjaxButton.js'); ...
packages/react-router-native/examples/RouteConfig.js
react-translate-team/react-router-CN
import React from 'react' import { StyleSheet, Text, AppRegistry, View } from 'react-native' import { NativeRouter, Route, Link } from 'react-router-native' // Some folks find value in a centralized route config. // A route config is just data. React is great at mapping // data into components, and <Route> is a compon...
app/javascript/mastodon/components/status_action_bar.js
pixiv/mastodon
import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import IconButton from './icon_button'; import DropdownMenuContainer from '../containers/dropdown_menu_container'; import { defineMessages, injectIntl } from 'react-intl'; import ImmutablePureCompo...
stories/shared/TabControl.stories.js
buildkite/frontend
// @flow /* global module */ import React from 'react'; import { storiesOf } from '@storybook/react'; import { text, boolean, select } from '@storybook/addon-knobs'; import TabControl from '../../app/components/shared/TabControl'; const basic = () => { const activeTab = select('Active Tab', ['1', '2', '3'], '1'); ...
fields/types/url/UrlField.js
snowkeeper/keystone
import React from 'react'; import Field from '../Field'; import { Button, FormInput } from 'elemental'; module.exports = Field.create({ displayName: 'URLField', statics: { type: 'Url', }, openValue () { var href = this.props.value; if (!href) return; if (!/^(mailto\:)|(\w+\:\/\/)/.test(href)) { href = '...
clients/packages/admin-client/src/components/layout/settings-page-layout.js
nossas/bonde-client
import PropTypes from 'prop-types' import React from 'react' import classnames from 'classnames' const SettingsPageLayout = ({ children, className }) => ( <div className={classnames( 'settings-page-layout flex-auto flex flex-column bg-silver relative', className )} > {children} </div> ) ...
docs/src/sections/CarouselSection.js
dozoisch/react-bootstrap
import React from 'react'; import Anchor from '../Anchor'; import PropTable from '../PropTable'; import ReactPlayground from '../ReactPlayground'; import Samples from '../Samples'; export default function CarouselSection() { return ( <div className="bs-docs-section"> <h2 className="page-header"> <...
src/parser/warrior/arms/modules/spells/azeritetraits/TestOfMight.js
ronaldpereira/WoWAnalyzer
import React from 'react'; import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer'; import Enemies from 'parser/shared/modules/Enemies'; import { formatNumber, formatPercentage } from 'common/format'; import { calculateAzeriteEffects } from 'common/stats'; import SPELLS from 'common/SPELLS'; import RESOURCE_TY...
index.android.js
nb7123/RNapp
/** * Sample React Native App * https://github.com/facebook/react-native * @flow */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, TextInput, Image, Button, BackHandler, ToolbarAndroid, View } from 'react-native'; import ImagePicker from './src/native_modules' ...
src/utils/CustomPropTypes.js
modulexcite/react-bootstrap
import React from 'react'; const ANONYMOUS = '<<anonymous>>'; const CustomPropTypes = { isRequiredForA11y(propType){ return function(props, propName, componentName){ if (props[propName] === null) { return new Error( 'The prop `' + propName + '` is required to make ' + componentName + ' ...
src/svg-icons/communication/voicemail.js
xmityaz/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let CommunicationVoicemail = (props) => ( <SvgIcon {...props}> <path d="M18.5 6C15.46 6 13 8.46 13 11.5c0 1.33.47 2.55 1.26 3.5H9.74c.79-.95 1.26-2.17 1.26-3.5C11 8.46 8.54 6 5.5 6S0 8.46 0 11.5 2.46 17 5.5 17h13c3...
tests/react/createElementRequiredProp_string.js
claudiopro/flow
// @flow import React from 'react'; class Bar extends React.Component<{test: number}> { render() { return ( <div> {this.props.test} </div> ) } } class Foo extends React.Component<{}> { render() { const Cmp = Math.random() < 0.5 ? 'div' : Bar; return (<Cmp/>); } }
modules/core/examples/mars-tencent/index.ios.js
Caijiacheng/react-native-mars
/** * 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 example extends Component { render() { return ( <View style={styles.container}>...
app/containers/HomePage.js
kaunio/gloso
// @flow import React, { Component } from 'react'; import { connect } from 'react-redux'; import Home from '../components/Home'; class HomePage extends Component { render() { return ( <Home saveData={this.props.saveData} /> ); } } function mapStateToProps(state) { return { saveData: state.glos...
examples/passing-props-to-children/app.js
djkirby/react-router
import React from 'react' import { render } from 'react-dom' import { browserHistory, Router, Route, Link, withRouter } from 'react-router' import withExampleBasename from '../withExampleBasename' import './app.css' const App = withRouter( React.createClass({ getInitialState() { return { tacos: ...
static/src/containers/LoginCheck.js
eltrufas/cosmico
import React from 'react'; import { connect } from 'react-redux'; import Login from './Login' import CircularProgress from 'material-ui/CircularProgress'; import Paper from 'material-ui/Paper'; const LoginCheck = ({ isLoading, token, error, children }) => { if (token) { return ( <div> { children }...
src/js/shared/components/paging.js
akornatskyy/sample-blog-react
import React from 'react'; import PropTypes from 'prop-types'; import {Row, Col, Pagination} from 'react-bootstrap'; const Paging = ({pending, paging, onSelect}) => { let newer; let older; if (!paging) { return null; } if (paging.before !== undefined) { newer = ( <Pag...
src/layouts/index.js
buts-butler/web-ui
import React from 'react' import Link from 'gatsby-link' import { Container } from 'react-responsive-grid' import { siteMetadata } from '../../gatsby-config' import SiteNavi from '../components/SiteNavi' import './gatsrap.scss' import 'animate.css/animate.css' import 'font-awesome/css/font-awesome.css' import 'prismjs...
src/components/news/News.js
AlanMorel/aria
import React from 'react'; import Utility from '../../Utility'; import Banner from '../navigation/banner/Banner'; import Newslist from '../../components/news/newslist/Newslist'; class News extends React.Component { componentDidMount() { Utility.setTitle("News"); } getTitle() { var title ...
docs/src/examples/modules/Tab/States/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 TabStatesExamples = () => ( <ExampleSection title='States'> <ComponentExample title='Loading' description='A ta...
fields/types/textarea/TextareaFilter.js
davibe/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...
classic/src/scenes/wbui/ULinkOR/ULinkORListItem.js
wavebox/waveboxapp
import React from 'react' import { ListItem } from '@material-ui/core' import { withStyles } from '@material-ui/core/styles' import classNames from 'classnames' const styles = { root: { '&:hover:not(:focus)': { backgroundColor: 'rgba(0, 0, 0, 0.04)' } } } @withStyles(styles) class ULinkORListItem ex...
internals/templates/containers/NotFoundPage/index.js
seanng/jobmaster-web
/** * NotFoundPage * * This is the page we show when the user visits a url that doesn't have a route * * NOTE: while this component should technically be a stateless functional * component (SFC), hot reloading does not currently support SFCs. If hot * reloading is not a necessity for you then you can refactor it...
docs/src/_bilprospekt_input_field_component.js
Bilprospekt/bilprospekt-ui
import React from 'react'; import _ from 'underscore'; import {InputField, ActionButton} from 'bilprospekt-ui'; const InputFieldDoc = React.createClass({ getInitialState() { return { inputStatus: 'default', }; }, _setStatus(status) { this.setState({ inputStatus: st...
Libraries/Components/Slider/Slider.js
exponentjs/react-native
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow strict-local */ 'use strict'; const Platform = require('../../Utilities/Platform'); import SliderNativeCompon...
scripts/stores/AddBookStore.js
nverdhan/satticentre
import React from 'react'; import { register } from '../AppDispatcher'; import { createStore, mergeIntoBag, isInBag } from '../utils/StoreUtils'; import selectn from 'selectn'; var _book = {} var _bookStatus = 'NA' // NA, OWN, WISH, LEND, RENT var _showLoading = true; const AddBookStore = createStore({ get(){ retur...
src/js/components/table/table_select_cell.js
working-minds/realizejs
import React, { Component } from 'react'; import PropTypes from '../../prop_types'; import { uuid } from '../../utils'; import { mixin } from '../../utils/decorators'; import { CssClassMixin } from '../../mixins'; import { InputCheckbox, Label } from '../../components'; @mixin(CssClassMixin) export default class Tab...
app/javascript/mastodon/components/permalink.js
alarky/mastodon
import React from 'react'; import PropTypes from 'prop-types'; export default class Permalink extends React.PureComponent { static contextTypes = { router: PropTypes.object, }; static propTypes = { className: PropTypes.string, href: PropTypes.string.isRequired, to: PropTypes.string.isRequired, ...
examples/redux-observable-shopping-cart/js/main.js
jesinity/redux-observable
import "babel-polyfill" import React from 'react'; import { render } from 'react-dom'; import { Provider, ReactRedux } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import { createEpicMiddleware } from 'redux-observable'; import * as actions from './actions'; import App from './components/A...
react/features/welcome/components/native/settings/components/FormRow.js
jitsi/jitsi-meet
// @flow import React, { Component } from 'react'; import { Text, View } from 'react-native'; import { translate } from '../../../../../base/i18n'; import styles, { ANDROID_UNDERLINE_COLOR, PLACEHOLDER_COLOR } from './styles'; /** * The type of the React {@code Component} props of {@link FormRow}. */ type Props =...
src/js/components/deployments/deploymentstatus.js
michaelatmender/gui
import React from 'react'; import { Tooltip } from '@mui/material'; import successImage from '../../../assets/img/success_status.png'; import errorImage from '../../../assets/img/error_status.png'; import pendingImage from '../../../assets/img/pending_status.png'; import inprogressImage from '../../../assets/img/progr...
src/scenes/home/ourPrograms/ourPrograms.js
OperationCode/operationcode_frontend
import React from 'react'; import QuoteBanner from 'shared/components/quoteBanner/quoteBanner'; import MentorshipProgram from './mentorshipProgram/mentorshipProgram'; import MentorVolunteers from './mentorVolunteers/mentorVolunteers'; import GettingStarted from './gettingStarted/gettingStarted'; const OurPrograms = ()...
src/Parser/DemonHunter/Vengeance/Modules/Statistics/SpiritBomb/SpiritBomb.js
hasseboulen/WoWAnalyzer
import React from 'react'; import AbilityTracker from 'Parser/Core/Modules/AbilityTracker'; import Combatants from 'Parser/Core/Modules/Combatants'; import Enemies from 'Parser/Core/Modules/Enemies'; import SPELLS from 'common/SPELLS'; import SpellLink from 'common/SpellLink'; import SpellIcon from 'common/SpellIcon'...
src/components/hero/hero.js
modestack/modestack.github.io
import React from 'react'; import styles from './_hero.module.scss'; import {Link} from "../common/link/link"; const Hero = () => { return ( <div> <div className={styles.skewedBackground}></div> <div className={styles.introContainer}> <div className={styles.tagline}>...
wrappers/toml.js
Outfitio/outfit-help
import React from 'react' import toml from 'toml-js' import Helmet from 'react-helmet' import { config } from 'config' module.exports = React.createClass({ propTypes () { return { route: React.PropTypes.object, } }, render () { const data = this.props.route.page.data return ( <div> ...
src/packages/@ncigdc/routes/AWGRoutes.js
NCI-GDC/portal-ui
import React from 'react'; import { Route, Switch, Redirect } from 'react-router-dom'; import Head from '@ncigdc/components/Head'; import NotFound from '@ncigdc/components/NotFound'; import LoadableWithLoading from '@ncigdc/components/LoadableWithLoading'; import FileRoute from '@ncigdc/routes/FileRoute'; import AuthRo...
index.android.js
neyko5/BalistosNative
import React from 'react'; import { AppRegistry } from 'react-native'; import App from './src/components/App/App'; import { createStore, applyMiddleware, combineReducers } from 'redux'; import { Provider } from 'react-redux'; import createSagaMiddleware from 'redux-saga'; import reducer from './src/reducers'; import ...
dashboard/js/app.js
boivie/lovebeat
import React from 'react'; import ReactDOM from 'react-dom'; // Notice that we've organized all of our routes into a separate file. import Router from './router'; require('../css/app.scss'); console.log("Welcome to lovebeat, version %LOVEBEAT_VERSION%") // Now we can attach the router to the 'root' element like thi...
src/components/Navbar/Navbar.js
elurye/ReactJestBoiler
/* * 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 ...
docs/app/Examples/collections/Grid/Variations/GridExampleStretchedEqual.js
vageeshb/Semantic-UI-React
import React from 'react' import { Grid, Image, Segment } from 'semantic-ui-react' const GridExampleStretchedEqual = () => ( <Grid columns='equal'> <Grid.Row stretched> <Grid.Column> <Segment>1</Segment> <Segment>2</Segment> </Grid.Column> <Grid.Column width={6}> <Segmen...
test/description/index.js
ghondar/PelisTime
import React from 'react' import reactDom from 'react-dom/server' import test from 'tape' import dom from 'cheerio' import DescriptionVideo from '../../js/components/DescriptionVideo.jsx' const render = reactDom.renderToStaticMarkup test('Description', assert => { const result = 'hello world' const props = { ...
src/js/all/stories/TypographySmall.js
grommet/grommet
import React from 'react'; import { Grommet, Box, Heading, Paragraph, Text } from 'grommet'; import { grommet } from 'grommet/themes'; const paragraphFiller = ` Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. `; export const Small = () => ( ...
demo/js/alert.js
bebeanan/monkey-ui
import React from 'react'; import ReactDOM from 'react-dom'; import MonkeyUi from '../../lib/monkeyui.js'; var Alert=MonkeyUi.Alert; var Icon=MonkeyUi.Icon; const BatchUpload = MonkeyUi.BatchUpload console.log('888') console.log(BatchUpload) const onClose = function (e) { console.log(e, 'I was closed.'); const log = ...
stories/listgroup.stories.js
JimBarrows/Bootstrap-React-Components
import {storiesOf} from '@storybook/react' import React from 'react' import ListGroup from '../src/bootstrap/components/ListGroup/index' storiesOf('bootstrap/components/List Group', module) .addDecorator((story) => <div className="container"> {story()} </div>) .add('Basic', () => <ListGroup id={'basic'...
pages/404.js
turntwogg/esports-aggregator
import React from 'react'; import Page from '../components/Page'; import PageHeader from '../components/PageHeader'; import PageContent from '../components/PageContent'; const FourOhFour = () => ( <Page name="404" title="404" size="narrow"> <PageHeader title="Oops!" /> <PageContent> <p>The page you we...
client/src/index.js
banderson/reactive-stock-ticker-demo
import 'rxjs'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './components/App'; import './styles/index.css'; import {Provider} from 'react-redux'; import createStore from './createStore'; ReactDOM.render( <Provider store={createStore()}> <App /> </Provider>, document.getEleme...
packages/lore-hook-connect/src/decorators/connect.js
lore/lore
/* eslint no-shadow: "off" */ /* eslint react/no-is-mounted: "warn" */ /* eslint react/prefer-es6-class: "off" */ /* eslint no-undef: "off" */ import React from 'react'; import createReactClass from 'create-react-class'; import _ from 'lodash'; import invariant from 'invariant'; import storeShape from '../utils/storeS...
src/svg-icons/action/accessibility.js
spiermar/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ActionAccessibility = (props) => ( <SvgIcon {...props}> <path d="M12 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 7h-6v13h-2v-6h-2v6H9V9H3V7h18v2z"/> </SvgIcon> ); ActionAccessibility = pure(ActionAccessib...
AirFront/index_backend.js
sunshinezxf/Airburg
import React from 'react'; import ReactDOM from 'react-dom'; import {Router, Route, IndexRoute} from 'react-router'; import {Provider} from 'react-redux'; import store, {history} from './backend/redux/store'; import App from './backend/redux/app' import * as MC from './backend/manageCustomer'; import * as MCP from './...
src/svg-icons/content/create.js
kasra-co/material-ui
import React from 'react'; import pure from 'recompose/pure'; import SvgIcon from '../../SvgIcon'; let ContentCreate = (props) => ( <SvgIcon {...props}> <path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/...
jenkins-design-language/src/js/components/material-ui/svg-icons/maps/local-hospital.js
alvarolobato/blueocean-plugin
import React from 'react'; import SvgIcon from '../../SvgIcon'; const MapsLocalHospital = (props) => ( <SvgIcon {...props}> <path d="M19 3H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 11h-4v4h-4v-4H6v-4h4V6h4v4h4v4z"/> </SvgIcon> ); MapsLocalHospital.displayName = 'MapsLocal...
app/modules/shared/components/Spinner/index.js
ersinerdal/react-redux-immutable-ddd
import React from 'react'; import {Preloader} from 'react-materialize' class Spinner extends React.Component{ constructor(props){ super(props); } render() { return ( <div className='loading'> <Preloader flashing/> </div> ) } }; export defa...
src/routes/system/config/Modal.js
muidea/magicSite
import React from 'react' import PropTypes from 'prop-types' import { Form, Input, Modal } from 'antd' const { TextArea } = Input const FormItem = Form.Item const formItemLayout = { labelCol: { span: 6, }, wrapperCol: { span: 14, }, } const modal = ({ item = {}, type, onOk, form: { getFie...
src/components/AutoComplete/AutoCompleteList.js
mrc535s/react-autocomplete
import React from 'react'; import AutoCompleteListItem from './AutoCompleteListItem'; export default class AutoCompleteList extends React.Component { constructor(props) { super(props); } render() { const styles = { borderRight: 'solid 1px grey', borderLeft: 'solid 1px grey', borderBottom: 'solid 1px ...