chore(ui,icons,ui-preset,toolbox): Move design system packages to monorepo (#5470)

This commit is contained in:
Kasper Fabricius Kristensen
2023-11-07 22:17:44 +01:00
committed by GitHub
parent 71853eafdd
commit e4ce2f4e07
722 changed files with 30300 additions and 186 deletions

View File

@@ -0,0 +1 @@
export * from "./textarea"

View File

@@ -0,0 +1,27 @@
import type { Meta, StoryObj } from "@storybook/react"
import * as React from "react"
import { Textarea } from "./textarea"
const meta: Meta<typeof Textarea> = {
title: "Components/Textarea",
component: Textarea,
parameters: {
layout: "centered",
},
render: (args) => (
<div className="w-[400px]">
<Textarea {...args} />
</div>
),
}
export default meta
type Story = StoryObj<typeof Textarea>
export const Default: Story = {
args: {
placeholder: "Placeholder",
},
}

View File

@@ -0,0 +1,24 @@
import * as React from "react"
import { clx } from "@/utils/clx"
import { inputBaseStyles } from "../input"
const Textarea = React.forwardRef<
HTMLTextAreaElement,
React.ComponentPropsWithoutRef<"textarea">
>(({ className, ...props }, ref) => {
return (
<textarea
ref={ref}
className={clx(
inputBaseStyles,
"txt-medium min-h-[70px] w-full px-3 py-[7px]",
className
)}
{...props}
/>
)
})
Textarea.displayName = "Textarea"
export { Textarea }