From c830e24542ced7885ceb2b513b6bca3991a1208a Mon Sep 17 00:00:00 2001 From: Sahil Garg Date: Fri, 6 Jun 2025 16:03:27 +0530 Subject: [PATCH 1/4] chore: removed redundant radio --- platforms/metagram/src/lib/ui/Input/Input.stories.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/platforms/metagram/src/lib/ui/Input/Input.stories.ts b/platforms/metagram/src/lib/ui/Input/Input.stories.ts index 5b273f1b..a7d00060 100644 --- a/platforms/metagram/src/lib/ui/Input/Input.stories.ts +++ b/platforms/metagram/src/lib/ui/Input/Input.stories.ts @@ -52,11 +52,3 @@ export const Password = { placeholder: "Please enter password", }, }; - -export const Radio = { - args: { - type: "radio", - value: "option1", - name: "option-1", - }, -}; From 6cb63bc34268ab4dd2d411f35976e9374b789378 Mon Sep 17 00:00:00 2001 From: Sahil Garg Date: Fri, 6 Jun 2025 16:26:51 +0530 Subject: [PATCH 2/4] feat: added textarea. --- .../src/lib/ui/Textarea/Textarea.stories.ts | 22 ++++++++++++++++++ .../src/lib/ui/Textarea/Textarea.svelte | 23 +++++++++++++++++++ platforms/metagram/src/lib/ui/index.ts | 1 + 3 files changed, 46 insertions(+) create mode 100644 platforms/metagram/src/lib/ui/Textarea/Textarea.stories.ts create mode 100644 platforms/metagram/src/lib/ui/Textarea/Textarea.svelte diff --git a/platforms/metagram/src/lib/ui/Textarea/Textarea.stories.ts b/platforms/metagram/src/lib/ui/Textarea/Textarea.stories.ts new file mode 100644 index 00000000..bf7a0950 --- /dev/null +++ b/platforms/metagram/src/lib/ui/Textarea/Textarea.stories.ts @@ -0,0 +1,22 @@ +import type { ComponentProps } from "svelte"; +import { Textarea } from ".."; + +export default { + title: "UI/Textarea", + component: Textarea, + tags: ["autodocs"], + render: (args: { + Component: Textarea; + props: ComponentProps; + }) => ({ + Component: Textarea, + props: args, + }), +}; + +export const Primary = { + args: { + rows: 5, + placeholder: "Hey guys...", + }, +}; diff --git a/platforms/metagram/src/lib/ui/Textarea/Textarea.svelte b/platforms/metagram/src/lib/ui/Textarea/Textarea.svelte new file mode 100644 index 00000000..3707a29a --- /dev/null +++ b/platforms/metagram/src/lib/ui/Textarea/Textarea.svelte @@ -0,0 +1,23 @@ + + + diff --git a/platforms/metagram/src/lib/ui/index.ts b/platforms/metagram/src/lib/ui/index.ts index dfc0602f..6d267a48 100644 --- a/platforms/metagram/src/lib/ui/index.ts +++ b/platforms/metagram/src/lib/ui/index.ts @@ -6,3 +6,4 @@ export { default as Label } from "./Label/Label.svelte"; export { default as Toggle } from "./Toggle/Toggle.svelte"; export { default as Helper } from "./Helper/Helper.svelte"; export { default as InputRadio } from "./InputRadio/InputRadio.svelte"; +export { default as Textarea } from "./Textarea/Textarea.svelte"; From 0e9706acee5756b81c1cbc920f75c039f390b7cc Mon Sep 17 00:00:00 2001 From: Sahil Garg Date: Fri, 6 Jun 2025 16:39:53 +0530 Subject: [PATCH 3/4] fix: tabindex --- platforms/metagram/src/lib/ui/Textarea/Textarea.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/metagram/src/lib/ui/Textarea/Textarea.svelte b/platforms/metagram/src/lib/ui/Textarea/Textarea.svelte index 3707a29a..4fccc0d2 100644 --- a/platforms/metagram/src/lib/ui/Textarea/Textarea.svelte +++ b/platforms/metagram/src/lib/ui/Textarea/Textarea.svelte @@ -20,4 +20,4 @@ const cBase = 'rounded-xl bg-grey/80 resize-none w-full p-5'; - + From 22fe24b62c52f8fddd4a30fb842273865d0e3d1e Mon Sep 17 00:00:00 2001 From: Sahil Garg Date: Fri, 6 Jun 2025 16:40:39 +0530 Subject: [PATCH 4/4] fix: removed type inconsitency. --- platforms/metagram/src/lib/ui/Textarea/Textarea.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/metagram/src/lib/ui/Textarea/Textarea.svelte b/platforms/metagram/src/lib/ui/Textarea/Textarea.svelte index 4fccc0d2..4c0e2d2e 100644 --- a/platforms/metagram/src/lib/ui/Textarea/Textarea.svelte +++ b/platforms/metagram/src/lib/ui/Textarea/Textarea.svelte @@ -12,7 +12,7 @@ let { name = '', placeholder = '', - value = $bindable(''), + value = $bindable(), rows, ...restProps }: ITextareaProps = $props();