From 3a9975ce230a892a8af0286ffa81776d03a8361b Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Wed, 28 Sep 2022 21:31:41 +0800 Subject: feat: Add switch component --- apps/kit/src/lib/components/switch.svelte | 135 ++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 apps/kit/src/lib/components/switch.svelte (limited to 'apps/kit/src/lib/components') diff --git a/apps/kit/src/lib/components/switch.svelte b/apps/kit/src/lib/components/switch.svelte new file mode 100644 index 0000000..8a90dba --- /dev/null +++ b/apps/kit/src/lib/components/switch.svelte @@ -0,0 +1,135 @@ + + + + +
+ {#if hasLabelOrDescription && !rightAlignedLabelDescription} + + {#if label} + {label} + {/if} + {#if description} + {description} + {/if} + + {/if} + {#if type === "short"} + + {:else if type === "icon"} + + {:else if type === "default"} + + {/if} + {#if hasLabelOrDescription && rightAlignedLabelDescription} + + {#if label} + {label} + {/if} + {#if description} + {description} + {/if} + + {/if} +
-- cgit v1.3