Raw
1 import { clx } from "@/utils/clx"
2 import * as React from "react"
3
4 /**
5 * This component is based on the `code` element and supports all of its props
6 */
7 const Code = React.forwardRef<
8 HTMLElement,
9 React.ComponentPropsWithoutRef<"code">
10 >(({ className, ...props }, ref) => {
11 return (
12 <code
13 ref={ref}
14 className={clx(
15 "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",
16 className
17 )}
18 {...props}
19 />
20 )
21 })
22
23 Code.displayName = "Code"
24
25 export { Code }