diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:54:31 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 02:54:31 +0000 |
commit | 3b4936b6f2b870f9f2444ebb6ce1ca2de3f49d9f (patch) | |
tree | c91ab0ac9447b25f91c05e901212c2142fb95953 /html/src/components/modal/index.tsx | |
parent | Initial commit. (diff) | |
download | ttyd-3b4936b6f2b870f9f2444ebb6ce1ca2de3f49d9f.tar.xz ttyd-3b4936b6f2b870f9f2444ebb6ce1ca2de3f49d9f.zip |
Adding upstream version 1.7.4.upstream/1.7.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | html/src/components/modal/index.tsx | 27 |
1 files changed, 27 insertions, 0 deletions
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<Props> { + constructor(props: Props) { + super(props); + } + + render({ show, children }: Props) { + return ( + show && ( + <div className="modal"> + <div className="modal-background" /> + <div className="modal-content"> + <div className="box">{children}</div> + </div> + </div> + ) + ); + } +} |