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,30 @@
import React from "react"
import type { Meta, StoryObj } from "@storybook/react"
import { Command } from "./command"
import { Badge } from "../badge"
const meta: Meta<typeof Command> = {
title: "Components/Command",
component: Command,
parameters: {
layout: "centered",
},
}
export default meta
type Story = StoryObj<typeof Command>
export const Default: Story = {
render: () => {
return (
<div className="w-[500px]">
<Command>
<Badge color="green">Get</Badge>
<code>localhost:9000/store/products</code>
<Command.Copy content="localhost:9000/store/products" />
</Command>
</div>
)
},
}

View File

@@ -0,0 +1,25 @@
"use client"
import { Copy } from "@/components/copy"
import { clx } from "@/utils/clx"
import React from "react"
const CommandComponent = ({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) => {
return (
<div
className={clx(
"bg-ui-code-bg-header border-ui-code-border flex items-center rounded-lg border px-3 py-2",
"[&>code]:text-ui-code-text-base [&>code]:txt-compact-small [&>code]:mx-3 [&>code]:font-mono [&>code]:leading-6",
className
)}
{...props}
/>
)
}
const Command = Object.assign(CommandComponent, { Copy })
export { Command }

View File

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