0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-08-06 08:57:38 +00:00

Add some defaults to dropdown

This commit is contained in:
Gazook89
2026-05-29 10:54:58 -05:00
parent e7df5d1160
commit f716c390b9
+1 -2
View File
@@ -64,7 +64,7 @@ const Dropdown = ({ groupName, className = null, icon, children, color = null, c
// the trigger is the piece placed inside the opening button of the menu. // the trigger is the piece placed inside the opening button of the menu.
// This method allows for creating a generic span with the group name, // This method allows for creating a generic span with the group name,
// or using a bespoke element (like a graphic) passed in from props to be used as the trigger // or using a bespoke element (like a graphic) passed in from props to be used as the trigger
const trigger = (groupName, icon)=>{ const trigger = (groupName = 'menu', icon = '')=>{
if(!customTrigger){ if(!customTrigger){
return <> return <>
<i className={icon}></i><span className='menu-name'>{groupName}</span><i className={`caret fas fa-caret-${isSubMenu ? 'right' : 'down'}`}></i> <i className={icon}></i><span className='menu-name'>{groupName}</span><i className={`caret fas fa-caret-${isSubMenu ? 'right' : 'down'}`}></i>
@@ -98,7 +98,6 @@ const Dropdown = ({ groupName, className = null, icon, children, color = null, c
id={`${menuId}-trigger`} id={`${menuId}-trigger`}
className={['menu-item', color].join(' ')} className={['menu-item', color].join(' ')}
popoverTarget={menuId} popoverTarget={menuId}
icon={icon}
aria-haspopup='menu' aria-haspopup='menu'
role='menuitem' role='menuitem'
disabled={!React.Children.count(children)} disabled={!React.Children.count(children)}