feat: add proper error component

This commit is contained in:
Aarnav Tale
2024-03-29 16:14:35 -04:00
parent 4a1cdaa432
commit 22b6af685a
4 changed files with 100 additions and 42 deletions
+7 -4
View File
@@ -1,9 +1,12 @@
import { type ReactNode } from 'react'
import clsx from 'clsx'
import { type HTMLProps } from 'react'
export default function Code({ children }: { readonly children: ReactNode }) {
type Properties = HTMLProps<HTMLSpanElement>
export default function Code(properties: Properties) {
return (
<code className='bg-gray-100 dark:bg-zinc-700 p-0.5 rounded-md'>
{children}
<code className={clsx('bg-gray-100 dark:bg-zinc-700 p-0.5 rounded-md', properties.className)}>
{properties.children}
</code>
)
}