mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-18 19:46:57 +02:00
fix(theme): make warning a first-class admonition, and deprecate caution admonition (#9308)
This commit is contained in:
parent
58be496da2
commit
f5ae537d3e
339 changed files with 666 additions and 515 deletions
|
@ -72,7 +72,7 @@ I can write **Markdown** alongside my _JSX_!
|
|||
</BrowserWindow>
|
||||
```
|
||||
|
||||
:::caution MDX is JSX
|
||||
:::warning MDX is JSX
|
||||
|
||||
Since all doc files are parsed using MDX, anything that looks like HTML is actually JSX. Therefore, if you need to inline-style a component, follow JSX flavor and provide style objects.
|
||||
|
||||
|
@ -198,7 +198,7 @@ From MDX v2+ onward (Docusaurus v3+), lower-case tag names are always rendered a
|
|||
|
||||
:::
|
||||
|
||||
:::caution
|
||||
:::warning
|
||||
|
||||
This feature is powered by [an `MDXProvider`](https://mdxjs.com/docs/using-mdx/#mdx-provider). If you are importing Markdown in a React page, you have to supply this provider yourself through the `MDXContent` theme component.
|
||||
|
||||
|
@ -319,7 +319,7 @@ import PartialExample from './_markdown-partial-example.mdx';
|
|||
|
||||
This way, you can reuse content among multiple pages and avoid duplicating materials.
|
||||
|
||||
:::caution
|
||||
:::warning
|
||||
|
||||
Currently, the table of contents does not contain the imported Markdown headings. This is a technical limitation that we are trying to solve ([issue](https://github.com/facebook/docusaurus/issues/3915)).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue