Files
pterodactyl-panel/resources/scripts/components/elements/Code.tsx
T
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

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>
);
}