-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
169 additions
and
423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import CvcInput from './CvcInput'; | ||
|
||
const meta = { | ||
title: 'Components/Input/CvcInput', | ||
component: CvcInput, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
} satisfies Meta<typeof CvcInput>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof CvcInput>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
onChange: (value: string) => console.log('CVC value:', value), | ||
}, | ||
}; | ||
|
||
export const WithInitialValue: Story = { | ||
args: { | ||
onChange: (value: string) => console.log('CVC value:', value), | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import ExpireDateInput from './ExpireDateInput'; | ||
|
||
const meta = { | ||
title: 'Components/Input/ExpireDateInput', | ||
component: ExpireDateInput, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
} satisfies Meta<typeof ExpireDateInput>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof ExpireDateInput>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
onChange: (value) => console.log('Changed:', value), | ||
onFull: (e) => console.log('Full:', e), | ||
}, | ||
}; | ||
|
||
export const WithInitialValue: Story = { | ||
args: { | ||
...Default.args, | ||
defaultValue: '12', | ||
}, | ||
}; | ||
|
||
export const Disabled: Story = { | ||
args: { | ||
...Default.args, | ||
disabled: true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import InputBox from './InputBox'; | ||
|
||
const meta = { | ||
title: 'Components/Input/InputBox', | ||
component: InputBox, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
} satisfies Meta<typeof InputBox>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof InputBox>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
children: 'Input Box Content', | ||
className: 'p-4', | ||
}, | ||
}; | ||
|
||
export const WithCustomStyle: Story = { | ||
args: { | ||
children: 'Custom Styled Input Box', | ||
className: 'p-6 bg-red-300', | ||
}, | ||
}; | ||
|
||
export const WithNestedContent: Story = { | ||
args: { | ||
children: ( | ||
<div> | ||
<h3 className="font-bold">Nested Content</h3> | ||
<p>This is nested content inside InputBox</p> | ||
</div> | ||
), | ||
className: 'p-4', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import NameInput from './NameInput'; | ||
|
||
const meta = { | ||
title: 'Components/Input/NameInput', | ||
component: NameInput, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
} satisfies Meta<typeof NameInput>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof NameInput>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
onChange: (value) => console.log('Name changed:', value), | ||
maxLength: 30, | ||
}, | ||
}; | ||
|
||
export const CustomMaxLength: Story = { | ||
args: { | ||
onChange: (value) => console.log('Name changed:', value), | ||
maxLength: 10, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import PasswordInput from './PasswordInput'; | ||
|
||
const meta = { | ||
title: 'Components/Input/PasswordInput', | ||
component: PasswordInput, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
} satisfies Meta<typeof PasswordInput>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
onChange: (value: string) => { | ||
console.log('Password value:', value); | ||
}, | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.