Feature/idea_type_callout (#2642)

* docs: enhance contribution guidance in "What is Fumadocs" documentation

* feat(callout): add 'idea' type to Callout component and update documentation

* feat(callout): add 'idea' type support with updated icon and color in Callout component

* Delete docs-improvement.md

* Update changeset for 'idea' callout type

Removed 'docs' patch and added 'idea' callout type.

---------

Co-authored-by: Fuma Nama <[email protected]>
This commit is contained in:
Mehul Kumar
2025-11-20 09:11:51 +08:00
committed by GitHub
co-authored by Fuma Nama
parent ade44d091b
commit 40d9b7575c
5 changed files with 19 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"fumadocs-ui": patch
---
Add 'idea' callout type
@@ -141,6 +141,7 @@ Useful for adding tips/warnings, it is included by default. You can specify the
- `warn`/`warning`
- `error`
- `success`
- `idea`
```mdx
<Callout>Hello World</Callout>
@@ -150,6 +151,10 @@ Useful for adding tips/warnings, it is included by default. You can specify the
<Callout title="Title" type="error">
Hello World
</Callout>
<Callout title="Title" type="idea">
Hello World
</Callout>
```
<Callout>Hello World</Callout>
@@ -162,6 +167,10 @@ Useful for adding tips/warnings, it is included by default. You can specify the
Hello World
</Callout>
<Callout title="Title" type="idea">
Hello World
</Callout>
### Headings
An anchor is automatically applied to each heading, it sanitizes invalid characters like spaces. (e.g. `Hello World` to `hello-world`)
@@ -41,7 +41,7 @@ You can fetch data from server to display content, or integrate with CMS receivi
Fumadocs is maintained by Fuma and many contributors, with care on the maintainability of codebase.
While we don't aim to offer every functionality people wanted, we're more focused on making basic features perfect and well-maintained.
You can also help Fumadocs to be more useful by contributing!
You can also help Fumadocs to be more useful by contributing!
## When to use Fumadocs
+1
View File
@@ -26,6 +26,7 @@ The default theme of Fumadocs
--color-fd-warning: oklch(76.9% 0.188 70.08);
--color-fd-error: oklch(63.7% 0.237 25.331);
--color-fd-success: oklch(72.3% 0.219 149.579);
--color-fd-idea: oklch(70.5% 0.209 60.849);
--color-fd-diff-remove: rgba(200, 10, 100, 0.12);
--color-fd-diff-remove-symbol: rgb(230, 10, 100);
--color-fd-diff-add: rgba(14, 180, 100, 0.1);
+3 -2
View File
@@ -1,8 +1,8 @@
import { CircleCheck, CircleX, Info, TriangleAlert } from 'lucide-react';
import { CircleCheck, CircleX, Info, TriangleAlert, Sun } from 'lucide-react';
import type { ComponentProps, ReactNode } from 'react';
import { cn } from '@/utils/cn';
export type CalloutType = 'info' | 'warn' | 'error' | 'success' | 'warning';
export type CalloutType = 'info' | 'warn' | 'error' | 'success' | 'warning' | 'idea';
const iconClass = 'size-5 -me-0.5 fill-(--callout-color) text-fd-card';
@@ -68,6 +68,7 @@ export function CalloutContainer({
warning: <TriangleAlert className={iconClass} />,
error: <CircleX className={iconClass} />,
success: <CircleCheck className={iconClass} />,
idea: <Sun className={iconClass} />,
}[type]}
<div className="flex flex-col gap-2 min-w-0 flex-1">{children}</div>
</div>