mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-25 17:30:37 +01:00
feat(NavigationMenu): handle children on vertical orientation (#2384)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -3,7 +3,7 @@ export interface LinkBaseProps {
|
||||
as?: string
|
||||
type?: string
|
||||
disabled?: boolean
|
||||
onClick?: (e: MouseEvent) => void | Promise<void>
|
||||
onClick?: ((e: MouseEvent) => void | Promise<void>) | Array<((e: MouseEvent) => void | Promise<void>)>
|
||||
href?: string
|
||||
navigate?: (e: MouseEvent) => void
|
||||
rel?: string
|
||||
@@ -28,7 +28,9 @@ function onClickWrapper(e: MouseEvent) {
|
||||
}
|
||||
|
||||
if (props.onClick) {
|
||||
props.onClick(e)
|
||||
for (const onClick of Array.isArray(props.onClick) ? props.onClick : [props.onClick]) {
|
||||
onClick(e)
|
||||
}
|
||||
}
|
||||
|
||||
if (props.href && props.navigate && !props.isExternal) {
|
||||
|
||||
Reference in New Issue
Block a user