mirror of
https://github.com/pterodactyl/panel.git
synced 2026-11-30 11:25:52 -05:00
Co-authored-by: Anthony <anthony@infraly.co> Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
22 lines
521 B
TypeScript
22 lines
521 B
TypeScript
import React from 'react';
|
|
import { cn } from '@/lib/cn';
|
|
|
|
interface CodeProps {
|
|
dark?: boolean | undefined;
|
|
className?: string;
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
export default function Code({ dark, className, children }: CodeProps) {
|
|
return (
|
|
<code
|
|
className={cn('font-mono px-1.5 py-0.5 inline-block rounded-sm', className, {
|
|
'bg-sunken': !dark,
|
|
'bg-muted text-foreground': dark,
|
|
})}
|
|
>
|
|
{children}
|
|
</code>
|
|
);
|
|
}
|