mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-06-06 02:31:13 +02:00
Simplify NIP link styling in rich text
Remove icon and inline-flex layout from NIP links so they align consistently with surrounding text and have the same size.
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
import { FileText } from "lucide-react";
|
|
||||||
import type { NipNode } from "@/lib/nip-transformer";
|
import type { NipNode } from "@/lib/nip-transformer";
|
||||||
import { useGrimoire } from "@/core/state";
|
import { useGrimoire } from "@/core/state";
|
||||||
import { getNIPInfo } from "@/lib/nip-icons";
|
import { getNIPInfo } from "@/lib/nip-icons";
|
||||||
@@ -26,11 +25,10 @@ export function Nip({ node }: NipNodeProps) {
|
|||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
onClick={openNIP}
|
onClick={openNIP}
|
||||||
className="inline-flex items-center gap-0.5 text-muted-foreground underline decoration-dotted hover:text-foreground cursor-crosshair"
|
className="text-muted-foreground underline decoration-dotted hover:text-foreground cursor-crosshair"
|
||||||
title={nipInfo?.description ?? `View NIP-${number} specification`}
|
title={nipInfo?.description ?? `View NIP-${number} specification`}
|
||||||
>
|
>
|
||||||
<FileText className="size-3" />
|
{raw}
|
||||||
<span>{raw}</span>
|
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user