path stringlengths 5 195 | repo_name stringlengths 5 79 | content stringlengths 25 1.01M |
|---|---|---|
app/components/KalturaPlayer.js | nchathu2014/canvas_react | import React from 'react';
var href=null;
var KalturaPlayer = React.createClass({
propTypes:{
player_id:React.PropTypes.string.isRequired,
wid:React.PropTypes.string.isRequired,
uiconf_id:React.PropTypes.string.isRequired,
entry_id:React.PropTypes.s... |
src/svg-icons/device/add-alarm.js | frnk94/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let DeviceAddAlarm = (props) => (
<SvgIcon {...props}>
<path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.... |
src/components/common/orders/OrderSummary.js | ESTEBANMURUZABAL/my-ecommerce-template | /**
* Imports
*/
import React from 'react';
import {FormattedMessage, FormattedNumber} from 'react-intl';
// Flux
import IntlStore from '../../../stores/Application/IntlStore';
// Required components
import Breakpoint from '../../core/Breakpoint';
import Text from '../../common/typography/Text';
// Translation dat... |
cerberus-dashboard/src/components/ApiError/ApiError.js | Nike-Inc/cerberus-management-service | /*
* Copyright (c) 2020 Nike, inc.
*
* 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 ... |
components/Home/Features.js | slidewiki/slidewiki-platform | import PropTypes from 'prop-types';
import React from 'react';
import { NavLink } from 'fluxible-router';
import {FormattedMessage, defineMessages} from 'react-intl';
import setDocumentTitle from '../../actions/setDocumentTitle';
class features extends React.Component {
componentDidMount() {
this.context.e... |
frontend/app_v2/src/common/icons/Audio.js | First-Peoples-Cultural-Council/fv-web-ui | import React from 'react'
import PropTypes from 'prop-types'
/**
* @summary Audio
* @component
*
* @param {object} props
*
* @returns {node} jsx markup
*/
function Audio({ styling }) {
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" className={styling}>
<path d="M0 0h24v24H0z" fi... |
node_modules/semantic-ui-react/dist/es/views/Comment/CommentAction.js | SuperUncleCat/ServerMonitoring | import _extends from 'babel-runtime/helpers/extends';
import cx from 'classnames';
import PropTypes from 'prop-types';
import React from 'react';
import { customPropTypes, getElementType, getUnhandledProps, META, useKeyOnly } from '../../lib';
/**
* A comment can contain an action.
*/
function CommentAction(props) ... |
docs/src/pages/demos/lists/FolderList.js | AndriusBil/material-ui | // @flow weak
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from 'material-ui/styles';
import List, { ListItem, ListItemText } from 'material-ui/List';
import Avatar from 'material-ui/Avatar';
import FolderIcon from 'material-ui-icons/Folder';
const styles = theme => ({
root: ... |
src/svg-icons/editor/bubble-chart.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let EditorBubbleChart = (props) => (
<SvgIcon {...props}>
<circle cx="7.2" cy="14.4" r="3.2"/><circle cx="14.8" cy="18" r="2"/><circle cx="15.2" cy="8.8" r="4.8"/>
</SvgIcon>
);
EditorBubbleChart = pure(EditorBub... |
monkey/monkey_island/cc/ui/src/components/attack/techniques/T1197.js | guardicore/monkey | import React from 'react';
import ReactTable from 'react-table';
import {renderMachine} from './Helpers'
import MitigationsComponent from './MitigationsComponent';
class T1210 extends React.Component {
constructor(props) {
super(props);
this.columns = [{
Header: 'Machine',
id: 'machine', access... |
docs/src/HomePage.js | Sipree/react-bootstrap | import React from 'react';
import NavMain from './NavMain';
import PageFooter from './PageFooter';
import Grid from '../../src/Grid';
import Alert from '../../src/Alert';
import Glyphicon from '../../src/Glyphicon';
import Label from '../../src/Label';
export default class HomePage extends React.Component {
render(... |
fields/types/name/NameField.js | davibe/keystone | import Field from '../Field';
import React from 'react';
import { FormField, FormInput, FormRow } from 'elemental';
module.exports = Field.create({
displayName: 'NameField',
focusTargetRef: 'first',
valueChanged: function(which, event) {
this.props.value[which] = event.target.value;
this.props.onChange({
... |
examples/using-inferno/pages/about.js | kevmannn/next.js | import React from 'react'
export default () => (
<div>About us</div>
)
|
packages/cf-component-icon/src/reactsvgs/Upload.js | jroyal/cf-ui | import React from 'react';
import PropTypes from 'prop-types';
const Upload = ({ className, label }) => (
<svg
className={className}
aria-label={label}
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
>
<path d="M13.636,7.344a2.128,2.128,0,0,0-3.28-2.588A4.246,4.246,0,0,0,2.2,6.416c0,.035... |
src/parser/warrior/arms/modules/talents/index.js | ronaldpereira/WoWAnalyzer | import React from 'react';
import Analyzer from 'parser/core/Analyzer';
import StatisticsListBox, { STATISTIC_ORDER } from 'interface/others/StatisticsListBox';
// Talents
import AngerManagement from './AngerManagement';
import Skullsplitter from './Skullsplitter';
import SuddenDeath from './SuddenDeath';
import WarMac... |
src/components/AccountTitle/AccountTitle.js | expdevelop/d812 | import React from 'react'
import { Title, Link } from 'components'
import { classNames } from 'helpers'
import s from './AccountTitle.sass'
// TODO: sidebar title integration
const AccountTitle = ({
start = 'Для продолжения необходимо',
firstLink = {content: 'войти', link: '?account&signin'},
end = 'или', lastLi... |
src/smif/app/src/index.js | tomalrussell/smif | import '@babel/polyfill'
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { Route, BrowserRouter as Router, Switch } from 'react-router-dom'
import Nav from 'containers/Nav'
import Welcome from 'components/Welcome'
import NotFound from 'components/ConfigForm/Ge... |
docs/src/examples/switchIsGregorian.js | mberneti/react-datepicker2 | import React from 'react'
import momentJalaali from 'moment-jalaali'
import DatePicker from '../../../src/components/DatePicker';
class component extends React.Component {
constructor(props) {
super(props);
this.state = {
value: momentJalaali(),
isGregorian: true
};
}
render() {
retur... |
src/App/CryptoRoi.js | kgstew/whitesands | import React, { Component } from 'react';
import axios from 'axios';
import './App.css';
class AddTradeForm extends Component {
constructor(props) {
super(props);
this.state = {
coinOne: '',
coinTwo: '',
price: 0,
quantity: 0,
validEntry: true
};
this.changeCoinOne... |
actor-apps/app-web/src/app/utils/require-auth.js | alihalabyah/actor-platform | import React from 'react';
import LoginStore from 'stores/LoginStore';
export default (Component) => {
return class Authenticated extends React.Component {
static willTransitionTo(transition) {
if (!LoginStore.isLoggedIn()) {
transition.redirect('/auth', {}, {'nextPath': transition.path});
}... |
src/components/header.js | Andrey11/golfmanager | 'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
TextInput,
View
} from 'react-native';
import GiftedSpinner from 'react-native-gifted-spinner';
import IconButton from './iconButton';
export default class header extends Component {
render(){
return (
... |
app/components/Header/index.js | thuantrinh/math_is_hard | import React from 'react';
import './header.css';
import styled from 'styled-components';
const MenuItemsContainer = styled.div`
display: block;
`
class Header extends React.Component { // eslint-disable-line react/prefer-stateless-function
componentWillMount = () => {
this.state = {
showMenu: false
... |
src/components/Search/Search.js | ortonomy/flingapp-frontend | import React, { Component } from 'react';
import search from './Search.module.css';
import sidebar from '../Sidebar/Sidebar.module.css';
class Search extends Component {
search() {
return true;
}
render() {
return (
<div className={search.Search}>
<div className={sidebar.sectionTitle}>
... |
src/Async.js | millerized/react-select | import React from 'react';
import Select from './Select';
import stripDiacritics from './utils/stripDiacritics';
let requestId = 0;
function initCache (cache) {
if (cache && typeof cache !== 'object') {
cache = {};
}
return cache ? cache : null;
}
function updateCache (cache, input, data) {
if (!cache) return... |
react/src/components/dashboard/settings/settings.coindClearDataDirPanel.js | pbca26/EasyDEX-GUI | import React from 'react';
import translate from '../../../translate/translate';
import {
apiClearCoindFolder,
triggerToaster,
} from '../../../actions/actionCreators';
import { coindList } from '../../../util/coinHelper';
import Store from '../../../store';
class CoindClearDataDirPanel extends React.Component {
... |
src/svg-icons/content/low-priority.js | manchesergit/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ContentLowPriority = (props) => (
<SvgIcon {...props}>
<path d="M14 5h8v2h-8zm0 5.5h8v2h-8zm0 5.5h8v2h-8zM2 11.5C2 15.08 4.92 18 8.5 18H9v2l3-3-3-3v2h-.5C6.02 16 4 13.98 4 11.5S6.02 7 8.5 7H12V5H8.5C4.92 5 2 7.... |
website/src/App.js | admiraldolphin/govhack2017 | import React, { Component } from 'react';
import './App.css';
import Data from './Data';
import Navbar from './Navbar';
class App extends Component {
constructor(props) {
super(props);
this.state = {
data:
[
{
"card": {
"name": "Towers, John",
"traits": [
... |
admin/client/App/components/Navigation/Mobile/ListItem.js | w01fgang/keystone | /**
* A list item of the mobile navigation
*/
import React from 'react';
import { Link } from 'react-router';
const MobileListItem = React.createClass({
displayName: 'MobileListItem',
propTypes: {
children: React.PropTypes.node.isRequired,
className: React.PropTypes.string,
href: React.PropTypes.string.isRe... |
components/Header.js | dawnlabs/carbon | import React from 'react'
import Logo from './svg/Logo'
const Header = ({ enableHeroText }) => (
<header role="banner" className="header mb4">
<div className="header-content">
<a id="link-home" href="/" aria-label="Home">
<Logo />
</a>
{enableHeroText ? (
<h2 className="mt3">
... |
packages/react/src/components/atoms/buttons/ButtonSort/index.js | massgov/mayflower | /**
* ButtonSort module.
* @module @massds/mayflower-react/ButtonSort
* @requires module:@massds/mayflower-assets/scss/01-atoms/button-sort
*/
import React from 'react';
import PropTypes from 'prop-types';
const ButtonSort = (buttonSort) => {
const buttonSortClass = buttonSort.direction ? ` ma__button-sort--${bu... |
app/user/dashboard/HomeTab.js | in42/internship-portal | import React from 'react';
import { Card, Container } from 'semantic-ui-react';
import Axios from 'axios';
import PostItem from '../../common/post/PostItem';
import Auth from '../../auth/modules/Auth';
export default class HomeTab extends React.Component {
constructor() {
super();
this.state = { posts: [] }... |
components/news/NewsList.js | BDE-ESIEE/mobile | import React, { Component } from 'react';
import {
Text,
View,
ListView,
ActivityIndicator,
StatusBar,
TouchableOpacity,
RefreshControl,
Button
} from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import moment from 'moment';
import Icon from 'react-native-vector-icons/Ionic... |
src/mobile/public/components/Profile/index.js | Perslu/rerebrace | import React from 'react';
import './styles.css';
import CoverPhoto from '../CoverPhoto';
import singleCoverPhoto from '../../../assets/single_cover.jpg'
import AppHeader from '../AppHeader';
import AppContainer from '../AppContainer';
import AboutSection from './AboutSection';
import faker from 'faker';
const rend... |
app/javascript/components/collections/landing/SearchResultsCard.js | avalonmediasystem/avalon | /*
* Copyright 2011-2022, The Trustees of Indiana University and Northwestern
* University. 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/LICENS... |
modules/ScrollManagementMixin.js | kenwheeler/react-router | import React from 'react';
import { canUseDOM, setWindowScrollPosition } from './DOMUtils';
import NavigationTypes from './NavigationTypes';
var { func } = React.PropTypes;
function getCommonAncestors(branch, otherBranch) {
return branch.filter(route => otherBranch.indexOf(route) !== -1);
}
function shouldUpdateSc... |
poc/src/js/dashboard/demo.js | clplain/poc | require('./demo.css');
import React from 'react';
import App from './app';
class Demo extends React.Component {
render() {
return (
<div className='panel panel-default'>
<div className='panel-body'>
<App/>
</div>
</div>
);
}
}
export default Demo;
|
src/components/atoms/Spinner/index.stories.js | DimensionLab/narc | import React from 'react'
import { storiesOf } from '@storybook/react'
import Spinner from '.'
storiesOf('Spinner', module)
.add('default', () => (
<Spinner />
))
.add('reverse', () => (
<Spinner reverse />
))
.add('another palette', () => (
<Spinner palette="secondary" />
))
|
app/javascript/flavours/glitch/components/animated_number.js | glitch-soc/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import { FormattedNumber } from 'react-intl';
import TransitionMotion from 'react-motion/lib/TransitionMotion';
import spring from 'react-motion/lib/spring';
import { reduceMotion } from 'flavours/glitch/util/initial_state';
const obfuscatedCount = count =... |
public/js/components/admin/graphs/graph.react.js | IsuruDilhan/Coupley | /**
* Created by Isuru 1 on 21/02/2016
*/
import React from 'react';
import { Link } from 'react-router';
import GraphActions from './../../../actions/admin/GraphActions';
import GraphStore from './../../../stores/admin/GraphStore';
const LineGraph = React.createClass({
getInitialState: function () {
return... |
src/routes/Editor/components/QuestionsTab.js | athenekilta/ilmomasiina | import React from 'react';
import PropTypes from 'prop-types';
import _ from 'lodash';
import { Input, Checkbox, Select } from 'formsy-react-components';
import { SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc';
const DragHandle = SortableHandle(() => <span className="handler" />); // Th... |
screens/MeditationPlayerScreen.js | FuzzyHatPublishing/isleep | /**
* @flow
*/
import React, { Component } from 'react';
import {
Dimensions,
Image,
Modal,
Platform,
Slider,
StyleSheet,
Text,
TouchableHighlight,
TouchableOpacity,
View
} from 'react-native';
import { Icon } from 'react-native-elements';
import { MaterialIcons } from '@expo/vector-icons';
impo... |
public/components/MainPageAppView.js | supportivesantas/project-ipsum | import React from 'react';
import { browserHistory } from 'react-router';
import actions from '../actions/ipsumActions.js';
import { connect } from 'react-redux';
import maps from '../mappingFunctions.js';
import { Button, ButtonToolbar, Panel, Col } from 'react-bootstrap';
import barGraph from './AllAppsBarGraph';
imp... |
app/javascript/mastodon/components/picture_in_picture_placeholder.js | MitarashiDango/mastodon | import React from 'react';
import PropTypes from 'prop-types';
import Icon from 'mastodon/components/icon';
import { removePictureInPicture } from 'mastodon/actions/picture_in_picture';
import { connect } from 'react-redux';
import { debounce } from 'lodash';
import { FormattedMessage } from 'react-intl';
export defau... |
server/sonar-web/src/main/js/components/SourceViewer/components/LineCode.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... |
node_modules/material-ui/src/hoc/selectable-enhance.js | Maxwelloff/react-football | import React from 'react';
import getMuiTheme from '../styles/getMuiTheme';
import StylePropable from '../mixins/style-propable';
import ColorManipulator from '../utils/color-manipulator';
export const SelectableContainerEnhance = (Component) => {
const composed = React.createClass({
displayName: `Selectable${C... |
src/svg-icons/av/fast-forward.js | barakmitz/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let AvFastForward = (props) => (
<SvgIcon {...props}>
<path d="M4 18l8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"/>
</SvgIcon>
);
AvFastForward = pure(AvFastForward);
AvFastForward.displayName = 'AvFastForward';
AvFastForw... |
src/components/common/svg-icons/maps/local-post-office.js | abzfarah/Pearson.NAPLAN.GnomeH | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let MapsLocalPostOffice = (props) => (
<SvgIcon {...props}>
<path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/>
</SvgIcon>
);
MapsLocalPostOff... |
src/packages/@ncigdc/components/DownloadVisualizationButton.js | NCI-GDC/portal-ui | // @flow
import React from 'react';
import downloadSvg from 'download-svg';
import { compose } from 'recompose';
import saveFile from '@ncigdc/utils/filesaver';
import toTsvString, { mapArrayToTsvString } from '@ncigdc/utils/toTsvString';
import DropDown from '@ncigdc/uikit/Dropdown';
import DropdownItem from '@ncigd... |
examples/huge-apps/routes/Course/routes/Announcements/routes/Announcement/components/Announcement.js | amsardesai/react-router | import React from 'react';
class Announcement extends React.Component {
//static loadProps (params, cb) {
//cb(null, {
//announcement: COURSES[params.courseId].announcements[params.announcementId]
//});
//}
render () {
//var { title, body } = this.props.announcement;
var { courseId, annou... |
front/app/js/components/xAPITextArea.js | nudoru/learning-map | import React from 'react';
import PropTypes from 'prop-types';
import {curry} from 'ramda';
import {Col, Grid, Row} from "../rh-components/rh-Grid";
import {Button, SecondaryButton} from "../rh-components/rh-Button";
import {TextArea} from "../rh-components/rh-Form";
export class XAPITextArea extends React.PureCompone... |
app/javascript/mastodon/features/reblogs/index.js | alarky/mastodon | import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import LoadingIndicator from '../../components/loading_indicator';
import { fetchReblogs } from '../../actions/interactions';
import { ScrollContainer } from ... |
mla_game/front-end/javascript/components/partials/paginator.js | WGBH/FixIt | import React from 'react';
class Paging extends React.Component{
render(){
return(
<div className="pagination">
<button disabled={this.props.waiting} onClick={this.props.handleProgress.bind(this)} className='next'>
<span>Next</span>
<svg viewBox="0 0 200 200">
<... |
app/javascript/mastodon/features/ui/components/actions_modal.js | riku6460/chikuwagoddon | import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import StatusContent from '../../../components/status_content';
import Avatar from '../../../components/avatar';
import Relative... |
app/components/layout/Settings/Skills.js | communicode-source/communicode | import React from 'react';
import classNames from 'classnames';
import styles from './../../../assets/css/pages/settings.scss';
import PropTypes from 'prop-types';
import {Form, FormGroup, FormControl, ControlLabel, Col} from 'react-bootstrap';
class Skills extends React.Component {
constructor(props) {
su... |
packages/es-components/src/components/patterns/progress-tracker/ProgressTracker.js | jrios/es-components | import React from 'react';
import { withTheme } from 'styled-components';
import PropTypes from 'prop-types';
import {
ProgressContainer,
ProgressItem
} from './progress-tracker-subcomponents';
const getMappedSteps = (steps, onPastStepClicked, onFutureStepClicked, showNav) => {
let isPastStep = true;
return st... |
src/components/App.js | inkatze/rfh | import React from 'react';
import Menu from './Menu';
import Content from './Content';
import Contact from './Contact';
import Footer from './Footer';
const App = (props) => {
return (
<div>
<Menu />
<Content />
<Contact />
<Footer />
</div>
);
}
export default App;
|
src/components/ui/toolbars/HoverToolbar.js | brancusi/lingo-client-react | import React from 'react';
import Radium from 'radium';
import Rx from 'rx';
@Radium
export default class HoverToolbar extends React.Component {
static propTypes = {
children: React.PropTypes.array.isRequired,
options: React.PropTypes.object
}
constructor (props) {
super(props);
this.state = { s... |
example/components/Markdown.react.js | Neophy7e/react-bootstrap-typeahead | import cx from 'classnames';
import marked from 'marked';
import React from 'react';
const Markdown = React.createClass({
componentWillMount() {
marked.setOptions({
gfm: true,
tables: true,
breaks: true,
pedantic: false,
sanitize: true,
smartLists: true,
smartypants: fal... |
react/YoutubeSearchApp/src/components/video-detail.js | jacobuid/learning | import React from 'react';
const VideoDetail = ({video}) => {
if(!video){
return (
<div>loading...</div>
)
}
let videoURL = `https://www.youtube.com/embed/${video.id.videoId}`;
return (
<div className="video-detail col-md-8">
<div className="embed-... |
ceraon/static/src/js/app.js | Rdbaker/Mealbound | /**
* Main application initialization
*
*/
import React from 'react'
import ReactDOM from 'react-dom'
import SampleComponent from './sample-component.jsx'
// Initialize on Document Ready
document.addEventListener('DOMContentLoaded', () => {
let main = document.getElementById('main');
ReactDOM.render(<SampleCo... |
app/components/LoginPage/index.js | tomhah/containerProject | import React from 'react';
import {Decorator as Cerebral} from 'cerebral-view-react';
import styles from './styles.css';
@Cerebral({
username: 'login.username',
password: 'login.password'
})
class LoginPage extends React.Component {
render() {
const {signals, username, password} = this.props;
retur... |
node_modules/bs-recipes/recipes/webpack.react-transform-hmr/app/js/main.js | surbhishankar/Car-Ranks-App | import React from 'react';
import { render } from 'react-dom';
// It's important to not define HelloWorld component right in this file
// because in that case it will do full page reload on change
import HelloWorld from './HelloWorld.jsx';
render(<HelloWorld />, document.getElementById('react-root'));
|
react-native-life/ReactNativeLife/js/Components/ViewPagerAndroid/ViewPagerAndroid.js | CaMnter/front-end-life | /**
* @author CaMnter
*/
import React from 'react';
import {
Image,
StyleSheet,
Text,
TouchableWithoutFeedback,
TouchableOpacity,
View,
ViewPagerAndroid
} from 'react-native';
import type {ViewPagerScrollState} from 'ViewPagerAndroid';
let PAGES = 5;
let BGCOLOR = ['#fdc08e', '#fff6b9',... |
docs/src/app/components/pages/components/Drawer/ExampleUndocked.js | skarnecki/material-ui | import React from 'react';
import Drawer from 'material-ui/Drawer';
import MenuItem from 'material-ui/MenuItem';
import RaisedButton from 'material-ui/RaisedButton';
export default class DrawerUndockedExample extends React.Component {
constructor(props) {
super(props);
this.state = {open: false};
}
han... |
examples/with-lingui/components/withLang.js | flybayer/next.js | import React from 'react'
import { I18nProvider } from '@lingui/react'
export default function withLang(Component, defaultLang = 'en') {
return class WithLang extends React.Component {
static async getInitialProps(ctx) {
const language = ctx.query.lang || defaultLang
const [props, catalog] = await Pr... |
Realization/frontend/czechidm-core/src/content/audit/EntityAuditTable.js | bcvsolutions/CzechIdMng | import PropTypes from 'prop-types';
import React from 'react';
import { connect } from 'react-redux';
import _ from 'lodash';
//
import * as Utils from '../../utils';
import * as Basic from '../../components/basic';
import * as Advanced from '../../components/advanced';
import { AuditManager } from '../../redux';
impor... |
cerberus-dashboard/src/actions/versionHistoryBrowserActions.js | Nike-Inc/cerberus-management-service | /*
* Copyright (c) 2020 Nike, inc.
*
* 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 ... |
docs/src/app/components/pages/components/TimePicker/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 timePickerReadmeText from './README';
import TimePickerExampleSimple from... |
frontend/app_v2/src/components/Topics/TopicsPresentationTopic.js | First-Peoples-Cultural-Council/fv-web-ui | import React from 'react'
import PropTypes from 'prop-types'
import useIcon from 'common/useIcon'
import AudioMinimal from 'components/AudioMinimal'
import { Link } from 'react-router-dom'
import { useParams } from 'react-router-dom'
import { WIDGET_LIST_WORD, WIDGET_LIST_PHRASE, WIDGET_LIST_SONG, WIDGET_LIST_STORY } f... |
classic/src/scenes/wbfa/generated/FARInfoCircle.free.js | wavebox/waveboxapp | import React from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faInfoCircle } from '@fortawesome/free-solid-svg-icons/faInfoCircle'
export default class FARInfoCircle extends React.Component {
render () {
return (<FontAwesomeIcon {...this.props} icon={faInfoCircle} />)
}
}
|
src/components/Torrent/StatusButton/index.js | Secretmapper/react-transmission | import React, { Component } from 'react';
import CSSModules from 'react-css-modules';
import { observer } from 'mobx-react';
import styles from './styles/index.css';
@observer
@CSSModules(styles)
class StatusButton extends Component {
static defaultProps = {
onToggle: () => {},
}
render() {
return (
... |
src/svg-icons/action/account-balance.js | ichiohta/material-ui | import React from 'react';
import pure from 'recompose/pure';
import SvgIcon from '../../SvgIcon';
let ActionAccountBalance = (props) => (
<SvgIcon {...props}>
<path d="M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z"/>
</SvgIcon>
);
ActionAccountBalance = pure(ActionA... |
tests/react_experimental/useTransition_hook.js | mroch/flow | // @flow
import React from 'react';
React.useTransition(); // Ok
React.useTransition({}); // Error: no arguments are expected by function type
const [isPending, startTransition] = React.useTransition(); // OK
(isPending: boolean); // Ok
(startTransition: (() => void) => void); // Ok
(isPending: (() => void) => vo... |
internals/templates/homePage.js | mclxly/react-study | /*
* HomePage
*
* This is the first thing users see of our App, at the '/' route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a neccessity for you then you can refactor it and remove
* the ... |
weather/src/index.js | williampuk/ReduxCasts | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import ReduxPromise from 'redux-promise';
import App from './components/app';
import reducers from './reducers';
const createStoreWithMiddleware = applyMiddleware(... |
stories/dialogs/app-crashed.stories.js | LN-Zap/zap-desktop | import React from 'react'
import { storiesOf } from '@storybook/react'
import { DialogAppCrashed } from 'components/Dialog'
import { Window } from '../helpers'
storiesOf('Dialogs', module)
.addDecorator(story => <Window>{story()}</Window>)
.add('App Crashed', () => (
<DialogAppCrashed
error={{ message: '... |
lib/head.js | callumlocke/next.js | import React from 'react'
import PropTypes from 'prop-types'
import sideEffect from './side-effect'
class Head extends React.Component {
static contextTypes = {
headManager: PropTypes.object
}
render () {
return null
}
}
export function defaultHead () {
return [<meta charSet='utf-8' className='next... |
docs/src/app/components/pages/components/Toolbar/Page.js | hwo411/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 toolbarReadmeText from './README';
import toolbarExampleSimpleCode from '... |
frontend/src/Artist/Index/Overview/Options/ArtistIndexOverviewOptionsModalContent.js | lidarr/Lidarr | import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import Form from 'Components/Form/Form';
import FormGroup from 'Components/Form/FormGroup';
import FormInputGroup from 'Components/Form/FormInputGroup';
import FormLabel from 'Components/Form/FormLabel';
import Button ... |
frontend/smart-sushi-ui/src/App.js | cyterdan/smartSushi | import React, { Component } from 'react';
import './App.css';
import $ from 'jquery';
import 'whatwg-fetch';
var createReactClass = require('create-react-class');
var MenuSelect = createReactClass({
getInitialState: function() {
return {
menuList: []
};
},
componentDidMount: function() {
... |
src/server.js | hirzanalhakim/testKumparan | import express from 'express';
import React from 'react';
import ReactDOM from 'react-dom/server';
import favicon from 'serve-favicon';
import compression from 'compression';
import cookieParser from 'cookie-parser';
import httpProxy from 'http-proxy';
import path from 'path';
import VError from 'verror';
import Pretty... |
src/Col.js | jareth/react-materialize | import React from 'react';
import cx from 'classnames';
import constants from './constants';
class Col extends React.Component {
render() {
let {node, offset, className, children, ...props} = this.props;
let C = node;
let classes = {col: true};
constants.SIZES.forEach(s => {
if (this.props[s])... |
docs/src/components/Sidebar/Sidebar.js | abouthiroppy/scuba | import React from 'react';
import { Link } from 'react-router';
import { List, Item } from '../../../../src';
import links, { components as componentsLinks } from '../../linkslist';
import styles from './style';
const Sidebar = (props) => (
<div className={`sidebar ${styles.container}`}>
<h3 style={{ margin: 0 }... |
src/js/components/form/bulk_edit_form.js | working-minds/realizejs | import React, { Component } from 'react';
import PropTypes from '../../prop_types';
import $ from 'jquery';
import { uuid } from '../../utils';
import { mixin } from '../../utils/decorators';
import {
Container,
Form,
Input
} from '../../components';
import { CssClassMixin } from '../../mixins';
@mixin(CssClas... |
fields/types/relationship/RelationshipField.js | benkroeger/keystone | import async from 'async';
import Field from '../Field';
import { listsByKey } from '../../../admin/client/utils/lists';
import React from 'react';
import Select from 'react-select';
import xhr from 'xhr';
import {
Button,
FormInput,
InlineGroup as Group,
InlineGroupSection as Section,
} from '../../../admin/client... |
src/components/explorer/results/QueryAttentionOverTimeResultsContainer.js | mitmedialab/MediaCloud-Web-Tools | import PropTypes from 'prop-types';
import React from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { connect } from 'react-redux';
import MenuItem from '@material-ui/core/MenuItem';
import Divider from '@material-ui/core/Divider';
import ListItemIcon from '@material-ui/core/ListItemIcon';
... |
internals/templates/notFoundPage/notFoundPage.js | itimofeev/hustledb-ui | /**
* NotFoundPage
*
* This is the page we show when the user visits a url that doesn't have a route
*
* NOTE: while this component should technically be a stateless functional
* component (SFC), hot reloading does not currently support SFCs. If hot
* reloading is not a neccessity for you then you can refactor i... |
src/sliders/VerticalSlider.js | sk1981/react-header | import React from 'react';
import SliderToggle from './SliderToggle';
/**
* A vertical slide menu which spans full vertical width and slides horizontally
*/
class VerticalSlider extends React.Component {
constructor(props) {
super(props);
this.state = {draw: false};
this.drawSlider = this.drawSlider.bi... |
app/components/layout/Navigation/MyBuilds/build.js | buildkite/frontend | import React from 'react';
import PropTypes from 'prop-types';
import Relay from 'react-relay/classic';
import styled from 'styled-components';
import Emojify from 'app/components/shared/Emojify';
import Duration from 'app/components/shared/Duration';
import PusherStore from 'app/stores/PusherStore';
import Centrifug... |
packages/wix-style-react/src/common/FluidColumns/FluidColumns.js | wix/wix-style-react | import React from 'react';
import PropTypes from 'prop-types';
import { dataHooks } from './constants';
import { st, classes, vars } from './FluidColumns.st.css';
/** A fluid columns component*/
class FluidColumns extends React.PureComponent {
render() {
const { dataHook, className, cols, children } = this.prop... |
client/components/admin/layout/nav.js | ShannChiang/USzhejiang | import React from 'react';
import {Link} from 'react-router';
export default (props) => (
<div>
<div className="color-line">
</div>
<div id="logo" className="light-version">
<span>
{props.appName}
</span>
</div>
<nav role="navigation">
<Link to="#" className="heade... |
components/Section.js | rickysahu/mpngen | // Container for a specific question
import React from 'react'
import Formsy from 'formsy-react';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import Paper from 'material-ui/Paper';
import RaisedButton from 'material-ui/RaisedButton';
impo... |
src/index.js | BenzLeung/private-music-client-web | import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import thunkMiddleware from 'redux-thunk';
/*import loggerMiddleware from 'redux-logger';*/
import reducer from './redux/reducer';
import App from './presentation/A... |
examples/MenuMethodsExample.js | instea/react-native-popup-menu | import React, { Component } from 'react';
import { Text, TouchableOpacity } from 'react-native';
import Menu, {
MenuProvider,
MenuOptions,
MenuOption,
MenuTrigger,
withMenuContext,
} from 'react-native-popup-menu';
const Openner = (props) => (
<TouchableOpacity style={{ paddingTop: 50 }}
onPress={() =>... |
src/BootstrapMixin.js | IveWong/react-bootstrap | import React from 'react';
import styleMaps from './styleMaps';
import CustomPropTypes from './utils/CustomPropTypes';
const BootstrapMixin = {
propTypes: {
/**
* bootstrap className
* @private
*/
bsClass: CustomPropTypes.keyOf(styleMaps.CLASSES),
/**
* Style variants
* @type {("... |
src/components/ApiMethod.js | evaisse/swagger-open-api-ui | import React, { Component } from 'react';
import Form from "react-jsonschema-form";
import request from 'xhr-request';
import classNames from "classnames";
import ApiTransactionReport from './ApiTransactionReport';
import jwtDecode from "jwt-decode";
class ApiMethod extends Component {
constructor(props) {
... |
packages/reactor-kitchensink/src/examples/Charts/Financial/Candlestick/Candlestick.js | dbuhrman/extjs-reactor | import React, { Component } from 'react';
import { Container } from '@extjs/ext-react';
import { Cartesian } from '@extjs/ext-react-charts';
import ChartToolbar from '../../ChartToolbar';
import createData from './createData';
Ext.require([
'Ext.chart.axis.Numeric',
'Ext.chart.axis.Time',
'Ext.chart.series... |
src/main/app/src/components/Layout/Layout.js | mbrossard/cryptonit-cloud | import React from 'react';
import PropTypes from 'prop-types'
import _ from 'underscore';
class Layout extends React.Component {
static propTypes = {
children: PropTypes.node.isRequired
};
render() {
const { children, className, ...otherProps } = this.props;
return (
<... |
src/app/components/ColorCard.js | devgru/color | import React from 'react';
import { hcl, rgb } from 'd3-color';
import round from 'round-to-precision';
import objectMap from 'object-map';
import classNames from 'classnames';
import ClosestColor from '../domain/ClosestColor';
import ColorDescriptor from 'color-descriptor';
const cents = round(0.01);
const descripto... |
src/index.js | amysimmons/a-guide-to-the-care-and-feeding-of-new-devs | import React from 'react';
import ReactDOM from 'react-dom';
import App from './App/App';
ReactDOM.render(<App />, document.getElementById('root'));
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.