Move inlinecode to shared ui package

This commit is contained in:
Gregory Schier
2026-03-12 19:32:04 -07:00
parent d253d1605c
commit 4d792c7f9f
36 changed files with 35 additions and 56 deletions

View File

@@ -0,0 +1,15 @@
import classNames from 'classnames';
import type { HTMLAttributes } from 'react';
export function InlineCode({ className, ...props }: HTMLAttributes<HTMLSpanElement>) {
return (
<code
className={classNames(
className,
'font-mono text-shrink bg-surface-highlight border border-border-subtle flex-grow-0',
'px-1.5 py-0.5 rounded text shadow-inner break-words',
)}
{...props}
/>
);
}

View File

@@ -33,3 +33,4 @@ export { Portal } from "./components/Portal";
export { usePortal } from "./hooks/usePortal";
export { Banner } from "./components/Banner";
export type { BannerProps } from "./components/Banner";
export { InlineCode } from "./components/InlineCode";