Set submenu as dismissible by default.
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
Madeorsk 2024-09-23 17:58:12 +02:00
parent 09b7847808
commit bdb0da5ae0
Signed by: Madeorsk
GPG key ID: 677E51CA765BB79F
2 changed files with 4 additions and 3 deletions

View file

@ -1,5 +1,5 @@
{
"version": "1.2.5",
"version": "1.2.6",
"name": "@kernelui/core",
"description": "Kernel UI Core.",
"scripts": {

View file

@ -5,7 +5,7 @@ import {classes, Modify} from "../../Utils";
/**
* Add a submenu which opens on click on the child.
*/
export function SubmenuFloat({submenu, className, mode, children, content, ...props}: Modify<FloatProperties, {
export function SubmenuFloat({submenu, className, mode, dismissible, children, content, ...props}: Modify<FloatProperties, {
/**
* The submenu content.
*/
@ -16,7 +16,8 @@ export function SubmenuFloat({submenu, className, mode, children, content, ...pr
}>)
{
return (
<Float mode={mode ?? "click"} className={classes("submenu", className)}
<Float mode={mode ?? "click"} dismissible={dismissible ?? true}
className={classes("submenu", className)}
content={submenu} {...props}>
{children}
</Float>