Add disable prop in IconButton and MenuItem
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user