Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 43dbe62

Browse files
committed
feat(menulistitem): allow menu list item to use as polymorphic prop
1 parent ba708f3 commit 43dbe62

File tree

1 file changed

+5
-1
lines changed
  • packages/chakra-ui-core/src/CMenu

1 file changed

+5
-1
lines changed

packages/chakra-ui-core/src/CMenu/CMenu.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,10 @@ const CMenuItem = {
446446
role: {
447447
type: String,
448448
default: 'menuitem'
449+
},
450+
as: {
451+
type: [String, Object],
452+
default: 'button'
449453
}
450454
},
451455
computed: {
@@ -466,7 +470,7 @@ const CMenuItem = {
466470
const { focusableItems, focusAtIndex, closeOnSelect, closeMenu } = this.context
467471
return h(CPseudoBox, {
468472
props: {
469-
as: 'button'
473+
as: this.as
470474
},
471475
attrs: {
472476
display: 'flex',

0 commit comments

Comments
 (0)