diff --git a/platforms/metagram/src/app.css b/platforms/metagram/src/app.css index 9a89a250..4dbd4bbe 100644 --- a/platforms/metagram/src/app.css +++ b/platforms/metagram/src/app.css @@ -41,6 +41,7 @@ --color-black-200: #d2d2d2; --color-grey: #f5f5f5; + --color-red: #ff5255; --color-brand-burnt-orange: #da4a11; --color-brand-burnt-orange-100: #f8dbcf; diff --git a/platforms/metagram/src/lib/ui/Avatar/Avatar.stories.ts b/platforms/metagram/src/lib/ui/Avatar/Avatar.stories.ts index 01cd0fdc..81214f10 100644 --- a/platforms/metagram/src/lib/ui/Avatar/Avatar.stories.ts +++ b/platforms/metagram/src/lib/ui/Avatar/Avatar.stories.ts @@ -1,43 +1,40 @@ -import type { ComponentProps } from "svelte"; -import Avatar from "./Avatar.svelte"; +import type { ComponentProps } from 'svelte'; +import Avatar from './Avatar.svelte'; export default { - title: "UI/Avatar", - component: Avatar, - tags: ["autodocs"], - render: (args: { - Component: Avatar; - props: ComponentProps; - }) => ({ - Component: Avatar, - props: args, - }), + title: 'UI/Avatar', + component: Avatar, + tags: ['autodocs'], + render: (args: { Component: Avatar; props: ComponentProps }) => ({ + Component: Avatar, + props: args + }) }; export const Large = { - args: { - src: "https://www.gravatar.com/avatar/2c7d99fe281ecd3bcd65ab915bac6dd5?s=250", - size: "lg", - }, + args: { + src: 'https://www.gravatar.com/avatar/2c7d99fe281ecd3bcd65ab915bac6dd5?s=250', + size: 'lg' + } }; export const Medium = { - args: { - src: "https://www.gravatar.com/avatar/2c7d99fe281ecd3bcd65ab915bac6dd5?s=250", - size: "md", - }, + args: { + src: 'https://www.gravatar.com/avatar/2c7d99fe281ecd3bcd65ab915bac6dd5?s=250', + size: 'md' + } }; export const Small = { - args: { - src: "https://www.gravatar.com/avatar/2c7d99fe281ecd3bcd65ab915bac6dd5?s=250", - size: "sm", - }, + args: { + src: 'https://www.gravatar.com/avatar/2c7d99fe281ecd3bcd65ab915bac6dd5?s=250', + size: 'sm' + } }; export const ExtraSmall = { - args: { - src: "https://www.gravatar.com/avatar/2c7d99fe281ecd3bcd65ab915bac6dd5?s=250", - size: "xs", - }, + args: { + src: 'https://www.gravatar.com/avatar/2c7d99fe281ecd3bcd65ab915bac6dd5?s=250', + size: 'xs' + } }; diff --git a/platforms/metagram/src/lib/ui/Avatar/Avatar.svelte b/platforms/metagram/src/lib/ui/Avatar/Avatar.svelte index 2d82b1df..768136ee 100644 --- a/platforms/metagram/src/lib/ui/Avatar/Avatar.svelte +++ b/platforms/metagram/src/lib/ui/Avatar/Avatar.svelte @@ -1,31 +1,26 @@ ({ + Component: Input, + props: args + }) +}; + +export const Text = { + args: { + type: 'text', + placeholder: 'Joe Biden', + isRequired: true + } +}; + +export const Tel = { + args: { + type: 'tel', + placeholder: '987654321', + isRequired: true + } +}; + +export const isError = { + args: { + type: 'text', + placeholder: 'Enter something', + isError: true + } +}; + +export const Email = { + args: { + type: 'email', + placeholder: 'example@email.com' + } +}; + +export const Password = { + args: { + type: 'password', + placeholder: 'Please enter password', + isRequired: true + } +}; + +export const Disabled = { + args: { + type: 'text', + placeholder: 'Joe Biden', + isRequired: true, + isDisabled: true + } +}; diff --git a/platforms/metagram/src/lib/ui/Input/Input.svelte b/platforms/metagram/src/lib/ui/Input/Input.svelte new file mode 100644 index 00000000..32d3a8f1 --- /dev/null +++ b/platforms/metagram/src/lib/ui/Input/Input.svelte @@ -0,0 +1,38 @@ + + + diff --git a/platforms/metagram/src/lib/ui/index.ts b/platforms/metagram/src/lib/ui/index.ts index 5ba2df02..678e7c16 100644 --- a/platforms/metagram/src/lib/ui/index.ts +++ b/platforms/metagram/src/lib/ui/index.ts @@ -1,2 +1,3 @@ -export { default as Button } from "./Button/Button.svelte"; -export { default as Avatar } from "./Avatar/Avatar.svelte"; +export { default as Button } from './Button/Button.svelte'; +export { default as Avatar } from './Avatar/Avatar.svelte'; +export { default as Input } from './Input/Input.svelte';