2022-03-24 07:36:07 +08:00
|
|
|
<script lang="ts">
|
2022-05-13 22:47:50 +08:00
|
|
|
import { create_classes } from "@gradio/utils";
|
|
|
|
|
2022-05-12 12:40:41 +08:00
|
|
|
export let elem_id: string = "";
|
2022-06-17 07:49:54 +08:00
|
|
|
export let visible: boolean = true;
|
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-05-13 22:47:50 +08:00
|
|
|
export let style: Record<string, unknown> = {};
|
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
|
2022-05-12 12:40:41 +08:00
|
|
|
id={elem_id}
|
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-06-29 22:19:57 +08:00
|
|
|
class="overflow-hidden flex flex-col gr-gap gr-form-gap relative col w-full {create_classes(
|
2022-05-13 22:47:50 +08:00
|
|
|
style
|
|
|
|
)}"
|
2022-06-17 08:22:09 +08:00
|
|
|
class:!hidden={!visible}
|
2022-04-22 17:19:59 +08:00
|
|
|
>
|
2022-03-23 06:40:36 +08:00
|
|
|
<slot />
|
|
|
|
</div>
|