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 "./kbd"

View File

@@ -0,0 +1,21 @@
import type { Meta, StoryObj } from "@storybook/react"
import { Kbd } from "./kbd"
const meta: Meta<typeof Kbd> = {
title: "Components/Kbd",
component: Kbd,
parameters: {
layout: "centered",
},
}
export default meta
type Story = StoryObj<typeof Kbd>
export const Default: Story = {
args: {
children: "⌘",
},
}

View File

@@ -0,0 +1,25 @@
import * as React from "react"
import { clx } from "@/utils/clx"
const Kbd = React.forwardRef<
HTMLElement,
React.ComponentPropsWithoutRef<"kbd">
>(({ children, className, ...props }, ref) => {
return (
<kbd
{...props}
ref={ref}
className={clx(
"bg-ui-tag-neutral-bg text-ui-tag-neutral-text border-ui-tag-neutral-border inline-flex h-5 w-fit min-w-[20px] items-center justify-center rounded-md border px-1",
"txt-compact-xsmall-plus",
className
)}
>
{children}
</kbd>
)
})
Kbd.displayName = "Kbd"
export { Kbd }