1
0
Fork 0

some pattern picker fixes

This commit is contained in:
Enoch Riese 2022-07-15 17:40:18 -04:00
parent 8fc493858e
commit 72d756b621
5 changed files with 7 additions and 6 deletions

View file

@ -3,9 +3,9 @@ import { Menu } from '@headlessui/react'
import Link from 'next/link'
/** an accessible dropdown menu for use by picker components */
export const Picker = ({Icon, className, title, ariaLabel, iconOnly=false, children}) => {
export const Picker = ({Icon, className, title, ariaLabel, iconOnly=false, children, ...props}) => {
return (<Menu as="div" className={`dropdown dropdown-end w-auto`}>
return (<Menu as="div" className={`dropdown w-auto ${props.end ? 'dropdown-end' : ''}`}>
<Menu.Button className={iconOnly
? `btn btn-sm`
: `m-0 btn btn-neutral flex flex-row gap-2