diff --git a/front_end_portserver/src/stories/loginPage/Input.stories.tsx b/front_end_portserver/src/stories/loginPage/Input.stories.tsx new file mode 100644 index 0000000..4a32e69 --- /dev/null +++ b/front_end_portserver/src/stories/loginPage/Input.stories.tsx @@ -0,0 +1,44 @@ +import { Meta, StoryObj } from "@storybook/react"; +import { InputWithLabel, } from "./Inputs"; + +import mail from "@/assets/mail.svg" +import lock from "@/assets/lock-closed.svg" + +const meta = { + title: "Input", + component: InputWithLabel, + +} satisfies Meta + +export default meta; + +type Story = StoryObj; + +export const CustomInput:Story = { + args: { + labelValue : 'Custom Input', + typeName : 'Custom your Type of Input', + placeHolderName : 'Custom your placeholder', + srcIcon : mail, + }, +} + +export const EmailInput: Story = { + args: { + labelValue : 'Email', + typeName : 'Email', + placeHolderName: 'Input your Email', + srcIcon : mail, + + } +}; + +export const PasswordInput: Story = { + args: { + labelValue : 'Password', + typeName : 'Password', + placeHolderName: 'Input your Password', + srcIcon :lock, + } +}; + diff --git a/front_end_portserver/src/stories/loginPage/Inputs.tsx b/front_end_portserver/src/stories/loginPage/Inputs.tsx new file mode 100644 index 0000000..8e8d109 --- /dev/null +++ b/front_end_portserver/src/stories/loginPage/Inputs.tsx @@ -0,0 +1,35 @@ +import { Input } from "@/components/ui/input" +import { Label } from "@/components/ui/label" + +import mail from "@/assets/mail.svg" +import lock from "@/assets/lock-closed.svg" +import eyeOff from "@/assets/eye-off.svg" +// import eyeOn from "@/assets/eye-on.svg" + +interface InputWithLabelProps { + labelValue ?: string; + typeName ?: string; + placeHolderName ?: string; + srcIcon ?: typeof mail | typeof lock; +} + +export function InputWithLabel({ + labelValue, + typeName, + placeHolderName, + srcIcon, + +}:InputWithLabelProps) { + return ( +
+ +
+ + + {(typeName === 'password' || typeName === 'Password') && ( + Icon 2 + )} +
+
+ ) +}