Set submenu as dismissible by default.
This commit is contained in:
parent
09b7847808
commit
bdb0da5ae0
2 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "1.2.5",
|
"version": "1.2.6",
|
||||||
"name": "@kernelui/core",
|
"name": "@kernelui/core",
|
||||||
"description": "Kernel UI Core.",
|
"description": "Kernel UI Core.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import {classes, Modify} from "../../Utils";
|
||||||
/**
|
/**
|
||||||
* Add a submenu which opens on click on the child.
|
* 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.
|
* The submenu content.
|
||||||
*/
|
*/
|
||||||
|
@ -16,7 +16,8 @@ export function SubmenuFloat({submenu, className, mode, children, content, ...pr
|
||||||
}>)
|
}>)
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
<Float mode={mode ?? "click"} className={classes("submenu", className)}
|
<Float mode={mode ?? "click"} dismissible={dismissible ?? true}
|
||||||
|
className={classes("submenu", className)}
|
||||||
content={submenu} {...props}>
|
content={submenu} {...props}>
|
||||||
{children}
|
{children}
|
||||||
</Float>
|
</Float>
|
||||||
|
|
Loading…
Reference in a new issue