atproto explorer pdsls.dev
atproto tool

change to button

juli.ee f2c5de3b 7e8bafb4

verified
Changed files
+8 -8
src
components
+8 -8
src/components/lexicon-schema.tsx
···
return (
<>
<Show when={props.refType}>
-
<a
-
href={props.refType}
onClick={handleClick}
-
class="inline-block rounded bg-blue-100 px-1.5 py-0.5 font-mono text-xs text-blue-800 hover:bg-blue-200 hover:underline active:bg-blue-200 dark:bg-blue-900/30 dark:text-blue-300 dark:hover:bg-blue-900/50 dark:active:bg-blue-900/50"
>
{displayType}
-
</a>
</Show>
<Show when={!props.refType}>
<span class="inline-block rounded bg-blue-100 px-1.5 py-0.5 font-mono text-xs text-blue-800 dark:bg-blue-900/30 dark:text-blue-300">
···
return (
<div class="flex flex-col gap-3" id={`def-${props.name}`}>
<div class="flex items-center gap-2">
-
<a
-
href={`#schema:${props.name}`}
onClick={handleHeaderClick}
-
class="text-lg font-semibold hover:underline"
>
{props.name === "main" ? "Main Definition" : props.name}
-
</a>
<span class={`rounded px-2 py-0.5 text-xs font-semibold uppercase ${defTypeColor()}`}>
{props.def.type}
</span>
···
return (
<>
<Show when={props.refType}>
+
<button
+
type="button"
onClick={handleClick}
+
class="inline-block cursor-pointer rounded bg-blue-100 px-1.5 py-0.5 font-mono text-xs text-blue-800 hover:bg-blue-200 hover:underline active:bg-blue-200 dark:bg-blue-900/30 dark:text-blue-300 dark:hover:bg-blue-900/50 dark:active:bg-blue-900/50"
>
{displayType}
+
</button>
</Show>
<Show when={!props.refType}>
<span class="inline-block rounded bg-blue-100 px-1.5 py-0.5 font-mono text-xs text-blue-800 dark:bg-blue-900/30 dark:text-blue-300">
···
return (
<div class="flex flex-col gap-3" id={`def-${props.name}`}>
<div class="flex items-center gap-2">
+
<button
+
type="button"
onClick={handleHeaderClick}
+
class="cursor-pointer text-lg font-semibold hover:underline"
>
{props.name === "main" ? "Main Definition" : props.name}
+
</button>
<span class={`rounded px-2 py-0.5 text-xs font-semibold uppercase ${defTypeColor()}`}>
{props.def.type}
</span>