Skip to content

Commit

Permalink
Make longer admonitions a bit more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
damianstasik committed Sep 19, 2023
1 parent 19a5cd3 commit d4c0b2a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/theme/Admonition/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ type AdmonitionConfig = {
const AdmonitionConfigs: Record<string, AdmonitionConfig> = {
note: {
className:
"bg-sky-100 border-sky-300 text-sky-700 dark:bg-sky-950 dark:border-sky-700 dark:text-sky-200",
"bg-sky-100 border-sky-300 text-sky-700 dark:bg-sky-950 dark:border-sky-700 dark:text-sky-100",
iconComponent: NoteIcon,
label: "Note",
},
danger: {
className:
"bg-red-100 border-red-300 text-red-700 dark:bg-red-950 dark:border-red-700 dark:text-red-200",
"bg-red-100 border-red-300 text-red-700 dark:bg-red-950 dark:border-red-700 dark:text-red-100",
iconComponent: DangerIcon,
label: "Danger",
},
warning: {
className:
"bg-yellow-100 border-yellow-500 text-yellow-700 dark:bg-yellow-950 dark:border-yellow-700 dark:text-yellow-200",
"bg-yellow-100 border-yellow-500 text-yellow-700 dark:bg-yellow-950 dark:border-yellow-700 dark:text-yellow-100",
iconComponent: CautionIcon,
label: "Warning",
},
Expand Down Expand Up @@ -120,7 +120,7 @@ export default function Admonition(props: Props) {
return (
<div
className={clsx(
"flex flex-col py-2 px-3 not-prose border [&+&]:mt-3 [&_a:hover]:text-gray-900 dark:[&_a:hover]:text-gray-50",
"flex flex-col py-2 px-3 not-prose border gap-1 [&+&]:mt-3 [&_a:hover]:text-gray-900 dark:[&_a:hover]:text-gray-50",
typeConfig.className
)}
role="alert"
Expand All @@ -131,7 +131,7 @@ export default function Admonition(props: Props) {
</span>
{titleLabel}
</div>
<div>{children}</div>
<div className="leading-relaxed">{children}</div>
</div>
);
}

0 comments on commit d4c0b2a

Please sign in to comment.