blob: 558a2189f3bc0b391f91db22369cf9d8f738f908 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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>
)
);
}
}
|