feat: add missing propTypes

This commit is contained in:
kasia.oczkowska
2024-06-05 13:26:56 +01:00
parent 725b38c697
commit 3f5df118a0
53 changed files with 597 additions and 81 deletions

View File

@@ -1,3 +1,4 @@
import PropTypes from 'prop-types';
import Paper from '@mui/material/Paper';
import MuiPopper from '@mui/material/Popper';
import Tab from '@mui/material/Tab';
@@ -5,8 +6,10 @@ import * as React from 'react';
import Suggestions from 'components/PowerInput/Suggestions';
import TabPanel from 'components/TabPanel';
import { Tabs } from './style';
const Popper = (props) => {
const { open, anchorEl, data, onSuggestionClick } = props;
return (
<MuiPopper
open={open}
@@ -34,4 +37,15 @@ const Popper = (props) => {
</MuiPopper>
);
};
Popper.propTypes = {
open: PropTypes.bool.isRequired,
anchorEl: PropTypes.oneOfType([
PropTypes.func,
PropTypes.shape({ current: PropTypes.instanceOf(Element) }),
]),
data: PropTypes.array.isRequired,
onSuggestionClick: PropTypes.func,
};
export default Popper;