Skip to content

Commit a741e78

Browse files
committed
fix: input
1 parent 8d18eb5 commit a741e78

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

platforms/metagram/src/lib/ui/Input/Input.stories.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ export const Tel = {
2424
}
2525
};
2626

27-
export const isError = {
27+
export const Email = {
2828
args: {
29-
type: 'text',
30-
placeholder: 'Enter something',
31-
errorClass: 'border border-red text-red focus:text-black-800 focus:border-transparent'
29+
type: 'email',
30+
placeholder: 'example@email.com'
3231
}
3332
};
3433

35-
export const Email = {
34+
export const Invalid = {
3635
args: {
3736
type: 'email',
38-
placeholder: 'example@email.com'
37+
placeholder: 'Invalid email',
38+
value: 'not-an-email'
3939
}
4040
};
4141

platforms/metagram/src/lib/ui/Input/Input.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}: IInputProps = $props();
1717
1818
const cbase = $derived(
19-
`w-full bg-grey py-3.5 px-6 text-[15px] text-black-800 font-geist font-normal placeholder:text-black-600 rounded-4xl outline-0 border border-transparent`
19+
`w-full bg-grey py-3.5 px-6 text-[15px] text-black-800 font-geist font-normal placeholder:text-black-600 rounded-4xl outline-0 border border-transparent invalid:border-red invalid:text-red focus:invalid:text-black-800 focus:invalid:border-transparent`
2020
);
2121
</script>
2222

0 commit comments

Comments
 (0)