From 4a83e6a0fbd66881424f7703efe67c85537cee29 Mon Sep 17 00:00:00 2001 From: Madeorsk Date: Sun, 14 Jul 2024 17:06:41 +0200 Subject: [PATCH] Allow to set subapps properties. --- src/Components/Subapps/Subapps.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Components/Subapps/Subapps.tsx b/src/Components/Subapps/Subapps.tsx index 7713f51..e214117 100644 --- a/src/Components/Subapps/Subapps.tsx +++ b/src/Components/Subapps/Subapps.tsx @@ -1,6 +1,7 @@ import React from "react"; import {X} from "@phosphor-icons/react"; import {useCurtain, useCallableCurtain, useCurtains} from "../Curtains/Curtains"; +import {classes, Modify} from "../../Utils"; /** * More natural name of useCurtains for subapps. @@ -23,7 +24,7 @@ export const useCallableSubapp = useCallableCurtain; /** * Subapp main component. */ -export function Subapp({title, closable, children}: React.PropsWithChildren<{ +export function Subapp({className, title, closable, children}: React.PropsWithChildren, { /** * Subapp title. */ @@ -33,7 +34,7 @@ export function Subapp({title, closable, children}: React.PropsWithChildren<{ * Can disable close button. */ closable?: boolean; -}>) +}>>) { // Subapp is closable by default. closable = closable !== undefined ? closable : true; @@ -42,7 +43,7 @@ export function Subapp({title, closable, children}: React.PropsWithChildren<{ const {close} = useSubapp(); return ( -
+

{title ?? ""}