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:
@@ -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.
|
||||
// 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
|
||||
const trigger = (groupName, icon)=>{
|
||||
const trigger = (groupName = 'menu', icon = '')=>{
|
||||
if(!customTrigger){
|
||||
return <>
|
||||
<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`}
|
||||
className={['menu-item', color].join(' ')}
|
||||
popoverTarget={menuId}
|
||||
icon={icon}
|
||||
aria-haspopup='menu'
|
||||
role='menuitem'
|
||||
disabled={!React.Children.count(children)}
|
||||
|
||||
Reference in New Issue
Block a user