/** @jsx jsx */ import React from 'react'; import PropTypes from 'prop-types'; import { Global, css, jsx } from '@emotion/core'; import DirectoryListing from './DirectoryListing'; const globalStyles = css` body { font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; line-height: 1.7; padding: 0px 10px 5px; color: #000000; } `; export default class App extends React.Component { static defaultProps = { availableVersions: [] }; handleChange = event => { window.location.href = window.location.href.replace( '@' + this.props.packageVersion, '@' + event.target.value ); }; render() { return (

Index of /{this.props.packageName}@{this.props.packageVersion} {this.props.filename}

Version:{' '}


{this.props.packageName}@{this.props.packageVersion}
); } } if (process.env.NODE_ENV !== 'production') { const entryType = PropTypes.object; App.propTypes = { packageName: PropTypes.string.isRequired, packageVersion: PropTypes.string.isRequired, availableVersions: PropTypes.arrayOf(PropTypes.string), filename: PropTypes.string.isRequired, entry: entryType.isRequired, entries: PropTypes.objectOf(entryType).isRequired }; }