Add badge highlighting with animated border transitions, use className in BadgeProps

This commit is contained in:
2024-12-22 15:28:49 -06:00
parent 069471145a
commit e80c8b1c4f
3 changed files with 30 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ type EmboldenedProps = {
copyable?: boolean;
};
const Emboldened = ({ children, copyable }: EmboldenedProps) => {
const Emboldened = ({ children, copyable, className }: EmboldenedProps) => {
function copyToClipboard() {
// Copy to clipboard
navigator.clipboard.writeText(children.toString());
@@ -16,6 +16,7 @@ const Emboldened = ({ children, copyable }: EmboldenedProps) => {
<span
onClick={copyable ? copyToClipboard : undefined}
className={cn(
className,
"bg-zinc-900/40 rounded border border-zinc-700 py-0.5 px-1 font-mono text-teal-400",
{
"cursor-pointer": copyable,