chore(ui,icons,ui-preset,toolbox): Move design system packages to monorepo (#5470)
This commit is contained in:
committed by
GitHub
parent
71853eafdd
commit
e4ce2f4e07
@@ -0,0 +1,18 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react"
|
||||
|
||||
import { Code } from "./code"
|
||||
|
||||
const meta: Meta<typeof Code> = {
|
||||
title: "Components/Code",
|
||||
component: Code,
|
||||
}
|
||||
|
||||
export default meta
|
||||
|
||||
type Story = StoryObj<typeof Code>
|
||||
|
||||
export const Default: Story = {
|
||||
args: {
|
||||
children: "yarn add -D @medusajs/ui-preset",
|
||||
},
|
||||
}
|
||||
22
packages/design-system/ui/src/components/code/code.tsx
Normal file
22
packages/design-system/ui/src/components/code/code.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { clx } from "@/utils/clx"
|
||||
import * as React from "react"
|
||||
|
||||
const Code = React.forwardRef<
|
||||
HTMLElement,
|
||||
React.ComponentPropsWithoutRef<"code">
|
||||
>(({ className, ...props }, ref) => {
|
||||
return (
|
||||
<code
|
||||
ref={ref}
|
||||
className={clx(
|
||||
"border-ui-tag-neutral-border bg-ui-tag-neutral-bg text-ui-tag-neutral-text txt-compact-small inline-flex rounded-md border px-[6px] font-mono",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
})
|
||||
|
||||
Code.displayName = "Code"
|
||||
|
||||
export { Code }
|
||||
1
packages/design-system/ui/src/components/code/index.tsx
Normal file
1
packages/design-system/ui/src/components/code/index.tsx
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./code"
|
||||
Reference in New Issue
Block a user