mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix Tab prop type warning (#8185)
The props `isActive` and `tabIndex of the Tab component are required and are always passed in, but the prop type warning is triggered because the tabs are rendered without these props first, then cloned by the `Tabs` component, where these props are added. To silence the warning, the props have been made optional.
This commit is contained in:
parent
61fdb56864
commit
74b519959b
@ -24,10 +24,10 @@ const Tab = (props) => {
|
||||
|
||||
Tab.propTypes = {
|
||||
className: PropTypes.string,
|
||||
isActive: PropTypes.bool.isRequired,
|
||||
isActive: PropTypes.bool, // required, but added using React.cloneElement
|
||||
name: PropTypes.string.isRequired,
|
||||
onClick: PropTypes.func,
|
||||
tabIndex: PropTypes.number.isRequired,
|
||||
tabIndex: PropTypes.number, // required, but added using React.cloneElement
|
||||
}
|
||||
|
||||
Tab.defaultProps = {
|
||||
|
Loading…
Reference in New Issue
Block a user