Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
disabled: PropTypes.bool,
icon: customPropTypes.itemShorthandWithoutJSX,
menu: PropTypes.oneOfType([
customPropTypes.shorthandAllowingChildren,
PropTypes.arrayOf(customPropTypes.shorthandAllowingChildren),
]),
menuOpen: PropTypes.bool,
onMenuOpenChange: PropTypes.func,
onClick: PropTypes.func,
onFocus: PropTypes.func,
onBlur: PropTypes.func,
popup: PropTypes.oneOfType([
PropTypes.shape({
...Popup.propTypes,
trigger: customPropTypes.never,
children: customPropTypes.never,
}),
PropTypes.string,
]),
wrapper: customPropTypes.shorthandAllowingChildren,
}
static defaultProps = {
as: 'button',
accessibility: toolbarItemBehavior as Accessibility,
wrapper: {},
}
actionHandlers = {
performClick: event => {
event.preventDefault()
this.handleClick(event)
active: PropTypes.bool,
activeIndicator: customPropTypes.itemShorthandWithoutJSX,
defaultMenuOpen: PropTypes.bool,
disabled: PropTypes.bool,
icon: customPropTypes.itemShorthand,
index: PropTypes.number,
submenuIndicator: customPropTypes.itemShorthandWithoutJSX,
inSubmenu: PropTypes.bool,
menu: PropTypes.oneOfType([customPropTypes.itemShorthand, customPropTypes.collectionShorthand]),
menuOpen: PropTypes.bool,
onClick: PropTypes.func,
popup: PropTypes.oneOfType([
PropTypes.shape({
...Popup.propTypes,
trigger: customPropTypes.never,
children: customPropTypes.never,
}),
PropTypes.string,
]),
wrapper: customPropTypes.itemShorthand,
}
static defaultProps = {
as: 'button',
accessibility: toolbarMenuItemBehavior as Accessibility,
activeIndicator: 'stardust-checkmark',
submenuIndicator: 'stardust-menu-arrow-end',
wrapper: { as: 'li' },
}
static autoControlledProps = ['menuOpen']
active: PropTypes.bool,
disabled: PropTypes.bool,
icon: customPropTypes.itemShorthandWithoutJSX,
menu: PropTypes.oneOfType([
customPropTypes.shorthandAllowingChildren,
PropTypes.arrayOf(customPropTypes.shorthandAllowingChildren),
]),
menuOpen: PropTypes.bool,
onMenuOpenChange: PropTypes.func,
onClick: PropTypes.func,
onFocus: PropTypes.func,
onBlur: PropTypes.func,
popup: PropTypes.oneOfType([
PropTypes.shape({
...Popup.propTypes,
trigger: customPropTypes.never,
children: customPropTypes.never,
}),
PropTypes.string,
]),
wrapper: customPropTypes.shorthandAllowingChildren,
}
static defaultProps = {
as: 'button',
accessibility: toolbarItemBehavior as Accessibility,
wrapper: {},
}
actionHandlers = {
performClick: event => {
event.preventDefault()
...commonPropTypes.createCommon(),
active: PropTypes.bool,
activeIndicator: customPropTypes.itemShorthandWithoutJSX,
defaultMenuOpen: PropTypes.bool,
disabled: PropTypes.bool,
icon: customPropTypes.itemShorthand,
index: PropTypes.number,
submenuIndicator: customPropTypes.itemShorthandWithoutJSX,
inSubmenu: PropTypes.bool,
menu: PropTypes.oneOfType([customPropTypes.itemShorthand, customPropTypes.collectionShorthand]),
menuOpen: PropTypes.bool,
onClick: PropTypes.func,
popup: PropTypes.oneOfType([
PropTypes.shape({
...Popup.propTypes,
trigger: customPropTypes.never,
children: customPropTypes.never,
}),
PropTypes.string,
]),
wrapper: customPropTypes.itemShorthand,
}
static defaultProps = {
as: 'button',
accessibility: toolbarMenuItemBehavior as Accessibility,
activeIndicator: 'stardust-checkmark',
submenuIndicator: 'stardust-menu-arrow-end',
wrapper: { as: 'li' },
}
static autoControlledProps = ['menuOpen']