Skip to content

Commit ce4ba2c

Browse files
committed
fix(website): fixed alignment issue when callout component has no title
1 parent 1abfea9 commit ce4ba2c

File tree

8 files changed

+163
-132
lines changed

8 files changed

+163
-132
lines changed

.pkgs/configs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"eslint-plugin-de-morgan": "^1.2.1",
2525
"eslint-plugin-function": "^0.0.21",
2626
"eslint-plugin-jsdoc": "^50.6.9",
27-
"eslint-plugin-perfectionist": "^4.12.0",
27+
"eslint-plugin-perfectionist": "^4.12.1",
2828
"eslint-plugin-regexp": "^2.7.0",
2929
"eslint-plugin-unicorn": "^58.0.0",
3030
"typescript-eslint": "^8.31.0"

.pkgs/eslint-plugin-local/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@typescript-eslint/utils": "^8.31.0",
3535
"eslint-plugin-de-morgan": "^1.2.1",
3636
"eslint-plugin-jsdoc": "^50.6.9",
37-
"eslint-plugin-perfectionist": "^4.12.0",
37+
"eslint-plugin-perfectionist": "^4.12.1",
3838
"eslint-plugin-regexp": "^2.7.0",
3939
"eslint-plugin-unicorn": "^58.0.0",
4040
"string-ts": "^2.2.1",

apps/website/app/docs/[[...slug]]/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Callout } from "#/components/ui/Callout";
12
import { source } from "#/lib/source";
23
import { Popup, PopupContent, PopupTrigger } from "fumadocs-twoslash/ui";
34
import { Tab, Tabs } from "fumadocs-ui/components/tabs";
@@ -8,6 +9,7 @@ import { notFound } from "next/navigation";
89

910
const mdxComponents = {
1011
...defaultMdxComponents,
12+
Callout,
1113
Popup,
1214
PopupContent,
1315
PopupTrigger,

apps/website/app/overrides.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
.fd-callout .min-w-0.flex-1 {
2+
display: flex;
3+
flex-flow: column;
4+
gap: calc(var(--spacing) * 2);
5+
}
6+
7+
.fd-callout .min-w-0.flex-1>* {
8+
margin-top: 0;
9+
margin-bottom: 0;
10+
}
11+
112
[aria-roledescription="flowchart-v2"] span.nodeLabel {
213
filter: brightness(0.5);
314
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type { Pretty } from "@eslint-react/eff";
2+
import type React from "react";
3+
import { cn } from "#/lib/cn";
4+
import { Callout as FDCallout } from "fumadocs-ui/components/callout";
5+
6+
export type CalloutProps = Pretty<Parameters<typeof FDCallout>[0]> & { ref?: React.RefObject<HTMLDivElement | null> };
7+
8+
export function Callout({ children, className, ...props }: CalloutProps) {
9+
return (
10+
<FDCallout className={cn("fd-callout", className)} {...props}>
11+
{children}
12+
</FDCallout>
13+
);
14+
}

apps/website/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
},
1212
"dependencies": {
1313
"@chevrotain/regexp-to-ast": "^11.0.3",
14+
"@eslint-react/eff": "workspace:*",
1415
"bsky-react-post": "^0.1.7",
1516
"clsx": "^2.1.1",
1617
"fumadocs-core": "15.2.9",
@@ -51,7 +52,7 @@
5152
"eslint": "^9.25.1",
5253
"eslint-plugin-de-morgan": "^1.2.1",
5354
"eslint-plugin-import-x": "^4.10.6",
54-
"eslint-plugin-perfectionist": "^4.12.0",
55+
"eslint-plugin-perfectionist": "^4.12.1",
5556
"eslint-plugin-react-hooks": "^5.2.0",
5657
"eslint-plugin-react-refresh": "^0.4.20",
5758
"eslint-plugin-unicorn": "^58.0.0",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"cspell": "^8.19.2",
7070
"dedent": "^1.5.3",
7171
"dprint": "^0.49.1",
72-
"esbuild": "^0.25.2",
72+
"esbuild": "^0.25.3",
7373
"eslint": "^9.25.1",
7474
"eslint-config-flat-gitignore": "^2.1.0",
7575
"eslint-plugin-vitest": "^0.5.4",
@@ -112,7 +112,7 @@
112112
"@types/react": "^19.1.2",
113113
"@types/react-dom": "^19.1.2",
114114
"cross-spawn": "^7.0.6",
115-
"esbuild": "^0.25.2",
115+
"esbuild": "^0.25.3",
116116
"lucide-react": "^0.503.0",
117117
"next": "^15.3.1",
118118
"react": "^19.1.0",

0 commit comments

Comments
 (0)