-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: martinwenisch <[email protected]>
- Loading branch information
1 parent
e0295f4
commit 31b83dc
Showing
26 changed files
with
2,587 additions
and
3,964 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{ | ||
"editor.formatOnSave": true, // Enable format on save | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" // Let ESLint handle non-formatting fixes | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
"eslint.format.enable": true, // ESlint uses prettier rules for formatting | ||
|
||
"[prisma]": { | ||
"editor.defaultFormatter": "Prisma.prisma" | ||
}, | ||
"tailwindCSS.experimental.classRegex": [ | ||
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"] // Allows us to use Tailwind intellisense with cva() syntax | ||
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"] | ||
], | ||
"typescript.preferences.importModuleSpecifier": "non-relative" // Always auto-import from module root (avoid ../../..) | ||
"typescript.preferences.importModuleSpecifier": "non-relative", | ||
"eslint.format.enable": 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { InputField } from "../../../packages/design-system/src/ui/input/inputField"; | ||
import { SearchIcon } from "@repo/design-system/demo"; | ||
import { HomeIcon } from "@repo/design-system/demo"; | ||
|
||
const meta: Meta<typeof InputField> = { | ||
title: "Components/Input", | ||
component: InputField, | ||
argTypes: { | ||
label: { control: "text" }, | ||
error: { control: "text" }, | ||
showClearButton: { control: "boolean" }, | ||
icon: { | ||
control: { type: "select" }, | ||
options: { | ||
NoIcon: undefined, | ||
SearchIcon: SearchIcon, | ||
HomeIcon: HomeIcon, | ||
}, | ||
mapping: { | ||
SearchIcon: SearchIcon, | ||
HomeIcon: HomeIcon, | ||
}, | ||
}, | ||
}, | ||
tags: ["autodocs"], | ||
}; | ||
|
||
type InputStory = StoryObj<typeof meta>; | ||
|
||
export const Default: InputStory = { | ||
args: { | ||
label: "First Name", | ||
error: "Fix it", | ||
showClearButton: true, | ||
icon: undefined, | ||
}, | ||
}; | ||
|
||
export default meta; |
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,20 @@ | ||
"use client"; | ||
|
||
import { BadgeStarIcon } from "@repo/design-system/demo"; | ||
import { InputField } from "@repo/design-system/ui"; | ||
|
||
export default function Page() { | ||
return ( | ||
<div className="w-full min-h-80 flex flex-col p-10 justify-center items-center gap-4"> | ||
<InputField label="Full Name" icon={BadgeStarIcon} /> | ||
<InputField label="Full Name" icon={BadgeStarIcon} error="Test error" /> | ||
<InputField | ||
label="Full Name" | ||
icon={BadgeStarIcon} | ||
showClearButton={true} | ||
required | ||
/> | ||
<InputField label="Full Name" showClearButton={true} required /> | ||
</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
Oops, something went wrong.