From 3b4936b6f2b870f9f2444ebb6ce1ca2de3f49d9f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 04:54:31 +0200 Subject: Adding upstream version 1.7.4. Signed-off-by: Daniel Baumann --- html/src/components/modal/index.tsx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 html/src/components/modal/index.tsx (limited to 'html/src/components/modal/index.tsx') diff --git a/html/src/components/modal/index.tsx b/html/src/components/modal/index.tsx new file mode 100644 index 0000000..558a218 --- /dev/null +++ b/html/src/components/modal/index.tsx @@ -0,0 +1,27 @@ +import { h, Component, ComponentChildren } from 'preact'; + +import './modal.scss'; + +interface Props { + show: boolean; + children: ComponentChildren; +} + +export class Modal extends Component { + constructor(props: Props) { + super(props); + } + + render({ show, children }: Props) { + return ( + show && ( +
+
+
+
{children}
+
+
+ ) + ); + } +} -- cgit v1.2.3