Add disable prop in IconButton and MenuItem

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura
2021-12-24 15:05:56 +05:30
parent 7750366654
commit 246f6caf20
3 changed files with 27 additions and 8 deletions

View File

@@ -71,7 +71,8 @@ MenuHeader.propTypes = {
};
function MenuItem({
variant, iconSrc, type, onClick, children,
variant, iconSrc, type,
onClick, children, disabled,
}) {
return (
<div className="context-menu__item">
@@ -80,6 +81,7 @@ function MenuItem({
iconSrc={iconSrc}
type={type}
onClick={onClick}
disabled={disabled}
>
{ children }
</Button>
@@ -91,6 +93,7 @@ MenuItem.defaultProps = {
variant: 'surface',
iconSrc: 'none',
type: 'button',
disabled: false,
};
MenuItem.propTypes = {
@@ -98,7 +101,8 @@ MenuItem.propTypes = {
iconSrc: PropTypes.string,
type: PropTypes.oneOf(['button', 'submit']),
onClick: PropTypes.func.isRequired,
children: PropTypes.string.isRequired,
children: PropTypes.node.isRequired,
disabled: PropTypes.bool,
};
function MenuBorder() {