path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
src/components/display_message.js | santhoshml/Bookbild-UI | import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Link } from 'react-router-dom';
import DisplayIOIList from './display_IOI_list';
import { appendToMsgList, getMsgListAction, fetchAllContactsToMessageAction, postNewMsgAction } from '../... |
app/containers/HomePage/index.js | ReelTalkers/reeltalk-web | /*
* HomePage
*
* This is the first thing users see of our App, at the '/' route
*/
import React from 'react'
import Relay from 'react-relay'
Relay.injectNetworkLayer(
new Relay.DefaultNetworkLayer('http://localhost:8000/graphql')
)
import { connect } from 'react-redux'
import { push } from 'react-router-redux'... |
src/components/SearchBar.js | gshackles/react-demo-beerlist | import React, { Component } from 'react';
class SearchBar extends Component {
constructor(props) {
super(props);
this._keyChange = this._keyChange.bind(this);
}
_keyChange(event) {
const searchKey = event.target.value;
this.props.searchHandler(searchKey);
}
render() {
retu... |
docs/src/CodeExample.js | jamon/react-bootstrap | import React from 'react';
export default class CodeExample extends React.Component {
render() {
return (
<pre className="cm-s-solarized cm-s-light">
<code>
{this.props.codeText}
</code>
</pre>
);
}
componentDidMount() {
if (CodeMirror === undefined) {
ret... |
manager/src/components/common/RefreshIcon.js | victorditadi/IQApp | import React, { Component } from 'react';
import { Text, TouchableOpacity } from 'react-native';
import { Icon } from 'native-base';
const RefreshIcon = () => {
return (
<TouchableOpacity>
<Icon name='ios-mail' style={Styles.iconStyle}/>
</TouchableOpacity>
)
}
const Styles = {
i... |
app/javascript/mastodon/features/lists/components/new_list_form.js | gol-cha/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { changeListEditorTitle, submitListEditor } from '../../../actions/lists';
import IconButton from '../../../components/icon_button';
import { defineMessages, injectIntl } from 'react-intl';
const messages = def... |
actor-apps/app-web/src/app/components/common/Banner.react.js | hmoraes/actor-platform | import React from 'react';
import BannerActionCreators from 'actions/BannerActionCreators';
class Banner extends React.Component {
constructor(props) {
super(props);
if (window.localStorage.getItem('banner_jump') === null) {
BannerActionCreators.show();
}
}
onClose = () => {
BannerActionC... |
src/js/components/Button/stories/Active.js | HewlettPackard/grommet | import React from 'react';
import { Add } from 'grommet-icons';
import { Box, Button, Text } from 'grommet';
export const Active = () => (
<Box pad="large" gap="large">
{/* Out of the Box Button */}
<Box align="center">
<Button hoverIndicator="light-1" onClick={() => {}} active>
{/* When But... |
src/components/IndexProduct.js | BinaryCool/LaceShop | require('styles/IndexProduct.scss');
import React from 'react';
import ContentTitle from './ContentTitle.js';
import ContentTitle2 from './ContentTitle2.js';
import IndexProductsItem from './IndexProductsItem.js';
import {URL_LOAD_USER,URL_LOAD_CLIENTPICTYPE_VENDER,URL_LOAD_VENDERPICTYPE_VENDER} from '../utils/URLs.js'... |
src/svg-icons/image/looks-4.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ImageLooks4 = (props) => (
<SvgIcon {...props}>
<path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 14h-2v-4H9V7h2v4h2V7h2v10z"/>
</SvgIcon>
);
ImageLooks4 = pure(ImageLoo... |
src/components/app.js | eUstundag/react_redux_skeleton | import React from 'react';
import { Component } from 'react';
import BarComponent from '../containers/index'
export default class App extends Component {
render() {
return (
<BarComponent />
);
}
} |
app/components/AddDish.js | rondobley/meal-planner | import React from 'react';
import ReactDOM from 'react-dom';
import AddDishStore from '../stores/AddDishStore';
import AddDishActions from '../actions/AddDishActions';
class AddDish extends React.Component {
constructor(props) {
super(props);
this.state = {};
this.state.dishName = '';
... |
src/graphs/lineChart.js | dat2/plottr | import React from 'react';
import randomColor from 'randomcolor';
import GraphSvg from '../utils/graphSvg';
import XAxis from '../utils/xAxis';
import YAxis from '../utils/yAxis';
import { domain, flatten, sort, uniq } from '../utils/functions';
const svgWidth = 800,
svgHeight = 450,
svgPadding = { top: 10, bot... |
src/routes/Home/components/WelcomeDialog.js | synchu/schema | import PropTypes from 'prop-types';
import React from 'react';
import { Dialog, Switch, Button } from 'react-toolbox'
import classes from './HomeView.scss'
export const WelcomeDialog = (props) => {
const { welcomeActive, handleWelcome } = props
let switchValue = !welcomeActive
return (
<Dialog
... |
app/Resources/js/startup/home.js | ryota-murakami/tweet-pick | import React from 'react'
import { Provider } from 'react-redux'
import App from '../containers/home'
import ReactOnRails from 'react-on-rails'
const mainNode = () => {
const store = ReactOnRails.getStore('homeStore')
const reactComponent = (
<Provider store={store}>
<App/>
</Provi... |
components/ItemTooltip.js | hobinjk/illuminate | import React from 'react';
import statsApi from '../static/stats';
import { connectToStores } from 'fluxible-addons-react';
import ItemTooltipStore from '../stores/ItemTooltipStore';
class ItemTooltip extends React.Component {
render() {
if (!this.props.item || !this.props.anchor) {
var style = {
d... |
app/components/Logo/index.js | BeautifulTrouble/beautifulrising-client | /**
*
* Logo
*
*/
import React from 'react';
import styled from 'styled-components';
import { Link } from 'react-router';
import { injectIntl } from 'react-intl';
import messages from './messages';
const Title = styled.h1`
position: absolute;
background-color: ${props=>props.withBg ? 'white' : 'transparent'};
... |
src/components/Move.js | tobice/flux-lumines | import React from 'react';
import PureComponent from './PureComponent.js';
export default class Move extends PureComponent {
render() {
return (
<g transform={'translate(' + this.props.x + ' ' + this.props.y + ')'}>
{this.props.children}
</g>
);
}
} |
popup/components/RecepientsList.js | tkorakas/gmail-lists | import React, { Component } from 'react';
import cleanSpecialCharactersAndRemoveSpaces from '../../utils/StringHelpers';
import IconButton from '@material-ui/core/IconButton';
import Input from '@material-ui/core/Input';
import ArrowBack from '@material-ui/icons/ArrowBack';
import Toolbar from '@material-ui/core/Toolba... |
packages/mineral-ui-icons/src/IconLaptopWindows.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 IconLaptopWindows(props: IconProps) {
const iconProps = {
rtl: false,
...props
};
return (
<Icon {...icon... |
react-flux-mui/js/material-ui/docs/src/app/components/pages/components/FlatButton/ExampleComplex.js | pbogdan/react-flux-mui | import React from 'react';
import FlatButton from 'material-ui/FlatButton';
import FontIcon from 'material-ui/FontIcon';
import ActionAndroid from 'material-ui/svg-icons/action/android';
const styles = {
uploadButton: {
verticalAlign: 'middle',
},
uploadInput: {
cursor: 'pointer',
position: 'absolute... |
src/components/interaction-surface.js | ronlobo/building-os-charts | import React from 'react';
import d3 from 'd3';
import Events from 'events/events';
import getHeight from 'decorators/get-height';
import getMouseCoords from 'decorators/get-mouse-coords';
import getTranslate from 'decorators/get-translate';
import getWidth from 'decorators/get-width';
import setStateFromProps from 'de... |
src/HstWbInstaller.Imager.GuiApp/ClientApp/src/pages/Convert.js | henrikstengaard/hstwb-installer | import React from 'react'
import {get, isNil, set} from "lodash";
import Box from "@mui/material/Box";
import Title from "../components/Title";
import Grid from "@mui/material/Grid";
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import TextField from "../components/TextField";
import BrowseSaveDialog ... |
frontend/app_v2/src/common/icons/Twitter.js | First-Peoples-Cultural-Council/fv-web-ui | import React from 'react'
import PropTypes from 'prop-types'
function Twitter({ styling }) {
return (
<svg
viewBox="0 0 512 512"
xmlns="http://www.w3.org/2000/svg"
fillRule="evenodd"
clipRule="evenodd"
strokeLinejoin="round"
strokeMiterlimit="2"
fill="none"
stroke=... |
techCurriculum/ui/solutions/4.5/src/App.js | AnxChow/EngineeringEssentials-group | /**
* Copyright 2017 Goldman Sachs.
* Licensed 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/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writ... |
app/react-icons/fa/font.js | scampersand/sonos-front | import React from 'react';
import IconBase from 'react-icon-base';
export default class FaFont extends React.Component {
render() {
return (
<IconBase viewBox="0 0 40 40" {...this.props}>
<g><path d="m17.7 12.5l-3.8 10q0.7 0 3 0.1t3.6 0q0.4 0 1.3 0-2-5.7-4.1-10.1z m-16.2 24.6l0-... |
src/components/Markup.js | NuCivic/react-dashboard | import React, { Component } from 'react';
import Registry from '../utils/Registry';
import BaseComponent from './BaseComponent';
import Card from './Card';
import { isArray } from 'lodash';
export default class Markup extends BaseComponent {
getContent() {
if (this.props.data && isArray(this.props.data) && this.... |
components/footer/footer_test.js | BrontosaurusTails/Sovereign | import React from 'react';
import reactDom from 'react-dom/server';
import test from 'tape';
import dom from 'cheerio';
import Footer from './index.js';
const render = reactDom.renderToStaticMarkup;
test('Footer component', assert => {
const msg = 'should render 1 link';
const el = <Footer />;
const $ = dom.lo... |
src/InputGroupAddon.js | dozoisch/react-bootstrap | import classNames from 'classnames';
import React from 'react';
import { bsClass, getClassSet, splitBsProps } from './utils/bootstrapUtils';
class InputGroupAddon extends React.Component {
render() {
const { className, ...props } = this.props;
const [bsProps, elementProps] = splitBsProps(props);
const ... |
src/react.js | tchon/redux | import React from 'react';
import createAll from './components/createAll';
export const { Provider, Connector, provide, connect } = createAll(React);
|
resources/assets/javascript/components/plantsViewContainer.js | colinjeanne/garden | import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { createPlant, editPlant, updatePlant } from '../actions/plantActions';
import {
filterPlants,
selectPlant,
sortPlants } from '../actions/navigationActions';
import PlantsViewPage from './plantsViewPage';
import React... |
app/javascript/mastodon/features/getting_started/index.js | palon7/mastodon | import React from 'react';
import Column from '../ui/components/column';
import ColumnLink from '../ui/components/column_link';
import ColumnSubheading from '../ui/components/column_subheading';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import Prop... |
src/index.js | BurntCaramel/react-pending | import React from 'react';
function requiredPropTypesMustExist(props, { propTypes, displayName }) {
Object.keys(propTypes).every(propName => propTypes[propName](props, propName, displayName) == null);
}
export default function pending(NotReadyComponent) {
return (hasLoaded = requiredPropTypesMustExist) => (ReadyC... |
src/routes.js | mozilla/advocacy.mozilla.org | /* eslint-disable no-unused-vars */
import React from 'react';
/* eslint-disable no-unused-vars */
import { Route, IndexRedirect, Redirect, IndexRoute } from 'react-router';
var locales = Object.keys(require('../public/locales.json'));
function redirect(locale) {
return function(state, replace) {
var pageType;
... |
hw7-frontend/src/components/main/main.js | MinZhou2016/comp531 | import React, { Component } from 'react';
import HeadLine from './headline';
import Followers from './following';
import ArticlesView from '../article/articlesView';
const Main = () =>{
return (
<div className="main container-fluid">
<div className="row">
<div className="col-lg-3 col-md-4">
<HeadLi... |
actor-apps/app-web/src/app/components/modals/InviteUser.react.js | changjiashuai/actor-platform | import _ from 'lodash';
import React from 'react';
import Modal from 'react-modal';
import ReactMixin from 'react-mixin';
import { IntlMixin, FormattedMessage } from 'react-intl';
import { Styles, FlatButton } from 'material-ui';
import ActorTheme from 'constants/ActorTheme';
import ActorClient from 'utils/ActorClien... |
src/components/Editor/EditorToolbar.js | ryanbaer/busy | import React from 'react';
import PropTypes from 'prop-types';
import { injectIntl, FormattedMessage } from 'react-intl';
import { Button, Tooltip, Menu, Dropdown, Icon } from 'antd';
import './EditorToolbar.less';
const tooltip = (description, shortcut) =>
(<span>
{description}
<br />
<b>
{shortcu... |
docs/src/app/components/pages/components/Subheader/Page.js | hai-cea/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 subheaderReadmeText from './README';
import listExampleChatCode from '!ra... |
docs/pages/system/basics.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 = 'system/basics';
const requireDemo = require.context('docs/src/pages/system/basics', false, /\.(js|tsx)$/);
const requireRaw = req... |
static/src/components/islands/IslandDoubleTree.js | Firazenics/finalreckoningbot | // @flow
// jscs:disable maximumLineLength
import React from 'react';
type Props = {
paused: boolean
};
export default ({paused}: Props): React.Element => (
<svg className={`island double-tree ${paused ? 'paused' : ''}`} xmlns="http://www.w3.org/2000/svg" width="259" height="221">
<g fill="none" fill-rule="e... |
actor-apps/app-web/src/app/components/activity/ActivityHeader.react.js | boyley/actor-platform | import React from 'react';
import ReactMixin from 'react-mixin';
import addons from 'react/addons';
const {addons: { PureRenderMixin }} = addons;
@ReactMixin.decorate(PureRenderMixin)
class ActivityHeader extends React.Component {
static propTypes = {
close: React.PropTypes.func,
title: React.PropTypes.stri... |
tests/baselines/reference/reactDefaultPropsInferenceSuccess.js | nojvek/TypeScript | //// [reactDefaultPropsInferenceSuccess.tsx]
/// <reference path="/.lib/react16.d.ts" />
import React from 'react';
interface BaseProps {
when?: ((value: string) => boolean) | "a" | "b";
error?: boolean;
}
interface Props extends BaseProps {
}
class FieldFeedback<P extends Props = BaseProps> extends React.Comp... |
src/website/app/demos/Link/Link/examples/children.js | mineral-ui/mineral-ui | /* @flow */
import React from 'react';
import _Link from '../../../../../../library/Link';
const Link = (props: {}) => <_Link target="_blank" {...props} />;
export default {
id: 'children',
title: 'Children',
description: 'A Link will render any children.',
scope: { Link },
source: `
<Link href="http://... |
examples/react-es6/CheckboxWithLabel.js | dylanham/jest | import React from 'react';
class CheckboxWithLabel extends React.Component {
constructor(props) {
super(props);
this.state = {isChecked: false};
// since auto-binding is disabled for React's class model
// we can prebind methods here
// http://facebook.github.io/react/blog/2015/01/27/react-v0.1... |
src/containers/Login/index.js | Dominic-Preap/react-admin | // MODULES
import React, { Component } from 'react';
import { compose, bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Field, reduxForm } from 'redux-form';
import { Container, Row, Col, CardGroup, Card, CardBlock, Button, Form, Alert } from 'reactstrap';
// COMPONENTS
import renderF... |
src/Wrapper/index.js | christianalfoni/ducky-components | import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styles from './styles.css';
function Wrapper(props) {
return (
<div
className={classNames(styles.wrapper, {
[styles[props.size]]: props.size,
[props.className]: props.className
... |
src/svg-icons/content/add-circle-outline.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentAddCircleOutline = (props) => (
<SvgIcon {...props}>
<path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.5... |
frontend/app/index.js | petr/gqlclans | import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import thunkMiddleware from 'redux-thunk'
import { ApolloProvider } from 'react-apollo'
import ApolloClient from 'apollo-client-preset'
import { createStore, applyMiddleware, compose } from 'redux'
import MuiThemeProvider ... |
docs/src/app/components/pages/components/Card/ExampleExpandable.js | frnk94/material-ui | import React from 'react';
import {Card, CardActions, CardHeader, CardText} from 'material-ui/Card';
import FlatButton from 'material-ui/FlatButton';
const CardExampleExpandable = () => (
<Card>
<CardHeader
title="Without Avatar"
subtitle="Subtitle"
actAsExpander={true}
showExpandableButt... |
src/components/LevelSelection.js | jtak93/phaser-practice | import React, { Component } from 'react';
import { Grid, Button, Container, Image, Divider } from 'semantic-ui-react'
const LevelSelection = (props) => {
return (
<div>
<Container fluid>
<Button onClick={props.onBackToMainMenu} icon='reply' />
</Container>
<Divider hidden />
<Grid... |
src/containers/DevTools/DevTools.js | TracklistMe/client-react | import React from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import DockMonitor from 'redux-devtools-dock-monitor';
export default createDevTools(
<DockMonitor toggleVisibilityKey="ctrl-H"
changePositionKey="ctrl-Q">
<LogMonitor /... |
src/app/configure/routes.js | michael-wolfenden/webpack2-react-starter | import React from 'react'
import { Route } from 'react-router'
import Shell from 'components/Shell'
export default (
<Route path="/" component={Shell} />
)
|
src/examples/App.js | iporaitech/react-to-mdl | import React from 'react';
import {
Router,
Route,
IndexRoute,
browserHistory
} from 'react-router';
import AppLayout from './AppLayout';
import ButtonsPage from './pages/Buttons';
import CardsPage from './pages/Cards';
import ListsPage from './pages/Lists';
import LoadingPage from './pages/Loading';
import Te... |
node_modules/native-base/Components/Widgets/Switch.js | tedsf/tiptap | /* @flow */
'use strict';
import React from 'react';
import {Switch} from 'react-native';
import NativeBaseComponent from '../Base/NativeBaseComponent';
import computeProps from '../../Utils/computeProps';
export default class SwitchNB extends NativeBaseComponent {
getInitialStyle() {
return {
... |
js/components/listSwipe/index.js | onderveli/EmlakAPP | import React, { Component } from 'react';
import { Container, Header, Title, Content, Button, Icon, Text, Left, Right, Body, List, ListItem } from 'native-base';
import styles from './styles';
const datas = [
{
route: 'BasicListSwipe',
text: 'Single SwipeRow',
},
{
route: 'MultiListSwipe',
text: 'Multiple... |
static-src/src/js/AlbumLabel.js | chrisbay/library.kdhx.org | import React from 'react';
import {addHeader} from './csrf';
class AlbumLabelSheet extends React.Component {
constructor(props) {
super(props);
this.state = {
albums: []
};
}
componentDidMount() {
let headers = addHeader();
fetch('/albums/labels-to-print/', {
headers: headers,
... |
app/javascript/mastodon/components/status.js | palon7/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Avatar from './avatar';
import AvatarOverlay from './avatar_overlay';
import RelativeTimestamp from './relative_timestamp';
import DisplayName from './display_name';
import StatusContent fro... |
src/docs/utils/RestWatchDoc.js | grommet/grommet-docs | // (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP
import React, { Component } from 'react';
import DocsArticle from '../../components/DocsArticle';
export default class RestWatchDoc extends Component {
render () {
var inline = [
'var requestId = RestWatch.start(\'/rest/index/resources\... |
src/components/dialogs/HelpDialog.js | ello/webapp | /* eslint-disable max-len */
import React from 'react'
import { DismissButton } from '../../components/buttons/Buttons'
import { SHORTCUT_KEYS } from '../../constants/application_types'
import { css, media } from '../../styles/jss'
import * as s from '../../styles/jso'
import { dialogStyle as baseDialogStyle } from './... |
src/svg-icons/device/signal-wifi-3-bar-lock.js | kasra-co/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceSignalWifi3BarLock = (props) => (
<SvgIcon {...props}>
<path opacity=".3" d="M12 3C5.3 3 .8 6.7.4 7l3.2 3.9L12 21.5l3.5-4.3v-2.6c0-2.2 1.4-4 3.3-4.7.3-.1.5-.2.8-.2.3-.1.6-.1.9-.1.4 0 .7 0 1 .1L23.6 7c-.4-... |
frontend/blueprints/view/files/__root__/views/__name__View/__name__View.js | qurben/mopidy-jukebox | import React from 'react'
type Props = {
};
export class <%= pascalEntityName %> extends React.Component {
props: Props;
render () {
return (
<div></div>
)
}
}
export default <%= pascalEntityName %>
|
src/client/handlers/MessagesHandler.js | janicduplessis/imessage-client | import React from 'react';
import StyleSheet from 'react-style';
import {branch} from 'baobab-react/decorators';
import MessageList from '../components/MessageList';
import SendBox from '../components/SendBox';
import MessageActions from '../actions/MessageActions';
import UIActions from '../actions/UIActions';
@bran... |
dashboard/components/progress.js | vinnyhuang/fw-dev-dashboard | import React, { Component } from 'react';
import { ProgressBar } from 'react-bootstrap';
export default class Progress extends Component {
render() {
return (
<div className="progressBar">
<div className="title">
<strong>{ this.props.name }</strong>
</div>
<div className="... |
src/js/index.js | nestalk/toggl-report-react | import React from 'react';
import { Provider, connect } from 'react-redux';
import { render } from 'react-dom';
import configureStore from './configureStore';
import indexReducer from './reducers/indexReducer';
import '../css/main.css';
import {getStorageData} from './actions';
import Report from './components/reportC... |
src/components/5-ScopedAnimations/ScopedAnimationsDemo.js | AgtLucas/css-modules-playground | import ScopedAnimations from './ScopedAnimations';
import React from 'react';
import js from '!!raw!./ScopedAnimations.js';
import css from '!!raw!./ScopedAnimations.css';
import animationsCss from '!!raw!shared/styles/animations.css';
import Snippet from 'shared/Snippet/Snippet';
export default class ScopedAnimatio... |
packages/components/src/VirtualizedList/CellDatetime/CellDatetime.component.js | Talend/ui | import PropTypes from 'prop-types';
import React from 'react';
import classnames from 'classnames';
import isEqual from 'lodash/isEqual';
import pick from 'lodash/pick';
import distanceInWordsToNow from 'date-fns/distance_in_words_to_now';
import format from 'date-fns/format';
import isValid from 'date-fns/is_valid';
i... |
examples/data-fetch/pages/preact.js | arunoda/next.js |
import React from 'react'
import Link from 'next/link'
import 'isomorphic-fetch'
export default class MyPage extends React.Component {
static async getInitialProps () {
// eslint-disable-next-line no-undef
const res = await fetch('https://api.github.com/repos/developit/preact')
const json = await res.js... |
node_modules/react-bootstrap/es/PageHeader.js | premcool/getmydeal | 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/components/RunButton.js | jenca-cloud/jenca-gui | import React from 'react'
export default function RunButton(props) {
function handleClick(e){
if(e) e.preventDefault()
props.handleRun(props.app)
}
return (
<div>
<button onClick={handleClick} className="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
... |
src/containers/Layout/index.js | LamouchiMS/adintel | import React from 'react';
import injectTapEventPlugin from 'react-tap-event-plugin';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import {fade} from 'material-ui/utils/colorManipulator';
import {
cyan700,
grey600,
yellowA100,
yell... |
src/Col.js | roderickwang/react-bootstrap | import React from 'react';
import classNames from 'classnames';
import styleMaps from './styleMaps';
import CustomPropTypes from './utils/CustomPropTypes';
const Col = React.createClass({
propTypes: {
/**
* The number of columns you wish to span
*
* for Extra small devices Phones (<768px)
*
... |
src/templates/feeds/components/Comments.js | PatrickHai/react-client-changers | import React from 'react';
class Comments extends React.Component{
render(){
let saying = this.props.saying;
return (
<div className="comments">
<div className="com_title">
<span className="likes">赞 {saying.likes}</span>
<span className="coms">评论 {saying.coms}</span>... |
src/js/components/Heading/stories/CustomThemed/Extend.js | grommet/grommet | import React from 'react';
import { Grommet, Heading } from 'grommet';
import { deepMerge } from 'grommet/utils';
import { grommet } from 'grommet/themes';
const letterSpace = {
1: {
small: '-1px',
medium: '-1.22px',
large: '-1.45px',
},
2: {
small: '-0.47px',
medium: '-0.57px',
large: '-... |
client/react/frontpage/components/EventList.js | uclaradio/uclaradio | // EventList.js
// list of events in events tab of frontpage
import React from 'react';
import { connect } from 'react-redux';
import { updateEvents, fetchUpdatedEvents } from '../actions/events';
import { Link } from 'react-router';
// Common Elements
import RectImage from '../../common/RectImage';
import Loader f... |
src/svg-icons/editor/border-left.js | matthewoates/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBorderLeft = (props) => (
<SvgIcon {...props}>
<path d="M11 21h2v-2h-2v2zm0-4h2v-2h-2v2zm0-12h2V3h-2v2zm0 4h2V7h-2v2zm0 4h2v-2h-2v2zm-4 8h2v-2H7v2zM7 5h2V3H7v2zm0 8h2v-2H7v2zm-4 8h2V3H3v18zM19 9h2V7h-2v2z... |
node_modules/react-router/modules/RouteUtils.js | FrancoCotter/ReactWeatherApp | import React from 'react'
import warning from './routerWarning'
function isValidChild(object) {
return object == null || React.isValidElement(object)
}
export function isReactChildren(object) {
return isValidChild(object) || (Array.isArray(object) && object.every(isValidChild))
}
function checkPropTypes(componen... |
local-cli/templates/HelloNavigation/views/welcome/WelcomeText.android.js | jevakallio/react-native | import React, { Component } from 'react';
import {
StyleSheet,
Text,
View,
} from 'react-native';
export default class WelcomeText extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<... |
examples/async-data/app.js | christianv/react-autocomplete | import React from 'react'
import Autocomplete from '../../lib/index'
import { getStates, matchStateToTerm, sortStates, styles, fakeRequest } from '../utils'
let App = React.createClass({
getInitialState () {
return {
unitedStates: getStates(),
loading: false
}
},
render () {
return (
... |
src/index.js | christineoo/reddit-gallery | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import ToolboxApp from 'react-toolbox/lib/app';
import Root from './containers/Root';
import configureStore from './store/configureStore'
import 'babel-polyfill';
const store = configureStore()
ReactDOM.render(<Root store={store} />... |
packages/storybook/examples/core/TextInput.stories.js | iCHEF/gypcrete | import React from 'react';
import { action } from '@storybook/addon-actions';
import TextInput, { PureTextInput } from '@ichef/gypcrete/src/TextInput';
import DebugBox from 'utils/DebugBox';
export default {
title: '@ichef/gypcrete|TextInput',
component: PureTextInput,
subcomponents: {
'rowComp()': TextInpu... |
webpack/__mocks__/foremanReact/components/common/EmptyState/DefaultEmptyState.js | theforeman/foreman_discovery | import React from 'react';
import { useDispatch } from 'react-redux';
import { push } from 'connected-react-router';
import { Button } from '@patternfly/react-core';
import EmptyStatePattern from './EmptyStatePattern';
import { defaultEmptyStatePropTypes } from './EmptyStatePropTypes';
const DefaultEmptyState = props ... |
src/svg-icons/action/markunread-mailbox.js | pomerantsev/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionMarkunreadMailbox = (props) => (
<SvgIcon {...props}>
<path d="M20 6H10v6H8V4h6V0H6v6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2z"/>
</SvgIcon>
);
ActionMarkunreadMailbox = pu... |
src/abstract/base.js | tychotatitscheff/poseidon-ui | /* @flow */
/* eslint-disable no-console, no-var, vars-on-top */
// Shamelessly taken from https://github.com/este/este/blob/master/src/client/components/component.react.js
import React from 'react';
import shallowEqual from 'react-pure-render/shallowEqual';
var diff; // eslint-disable-line no-var
if (process.env.NO... |
src/svg-icons/av/subtitles.js | ArcanisCz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvSubtitles = (props) => (
<SvgIcon {...props}>
<path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z"/>
</SvgIcon... |
src/Parser/Druid/Restoration/Modules/Features/Clearcasting.js | hasseboulen/WoWAnalyzer | import React from 'react';
import StatisticBox, { STATISTIC_ORDER } from 'Main/StatisticBox';
import { formatPercentage } from 'common/format';
import SpellIcon from 'common/SpellIcon';
import SpellLink from 'common/SpellLink';
import Wrapper from 'common/Wrapper';
import SPELLS from 'common/SPELLS';
import Analyzer f... |
app/javascript/mastodon/features/compose/containers/warning_container.js | narabo/mastodon | import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
import Warning from '../components/warning';
import { createSelector } from 'reselect';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { OrderedSet } f... |
samples/index.js | aratakokubun/cursor-hijack | import React from 'react';
import { render } from 'react-dom';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import cjk from '../index';
import App from './app'
let store = createStore(cjk.Reducers);
let rootElement = document.getElementById('app')
render(
<Provider store={store}>
... |
src/Glyphicon.js | xuorig/react-bootstrap | import React from 'react';
import classNames from 'classnames';
const Glyphicon = React.createClass({
propTypes: {
/**
* bootstrap className
* @private
*/
bsClass: React.PropTypes.string,
/**
* An icon name. See e.g. http://getbootstrap.com/components/#glyphicons
*/
glyph: Re... |
src/selectable-group.js | leopoldjoy/react-selectable | import React from 'react';
import ReactDOM from 'react-dom';
import isNodeInRoot from './nodeInRoot';
import getBoundsForNode from './getBoundsForNode';
import doObjectsCollide from './doObjectsCollide';
class SelectableGroup extends React.Component {
constructor (props) {
super(props);
this.state = {
isBox... |
src/components/D3Bars.js | guzmonne/gux-d3-react | import React from 'react'
import T from 'prop-types'
import {DELAY} from '../variables.js'
const d3 = Object.assign({},
require('d3-selection'),
require('d3-transition')
)
class D3Bars extends React.Component {
componentDidMount() {
this.draw()
}
componentDidUpdate() {
this.draw()
}
draw = ()... |
src/components/Logo/index.js | dramich/twitchBot | import React, { Component } from 'react';
import TimelineMax from 'gsap/src/minified/TimelineMax.min';
/* component styles */
import { styles } from './styles.scss';
export default class Logo extends Component {
constructor(props) {
super(props);
this.state = {
logo: new TimelineMax,
hatson: ne... |
es/components/PlaylistManager/Import/ImportPanelHeader.js | welovekpop/uwave-web-welovekpop.club | import _jsx from "@babel/runtime/helpers/builtin/jsx";
import cx from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import { translate } from 'react-i18next';
import Tooltip from "@material-ui/core/es/Tooltip";
import IconButton from "@material-ui/core/es/IconButton";
import CloseIcon fro... |
js/components/episode.js | frequencyasia/website | import React from 'react';
import $ from 'jquery';
import fecha from 'fecha';
import i18next from 'i18next';
import Constants from './../constants';
import EpisodeCard from './episodeCard';
module.exports = React.createClass({
propTypes: {
slug: React.PropTypes.string.isRequired,
showSlug: React.PropTypes.... |
web/src/containers/Exchange.js | xiyanxiyan10/quant | import { ResetError } from '../actions';
import { ExchangeList, ExchangePut, ExchangeDelete } from '../actions/exchange';
import React from 'react';
import { connect } from 'react-redux';
import { Button, Table, Modal, Form, Input, Select, notification } from 'antd';
const FormItem = Form.Item;
const Option = Select.O... |
sb-admin-seed-react/src/vendor/recharts/demo/component/TextDemo.js | Gigasz/tropical-bears | import React, { Component } from 'react';
import { Text } from 'recharts';
class TextDemo extends Component {
state = {
exampleText: 'This is really long text',
x: 0,
y: 0,
width: 300,
height: 200,
angle: 0,
scaleToFit: false,
textAnchor: 'start',
verticalAnchor: 'start',
font... |
client/src/components/screenshots/takeButton/TakeButton.js | DjLeChuck/recalbox-manager | import React from 'react';
import PropTypes from 'prop-types';
import { translate } from 'react-i18next';
import Button from 'react-bootstrap/lib/Button';
import Glyphicon from 'react-bootstrap/lib/Glyphicon';
const TakeButton = ({ t, working, onClick }) => (
<Button bsStyle="success" onClick={onClick}>
{working... |
src/svg-icons/action/shopping-cart.js | ruifortes/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionShoppingCart = (props) => (
<SvgIcon {...props}>
<path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11... |
src/pages/404.js | DarylRodrigo/DarylRodrigo.github.io | import React from 'react';
import Layout from '../components/common/layout';
const NotFoundPage = () => (
<Layout>
<h1>NOT FOUND</h1>
<p>Not a valid URL</p>
</Layout>
);
export default NotFoundPage;
|
src/containers/Home/UserInfo.js | pmg1989/lms_mobile | import React from 'react'
import PropTypes from 'prop-types'
import { renderBgImage } from 'utils/tools'
import styles from './UserInfo.less'
const UserInfo = ({ avatar, firstName, school }) => {
return (
<div className={styles.user_box} style={renderBgImage(avatar)}>
<div className={styles.thumb_box}>
... |
fields/types/Field.js | concoursbyappointment/keystoneRedux | import classnames from 'classnames';
import evalDependsOn from '../utils/evalDependsOn.js';
import React from 'react';
import { findDOMNode } from 'react-dom';
import { FormField, FormInput, FormNote } from '../../admin/client/App/elemental';
import blacklist from 'blacklist';
import CollapsedFieldLabel from '../compon... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.