diff --git a/app/globals.css b/app/globals.css index ee1a459..7a61697 100644 --- a/app/globals.css +++ b/app/globals.css @@ -60,6 +60,19 @@ .skeleton { @apply animate-pulse bg-black/20 rounded-md text-white/0; } + + /* .accordion { + @apply first-of-type:rounded-t-md last-of-type:rounded-b-md; + } */ + .accordion:not(.accordion + .accordion) { + @apply rounded-t-md; + } + .accordion:has(+ .accordion) { + @apply border-b border-black/20; + } + .accordion:not(:has(+ .accordion)) { + @apply rounded-b-md; + } } @keyframes identifier { diff --git a/components/ttcmd/index.tsx b/components/ttcmd/index.tsx index 6726482..252101e 100644 --- a/components/ttcmd/index.tsx +++ b/components/ttcmd/index.tsx @@ -45,15 +45,13 @@ export const TTCMD: FC< return ( }> - { - /* */ - } + {hasEscapedTOC !== undefined && ( +
{token.children?.map((e) => ( {render(e, usedIds)} @@ -210,7 +211,7 @@ function render(token: Token, usedIds: string[]) { ); case "accordion": return ( -
+
@@ -269,6 +270,8 @@ function render(token: Token, usedIds: string[]) { ); case "hr": return
; + case "comment": + return <>; default: return (
diff --git a/lib/accordion/index.tsx b/lib/accordion/index.tsx index 14b0908..1d9ea86 100644 --- a/lib/accordion/index.tsx +++ b/lib/accordion/index.tsx @@ -24,7 +24,9 @@ export const Accordion: FC> = ( className="flex justify-between cursor-pointer" onClick={() => !expandOnHover && setOpen(!open)} > - {title} +
+ {title} +