2022-03-24 07:36:07 +08:00
|
|
|
<script lang="ts">
|
2022-04-05 06:47:51 +08:00
|
|
|
export let value: boolean = true;
|
2022-04-08 01:18:41 +08:00
|
|
|
export let default_value: boolean;
|
2022-03-25 14:03:47 +08:00
|
|
|
export let style: string = "";
|
2022-05-04 05:29:11 +08:00
|
|
|
export let variant: "default" | "panel" = "default";
|
2022-05-07 23:50:31 +08:00
|
|
|
export let parent: string | null = null;
|
2022-04-05 06:47:51 +08:00
|
|
|
|
2022-04-08 01:18:41 +08:00
|
|
|
if (default_value) value = default_value;
|
2022-03-25 14:03:47 +08:00
|
|
|
</script>
|
2022-03-24 07:36:07 +08:00
|
|
|
|
2022-04-22 17:19:59 +08:00
|
|
|
<div
|
|
|
|
{style}
|
|
|
|
class:hidden={!value}
|
2022-05-04 05:29:11 +08:00
|
|
|
class:bg-gray-50={variant === "panel"}
|
|
|
|
class:p-2={variant === "panel"}
|
|
|
|
class:rounded-lg={variant === "panel"}
|
2022-05-07 23:50:31 +08:00
|
|
|
class="flex flex-col gr-gap gr-form-gap relative col"
|
|
|
|
class:flex-1={parent === "row" || !parent}
|
2022-04-22 17:19:59 +08:00
|
|
|
>
|
2022-03-23 06:40:36 +08:00
|
|
|
<slot />
|
|
|
|
</div>
|