path stringlengths 5 296 | repo_name stringlengths 5 85 | content stringlengths 25 1.05M |
|---|---|---|
client/app/scripts/charts/nodes-error.js | alban/scope | import React from 'react';
import classnames from 'classnames';
const NodesError = ({
children, faIconClass, hidden, mainClassName = 'nodes-chart-error'
}) => {
const className = classnames(mainClassName, {
hide: hidden
});
const iconClassName = `fa ${faIconClass}`;
return (
<div className={classNam... |
src/components/LinkInfo/LinkInfo.js | hack-duke/hackduke-portal | import React from 'react'
import classes from './LinkInfo.scss'
import { intersperse } from 'extensions/stringUtils'
class LinkInfo extends React.Component {
static propTypes = {
links: React.PropTypes.array.isRequired,
titles: React.PropTypes.array.isRequired
}
prepareLink (link) {
if (!link.toLow... |
modules/PropTypes.js | bmathews/react-router | import React from 'react';
import Location from './Location';
import History from './History';
var { func, object, arrayOf, instanceOf, oneOfType, element } = React.PropTypes;
function falsy(props, propName, componentName) {
if (props[propName])
return new Error(`<${componentName}> should not have a "${propName... |
frontend/src/signup/components/forms/InputField.js | rabblerouser/core | import React from 'react';
import FieldError from './FieldError';
const InputField = ({ input, label, placeholder, type, optional, id, meta: { touched, error } }) => (
<fieldset className={id}>
<label htmlFor={input.name}>
{`${label}${optional ? '' : ' *'}`}
</label>
<input id={id} {...input} place... |
docs/src/components/clients/Filters.js | react-charts/react-charts | import React from 'react'
export const Filters = () => (
<>
<svg width={0} height={0}>
<defs>
<filter id="high-threshold">
<feColorMatrix type="saturate" values="0" />
<feComponentTransfer>
<feFuncR type="discrete" tableValues="0" />
<feFuncG type="discret... |
src/main/resources/code/react/Apps/ManageRadars/Pages/ManageRadarsPage/radarTemplateMap/index.js | artieac/technologyradar | import React from 'react';
export const radarTemplateMap = (handleDropdownSelection) => {
return [
{
key: 'dropdownItem',
render: rowData => {
return <a className="dropdown-item" onClick = {(event) => handleDropdownSelection(rowData) } title={ rowData.description }>{ rowData.name }</a>;
... |
examples/client/index.js | ninja/ninja | import 'babel-polyfill';
import {Provider} from 'react-redux';
import React from 'react';
import {Router} from 'react-router';
import {createHistory} from 'history';
import {createStore} from 'redux';
import {reducers} from './reducers';
import {render} from 'react-dom';
import {routes} from './routes';
const history ... |
src/svg-icons/device/battery-unknown.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBatteryUnknown = (props) => (
<SvgIcon {...props}>
<path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4zm-2.72 13.95h-1.9... |
src/components/SaveConfirmationWindow.js | futurice/PelaryHemmo | /*
Message window that is shown whenever new user has been added to system
or feedback has been successfully saved
*/
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { NavigationActions } from 'react-navigation';
import { View, StyleSheet, Mod... |
docs/app/Examples/elements/Button/States/ButtonExampleDisabled.js | aabustamante/Semantic-UI-React | import React from 'react'
import { Button } from 'semantic-ui-react'
const ButtonExampleDisabled = () => (
<Button disabled>Disabled</Button>
)
export default ButtonExampleDisabled
|
examples/master-detail/app.js | dashed/react-router | import React from 'react';
import HashHistory from 'react-router/lib/HashHistory';
import { Router, Navigation, Route, Link } from 'react-router';
import ContactStore from './ContactStore';
var App = React.createClass({
getInitialState() {
return {
contacts: ContactStore.getContacts(),
loading: true
... |
react/features/video-status-label/components/VideoStatusLabel.js | KalinduDN/kalindudn.github.io | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { toggleAudioOnly } from '../../base/conference';
import { translate } from '../../base/i18n';
/**
* React {@code Component} responsible for displaying a label that indicates
* the displayed video state of the current conference... |
information/blendle-frontend-react-source/app/modules/signup/LogoutContainer.js | BramscoChill/BlendleParser | import React from 'react';
import PropTypes from 'prop-types';
import Auth from 'controllers/auth';
export default class LogoutContainer extends React.Component {
static propTypes = {
params: PropTypes.object,
};
componentDidMount() {
Auth.logout().then(() => {
const { email } = this.props.params;... |
src/routes/UIElement/layer/index.js | terryli1643/thinkmore | import React from 'react'
import { layer } from '../../../components'
import { Table, Row, Col, Button, Card } from 'antd'
let Enum = {
default: 1,
}
const IcoPage = () => {
const handleButtonClick = (key) => {
if (key === Enum.default) {
layer.open({
title: '默认弹层',
content: <div style={... |
new-lamassu-admin/src/pages/Wallet/WizardSplash.js | lamassu/lamassu-server | import { makeStyles } from '@material-ui/core'
import React from 'react'
import { Button } from 'src/components/buttons'
import { H1, P } from 'src/components/typography'
import { ReactComponent as BitcoinLogo } from 'src/styling/logos/icon-bitcoin-colour.svg'
import { ReactComponent as BitcoinCashLogo } from 'src/sty... |
routes/edit/components/header/DefaultHeader.js | Literasee/literasee | import React from 'react'
import Logo from './Logo'
import styles from './header.styl'
export default function() {
return (
<header className={styles.container + ' container-fluid'}>
<div />
<div><a href="/"><Logo scale="0.6" /></a></div>
<div>
<a href={OAUTH_URL} className="btn">
... |
src/components/WingButton/WingButton.js | rainbowland302/hangman | import React from 'react';
import FloatingActionButton from 'material-ui/FloatingActionButton';
import Power from 'material-ui/svg-icons/action/power-settings-new';
import { Link, Events } from 'react-scroll';
import './WingButton.scss';
const WingButton = (props) => {
Events.scrollEvent.register('end', () => {
... |
src/encoded/static/components/matrix_reference_epigenome.js | ENCODE-DCC/encoded | import React from 'react';
import PropTypes, { bool } from 'prop-types';
import _ from 'underscore';
import url from 'url';
import * as encoding from '../libs/query_encoding';
import QueryString from '../libs/query_string';
import { svgIcon } from '../libs/svg-icons';
import { Modal, ModalHeader, ModalBody } from '../l... |
screens/SearchScreen/SearchHighlightArray.js | nattatorn-dev/expo-with-realworld | import React from 'react'
import { Dimensions, Text, View } from 'react-native'
import { connectHighlight } from 'react-instantsearch/connectors'
import { Colors } from 'constants'
export default connectHighlight(
( { attributeName, hit, core = false, textStyle } ) => {
const parsedHit = hit._highlightResult[ at... |
modules/components/Menu.js | devrieda/arc-reactor | import React from 'react';
import ReactDOM from 'react-dom';
import Immutable from 'immutable';
import cx from 'classnames';
import MenuButtonConfig from '../helpers/Config/MenuButtonConfig';
const { object, func, instanceOf } = React.PropTypes;
const Menu = React.createClass({
propTypes: {
content: instanceOf(... |
forms/form.js | p632-sp-2016/eDocLite | import React from 'react';
import { TextBox, Dropdown, Btn } from '../src/components/ToolBoxComponents';
export default class Form extends React.Component {
render() {
return (
<div>
<TextBox name="TextBox" elements={[{"label":"Text Box","placeholder":"Some Text","bsSize":{"value":"medium","options":["defau... |
web_modules/Item/index.js | lealivran/ProjetReact | import React, { Component } from 'react';
import styles from "./index.css"
const Item = ({name ="",id="", onClick=null }) =>
(<div className={styles.item}
onClick={()=>{
if(typeof onClick=="function") onClick({id,name})
}}>
{name}
</div>)
export default Item
|
v21/v21.0.0/sdk/svg.js | ccheever/expo-docs | import markdown from 'markdown-in-js'
import withDoc, { components } from '~/lib/with-doc'
import { expoteam } from '~/data/team'
// import { InternalLink, ExternalLink } from "~/components/text/link";
// import { P } from "~/components/text/paragraph";
// import Image from '~/components/base/image'
// import { Code }... |
packages/mineral-ui-icons/src/IconPersonAdd.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import Icon from 'mineral-ui/Icon';
import type { IconProps } from 'mineral-ui/Icon/types';
/* eslint-disable prettier/prettier */
export default function IconPersonAdd(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...iconProp... |
src/components/InnerBox.js | xgrommx/react-blessed-hot-motion | import React, { Component } from 'react';
export default class InnerBox extends Component {
constructor(props) {
super(props);
this.state = {
hey: true
};
setInterval(() => {
this.setState({hey: !this.state.hey});
}, 1000);
}
render() {
const position = this.props.position;... |
src/svg-icons/av/playlist-add-check.js | skarnecki/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvPlaylistAddCheck = (props) => (
<SvgIcon {...props}>
<path d="M14 10H2v2h12v-2zm0-4H2v2h12V6zM2 16h8v-2H2v2zm19.5-4.5L23 13l-6.99 7-4.51-4.5L13 14l3.01 3 5.49-5.5z"/>
</SvgIcon>
);
AvPlaylistAddCheck = pure... |
frontend/src/AddMovie/ImportMovie/SelectFolder/ImportMovieSelectFolderConnector.js | Radarr/Radarr | import { push } from 'connected-react-router';
import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import { addRootFolder, deleteRootFolder, fetchRootFolders } from 'Store/Actions/rootFold... |
src/sections/PortfolioSection/PortfolioItem.js | cjies/cjies-v2 | // @flow
import React from 'react';
import styled, { css } from 'styled-components';
import InApp from 'detect-inapp';
const inapp = new InApp(
navigator.userAgent || navigator.vendor || window.opera
);
const CoverImage = styled.img`
width: 100%;
height: 100%;
transition: transform 0.3s ease-out;
`;
const It... |
src/svg-icons/action/check-circle.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionCheckCircle = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>
</SvgIcon>
);
ActionChec... |
src/main.js | Donnzh/TwitterTrends | import React from 'react';
import ReactDOM from 'react-dom';
import createStore from './store/createStore';
import './styles/main.scss';
// Store Initialization
// ------------------------------------
const store = createStore(window.__INITIAL_STATE__);
// Render Setup
// ------------------------------------
const MO... |
src/js/components/icons/base/Sort.js | odedre/grommet-final | /**
* @description Sort 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.
* @prope... |
src/svg-icons/social/group.js | igorbt/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let SocialGroup = (props) => (
<SvgIcon {...props}>
<path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.3... |
src/components/modal/modal-content.js | rangle/react-redux-starter | import React from 'react';
import classNames from 'classnames';
import { modal } from './modal.css';
function ModalContent({ children }) {
const classDef = classNames('p2', 'z2', 'bg-white', 'relative', modal);
return (
<div className={ classDef }>
{ children }
</div>
);
}
ModalContent.propTypes ... |
fixtures/nesting/src/modern/HomePage.js | yungsters/react | import React from 'react';
import {useContext} from 'react';
import {Link} from 'react-router-dom';
import ThemeContext from './shared/ThemeContext';
import Clock from './shared/Clock';
export default function HomePage({counter, dispatch}) {
const theme = useContext(ThemeContext);
return (
<>
<h2>src/mo... |
test/HotKeys/UsingCustomKeyCodes.spec.js | Chrisui/react-hotkeys | import React from 'react';
import {mount} from 'enzyme';
import {expect} from 'chai';
import sinon from 'sinon';
import {HotKeys, configure} from '../../src/';
import FocusableElement from '../support/FocusableElement';
describe('Using custom key codes:', function () {
describe('when a custom key code has been adde... |
spec/coffeescripts/jsx/due_dates/DueDateAddRowButtonSpec.js | djbender/canvas-lms | /*
* Copyright (C) 2015 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distribut... |
client/modules/core/routes.js | mantrajs/mantra-sample-blog-app | import React from 'react';
import {mount} from 'react-mounter';
import MainLayout from './components/main_layout';
import PostList from './containers/postlist';
import Post from './containers/post';
import NewPost from './containers/newpost';
export default function (injectDeps, {FlowRouter}) {
const MainLayoutCtx ... |
server/sonar-web/src/main/js/components/controls/Toggle.js | lbndev/sonarqube | /*
* SonarQube
* Copyright (C) 2009-2017 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, o... |
app/javascript/mastodon/features/following/index.js | ikuradon/mastodon | import React from 'react';
import { connect } from 'react-redux';
import ImmutablePureComponent from 'react-immutable-pure-component';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { debounce } from 'lodash';
import LoadingIndicator from '../../components/loading... |
src/index.js | Paolinni/Redux-React-SimpleApp | import _ from 'lodash';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import YTSearch from 'youtube-api-search';
import VideoDetail from './components/video_detail'
import VideoList from './components/video_list'
import SearchBar from './components/search_bar'
import API_KEY from './compon... |
src/containers/network/NetworkEditor.js | Hylozoic/hylo-redux | import React from 'react'
import { prefetch } from 'react-fetcher'
import { connect } from 'react-redux'
import { get, some, omit, filter } from 'lodash'
import { fetchWithCache } from '../../util/caching'
import { scrollToBottom } from '../../util/scrolling'
import { avatarUploadSettings, bannerUploadSettings } from '... |
examples/todos/src/todos/components/TodoApp.js | ioof-holdings/redux-subspace | import React from 'react'
import AddTodo from '../containers/AddTodo'
import VisibleTodoList from '../containers/VisibleTodoList'
const TodoApp = ({ filter }) => (
<div>
<AddTodo />
<VisibleTodoList filter={filter} />
</div>
)
export default TodoApp
|
examples/ReactNativeDemo/__tests__/index.android.js | rayshih/fun-react | 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 />
);
});
|
docs/src/app/components/pages/components/Checkbox/Page.js | IsenrichO/mui-with-arrows | import React from 'react';
import Title from 'react-title-component';
import CodeExample from '../../../CodeExample';
import PropTypeDescription from '../../../PropTypeDescription';
import MarkdownElement from '../../../MarkdownElement';
import checkboxReadmeText from './README';
import checkboxCode from '!raw!materi... |
src/pages/ImportsAndExports.js | marktani/react-native-express-1 | import React from 'react'
import markdown from 'markdown-in-js'
import { EditorTranspiler } from '../components'
import markdownOptions from '../utils/MarkdownOptions'
import DefaultPage from './DefaultPage'
const importExample = `// import the default export
import React from 'react-native'
// import other named ex... |
src/routes.js | Bjorgvin/jumbles | import React from 'react'
import { Router, Route, Redirect, Switch } from 'react-router'
import { Link } from 'react-router-dom'
import styled from 'styled-components'
import { darken } from 'polished'
import jumble, { root } from './view/jumbles/routes'
export default function routes(history) {
const Navigation = s... |
example/react-bootstrap/src/containers/App.js | supostat/react-confirm | import React from 'react';
import { confirm, confirmComplex } from 'util/confirm';
const handleOnClick = () => {
confirm('Are you sure?').then(() => {
console.log('proceed!') ;
}, () => {
console.log('cancel!');
});
}
const handleOnClickComplex = () => {
confirmComplex({ message: 'hello' }).then(({ bu... |
draft-js-inline-toolbar-plugin/src/components/Toolbar/index.js | koaninc/draft-js-plugins | /* eslint-disable react/no-array-index-key */
import React from 'react';
import { getVisibleSelectionRect } from 'draft-js';
// TODO make toolbarHeight to be determined or a parameter
const toolbarHeight = 44;
const getRelativeParent = (element) => {
if (!element) {
return null;
}
const position = window.g... |
src/svg-icons/device/battery-std.js | nathanmarks/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceBatteryStd = (props) => (
<SvgIcon {...props}>
<path d="M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4z"/>
</SvgIcon>
);
D... |
app/javascript/mastodon/features/report/comment.js | maa123/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, defineMessages, FormattedMessage } from 'react-intl';
import Button from 'mastodon/components/button';
import Toggle from 'react-toggle';
const messages = defineMessages({
placeholder: { id: 'report.placeholder', defaultMessage: 'Typ... |
app/javascript/mastodon/features/home_timeline/index.js | increments/mastodon | import React from 'react';
import { connect } from 'react-redux';
import { expandHomeTimeline, refreshHomeTimeline } from '../../actions/timelines';
import PropTypes from 'prop-types';
import StatusListContainer from '../ui/containers/status_list_container';
import Column from '../../components/column';
import ColumnHe... |
index.ios.js | radding/trough-app | /**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import {
StackNavigator,
} from 'react-navigation';
import Trough from "./src/main.js";
const App = StackNa... |
dispatch/static/manager/src/js/pages/Tags/TagIndexPage.js | ubyssey/dispatch | import React from 'react'
import { connect } from 'react-redux'
import { replace } from 'react-router-redux'
import ItemIndexPage from '../ItemIndexPage'
import tagsActions from '../../actions/TagsActions'
const mapStateToProps = (state) => {
return {
token: state.app.auth.token,
listItems: state.app.tags.l... |
src/handbook/internet_policy.js | khayyamj/thunderbirds_troop51 | import React from 'react';
export default function () {
return (
<div>
<p className="p1"><span className="s1"><strong>Internet Policy</strong></span></p>
<p className="p2"> </p>
<p className="p3"><span className="s1">When personal information is posted on the internet, there is the potential that i... |
react/wrap.js | limi58/utils | import React from 'react'
export default function (props) {
const isCreate = ('create' in props) ? props.create : 'WRAP_CREATE_UNDEFINED'
const isShow = ('show' in props) ? props.show : 'WRAP_SHOW_UNDEFINED'
const tag = props.tag || 'div'
// 定义了create
if (isCreate !== 'WRAP_CREATE_UNDEFINED') {
... |
src/components/icons/VolumeMax.js | niekert/soundify | import React from 'react';
import PropTypes from 'prop-types';
const VolumeMax = ({ fill, ...props }) =>
<svg fill={fill} viewBox="0 0 24 24" {...props}>
<path d="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01... |
packages/site/src/pages/index.js | massgov/mayflower | import React from 'react';
import { graphql } from 'gatsby';
import Img from 'gatsby-image';
import IllustratedHeader from '@massds/mayflower-react/dist/IllustratedHeader';
import ButtonWithIcon from '@massds/mayflower-react/dist/ButtonWithIcon';
import GenTeaser from '@massds/mayflower-react/dist/GenTeaser';
import Se... |
App/Components/Comment/index.js | BelinChung/react-native-hiapp | import React from 'react'
import PropTypes from 'prop-types'
import { getRemoteAvatar } from '@Utils'
import { formatDistance } from 'date-fns'
import {
View,
Text,
StyleSheet
} from 'react-native'
import {
Avatar
} from 'react-native-elements'
export default class Comment extends React.Component {
render(... |
src/client/todos/list.react.js | gaearon/este | import Component from '../components/component.react';
import React from 'react';
import Todo from './todo.react';
import immutable from 'immutable';
import {msg} from '../intl/store';
class List extends Component {
render() {
const todos = this.props.todos;
if (!todos.size)
return (
<p>{msg(... |
src/App.js | kondoSoft/react-car-rental | import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
render() {
return (
<div className="App">
<div className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<h2>Welcome to React</h2>
... |
src/components/InfoWidget/InfoWidget.js | mywentu/react-blog | import React from 'react'
import './InfoWidget.scss'
import BlogTag from '../BlogTag'
const InfoWidget = (props) => (
<div className='info-widget'>
<span className='info-time'><i className='iconfont icon-icon04' />{props.pubtime}</span>
<span className='info-tag'><i className='iconfont icon-tag' /><BlogTag t... |
frontend/src/components/submitcast/ShowInput.js | tdv-casts/website | // @flow
import React from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import { red500 } from 'material-ui/styles/colors';
import CircularProgress from 'material-ui/CircularProgress';
import { Card, CardHeader, CardText, CardActions } from 'material-ui/Card';
import DropDownMenu from 'ma... |
egghead.io/react_fundamentals/lessons/11-higher-order/main.js | andrisazens/learning_react | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById('app'));
|
template/src/my-command.js | weaintplastic/react-sketchapp | import React from 'react';
import PropTypes from 'prop-types';
import { render, Artboard, Text, View } from 'react-sketchapp';
const Swatch = ({ name, hex }) => (
<View
name={`Swatch ${name}`}
style={{
height: 96,
width: 96,
margin: 4,
backgroundColor: hex,
padding: 8,
}}
... |
src/svg-icons/image/lens.js | jacklam718/react-svg-iconx | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageLens = (props) => (
<SvgIcon {...props}>
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"/>
</SvgIcon>
);
ImageLens = pure(ImageLens);
ImageLens.displayName = 'ImageLens';
Ima... |
src/svg-icons/action/perm-data-setting.js | mmrtnz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionPermDataSetting = (props) => (
<SvgIcon {...props}>
<path d="M18.99 11.5c.34 0 .67.03 1 .07L20 0 0 20h11.56c-.04-.33-.07-.66-.07-1 0-4.14 3.36-7.5 7.5-7.5zm3.71 7.99c.02-.16.04-.32.04-.49 0-.17-.01-.33-.0... |
app/containers/GetCityContainer.js | jcarva/get_weather | import React from 'react'
import GetCity from '../components/GetCity'
export default class GetCityContainer extends React.Component {
/*
Instead of providing a separate getInitialState
method, you can set up your own state property in the constructor.
(https://facebook.github.io/react/docs/reusable-componen... |
app/containers/app.js | fc-io/react-tape-redux | import '../css/style.css'
import React from 'react'
import {Link} from 'react-router/es6'
export default ({children}) =>
<div>
<nav>
Links:
{' '}
<Link to="/">Hello</Link>
{' '}
<Link to="/muu">muu</Link>
</nav>
<div>{children}</div>
</div>
|
myOne/__tests__/index.android.js | caopengxu/ReactNative-one | 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/Views/Forms/Blocks/Template.js | abachman/my-new-tab | import React from 'react'
import PropTypes from 'prop-types'
// Block editing form wrapper
export default class Template extends React.Component {
static propTypes = {
form: PropTypes.object.isRequired,
refCb: PropTypes.func.isRequired,
}
cacheOptions() {
return [
['No Caching', 0],
['1 ... |
src/svg-icons/communication/ring-volume.js | hai-cea/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationRingVolume = (props) => (
<SvgIcon {...props}>
<path d="M23.71 16.67C20.66 13.78 16.54 12 12 12 7.46 12 3.34 13.78.29 16.67c-.18.18-.29.43-.29.71 0 .28.11.53.29.71l2.48 2.48c.18.18.43.29.71.29.27 0... |
MobileApp/App/components/index.js | VowelWeb/CoinTradePros.com | import React, { Component } from 'react';
import {
StyleSheet,
Image,
Text,
TouchableOpacity,
View,
BackHandler
} from 'react-native';
import { Navigator } from 'react-native-deprecated-custom-components';
import Login from './login';
import Register from './register';
import Welcome from './welcome';
import Ad... |
src/components/components/pc_news_block.js | highcoder1/ReactNews | import React from 'react';
import {Card} from 'antd';
import {Link} from 'react-router-dom'
export default class PCNewsBlock extends React.Component {
constructor() {
super();
this.state = {
news: ''
};
}
componentWillMount() {
var myFetchOptions = {
method: 'GET'
};
fetch('http://newsapi.gugujia... |
blueocean-material-icons/src/js/components/svg-icons/communication/message.js | kzantow/blueocean-plugin | import React from 'react';
import SvgIcon from '../../SvgIcon';
const CommunicationMessage = (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-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"/>
</SvgIcon>
);
CommunicationMessage.displayName = 'Com... |
dispatch/static/manager/src/js/components/PageEditor/PageSidebar.js | ubyssey/dispatch | import React from 'react'
import { Tabs, Tab } from '@blueprintjs/core'
import BasicFieldsTab from './tabs/BasicFieldsTab'
import FeaturedImageTab from '../Editor/tabs/FeaturedImageTab'
import SEOTab from '../Editor/tabs/SEOTab'
require('../../../styles/components/article_sidebar.scss')
export default function Page... |
projects/plane-crashes/viz/src/static.js | ebemunk/blog | import React from 'react'
import ReactDOM from 'react-dom'
import ChartTitle from './vizlib/ChartTitle'
import Years from './viz/Years/Chart'
import Phase from './viz/Phase/Bar'
import { Damage, Matrix } from './viz/DamageMatrix'
import FatalityHist from './viz/FatalityHist'
import FatalityAvgs from './viz/FatalityAvg... |
app/javascript/flavours/glitch/features/standalone/public_timeline/index.js | im-in-space/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { expandPublicTimeline, expandCommunityTimeline } from 'flavours/glitch/actions/timelines';
import Masonry from 'react-masonry-infinite';
import { List... |
apps/shared/form/RadioListBox/RadioListBox.js | AusDTO/dto-digitalmarketplace-frontend | import React from 'react'
import PropTypes from 'prop-types'
import { Control } from 'react-redux-form'
import classNames from 'classnames'
import StatefulError from '../StatefulError'
import styles from './RadioListBox.scss'
const RadioListBox = props => {
const { id, label, name, options, model, messages, validat... |
frontend/src/components/thread/moderation/posts/move.js | 1905410/Misago | // jshint ignore:start
import React from 'react';
import Button from 'misago/components/button';
import Form from 'misago/components/form';
import FormGroup from 'misago/components/form-group';
import * as post from 'misago/reducers/post';
import ajax from 'misago/services/ajax';
import modal from 'misago/services/moda... |
actor-apps/app-web/src/app/components/modals/create-group/ContactItem.react.js | yaoliyc/actor-platform | import React from 'react';
import AvatarItem from 'components/common/AvatarItem.react';
class ContactItem extends React.Component {
static propTypes = {
contact: React.PropTypes.object,
onToggle: React.PropTypes.func
}
constructor(props) {
super(props);
this.onToggle = this.onToggle.bind(this)... |
src/app/fruits/list/List.js | peterneely/ct-ui | import React from 'react';
import PropTypes from 'prop-types';
import './list.scss';
const List = ({ people, selectedFruit }) => {
const visiblePeople = selectedFruit ? people.filter(({ favoriteFruit }) => favoriteFruit === selectedFruit) : people;
return (
<div className="fruits-list-container">
{visibl... |
docs/src/examples/elements/Loader/States/LoaderExampleIndeterminate.js | Semantic-Org/Semantic-UI-React | import React from 'react'
import { Dimmer, Loader, Image, Segment } from 'semantic-ui-react'
const LoaderExampleIndeterminate = () => (
<div>
<Segment>
<Dimmer active>
<Loader indeterminate>Preparing Files</Loader>
</Dimmer>
<Image src='/images/wireframe/short-paragraph.png' />
</S... |
versions/v1/components/Debugger/Components/index.js | cerebral/cerebral-debugger-prototype | import React from 'react';
import {connect} from 'cerebral-view-react';
import styles from './styles.css';
import connector from 'connector';
import StatePaths from './StatePaths';
import Renders from './Renders';
@connect({
map: 'debugger.componentsMap',
renders: 'debugger.renders'
})
class Components extends Re... |
src/js/app.js | alexey-ernest/find-a-donor | /**
* This file bootstraps the entire application.
*/
// CSS
import * as styles from '../sass/base.sass';
// React
import React from 'react';
import ReactDOM from 'react-dom';
// App
import DonorApp from './components/DonorApp.react';
// App initial data
import DonorData from './DonorData';
// render
ReactDOM.r... |
app/components/__tests__/Hello_test.js | Switajski/react-processed-grid | import React from 'react'
import { expect } from 'chai'
import { shallow } from 'enzyme'
import Hello from '../Hello'
describe('Hello Component', () => {
let component
beforeEach(() => {
component = shallow(<Hello />)
})
it('has some initial text', () => {
const text = component.find('h2').text()
... |
src/website/app/demos/Dropdown/Dropdown/examples/customItem.js | mineral-ui/mineral-ui | /* @flow */
import styled from '@emotion/styled';
import React from 'react';
import Button from '../../../../../../library/Button';
import Dropdown from '../../../../../../library/Dropdown';
import renderPropsDescription from '../../../common/renderPropsDescription';
import item from '../../../Menu/common/customItem';
... |
docs/app/Examples/views/Comment/States/index.js | ben174/Semantic-UI-React | import React from 'react'
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample'
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection'
const CommentTypes = () => (
<ExampleSection title='States'>
<ComponentExample
title='Collapsed'
description='Commen... |
app/javascript/mastodon/components/icon_with_badge.js | KnzkDev/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Icon from 'mastodon/components/icon';
const formatNumber = num => num > 40 ? '40+' : num;
const IconWithBadge = ({ id, count, className }) => (
<i className='icon-with-badge'>
<Icon id={id} fixedWidth className={className} />
{count > 0 &... |
react-flux-mui/js/material-ui/src/svg-icons/communication/call-received.js | pbogdan/react-flux-mui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let CommunicationCallReceived = (props) => (
<SvgIcon {...props}>
<path d="M20 5.41L18.59 4 7 15.59V9H5v10h10v-2H8.41z"/>
</SvgIcon>
);
CommunicationCallReceived = pure(CommunicationCallReceived);
CommunicationCa... |
plugins-test/editor/ueditor/src/app2.js | fengnovo/diary | import React from 'react';
import ReactDOM from 'react-dom';
import Editor from 'react-umeditor';
class FormBase extends React.Component {
constructor(props){
super(props)
this.state = {
form_data: {
text: "123",
editor: "<p>789</p>"
}
}
}
getIcons(){
return [
"undo redo | bold itali... |
src/components/sensors/SensorCard.js | TheGigabots/gigabots-dashboard | import React from 'react';
import PropTypes from 'prop-types';
import {withStyles} from 'material-ui/styles';
import Card, {CardContent, CardMedia} from 'material-ui/Card';
import {Palette} from "material-ui-icons";
import {blue, brown, green, grey, red, yellow} from 'material-ui/colors';
import Typography from 'materi... |
example/benchmarks/DeepTree.js | lelandrichardson/react-primitives | import React from 'react';
import PropTypes from 'prop-types';
const makeDeepTree = ({ View, StyleSheet }) => {
const propTypes = {
depth: PropTypes.number.isRequired,
breadth: PropTypes.number.isRequired,
wrap: PropTypes.number.isRequired,
id: PropTypes.number.isRequired,
};
class DeepTree exte... |
stories/View/index.js | Fineighbor/ui-kit | import React from 'react'
import createStory from '../../storybook/createStory'
import View from '../../src/View'
import Text from '../../src/Text'
import './align'
createStory('View', module)
.add('with direction `column`', () => (
<View direction='column'>
<Text>Row 1</Text>
<Text>Row 2</Text>
... |
client/src/containers/CreateHub/MoreOptions.js | JasonProcka/venos | import React from 'react';
class CreateHubMoreOptions extends React.Component {
render() {
return (
<div className="hubMoreOptions">
<div className="randomDiv"></div>
</div>
);
}
}
export default CreateHubMoreOptions;
|
app/containers/Users/ResetUserPassword.js | klpdotorg/tada-frontend | import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import Formsy from 'formsy-react';
import FRC from 'formsy-react-components';
import { Modal } from '../../components/Modal';
import {
resetUserPassword,
enableSubmitForm,
disableSubmitForm,
tog... |
docs/app/src/pages/guides/DataDragon.js | tercenya/compendium | import React from 'react';
import { CodeExample, NavMain, PageHeader, PageFooter, A } from '../../components';
import SampleCode from '../../SampleCode';
const GuidesPage = (props) => {
return (
<div>
<NavMain activePage="guides" />
<PageHeader
title="Data Dragon"
subTitle="Building... |
src/components/App/NotFoundPage.js | Aloomaio/netlify-cms | import React from 'react';
export default () => (
<div class="nc-notFound-container">
<h2>Not Found</h2>
</div>
);
|
packages/core/src/BasicRow.js | iCHEF/gypcrete | import React from 'react';
import PropTypes from 'prop-types';
import FlexCell from './FlexCell';
import Tag from './Tag';
import wrapIfNotElement from './utils/wrapIfNotElement';
function BasicRow({
basic,
tag,
statusIcon,
children,
...otherProps
}) {
if (!basic) {
return null;
}
return (
<... |
src/pages/index.js | The-Defman/LostshardDocs | import React from 'react';
import Link from 'gatsby-link';
import Helmet from 'react-helmet';
// import '../css/index.css'; // add some style if you want!
export default function Index({
data
}) {
return (
<div className="documentations">
Lostshard
</div>
);
}
|
test/integration/features/step_definitions/server-steps.js | travi/hapi-react-router | import React from 'react';
import {createStore} from 'redux';
import {connect, Provider} from 'react-redux';
import {Route, Redirect} from 'react-router';
import {provideHooks} from 'redial';
import hapi from '@hapi/hapi';
import {MOVED_TEMPORARILY, MOVED_PERMANENTLY} from 'http-status-codes';
import mustache from 'mus... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.