PropTypes and refactoring
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import './Button.css';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
const Button = (props) => {
|
||||
return (
|
||||
@@ -14,4 +15,12 @@ const Button = (props) => {
|
||||
);
|
||||
};
|
||||
|
||||
Button.propTypes = {
|
||||
children: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.string]),
|
||||
autoFocus: PropTypes.bool,
|
||||
buttonStyles: PropTypes.object,
|
||||
clicked: PropTypes.func,
|
||||
disabled: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default Button;
|
||||
|
||||
Reference in New Issue
Block a user