path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
test/TabPaneSpec.js | roadmanfong/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import TabPane from '../src/TabPane';
describe('TabPane', function () {
it('Should have class', function () {
let instance = ReactTestUtils.renderIntoDocument(
<TabPane>Item content</TabPane>
);
assert.ok(ReactTestUti... |
node_modules/react-native/Libraries/Image/ImageBackground.js | TrungSpy/React-Native-SampleProject | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @provides... |
fields/types/url/UrlField.js | belafontestudio/keystone | import React from 'react';
import Field from '../Field';
import { Button, FormInput } from 'elemental';
module.exports = Field.create({
displayName: 'URLField',
openValue () {
var href = this.props.value;
if (!href) return;
if (!/^(mailto\:)|(\w+\:\/\/)/.test(href)) {
href = 'http://' + href;
}
window... |
src/ButtonInput.js | egauci/react-bootstrap | import React from 'react';
import Button from './Button';
import FormGroup from './FormGroup';
import InputBase from './InputBase';
import childrenValueValidation from './utils/childrenValueInputValidation';
class ButtonInput extends InputBase {
renderFormGroup(children) {
let {bsStyle, value, ...other} = this.p... |
actor-apps/app-web/src/app/components/activity/UserProfile.react.js | allengaller/actor-platform | import React from 'react';
import { PureRenderMixin } from 'react/addons';
import ContactActionCreators from 'actions/ContactActionCreators';
import DialogActionCreators from 'actions/DialogActionCreators';
import PeerStore from 'stores/PeerStore';
import DialogStore from 'stores/DialogStore';
import AvatarItem from... |
js/components/Calendar/CalendarEvent.js | ecohealthalliance/GoodQuestion | import React from 'react';
import {
TouchableOpacity,
Text,
View,
} from 'react-native';
import Styles from '../../styles/Styles';
import Color from '../../styles/Color';
import ViewText from '../ViewText';
import Icon from 'react-native-vector-icons/FontAwesome';
const CalendarEvent = React.createClass({
pro... |
highorder/index-2.js | lizichen0403/201704slider | import React from 'react';
import ReactDOM from 'react-dom';
let Post=(props)=>(
<div>
<p>{props.content}</p>
<button onClick={props.refresh}>刷新</button>
</div>
);
function getData(url) {
return fetch(url).then((res)=>res.json());
}
//接收url地址作为参数
let loadAndRefresh=(url)=>{
return functi... |
src/svg-icons/image/panorama-wide-angle.js | spiermar/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... |
src/client/src/Components/EditableTable/EditableTableRow/index.js | severnsc/brewing-app | import React from 'react'
import PropTypes from 'prop-types'
import Button from '../../Button'
import RoundButton from '../../RoundButton'
import styled from 'styled-components'
const TableRow = styled.tr`
display:flex;
flex-direction:row;
position:relative;
border-bottom:1px solid rgb(224, 224, 224);
margin... |
app/javascript/mastodon/components/animated_number.js | maa123/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedNumber } from 'react-intl';
import TransitionMotion from 'react-motion/lib/TransitionMotion';
import spring from 'react-motion/lib/spring';
import { reduceMotion } from 'mastodon/initial_state';
const obfuscatedCount = count => {
if (co... |
app/js/update/views/success.js | blockstack/blockstack-browser | import React from 'react'
import { ShellScreen, Type } from '@blockstack/ui'
import PropTypes from 'prop-types'
class Success extends React.Component {
componentDidMount() {
setTimeout(() => this.props.finish(), 3500)
}
render() {
const { finish, ...rest } = this.props
const props = {
title: ... |
src/svg-icons/action/view-headline.js | mit-cml/iot-website-source | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionViewHeadline = (props) => (
<SvgIcon {...props}>
<path d="M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"/>
</SvgIcon>
);
ActionViewHeadline = pure(ActionViewHeadline);
ActionViewHeadline.d... |
docs/app/Examples/elements/Reveal/Types/index.js | shengnian/shengnian-ui-react | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const RevealTypesExamples = () => (
<ExampleSection title='Types'>
<ComponentExample
title='Fade'
description='An el... |
example/__tests__/index.android.js | leoilab/react-native-analytics-segment-io | import 'react-native';
import React from 'react';
import Index from '../index.android.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
);
});
|
src/components/Main.js | KENJU/LeanCanvasOnline | /**
* Main.js
*/
import React from 'react';
import CanvasBox from '../containers/CanvasBox';
class Main extends React.Component {
render() {
const data = this.props.currentCanvasData;
return (
<main>
<div id="canvas">
<CanvasBox
... |
fields/components/columns/ArrayColumn.js | lojack/keystone | import React from 'react';
import ItemsTableCell from '../../../admin/src/components/ItemsTableCell';
import ItemsTableValue from '../../../admin/src/components/ItemsTableValue';
var ArrayColumn = React.createClass({
displayName: 'ArrayColumn',
propTypes: {
col: React.PropTypes.object,
data: React.PropTypes.obje... |
app/components/LoadingIndicator/tests/Circle.test..js | activedecay/musical-meme | import React from 'react';
import expect from 'expect';
import { mount } from 'enzyme';
import Circle from '../Circle';
describe('<Circle />', () => {
it('should render an <div> tag', () => {
const renderedComponent = mount(<Circle />);
expect(renderedComponent.find('div').length).toEqual(1);
});
it('s... |
src/mixins/helpers.js | dptoot/react-slick | 'use strict';
import React from 'react';
import ReactDOM from 'react-dom';
import ReactTransitionEvents from 'react/lib/ReactTransitionEvents';
import {getTrackCSS, getTrackLeft, getTrackAnimateCSS} from './trackHelper';
import assign from 'object-assign';
var helpers = {
initialize: function (props) {
var slid... |
features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher/source/src/app/components/Apis/Create/FormComponents/TextArea.js | sambaheerathan/carbon-apimgt | /*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/li... |
react/learn/lesson3/main.js | fengnovo/diary | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App.jsx';
import Div1 from './Div1.jsx';
import Div2 from './Div2.jsx';
import Div3 from './Div3Props.jsx';
import LikeButton from './Div4State.jsx';
import Hello from './Div5DefaultProps.jsx';
import Div6StateAndProps from './Div6StateAnd... |
src/svg-icons/action/picture-in-picture.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPictureInPicture = (props) => (
<SvgIcon {...props}>
<path d="M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98V5c0-1.1-.9-2-2-2zm0 16.01H3V4.98h18v14.03z"/>
</SvgIcon>
... |
packages/material-ui-icons/src/FlashOn.js | dsslimshaddy/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from 'material-ui/SvgIcon';
let FlashOn = props =>
<SvgIcon {...props}>
<path d="M7 2v11h3v9l7-12h-4l4-8z" />
</SvgIcon>;
FlashOn = pure(FlashOn);
FlashOn.muiName = 'SvgIcon';
export default FlashOn;
|
src/components/GaugeChart/GaugeChart.js | Zoomdata/nhtsa-dashboard | import React, { Component } from 'react';
import echarts from 'echarts/lib/echarts';
import 'echarts/lib/chart/gauge';
export default class GaugeChart extends Component {
shouldComponentUpdate() {
return false;
}
componentWillReceiveProps(nextProps) {
if (!nextProps.data || !nextProps.max) {
return... |
examples/js/remote/remote-store-insert-row.js | echaouchna/react-bootstrap-tab | import React from 'react';
import RemoteInsertRow from './remote-insert-row';
function getProducts() {
const products = [];
const startId = products.length;
for (let i = 0; i < 12; i++) {
const id = startId + i;
products.push({
id: id,
name: 'Item name ' + id,
price: Math.floor((Math.ra... |
app/javascript/mastodon/containers/domain_container.js | gol-cha/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { blockDomain, unblockDomain } from '../actions/domain_blocks';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import Domain from '../components/domain';
import { openModal } from '../actions/modal';
const messages = d... |
app/components/Editor/EmptySpaceSlider.js | mswiszcz/pagebuilder | // @flow
import React, { Component } from 'react';
import styles from './EmptySpaceSlider.css';
export default class EmptySpaceSlider extends Component {
render() {
return (
<div className={styles.component}>
<div className={styles.slide}>
No file selected <br/>
</div>
</div... |
frontend/src/Settings/Profiles/Delay/DelayProfiles.js | geogolem/Radarr | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import FieldSet from 'Components/FieldSet';
import Icon from 'Components/Icon';
import Link from 'Components/Link/Link';
import Measure from 'Components/Measure';
import PageSectionContent from 'Components/Page/PageSectionContent';
import Scr... |
imports/client/ui/pages/Admin/AdminTable/Roles.js | mordka/fl-events | import React from 'react';
import { parseData } from './helper'
import RoleSelect from './../RoleSelect/index.js'
const Roles = ({ user, changeUserRole }) => {
const roles = parseData('role', user);
const UserName = parseData('user', user);
return (
<RoleSelect rolesData={roles} UserName={UserName} user={us... |
src/scenes/App/scenes/MapOverview/components/MapOverviewNav/index.js | jsza/tempus-website | import React from 'react'
import Immutable from 'immutable'
import {withRouter} from 'react-router'
import {NavLink} from 'react-router-dom'
import ZoneIcon from 'root/components/ZoneIcon'
import {prettyZoneName} from 'root/utils/TempusUtils'
import './styles.styl'
const zoneTypes = Immutable.List(['map', 'cours... |
test/TableSpec.js | jsbranco/react-materialize | /* global describe, it */
import React from 'react';
import { shallow } from 'enzyme';
import { assert } from 'chai';
import Table from '../src/Table';
const wrapper = shallow(
<Table
bordered
centered
hoverable
responsive
stripped
>
<tr>
<td>foo</td>
<td>bar</td>
</tr>
<... |
src/components/groups/GroupRolesListItem.js | mg4tv/mg4tv-web | import _ from 'lodash'
import React from 'react'
import {Link} from 'react-router-dom'
import {compose, withHandlers, withProps} from 'recompose'
import Username from '../users/Username'
const enhance = compose(
withProps('newRoleMember', 'updateNewRoleMember', ''),
withHandlers(
{
onNewRoleMemberChang... |
src/modules/AudioPlayerViewContainer.js | futurice/PelaryHemmo | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Player } from 'react-native-audio-toolkit';
const mapStateToProps = state => ({
isActive: state.getIn(['session', 'isActive']),
});
@connect(mapStateToProps)
export default class AudioPlayer... |
src/components/IndividualBook/IndividualBook.js | mikeadossi/Bookstore | import './individualBook.css'
import React from 'react'
import { Link } from 'react-router-dom';
import axios from 'axios';
export default class IndividualBook extends React.Component{
constructor(props) {
super(props)
this.state = {
title: props.title,
author_name: props.author_name,
list... |
InvertibleScrollView.js | exponentjs/react-native-invertible-scroll-view | import createReactClass from 'create-react-class';
import PropTypes from 'prop-types';
import React from 'react';
import cloneReferencedElement from 'react-clone-referenced-element';
import {
ScrollView,
StyleSheet,
View,
} from 'react-native';
import ScrollableMixin from 'react-native-scrollable-mixin';
type De... |
code/web/src/components/ZyxMain.js | zyxcambridge/RecordExistence | require('normalize.css/normalize.css');
// require('styles/ZyxApp.scss');
require('styles/App.scss');
// 不使用 ES6 的转译器
var ReactRouter = require('react-router')
var Router = ReactRouter.Router
var Route = ReactRouter.Route
var Link = ReactRouter.Link
import React from 'react';
import ReactDOM from 'react-dom';
import ... |
app/javascript/mastodon/features/account/components/action_bar.js | pfm-eyesightjp/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import DropdownMenuContainer from '../../../containers/dropdown_menu_container';
import Link from 'react-router-dom/Link';
import { defineMessages, injectIntl, FormattedMessage, FormattedNumber } f... |
src/svg-icons/image/filter-drama.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageFilterDrama = (props) => (
<SvgIcon {...props}>
<path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.61 5.64 5.36 8.04 2.35 8.36 0 10.9 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4... |
src/svg-icons/image/control-point.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageControlPoint = (props) => (
<SvgIcon {...props}>
<path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-... |
src/components/download-link.js | getinsomnia/website | import React from 'react';
import classnames from 'classnames';
import { links } from '../config';
import Link from './link';
class DownloadButton extends React.Component {
constructor(props) {
super(props);
this.state = {
platform: '__UNSET__'
};
}
componentDidMount() {
const isMobile = w... |
js/src/dapps/tokenreg/Accounts/AccountSelector/container.js | jesuscript/parity | // Copyright 2015, 2016 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any la... |
app/modules/components/game/game-ui/game-ui.js | alexmdodge/gridgrind | import React from 'react';
import './game-ui.scss';
const GameUI = () => (
<div className="gg-user-interface">
<h2 className="gg-moves-left">
<span id="update-moves-left">3</span>
<i className="fa fa-heart" />
Moves Left
</h2>
<h2 className="gg-current-level">
Lvl
<i classN... |
src/parser/mage/frost/modules/talents/LonelyWinter.js | sMteX/WoWAnalyzer | import React from 'react';
import SPELLS from 'common/SPELLS';
import Statistic from 'interface/statistics/Statistic';
import BoringSpellValueText from 'interface/statistics/components/BoringSpellValueText';
import STATISTIC_ORDER from 'interface/others/STATISTIC_ORDER';
import Analyzer from 'parser/core/Analyzer';
imp... |
src/components/Search/Search.js | shaohuawang2015/goldbeans-admin | import React from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom'
import styles from './Search.less'
import { Input, Select, Button, Icon } from 'antd'
class Search extends React.Component {
state = {
clearVisible: false,
selectValue: (this.props.select && this.props.selectProps) ... |
src/index.js | wallat/little-test | import React from 'react'
import { render } from 'react-dom'
import './index.css'
import '../semantic/dist/semantic.min.css';
import Exame from './Exame.js'
import Result from './Result.js'
import { Route, HashRouter } from 'react-router-dom'
let TO_ANSWER_GROUPS = require('.//GROUP_DEFINITION.json')
render(
<HashR... |
testClient/components/App.js | dmckirnan/ServerHive | import React from 'react';
import Stats from './Stats';
import { Component } from 'react';
import styles from '../styles/main.scss';
class App extends Component {
constructor() {
super()
this.state = {
authenticated: false,
username: '',
password: '',
stats: [],
}
this.login =... |
examples/tex/js/components/TeXEditorExample.js | davidchang/draft-js | /**
* Copyright (c) 2013-present, Facebook, Inc. All rights reserved.
*
* 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, INCL... |
fields/types/password/PasswordField.js | riyadhalnur/keystone | import React from 'react';
import Field from '../Field';
import { Button, FormInput, InputGroup } from 'elemental';
module.exports = Field.create({
displayName: 'PasswordField',
getInitialState () {
return {
passwordIsSet: this.props.value ? true : false,
showChangeUI: this.props.mode === 'create' ? true :... |
examples/real-world/index.js | clintonhalpin/redux | import 'babel-core/polyfill';
import React from 'react';
import Root from './containers/Root';
import BrowserHistory from 'react-router/lib/BrowserHistory';
React.render(
<Root history={new BrowserHistory()} />,
document.getElementById('root')
);
|
packages/material-ui-icons/legacy/SignalWifi3BarLockRounded.js | lgollut/material-ui | import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fillOpacity=".3" d="M15.5 14.5c0-2.8 2.2-5 5-5 .36 0 .71.04 1.05.11L23.64 7c-.45-.34-4.93-4-11.64-4C5.28 3 .81 6.66.36 7l10.08 12.56c.8 1 2.32 1 3.12 0l1.94-2.42V14.5z" /><path d="M15.5 1... |
yeondudad/Spinbox.js | react-2016/spinbox | import React from 'react';
class Spinbox extends React.Component {
/**
* Spinbox의 생성자
* @constructs
* @param {Spinbox.propTypes} props
*/
constructor(props) {
super(props);
this.state = {
value: this.props.initialValue
};
}
/**
* Spinbox을 렌... |
public/js/components/notifications/Notification.react.js | MadushikaPerera/Coupley | import React from 'react';
import ListItem from 'material-ui/lib/lists/list-item';
import Divider from 'material-ui/lib/divider';
import Avatar from 'material-ui/lib/avatar';
import Colors from 'material-ui/lib/styles/colors';
import IconButton from 'material-ui/lib/icon-button';
import MoreVertIcon from 'material-ui/l... |
test/unit/components/UI/Truncate.spec.js | LN-Zap/zap-desktop | import React from 'react'
import { renderWithTheme } from '@zap/test/unit/__helpers__/renderWithTheme'
import { Truncate } from 'components/Util'
describe('component.UI.Truncate', () => {
it('should truncate text to 12 chars by default', () => {
const tree = renderWithTheme(
<Truncate text="Lorem ipsum dol... |
modules/dreamview/frontend/src/components/DataRecorder/index.js | xiaoxq/apollo | import React from 'react';
import {
Tab, Tabs, TabList, TabPanel,
} from 'react-tabs';
import DriveEventEditor from 'components/DataRecorder/DriveEventEditor';
import AudioEventEditor from 'components/DataRecorder/AudioEventEditor';
export default class DataRecorder extends React.Component {
render() {
return... |
src/svg-icons/action/thumb-up.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionThumbUp = (props) => (
<SvgIcon {...props}>
<path d="M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-... |
src/components/echart.js | thbgh/antdPro | /**
* @Author: THB
* @Date: 2017-08-03 19:17:20 PM Thursday
* @Email: thbwork2016@gmail.com
* @Project: SDB
* @Filename: echart.js
* @Last modified by: THB
* @Last modified time: 2017-08-11 15:55:15 PM Friday
*/
import React, { Component } from 'react';
export default class myChart extends Component {
... |
test/SideNavItem.spec.js | react-materialize/react-materialize | import React from 'react';
// import { shallow } from 'enzyme';
import SideNavItem from '../src/SideNavItem';
function setup(props = {}, children) {
const propsIn = {
...props
};
const component = <SideNavItem {...propsIn}>{children}</SideNavItem>;
const wrapper = shallow(component);
const firstChild = w... |
src/svg-icons/social/school.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialSchool = (props) => (
<SvgIcon {...props}>
<path d="M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3L1 9l11 6 9-4.91V17h2V9L12 3z"/>
</SvgIcon>
);
SocialSchool = pure(SocialSchool);
SocialSchool.displayNa... |
src/svg-icons/editor/border-bottom.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderBottom = (props) => (
<SvgIcon {...props}>
<path d="M9 11H7v2h2v-2zm4 4h-2v2h2v-2zM9 3H7v2h2V3zm4 8h-2v2h2v-2zM5 3H3v2h2V3zm8 4h-2v2h2V7zm4 4h-2v2h2v-2zm-4-8h-2v2h2V3zm4 0h-2v2h2V3zm2 10h2v-2h-2v2zm... |
definitions/npm/expo-camera_v6.x.x/flow_v0.69.0-/test_expo-camera.js | flowtype/flow-typed | // @flow
import React from 'react';
import { it, describe } from 'flow-typed-test';
import { Camera, Constants } from 'expo-camera';
describe('opaque props', () => {
it('should passes when used properly', () => {
<Camera
type={Constants.Type.front}
flashMode={Constants.FlashMode.off}
autoFocus... |
CoreCRM/ClientApp/src/components/Layout/Footer.js | holmescn/CoreCRM | import React from 'react';
import styles from './Footer.less';
const Footer = () => (<div className={styles.footer}>CoreCRM ©right; 2017</div>);
export default Footer;
|
src/svg-icons/navigation/fullscreen.js | verdan/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NavigationFullscreen = (props) => (
<SvgIcon {...props}>
<path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/>
</SvgIcon>
);
NavigationFullscreen = pure(NavigationFullscre... |
packages/netlify-cms-widget-markdown/src/MarkdownControl/ToolbarButton.js | netlify/netlify-cms | import React from 'react';
import PropTypes from 'prop-types';
import styled from '@emotion/styled';
import { Icon, buttons } from 'netlify-cms-ui-default';
const StyledToolbarButton = styled.button`
${buttons.button};
display: inline-block;
padding: 6px;
border: none;
background-color: transparent;
font-s... |
src/DataTable/__tests__/TableHeader-test.js | tleunen/react-mdl | /* eslint-env mocha */
import chai, { expect } from 'chai';
import chaiEnzyme from 'chai-enzyme';
import sinon from 'sinon';
import { shallow } from 'enzyme';
import React from 'react';
import TableHeader from '../TableHeader';
import Tooltip from '../../Tooltip';
chai.use(chaiEnzyme());
describe('TableHeader', () =>... |
src/components/IngestionWizard/DropDownSelect.js | giux78/daf-dataportal | /**
*
* DropDownSelect
*
*/
import React from 'react';
class DropDownSelect extends React.Component { // eslint-disable-line react/prefer-stateless-function
transforToArray(input){
let array;
console.log('transforToArray: ' + input)
if(input.indexOf(",") !== -1){
array = input.split(",")
}... |
components/Job.js | amni/alanmni-portfolio | import React from 'react'
import { Link } from 'react-router'
import { prefixLink } from 'gatsby-helpers'
import Helmet from "react-helmet"
import { config } from 'config'
class Job extends React.Component {
constructor(props) {
super(props);
}
render () {
return (
<div style = {{marginTop: ... |
src/molecules/formfields/CheckboxWrapper/index.js | policygenius/athenaeum | import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import ErrorMessage from 'atoms/ErrorMessage';
import Layout from 'atoms/Layout';
import Col from 'atoms/Layout/Col';
import Text from 'atoms/Text';
import { renderTooltip } from 'utils/fieldUtils';
import styles from ... |
src/main/resources/code/react/Apps/ManageRadars/Pages/ManageRadarTemplatesPage/RadarTemplateDetails/RadarRingsComponent/radarRingMap/index.js | artieac/technologyradar | import React from 'react';
import { Link } from 'react-router-dom';
export const radarRingMap = (editMode, canAddOrDelete, handleNameChange, handleSortOrderChange, handleDeleteClick) => {
return [
{
title: 'Name',
key: 'name',
render: rowData => {
return <span><input type="text" classNa... |
src/containers/LoginPageContainer/LoginPageContainer.js | anvk/redux-portal-boilerplate | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { LoginPage } from '../../components';
import { push as pushRoute } from 'react-router-redux';
import * as loginPageActions from '../../actions/loginPageActions.js';
import { HOME_URL } from '../../constants/constants.js';
import to... |
client/modules/comments/components/.stories/comment_list.js | Entropy03/jianwei | import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import { setComposerStub } from 'react-komposer';
import CommentList from '../comment_list';
import CreateComment from '../../containers/create_comment';
// Create the stub for the composer.
setComposerStub(CreateComment, (props) => {
... |
docs/app/Examples/collections/Breadcrumb/index.js | jcarbo/stardust | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const BreadcrumbExamples = () => (
<div>
<ExampleSection title='Types'>
<ComponentExample
title='Breadcrumb'
... |
src/fields/DatePickerField.android.js | MichaelCereda/react-native-form-generator | 'use strict';
import React from 'react';
import ReactNative from 'react-native';
let { View, StyleSheet, TextInput, Text, PickerIOS} = ReactNative;
import {DatePickerComponent} from '../lib/DatePickerComponent';
export class DatePickerField extends React.Component{
setDate(date){
this.refs.datePickerComponent... |
webpack/components/NewTemplateSync/components/TextButtonField/FieldType.js | mmoll/foreman_templates | import React from 'react';
import PropTypes from 'prop-types';
import InputField from './InputField';
import SelectField from './SelectField';
import CheckboxField from './CheckboxField';
const FieldType = ({ item, fieldSelector, input, disabled, blank }) => {
if (!fieldSelector) {
return <InputField input={inp... |
definitions/npm/styled-components_v3.x.x/flow_v0.57.x-v0.74.x/test_styled-components_v3.x.x.js | doberkofler/flow-typed | // @flow
import {renderToString} from 'react-dom/server'
import styled, {
css,
ThemeProvider,
withTheme,
keyframes,
ServerStyleSheet,
StyleSheetManager
} from 'styled-components'
import React from 'react'
import type {
Theme,
Interpolation,
ReactComponentFunctional,
ReactComponentFunctionalUndefined... |
components/drawer/drawerSpacer.js | react-material-design/react-material-design | import React from 'react';
import PropTypes from 'prop-types';
import '@material/drawer/dist/mdc.drawer.css';
/** Drawer Spacer */
const DrawerSpacer = ({ children }) => (
<div className="mdc-drawer__toolbar-spacer">
{children}
</div>
);
DrawerSpacer.propTypes = {
children: PropTypes.any,
};
expor... |
templates/rubix/relay/relay-seed/src/common/footer.js | jeffthemaximum/jeffline | import React from 'react';
import {
Row,
Col,
Grid,
} from '@sketchpixy/rubix';
export default class Footer extends React.Component {
state = {
version: 0
};
componentDidMount() {
this.setState({
version: document.body.getAttribute('data-version')
});
}
render() {
var year = ne... |
frontend/src/Settings/MediaManagement/RootFolder/EditRootFolderModalContent.js | lidarr/Lidarr | import PropTypes from 'prop-types';
import React from 'react';
import ArtistMetadataProfilePopoverContent from 'AddArtist/ArtistMetadataProfilePopoverContent';
import ArtistMonitoringOptionsPopoverContent from 'AddArtist/ArtistMonitoringOptionsPopoverContent';
import Form from 'Components/Form/Form';
import FormGroup f... |
src/components/about-us/web-font.js | twreporter/twreporter-react | import React from 'react'
const typekitScripts = `
(function(d) {
var config = {
kitId: 'nal4paz',
scriptTimeout: 3000,
async: true
},
h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElem... |
app/components/modules/examples.module/index.js | omeryagmurlu/algoriv | import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { List, ListItem } from 'material-ui/List';
import IconButton from 'material-ui/IconButton';
import IconMenu from 'app/components/IconMenu';
import ActionDelete from 'material-ui/svg-icons/action/delete';
import ContentAdd from 'mater... |
src/svg-icons/maps/train.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsTrain = (props) => (
<SvgIcon {...props}>
<path d="M12 2c-4 0-8 .5-8 4v9.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h2.23l2-2H14l2 2h2v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V6c0-3.5-3.58-4-8-4zM7.5 17c-.83 0-1.5-.67-1.... |
src/components/Common/Spinner.js | MattMcFarland/tw-client | import React from 'react';
// ?lines=13&length=27&width=13&radius=42&scale=1.25&corners=1.0&opacity=0.20&rotate=0&direction=1&speed=1.3&trail=54&top=50&left=50&shadow=on&hwaccel=on
const opts = {
lines: 13 // The number of lines to draw
, length: 27 // The length of each line
, width: 13 // The line thickness
... |
packages/browser/src/components/DataTable/BooleanTermAggregation.js | appbaseio/dejaVu | // @flow
import React from 'react';
import { Popover } from 'antd';
import { MultiDataList } from '@appbaseio/reactivesearch';
import { css } from 'react-emotion';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faFilter } from '@fortawesome/free-solid-svg-icons';
import Flex from '../Flex'... |
cm19/ReactJS/your-first-react-app-exercises-master/exercise-17/friend-detail/FriendDetail.spec.js | Brandon-J-Campbell/codemash | import React from 'react';
import { MemoryRouter } from 'react-router-dom';
import ThemeProvider from '../theme/Provider';
import { render } from 'react-testing-library';
import FriendDetail from './FriendDetail';
describe('./friend-detail/FriendDetail', () => {
it('renders loading if friend isn`t loaded yet', (... |
docs/src/app/components/pages/components/RaisedButton/ExampleComplex.js | skarnecki/material-ui | import React from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import ActionAndroid from 'material-ui/svg-icons/action/android';
import FontIcon from 'material-ui/FontIcon';
const styles = {
button: {
margin: 12,
},
exampleImageInput: {
cursor: 'pointer',
position: 'absolute',
to... |
modules/dreamview/frontend/src/components/PNCMonitor/index.js | jinghaomiao/apollo | import React from 'react';
import {
Tab, Tabs, TabList, TabPanel,
} from 'react-tabs';
import ControlMonitor from 'components/PNCMonitor/ControlMonitor';
import LatencyMonitor from 'components/PNCMonitor/LatencyMonitor';
import PlanningMonitor from 'components/PNCMonitor/PlanningMonitor';
import StoryTellingMonitor ... |
demos/dinosaur-boutique/src/ButtonModal.js | jacobp100/state-transitions | import React from 'react';
import { TweenState } from '../../../src/index';
export default function List({ onClick, onClear, isActive, title, children }) {
let element;
if (isActive) {
element = (
<TweenState id={ title } key={ title + '-modal' } duration={ 0.3 }>
<div className="button-modal__... |
common/main-layout/NavBarDefault.js | gobble43/gobble-dist-web | import React from 'react';
import SearchBarContainer from './SearchBarContainer';
const NavbarDefault = () => (
<div className="navbar-auth navbar-wrapper">
<div className="navbar-menu pure-menu pure-menu-horizontal">
<a href="/" className="navbar-menu-heading pure-menu-heading">
<img className="na... |
example/App.js | phantomlds/react-native-maps | import React from 'react';
import {
Platform,
View,
StyleSheet,
TouchableOpacity,
ScrollView,
Text,
Switch,
} from 'react-native';
import { PROVIDER_GOOGLE, PROVIDER_DEFAULT } from 'react-native-maps';
import DisplayLatLng from './examples/DisplayLatLng';
import ViewsAsMarkers from './examples/ViewsAsMark... |
src/components/Footer/Footer.js | jlopezh/donation-project | import React from 'react';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './Footer.scss';
function Footer() {
return (
<div className={s.root}>
<div className={s.container}>
<span className={s.text}>© Jose Luis Lopez H</span>
</div>
</div>
);
}
export d... |
src/components/SegmentedControl.js | kidaa/elemental | import classnames from 'classnames';
import React from 'react';
module.exports = React.createClass({
displayName: 'SegmentedControl',
propTypes: {
className: React.PropTypes.string,
equalWidthSegments: React.PropTypes.bool,
onChange: React.PropTypes.func.isRequired,
options: React.PropTypes.array.isRequired... |
admin/client/App/App.js | jacargentina/keystone | /**
* The App component is the component that is rendered around all views, and
* contains common things like navigation, footer, etc.
*/
import React from 'react';
import MobileNavigation from './components/Navigation/Mobile';
import PrimaryNavigation from './components/Navigation/Primary';
import SecondaryNaviga... |
js/components/typography/index.js | soltrinox/MarketAuth.ReactNative |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Container, Header, Title, Content, Button, Icon, H1, H2, H3, Text } from 'native-base';
import { openDrawer } from '../../actions/drawer';
import styles from './styles';
class NHTypography extends Component { // eslint-disable... |
test/ListGroupSpec.js | johanneshilden/react-bootstrap | import React from 'react';
import ReactTestUtils from 'react/lib/ReactTestUtils';
import ListGroup from '../src/ListGroup';
import ListGroupItem from '../src/ListGroupItem';
describe('ListGroup', function () {
it('Should output a "div" with the class "list-group"', function () {
let instance = ReactTestUtils.re... |
src/utils/ownerWindow.js | sthawali/react-overlays | import React from 'react';
import ownerWindow from 'dom-helpers/ownerWindow';
export default function (componentOrElement) {
return ownerWindow(React.findDOMNode(componentOrElement));
}
|
src/routes/Member/routes/UpdatePassword/components/UpdatePassword.js | bang88/ant-console | /**
* SunEee
* @date Created on 11/12/15
* @author YuHui(语晖)<yuhui@suneee.com>
*/
import React from 'react';
import MainBody from 'components/MainBody';
export default class UpdatePassword extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
componentDid... |
front/app/app/App.js | nudoru/React-Starter-2-app | import React from 'react';
import { connect } from 'react-redux';
import { Either } from './utils/functional';
import { resetId } from './utils/ElementIDCreator';
import PleaseWaitModal from './rh-components/rh-PleaseWaitModal';
import { AppRouter } from './config/AppRouter';
const LoadingMessage = () =>
<PleaseWait... |
packages/wix-style-react/src/PopoverMenu/docs/index.story.js | wix/wix-style-react | /* eslint-disable no-console */
import React from 'react';
import {
api,
example,
columns,
description,
divider,
header,
importExample,
playground,
tab,
tabs,
title,
} from 'wix-storybook-utils/Sections';
import More from 'wix-ui-icons-common/More';
import Add from 'wix-ui-icons-common/Add';
imp... |
src/components/Auth/SignUp/SignUp.react.js | DravitLochan/accounts.susi.ai | import React, { Component } from 'react';
import Paper from 'material-ui/Paper';
import TextField from 'material-ui/TextField';
import RaisedButton from 'material-ui/RaisedButton';
import $ from 'jquery';
import './SignUp.css';
import AppBar from 'material-ui/AppBar';
import PasswordField from 'material-ui-password-fie... |
src/components/Login.js | Julzso23/player.me-one-click-share | import React from 'react';
import request from 'superagent';
import Spinner from './Spinner';
import Error from './Error';
import {withRouter} from 'react-router';
import '../styles/form.css';
class Login extends React.Component {
constructor(props) {
super(props);
this.state = {
name:... |
app/javascript/components/Filters/ReviewedFilter/component.js | thecartercenter/elmo | import React from 'react';
import PropTypes from 'prop-types';
import Button from 'react-bootstrap/Button';
import Form from 'react-bootstrap/Form';
import ButtonGroup from 'react-bootstrap/ButtonGroup';
import { inject, observer } from 'mobx-react';
import FilterOverlayTrigger from '../FilterOverlayTrigger/component'... |
client/routes.js | SwanCourses/Mokryi-Vlad | /* eslint-disable global-require */
import React from 'react';
import { Route, IndexRoute, IndexRedirect } from 'react-router';
import App from './modules/App/App';
import Product from './modules/Product/Product';
import { isAdmin, isLoggedIn } from './util/apiCaller';
// require.ensure polyfill for node
if (typeof re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.