path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
website/src/components/PostLink.js | davidsonfellipe/awesome-wpo | import React from 'react'
import styled from 'styled-components'
import Link from '../components/Link'
import ItemDate from '../components/ItemDate'
import { screen } from '../styles/screen'
const Date = styled(ItemDate)`
display: none;
${screen.md} {
display: inherit;
}
`
const PostLink = ({ post }) => ... |
src/server.js | namikingsoft/sample-react-server | import express from 'express'
import React from 'react'
import ReactDOMServer from 'react-dom/server'
import Counter from './components/Counter'
// init express
const app = express()
// add static path
app.use(express.static('public'))
// add top page routing
app.get('/', (req, res) => {
res.send(
ReactDOMServ... |
example/src/RuntimeAssets.js | rastapasta/react-native-gl-model-view | import React from 'react';
import {
ActivityIndicator,
View,
StyleSheet,
TouchableOpacity,
Text,
} from 'react-native';
import ModelView from 'react-native-gl-model-view';
import {Buffer} from 'buffer';
import axios from 'axios';
// XXX: This is the standard content header returned for a blob.
const octetStr... |
spec/javascripts/jsx/gradebook/default_gradebook/GradebookGrid/editors/TotalGradeOverrideCellEditor/EditableCellSpec.js | djbender/canvas-lms | /*
* Copyright (C) 2018 - 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... |
App/node_modules/react-native/Libraries/Components/MaskedView/MaskedViewIOS.ios.js | Dagers/React-Native-Differential-Updater | /**
* 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... |
src/svg-icons/action/perm-identity.js | pradel/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPermIdentity = (props) => (
<SvgIcon {...props}>
<path d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9... |
src/server.js | nbuechler/react-redux-universal-hot-example | import Express from 'express';
import React from 'react';
import Location from 'react-router/lib/Location';
import config from './config';
import favicon from 'serve-favicon';
import compression from 'compression';
import httpProxy from 'http-proxy';
import path from 'path';
import createStore from './redux/create';
im... |
app/components/shared/submenu-item.js | soundglom/getmusiclive | import React from 'react';
const MenuItem = (props) => {
let
return (
<li>
<a>{props.title}</a>
<ul className='vertical accordion menu' children={} />
</li>
);
};
|
docs/src/app/components/pages/components/AppBar/ExampleIcon.js | mtsandeep/material-ui | import React from 'react';
import AppBar from 'material-ui/AppBar';
/**
* A simple example of `AppBar` with an icon on the right.
* By default, the left icon is a navigation-menu.
*/
const AppBarExampleIcon = () => (
<AppBar
title="Title"
iconClassNameRight="muidocs-icon-navigation-expand-more"
/>
);
e... |
client/src/app/components/markedDisplay.js | FrontSmith/FSFramework | import React from 'react';
import marked from 'marked';
export default React.createClass( {
render() {
return (
<div className="marked-display"
dangerouslySetInnerHTML={{
__html: this.unsafeContent()
}}
>
</div>
... |
examples/redirect-using-index/app.js | ThibWeb/react-router | import React from 'react';
import { Router, Route, IndexRoute, Link } from 'react-router';
var App = React.createClass({
render() {
return (
<div>
{this.props.children}
</div>
);
}
});
var Index = React.createClass({
render () {
return (
<div>
<h1>You should not se... |
src/components/Earth.js | mbondyra/spells | import React from 'react'
import {Entity} from 'aframe-react'
export default props => (
<Entity
material={{
color: 'blue'
}}
position={[0,-20, 0]}
geometry={
{ primitive:"plane"
, width: "200000"
, height: "200000"
}
}
rotation={[-90, 0, 0]}
>
</Entity>
)
|
themes/genius/Genius 2.3.1 Bootstrap 4/React_Starter/src/containers/Full/Full.js | davidchristie/kaenga-housing-calculator | import React, { Component } from 'react';
import Header from '../../components/Header/';
import Sidebar from '../../components/Sidebar/';
import Aside from '../../components/Aside/';
import Footer from '../../components/Footer/';
import Breadcrumbs from 'react-breadcrumbs';
class Full extends Component {
render() {... |
src/components/menu/modals/settings.js | aautem/aa | import React from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { Dimensions, Modal, View, Text, Slider, Switch, ActivityIndicator, TouchableOpacity, TouchableHighlight, Picker } from 'react-native';
import { Grid, Col, Row } from ... |
app/javascript/mastodon/components/admin/ReportReasonSelector.js | ashfurrow/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import api from 'mastodon/api';
import { injectIntl, defineMessages } from 'react-intl';
import classNames from 'classnames';
const messages = defineMessages({
other: { id: 'report.categories.other', defaultMessage: 'Other' },
spam: { id: 'report.categ... |
app/components/AuthenticatedComponent.js | scalegray/scalegray |
import React from 'react';
import LoginStore from '../stores/LoginStore';
export default (ComposedComponent) => {
return class AuthenticatedComponent extends React.Component {
static willTransitionTo(transition) {
if (!LoginStore.isLoggedIn()) {
transition.redirect('/login', {}, {'nextPath' : tra... |
app/containers/LanguageProvider/index.js | perry-ugroop/ugroop-react-dup2 | /*
*
* LanguageProvider
*
* this component connects the redux state language locale to the
* IntlProvider component and i18n messages (loaded from `app/translations`)
*/
import React from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { IntlProvider } from 'reac... |
lib/components/user/monitored-trip/trip-status-rendering-strategies/base-renderer.js | opentripplanner/otp-react-redux | import { FormattedMessage } from 'react-intl'
import moment from 'moment'
import React from 'react'
import FormattedDuration from '../../../util/formatted-duration'
/**
* Calculate commonly-used pieces of data used to render the trip status
* component. The monitoredTrip param can be undefined.
*/
export default f... |
src/views/components/ConsoleInterface.js | physiii/home-gateway | import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import Api from '../../api.js';
import {getServicesByType} from '../../state/ducks/services-list/selectors.js';
import {getDeviceById} from '../../state/ducks/devices-list/selectors.js';
const LABEL_STYLE = 'color: #888... |
app/routes.js | shawnxusy/git-dashboard | /* jshint esnext:true */
import React from 'react';
import {Route, IndexRoute} from 'react-router';
import alt from './alt';
import App from './components/App';
import Home from './components/Home';
import Stats from './components/Stats';
import Character from './components/Character';
import CharacterList from './com... |
src/media/js/site/containers/devAgreement.js | diox/marketplace-content-tools | /*
Container that allows users who have signed the terms of service to review
its contents.
*/
import React from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {getTOS, signTOS} from '../actions/tos';
import {Page} from '../components/page';
import TOSIframe from '..... |
generators/app/templates/src/utils/createForm.js | gmmendezp/generator-nyssa-fe | import React, { Component } from 'react';
import { Field, reduxForm } from 'redux-form';
import { style } from 'typestyle';
import { FIELD_NAME, FIELD_TYPE, FIELD_COMPONENTS } from './form';
import Button from 'react-md/lib/Buttons/Button';
/**
* Create a form the following way: createForm(options)
* Options should ... |
webapp-src/src/Login/Buttons.js | babelouest/glewlwyd | import React, { Component } from 'react';
import i18next from 'i18next';
import apiManager from '../lib/APIManager';
import messageDispatcher from '../lib/MessageDispatcher';
class Buttons extends Component {
constructor (props) {
super(props);
this.state = {
config: props.config,
userList: prop... |
app/javascript/mastodon/components/poll.js | yukimochi/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import classNames from 'classnames';
import Motion fr... |
src/components/body.js | chenzejiang/web-response |
import React from 'react';
import { connect } from 'react-redux';
import { changeShowIndex, addCount, changeUrl } from '../actions';
//import { checkUrl } from '';
import { checkUrl } from '../utils/util';
const Body = React.createClass({
getInitialState: function(){
return {year:(new Date()).getFullYear(... |
modules/gui/src/widget/toolbar/panelButtonContext.js | openforis/sepal | import React from 'react'
export const PanelButtonContext = React.createContext()
|
src/components/Header.js | jhkmjnhamster/vcash-electron | import React from 'react'
import { translate } from 'react-i18next'
import { withRouter } from 'react-router-dom'
import { inject, observer } from 'mobx-react'
import { Menu } from 'antd'
/** Required components. */
import WalletLock from './WalletLock'
import WalletUnlock from './WalletUnlock'
@translate(['wallet'],... |
react/features/toolbox/components/Notice.js | parisjulien/arkadin-jitsimeet | /* @flow */
import React, { Component } from 'react';
declare var config: Object;
/**
* Notice react component.
*
* @class Notice
*/
export default class Notice extends Component {
state: Object;
/**
* Constructor of Notice component.
*
* @param {Object} props - The read-only React Compon... |
client/components/image_score.js | lewis831/images | import React from 'react';
const ImageScore = (props) => {
//props.ups is the number of upvotes
//props.downs is the number of downvotes
const { ups, downs } = props;
const upsPercent = `${100 * (ups / (ups + downs))}%`;
const downsPercent = `${100 * (downs / (ups + downs))}%`;
return (
<div>
... |
docs/pages/api-docs/popper.js | lgollut/material-ui | import React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import { prepareMarkdown } from 'docs/src/modules/utils/parseMarkdown';
const pageFilename = 'api/popper';
const requireRaw = require.context('!raw-loader!./', false, /\/popper\.md$/);
export default function Page({ docs }... |
src/server/controllers/public.js | cmseguin/react-express-boilerplate | import { match, RouterContext } from 'react-router'
import _ from 'lodash'
import environment from '~/server/services/environment'
import express from 'express'
import minifyHTML from 'express-minify-html'
import { renderToString } from 'react-dom/server'
import React from 'react'
import routes from '~/app/router'
// ... |
src/components/actionLayer/ActionLayer.js | numb86/image-editor | // @flow
import React from 'react';
import DrawLineLayer from './DrawLineLayer';
import EraserLayer from './EraserLayer';
import type {DisplayType} from '../Display';
import type {MouseMoveActionLayerSetting} from '../../state/generateActionLayerSettings';
export const DRAW_LINE: 'drawLine' = 'drawLine';
export cons... |
tests/containers/TodoListContainer.spec.js | tenshiemi/DoDidDone | import React from 'react';
import TodoListContainer from 'containers/TodoListContainer';
import { shallow } from 'enzyme';
describe.skip('(Container) TodoListContainer', () => {
let _props, _wrapper;
beforeEach(() => {
_props = {
todoItems: []
}
_wrapper = shallow(<TodoListContainer { ..._prop... |
src/img/book.js | everywherebible/app | import React from 'react';
export default props =>
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 23 23" {...props}>
<path fill="#000" d="M4.2 7.2h12.2V20H4.2z"/>
<path fill="#fff" d="M18 3H7c-.3 0-.5 0-.7.3l-3 3c-.2.2-.3.4-.3.7v11c0 1.7 1.3 3 3 3h9c1.3 0 2.4-.8 2.8-2h.7c1.4 0 2.... |
code/web/node_modules/react-bootstrap/es/ModalBody.js | zyxcambridge/RecordExistence | import _extends from 'babel-runtime/helpers/extends';
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from ... |
src/lib/test/headinjectscript.spec.js | BruceGitHub/react-headinjectscript |
import React from 'react';
import { mount, shallow, render } from 'enzyme';
import { expect } from 'chai';
import sinon from 'sinon';
import jsdom from 'jsdom';
import HeadInjectScript from './../headinjectscript';
const srcTest = 'xxx';
const srcArrayTest = [
'xxx',
'yyy',
];
const srcMap = 'https://maps.goog... |
TestPage.js | FunctionFoundry/react-partial-table | /**
* Copyright (c) 2015, Peter W Moresi
*/
import React from 'react';
import {Table, Column} from './Table';
import Colors from './CrayolaColors';
/* Write some great components about what data
* this application presents and how it needs to be
* organized.
*/
export default class TestPage extends React.Componen... |
src/components/Page/Page.js | bobbybeckner/ha-catalyst-test | /**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-... |
src/js/components/icons/base/CircleInformation.js | odedre/grommet-final | /**
* @description CircleInformation SVG Icon.
* @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon.
* @property {string} colorIndex - The color identifier to use for the stroke color.
* If not specified, this component will default to muiTheme.palette.textCol... |
test/date-picker/calendar-spec.js | 2947721120/material-ui | import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
import React from 'react';
import ReactDOM from 'react-dom';
import Calendar from 'date-picker/calendar';
import CalendarToolbar from 'date-picker/calendar-toolbar';
import IconButton from 'icon-button';
import injectTheme from '../fixt... |
app/packs/src/components/PubchemLcss.js | ComPlat/chemotion_ELN | import React from 'react';
import { Button, Row, Col } from 'react-bootstrap';
import PropTypes from 'prop-types';
import { concat, uniqBy } from 'lodash';
import PubchemSigns from './PubchemSigns';
const PubchemLcss = ({
cid, informArray
}) => {
const sourceRoot = 'https://pubchem.ncbi.nlm.nih.gov';
let imgWH =... |
test/integration/build-output/fixtures/with-error/pages/_error.js | azukaru/next.js | import React from 'react'
function Error({ statusCode }) {
return (
<p>
{statusCode
? `An error ${statusCode} occurred on server`
: 'An error occurred on client'}
</p>
)
}
Error.getInitialProps = ({ res, err }) => {
const statusCode = res ? res.statusCode : err ? err.statusCode : 4... |
src/routes/crmaccount/List.js | vincentdd/crm | /**
* Created by wxy on 2017/9/24.
*/
import React from 'react'
import moment from 'moment'
import PropTypes from 'prop-types'
import {
Table,
Icon,
Modal,
} from 'antd'
import {
DropOption
} from 'components'
const confirm = Modal.confirm
const List = ({
onEditItem,
onUpdateStatusItem,
...tableProps
... |
src/Pagination.js | zanjs/react-ui | 'use strict'
import React from 'react'
import classnames from 'classnames'
import { forEach } from './utils/objects'
import { requireCss } from './themes'
requireCss('pagination')
export default class Pagination extends React.Component {
static displayName = 'Pagination'
static propTypes = {
className: Reac... |
test/specs/elements/Step/StepContent-test.js | jamiehill/stardust | import faker from 'faker'
import React from 'react'
import * as common from 'test/specs/commonTests'
import StepContent from 'src/elements/Step/StepContent'
import StepDescription from 'src/elements/Step/StepDescription'
import StepTitle from 'src/elements/Step/StepTitle'
describe('StepContent', () => {
common.isCo... |
src/screen/PowerSource/components/InstrumentCluster.js | wavicles/fossasia-pslab-apps | import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Card, Button, Typography, Divider } from '@material-ui/core';
import PlusIcon from '@material-ui/icons/Add';
import MinusIcon from '@material-ui/icons/Remove';
import { withStyles } from '@material-ui/... |
src/components/Header.js | tuanvt/asterixlab | import React from 'react';
import $ from 'jquery';
var logoImage = require('../images/logo.png');
class Header extends React.Component {
constructor(props) {
super(props);
}
componentDidMount(){
}
render () {
return (
<div className="top-border">
<div className="w-row">... |
src/containers/options/Filtering/DomainFilter.js | wrleskovec/thoughtcrime | import React from 'react';
import { connect } from 'react-redux';
import { openModal, searchSites, sortSites, deleteSite, saveChangesModal }
from '~/actions/options.js';
import { fetchSites, } from '~/actions/common.js';
import SearchSiteDB from '~/components/SearchSiteDB.js';
import SearchRecordsBox from '~/componen... |
src/svg-icons/maps/local-movies.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalMovies = (props) => (
<SvgIcon {...props}>
<path d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"/>
</Svg... |
sketch/src/components/URLGroup.js | preciousforever/sketch-data-populator | import React from 'react'
import './URLGroup.scss'
import Strings, * as STRINGS from '@data-populator/core/strings'
import classNames from 'classnames'
import Title from './Title'
import TextField from './TextField'
import Button from './Button'
import HeadersList from './HeadersList'
import * as OPTIONS from '../libr... |
client/routes.js | JSVillage/military-families-backend | import React from 'react';
import {Route, IndexRoute} from 'react-router';
import MasterPage from './components/MasterPage';
import HomeContainer from './components/home/HomeContainer';
import AboutContainer from './components/about/AboutContainer';
import ContactContainer from './components/contact/ContactContainer';
... |
docs/src/app/components/pages/components/Snackbar/Page.js | frnk94/material-ui | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import SnackbarReadmeText from './README';
import SnackbarExampleSimple from './... |
docs/app/Examples/elements/Segment/Variations/SegmentExampleAttached.js | aabustamante/Semantic-UI-React | import React from 'react'
import { Segment } from 'semantic-ui-react'
const SegmentExampleAttached = () => (
<div>
<Segment attached='top'>
This segment is on top
</Segment>
<Segment attached>
This segment is attached on both sides
</Segment>
<Segment attached='bottom'>
This seg... |
src/js/components/icons/base/PlatformFreebsd.js | odedre/grommet-final | /**
* @description PlatformFreebsd SVG Icon.
* @property {string} a11yTitle - Accessibility Title. If not set uses the default title of the status icon.
* @property {string} colorIndex - The color identifier to use for the stroke color.
* If not specified, this component will default to muiTheme.palette.textColor... |
src/routes/account/Admin/index.js | pmg1989/dva-admin | import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'dva'
import { checkPower } from 'utils'
import { ADD, UPDATE, DELETE } from 'constants/options'
import AdminList from './List'
import AdminSearch from './Search'
import AdminModal from './ModalForm'
const namespace = 'accountAdmin'
... |
examples/sharedlinks/sharedlinks-webapp/src/App.js | szopu/django-rest-registration | import React, { Component } from 'react';
import { Router, Route } from 'react-router-dom'
import createBrowserHistory from 'history/createBrowserHistory';
import PropTypes from 'prop-types';
import AppBar from 'material-ui/AppBar';
import IconButton from 'material-ui/IconButton';
import IconMenu from 'material-ui/Ico... |
client/src/scenes/RoomPage/index.js | RudthMael/chatx | import React from 'react';
import { connect } from 'react-redux';
import { joinRoom, sendMessage } from '../../actions';
import { getRoom } from '../../selectors';
import MessagesList from './MessagesList';
import UsersList from './UsersList';
import './index.css';
class RoomPage extends React.Component {
static pr... |
src/routes/Admin/routes/LessonList/components/LessonListView.js | eunvanz/flowerhada | import React from 'react'
import { Link } from 'react-router'
class LessonListView extends React.Component {
componentDidMount () {
this.props.fetchLessons()
}
render () {
const renderList = () => {
return this.props.lessonList.map(lesson => {
return (
<tr key={lesson.id}>
... |
src/pages/about.js | frintjs/frint.js.org | import React from 'react';
const contributorsJson = require('../static/data/contributors.json');
const About = () => {
const renderContributors = (contributors) => {
if (contributors.length > 0) {
return contributors.map(contributor => (
<div className="column is-one-quarter" key={contributor.logi... |
src/svg-icons/notification/airline-seat-flat.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let NotificationAirlineSeatFlat = (props) => (
<SvgIcon {...props}>
<path d="M22 11v2H9V7h9c2.21 0 4 1.79 4 4zM2 14v2h6v2h8v-2h6v-2H2zm5.14-1.9c1.16-1.19 1.14-3.08-.04-4.24-1.19-1.16-3.08-1.14-4.24.04-1.16 1.19-1.1... |
app/javascript/mastodon/components/hashtag.js | dwango/mastodon | import React from 'react';
import { Sparklines, SparklinesCurve } from 'react-sparklines';
import { Link } from 'react-router-dom';
import { FormattedMessage } from 'react-intl';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { shortNumberFormat } from '../utils/numbers';
const Hashtag = ({ hashtag... |
assets/jqwidgets/demos/react/app/docking/righttoleftlayout/app.js | juannelisalde/holter | import React from 'react';
import ReactDOM from 'react-dom';
import JqxTabs from '../../../jqwidgets-react/react_jqxtabs.js';
import JqxPanel from '../../../jqwidgets-react/react_jqxpanel.js';
import JqxDocking from '../../../jqwidgets-react/react_jqxdocking.js';
import JqxCalendar from '../../../jqwidgets-react/react... |
packages/veritone-react-common/src/components/CopyPrompt/index.js | veritone/veritone-sdk | import React from 'react';
import { isString } from 'lodash';
import Clipboard from 'clipboard';
import Button from '@material-ui/core/Button';
import { withStyles } from '@material-ui/styles';
import { node, string, shape, arrayOf, oneOfType, bool, any } from 'prop-types';
import styles from './styles';
class CopyPr... |
app/assets/javascripts/components/story/CollapsedStory/CollapsedStoryStateButton.js | Codeminer42/cm42-central | import React from 'react'
import PropTypes from 'prop-types';
const CollapsedStoryStateButton = ({ action, onUpdate }) => (
<button type="button"
className={`Story__btn Story__btn--${action}`}
onClick={onUpdate}
>
{I18n.t(`story.events.${action}`)}
</button>
);
CollapsedStoryStateButton.propTypes = ... |
packages/my-joy-instances/src/components/create-instance/__tests__/title.spec.js | geek/joyent-portal | import React from 'react';
import renderer from 'react-test-renderer';
import 'jest-styled-components';
import { NameIcon } from 'joyent-ui-toolkit';
import Title from '../title';
import Theme from '@mocks/theme';
it('renders <Title /> without throwing', () => {
expect(
renderer
.create(
<Theme>
... |
packages/@lyra/form-builder/src/inputs/InvalidValueInput/InvalidValueInput.js | VegaPublish/vega-studio | import PropTypes from 'prop-types'
import React from 'react'
import DefaultButton from 'part:@lyra/components/buttons/default'
import Details from '../common/Details'
import styles from './InvalidValueInput.css'
import PatchEvent, {set, unset} from '../../PatchEvent'
import CONVERTERS from './converters'
const setAuto... |
App/Components/PassphraseModal.js | bretth18/PresidioWallet | import { View } from 'react-native';
import React, { Component } from 'react';
import { Container, Content, ListItem, List, Text } from 'native-base';
import { Actions } from 'react-native-router-flux';
class PassphraseModal extends Component {
constructor(props) {
super(props);
// this.dismissModal = t... |
app/javascript/mastodon/features/compose/components/search_results.js | foozmeat/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
import AccountContainer from '../../../containers/account_container';
import StatusContainer from '../../../containers/status_container';
import { Link } from 'react-router-dom';
import ... |
cpv-ui/src/components/SideDrawer/DrawerToggleButton.js | zkouba/cinema-program-viewer | import React from 'react';
import './DrawerToggleButton.css'
const DrawerToggleButton = (props) => {
return (
<button className="toggle_button" onClick={props.click}>
<div className="toggle_button_line"></div>
<div className="toggle_button_line"></div>
<div className="toggle_button_line"></div>
</button... |
ui/src/components/workflow/WorkflowMetaList.js | grfeng/conductor | import React from 'react';
import { Link } from 'react-router';
import { connect } from 'react-redux';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
import { getWorkflowDefs } from '../../actions/WorkflowActions';
class WorkflowMetaList extends React.Component {
state = {
workflows: ... |
app/javascript/mastodon/features/ui/components/upload_area.js | kirakiratter/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import { FormattedMessage } from 'react-intl';
export default class UploadArea extends React.PureComponent {
static propTypes = {
active: PropTypes.boo... |
packages/icons/src/md/maps/Map.js | suitejs/suitejs | import React from 'react';
import IconBase from '@suitejs/icon-base';
function MdMap(props) {
return (
<IconBase viewBox="0 0 48 48" {...props}>
<path d="M41 6c.55 0 1 .45 1 1v30.24c0 .46-.3.82-.72.97L30 42l-12-4.2-10.69 4.15A1.003 1.003 0 0 1 6 41V10.76c0-.46.31-.82.73-.96L18 6l12 4.2 10.69-4.15c.1-.04.2-... |
src/sub-apps/easy-brew-calculator/components/result-block.js | musicbender/mug-math | import React from 'react';
export default ({
name,
label,
value,
unit,
}) => {
return (
<div className={`result-block-${name}`}>
<p className="label">{label}</p>
<p className="value">{value}</p>
<p className="unit">{unit}</p>
</div>
);
}
|
src/Stepper/Step.spec.js | pomerantsev/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import Step from './Step';
import getMuiTheme from '../styles/getMuiTheme';
describe('<Step />', () => {
const muiTheme = getMuiTheme();
const shallowWithContext = (node, context = {}) => {
return sha... |
example/examples/FitToCoordinates.js | azt3k/react-native-maps | import React from 'react';
import {
StyleSheet,
View,
Dimensions,
TouchableOpacity,
Text,
} from 'react-native';
import MapView from 'react-native-maps';
const { width, height } = Dimensions.get('window');
const ASPECT_RATIO = width / height;
const LATITUDE = 37.78825;
const LONGITUDE = -122.4324;
const LA... |
examples/src/AsyncConnectExample/web.js | R1ZZU/react-native-webview-messaging | import React from 'react';
import { render } from 'react-dom';
import { connectToRemote } from 'react-native-webview-messaging/web';
class App extends React.Component {
state = {
connected: false,
connecting: false,
}
render() {
return (
<div style={{ textAlign: 'center' }}>
{ this.sta... |
client/src/font/tests/Icons-story.js | silverstripe/silverstripe-admin | /* global document */
import React from 'react';
// eslint-disable-next-line import/no-extraneous-dependencies
import { storiesOf } from '@storybook/react';
import content from '../icons-reference.html';
/**
* Config for grouping icons into different sections of the story
*/
const groups = [{
title: 'Page icons',... |
app/src/js/app.js | YannickDot/redux-websocket-example | import React from 'react';
import { createStore, combineReducers, applyMiddleware, compose } from 'redux';
import { devTools, persistState } from 'redux-devtools';
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
import { Provider } from 'react-redux';
import thunk from 'redux-thunk';
impor... |
examples/transitions/app.js | SpainTrain/react-router | import React from 'react';
import { Router, Route, Link, History, Lifecycle } from 'react-router';
var App = React.createClass({
render() {
return (
<div>
<ul>
<li><Link to="/dashboard">Dashboard</Link></li>
<li><Link to="/form">Form</Link></li>
</ul>
{this.props... |
client/entry.js | GORDON17/py_rrfm_re |
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import jss from 'jss';
import jssVendorPrefixer from 'jss-vendor-prefixer';
import jssPx from 'jss-px';
import jssNested from 'jss-nested';
import jssCamelCase from 'jss-camel-case';
import { Provider } from 'react-redux';
import { ... |
src/js/components/icons/base/Checkbox.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... |
lib/Runtime.js | jirokun/survey-designer-js | /* eslint-env browser,jquery */
import 'babel-polyfill';
import 'classlist-polyfill';
import Raven from 'raven-js';
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import 'tooltipster/dist/css/tooltipster.bundle.min.css';
import EnqueteRuntimeApp from './runtime/co... |
pages/advanced/content/size.js | CarlRosell/glamorous-website | module.exports = {
title: 'Optimizing Bundle Size',
description: `
If your use case is really size constrained, then you might consider using the "tiny" version of glamorous for your application.
It is a miniature version of ~glamorous~ with a few limitations:
1. No built-in component factories (~glamo... |
SentenceMosaics/app/components/Help.js | DFAxCMU/sentence-mosaics | 'use strict';
import React, { Component } from 'react';
import {
View,
ScrollView,
Text,
} from 'react-native';
import { styles } from '../styles';
import { connect } from 'react-redux';
import Question from './Question';
if (global.globalDeviceType == 'iPad') {
var headingSize = 48;
var bodySize = 20;
} ... |
definitions/npm/styled-components_v3.x.x/flow_v0.104.x-/test_styled-components_native_v3.x.x.js | splodingsocks/FlowTyped | // @flow
import nativeStyled, {
ThemeProvider as NativeThemeProvider,
withTheme as nativeWithTheme,
keyframes as nativeKeyframes,
} from 'styled-components/native'
import React from 'react'
import type {
Theme as NativeTheme,
Interpolation as NativeInterpolation,
ReactComponentFunctional as NativeReactCompo... |
src/js/containers/Export/Export.js | akonyushevskiy/matchmaking | import './Export.scss';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router';
import moment from 'moment';
import _ from 'lodash';
import { fetchMatch, ROOT_URL } from '../../actions/index';
import Icon from '../../components/Icon.js';
function mapState... |
contrib/webui/src/paper/view/container.js | roscopecoltran/papernet | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { browserHistory } from 'react-router';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { TEAMS_FETCH, TEAMS_SHARE, teamPropType } from 'profile/teams/constants';
import { pape... |
react_state/__tests__/index.android.js | devSC/react-native | 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 />
);
});
|
_seraphim/src/elements/sphere/Barrier.js | goldbuick/src | import React from 'react';
import * as THREE from 'three';
import Draft from 'viz/Draft';
import tween from 'anim/tween';
import GenAlgo from 'viz/GenAlgo';
import GenPoints from 'viz/GenPoints';
import Projection from 'viz/Projection';
import RenderObject from 'render/RenderObject';
import BarrierGem from './BarrierG... |
tests/react_native_tests/test_data/native_code/ToolbarWithActions/storybook/stories/FilterIcon/index.js | ibhubs/sketch-components | import React from 'react'
import { storiesOf } from '@storybook/react-native'
import { action } from '@storybook/addon-actions'
import { linkTo } from '@storybook/addon-links'
import SvgComponent from 'app/icons/FilterIcon'
storiesOf('FilterIcon', module)
.add('default', () => (
<FilterIcon></FilterIcon>)) |
src/components/IrcButton.js | janimattiellonen/renoirc | import React from 'react';
import {Button} from 'react-bootstrap';
export default class IrcButton extends Button {
}
|
src/svg-icons/device/gps-off.js | owencm/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceGpsOff = (props) => (
<SvgIcon {...props}>
<path d="M20.94 11c-.46-4.17-3.77-7.48-7.94-7.94V1h-2v2.06c-1.13.12-2.19.46-3.16.97l1.5 1.5C10.16 5.19 11.06 5 12 5c3.87 0 7 3.13 7 7 0 .94-.19 1.84-.52 2.65l1.5... |
src/Paper/Paper.spec.js | tan-jerene/material-ui | /* eslint-env mocha */
import React from 'react';
import {shallow} from 'enzyme';
import {assert} from 'chai';
import Paper from './Paper';
import getMuiTheme from '../styles/getMuiTheme';
describe('<Paper />', () => {
const muiTheme = getMuiTheme();
const shallowWithContext = (node) => shallow(node, {context: {mu... |
App/Client/node_modules/react-router/es6/IndexRedirect.js | qianyuchang/React-Chat | 'use strict';
import React from 'react';
import warning from './routerWarning';
import invariant from 'invariant';
import Redirect from './Redirect';
import { falsy } from './PropTypes';
var _React$PropTypes = React.PropTypes;
var string = _React$PropTypes.string;
var object = _React$PropTypes.object;
/**
* An <Ind... |
src/components/footer/FooterRenderables.js | ello/webapp | import React from 'react'
import PropTypes from 'prop-types'
import classNames from 'classnames'
import { ChevronIcon, ListIcon, GridIcon, RSSIcon } from '../assets/Icons'
import { FooterForm, FooterLink, FooterTool } from '../footer/FooterParts'
import { before, css, media, modifier, parent, select } from '../../style... |
modules/RouteContext.js | tkirda/react-router | import React from 'react'
const { object } = React.PropTypes
/**
* The RouteContext mixin provides a convenient way for route
* components to set the route in context. This is needed for
* routes that render elements that want to use the Lifecycle
* mixin to prevent transitions.
*/
const RouteContext = {
prop... |
src/app/features/layout/components/layout.spec.js | caelwinner/invoicer-ui | import React from 'react';
import { render, shallow } from 'enzyme';
import Layout from './layout';
import SideBar from './side-bar';
import MainContent from './main-content';
describe('Layout tests', () => {
it('should contains Side Bar', () => {
const wrapper = shallow(<Layout />);
expect(wrapper.contain... |
example/src/scripts/pages/UIKit/ButtonGroups/index.js | vyorkin-personal/erlyeditor | import React from 'react';
import css from 'react-css-modules';
import { ButtonGroup, Button, tooltip } from 'erlyeditor';
import styles from './styles';
const TooltipButton = tooltip(Button);
export const ButtonGroups = () => (
<ul styleName='button-group-demo'>
<li>
<ButtonGroup filled small>
<... |
client/app/main.js | rcarrillopadron/jspm-demo | /**
* Created by Roberto on 9/22/2015.
*/
import 'whatwg-fetch';
import React from 'react';
import RepositoryList from './repository-list';
class HelloWorld extends React.Component{
render() {
return (
<div>
<h2>Open source</h2>
<RepositoryList />
<... |
packages/material/src/inputs/Input.js | wq/wq.app | import React from 'react';
import { Field } from 'formik';
import { TextField } from 'formik-material-ui';
import { useHtmlInput } from '@wq/react';
import PropTypes from 'prop-types';
export default function Input({ hint, inputProps, ...rest }) {
const { name, type, maxLength } = useHtmlInput(rest);
return (
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.