Completely updated React, fixed #11, (hopefully)
This commit is contained in:
61
goTorrentWebUI/node_modules/material-ui/Tabs/TabScrollButton.js.flow
generated
vendored
61
goTorrentWebUI/node_modules/material-ui/Tabs/TabScrollButton.js.flow
generated
vendored
@@ -1,50 +1,22 @@
|
||||
// @flow weak
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';
|
||||
import KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';
|
||||
import withStyles from '../styles/withStyles';
|
||||
import ButtonBase from '../ButtonBase';
|
||||
import KeyboardArrowLeft from '../svg-icons/KeyboardArrowLeft';
|
||||
import KeyboardArrowRight from '../svg-icons/KeyboardArrowRight';
|
||||
|
||||
export const styles = (theme: Object) => ({
|
||||
export const styles = theme => ({
|
||||
root: {
|
||||
color: 'inherit',
|
||||
flex: `0 0 ${theme.spacing.unit * 7}px`,
|
||||
},
|
||||
});
|
||||
|
||||
type ProvidedProps = {
|
||||
classes: Object,
|
||||
};
|
||||
|
||||
export type Props = {
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes?: Object,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className?: string,
|
||||
/**
|
||||
* Which direction should the button indicate?
|
||||
*/
|
||||
direction: 'left' | 'right',
|
||||
/**
|
||||
* Callback to execute for button press.
|
||||
*/
|
||||
onClick?: Function,
|
||||
/**
|
||||
* Should the button be present or just consume space.
|
||||
*/
|
||||
visible?: boolean,
|
||||
};
|
||||
|
||||
/**
|
||||
* @ignore - internal component.
|
||||
*/
|
||||
function TabScrollButton(props: ProvidedProps & Props) {
|
||||
function TabScrollButton(props) {
|
||||
const { classes, className: classNameProp, direction, onClick, visible, ...other } = props;
|
||||
|
||||
const className = classNames(classes.root, classNameProp);
|
||||
@@ -60,6 +32,29 @@ function TabScrollButton(props: ProvidedProps & Props) {
|
||||
);
|
||||
}
|
||||
|
||||
TabScrollButton.propTypes = {
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes: PropTypes.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* Which direction should the button indicate?
|
||||
*/
|
||||
direction: PropTypes.oneOf(['left', 'right']),
|
||||
/**
|
||||
* Callback to execute for button press.
|
||||
*/
|
||||
onClick: PropTypes.func,
|
||||
/**
|
||||
* Should the button be present or just consume space.
|
||||
*/
|
||||
visible: PropTypes.bool,
|
||||
};
|
||||
|
||||
TabScrollButton.defaultProps = {
|
||||
visible: true,
|
||||
};
|
||||
|
Reference in New Issue
Block a user