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