-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from aversini/feat-Adding-TextInputMask
feat: adding TextInputMask component
- Loading branch information
Showing
11 changed files
with
896 additions
and
87 deletions.
There are no files selected for viewing
73 changes: 73 additions & 0 deletions
73
packages/documentation/src/stories/TextInputMask.stories.tsx
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,73 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { TextInputMask } from "@versini/ui-components"; | ||
|
||
const meta: Meta<typeof TextInputMask> = { | ||
component: TextInputMask, | ||
parameters: { | ||
controls: { exclude: ["spacing", "rightElement"], sort: "requiredFirst" }, | ||
}, | ||
args: { | ||
label: "Enter password", | ||
name: "password", | ||
disabled: false, | ||
helperText: "", | ||
raw: false, | ||
focusKind: "light", | ||
borderKind: "dark", | ||
errorKind: "light", | ||
error: false, | ||
inputClassName: "", | ||
className: "", | ||
}, | ||
argTypes: { | ||
className: { | ||
control: "text", | ||
}, | ||
inputClassName: { | ||
control: "text", | ||
}, | ||
labelId: { | ||
control: "text", | ||
}, | ||
id: { | ||
control: "text", | ||
}, | ||
helperText: { | ||
control: "text", | ||
}, | ||
raw: { | ||
control: "boolean", | ||
}, | ||
error: { | ||
control: "boolean", | ||
}, | ||
focusKind: { | ||
options: ["dark", "light"], | ||
control: { type: "radio" }, | ||
}, | ||
borderKind: { | ||
options: ["dark", "light"], | ||
control: { type: "radio" }, | ||
}, | ||
errorKind: { | ||
options: ["dark", "light"], | ||
control: { type: "radio" }, | ||
}, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof TextInputMask>; | ||
|
||
export const Basic: Story = { | ||
render: (args) => ( | ||
<div className="min-h-10 bg-slate-500 p-11"> | ||
<form noValidate> | ||
<div className="flex gap-2"> | ||
<TextInputMask {...args} /> | ||
</div> | ||
</form> | ||
</div> | ||
), | ||
}; |
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
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
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
Oops, something went wrong.