Files
pterodactyl-panel/resources/scripts/components/elements/Code.tsx
T

22 lines
521 B
TypeScript
Raw Normal View History

import React from 'react';
2026-10-05 18:10:18 -04:00
import { cn } from '@/lib/cn';
interface CodeProps {
dark?: boolean | undefined;
className?: string;
2026-10-05 18:10:18 -04:00
children: React.ReactNode;
}
2026-10-05 18:10:18 -04:00
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>
);
}