docusaurus/assets/js/bd7149c1.eef4498d.js
2024-05-30 10:39:22 +00:00

1 line
No EOL
42 KiB
JavaScript

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[93630],{35434:(e,n,t)=>{t.d(n,{Z:()=>c});var r=t(24246);t(27378);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function i(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function c(e){return(0,r.jsx)("svg",i(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){o(e,n,t[n])}))}return e}({viewBox:"0 0 14 16"},e),{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}))}},77773:(e,n,t)=>{t.d(n,{Z:()=>se});var r=t(24246),o=t(27378);function i(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function c(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function s(e){const{mdxAdmonitionTitle:n,rest:t}=function(e){const n=o.Children.toArray(e),t=n.find((e=>o.isValidElement(e)&&"mdxAdmonitionTitle"===e.type)),i=n.filter((e=>e!==t));return{mdxAdmonitionTitle:null==t?void 0:t.props.children,rest:i.length>0?(0,r.jsx)(r.Fragment,{children:i}):null}}(e.children);var s;const a=null!==(s=e.title)&&void 0!==s?s:n;return c(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){i(e,n,t[n])}))}return e}({},e,a&&{title:a}),{children:t})}var a=t(40624),l=t(36712),u=t(89583);const d={admonition:"admonition_o5H7",admonitionHeading:"admonitionHeading_FzoX",admonitionIcon:"admonitionIcon_rXq6",admonitionContent:"admonitionContent_Knsx"};function p({type:e,className:n,children:t}){return(0,r.jsx)("div",{className:(0,a.Z)(u.k.common.admonition,u.k.common.admonitionType(e),d.admonition,n),children:t})}function b({icon:e,title:n}){return(0,r.jsxs)("div",{className:d.admonitionHeading,children:[(0,r.jsx)("span",{className:d.admonitionIcon,children:e}),n]})}function f({children:e}){return e?(0,r.jsx)("div",{className:d.admonitionContent,children:e}):null}function m(e){const{type:n,icon:t,title:o,children:i,className:c}=e;return(0,r.jsxs)(p,{type:n,className:c,children:[o||t?(0,r.jsx)(b,{title:o,icon:t}):null,(0,r.jsx)(f,{children:i})]})}function h(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function y(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function j(e){return(0,r.jsx)("svg",y(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){h(e,n,t[n])}))}return e}({viewBox:"0 0 14 16"},e),{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})}))}function O(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function g(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}const w={icon:(0,r.jsx)(j,{}),title:(0,r.jsx)(l.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function x(e){return(0,r.jsx)(m,g(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){O(e,n,t[n])}))}return e}({},w,e),{className:(0,a.Z)("alert alert--secondary",e.className),children:e.children}))}function v(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function P(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function k(e){return(0,r.jsx)("svg",P(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){v(e,n,t[n])}))}return e}({viewBox:"0 0 12 16"},e),{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}))}function D(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function S(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}const T={icon:(0,r.jsx)(k,{}),title:(0,r.jsx)(l.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function N(e){return(0,r.jsx)(m,S(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){D(e,n,t[n])}))}return e}({},T,e),{className:(0,a.Z)("alert alert--success",e.className),children:e.children}))}var A=t(35434);function C(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function M(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}const E={icon:(0,r.jsx)(A.Z,{}),title:(0,r.jsx)(l.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function z(e){return(0,r.jsx)(m,M(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){C(e,n,t[n])}))}return e}({},E,e),{className:(0,a.Z)("alert alert--info",e.className),children:e.children}))}function I(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Z(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function _(e){return(0,r.jsx)("svg",Z(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){I(e,n,t[n])}))}return e}({viewBox:"0 0 16 16"},e),{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}))}function V(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function H(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}const R={icon:(0,r.jsx)(_,{}),title:(0,r.jsx)(l.Z,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function B(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function W(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function U(e){return(0,r.jsx)("svg",W(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){B(e,n,t[n])}))}return e}({viewBox:"0 0 12 16"},e),{children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}))}function q(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function X(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}const L={icon:(0,r.jsx)(U,{}),title:(0,r.jsx)(l.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};function Y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function $(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}const J={icon:(0,r.jsx)(_,{}),title:(0,r.jsx)(l.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};function F(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function K(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){F(e,n,t[n])}))}return e}const Q={note:x,tip:N,info:z,warning:function(e){return(0,r.jsx)(m,H(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){V(e,n,t[n])}))}return e}({},R,e),{className:(0,a.Z)("alert alert--warning",e.className),children:e.children}))},danger:function(e){return(0,r.jsx)(m,X(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){q(e,n,t[n])}))}return e}({},L,e),{className:(0,a.Z)("alert alert--danger",e.className),children:e.children}))}},G={secondary:e=>(0,r.jsx)(x,K({title:"secondary"},e)),important:e=>(0,r.jsx)(z,K({title:"important"},e)),success:e=>(0,r.jsx)(N,K({title:"success"},e)),caution:function(e){return(0,r.jsx)(m,$(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){Y(e,n,t[n])}))}return e}({},J,e),{className:(0,a.Z)("alert alert--warning",e.className),children:e.children}))}},ee=K({},Q,G);var ne=t(52615);function te(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var re,oe;const ie=(re=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){te(e,n,t[n])}))}return e}({},ee),oe=null!=(oe={"my-custom-admonition":function(e){return(0,r.jsxs)("div",{style:{border:"solid red",padding:10},children:[(0,r.jsx)(ne.Z,{as:"h5",style:{color:"blue",fontSize:30},children:e.title}),(0,r.jsx)("div",{children:e.children})]})}})?oe:{},Object.getOwnPropertyDescriptors?Object.defineProperties(re,Object.getOwnPropertyDescriptors(oe)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(oe)).forEach((function(e){Object.defineProperty(re,e,Object.getOwnPropertyDescriptor(oe,e))})),re);function ce(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function se(e){const n=s(e),t=(o=n.type,ie[o]||(console.warn(`No admonition component found for admonition type "${o}". Using Info as fallback.`),ie.info));var o;return(0,r.jsx)(t,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){ce(e,n,t[n])}))}return e}({},n))}},61132:(e,n,t)=>{t.d(n,{Z:()=>c});var r=t(24246),o=(t(27378),t(40624));const i={tabItem:"tabItem_pnkT"};function c({children:e,hidden:n,className:t}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,o.Z)(i.tabItem,t),hidden:n,children:e})}},97555:(e,n,t)=>{t.d(n,{Z:()=>S});var r=t(24246),o=t(27378),i=t(40624),c=t(75527),s=t(3620),a=t(44479),l=t(62821),u=t(52196),d=t(53589);function p(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function b(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function f(e){var n,t;return null!==(t=null===(n=o.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,o.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)})))||void 0===n?void 0:n.filter(Boolean))&&void 0!==t?t:[]}function m(e){const{values:n,children:t}=e;return(0,o.useMemo)((()=>{const e=null!=n?n:function(e){return f(e).map((({props:{value:e,label:n,attributes:t,default:r}})=>({value:e,label:n,attributes:t,default:r})))}(t);return function(e){const n=(0,u.l)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e}),[n,t])}function h({value:e,tabValues:n}){return n.some((n=>n.value===e))}function y({queryString:e=!1,groupId:n}){const t=(0,s.k6)(),r=function({queryString:e=!1,groupId:n}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!n)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return null!=n?n:null}({queryString:e,groupId:n}),i=(0,l._X)(r),c=(0,o.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(t.location.search);n.set(r,e),t.replace(b(function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){p(e,n,t[n])}))}return e}({},t.location),{search:n.toString()}))}),[r,t]);return[i,c]}function j(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,i=m(e),[c,s]=(0,o.useState)((()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(e){if(!h({value:e,tabValues:n}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}var t;const r=null!==(t=n.find((e=>e.default)))&&void 0!==t?t:n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:i}))),[l,u]=y({queryString:t,groupId:r}),[p,b]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[t,r]=(0,d.Nk)(n);return[t,(0,o.useCallback)((e=>{n&&r.set(e)}),[n,r])]}({groupId:r}),f=(()=>{const e=null!=l?l:p;return h({value:e,tabValues:i})?e:null})();(0,a.Z)((()=>{f&&s(f)}),[f]);return{selectedValue:c,selectValue:(0,o.useCallback)((e=>{if(!h({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),b(e)}),[u,b,i]),tabValues:i}}var O=t(29088);const g={tabList:"tabList_Qoir",tabItem:"tabItem_AQgk"};function w(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function x(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){w(e,n,t[n])}))}return e}function v(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function P({className:e,block:n,selectedValue:t,selectValue:o,tabValues:s}){const a=[],{blockElementScrollPositionUntilNextRender:l}=(0,c.o5)(),u=e=>{const n=e.currentTarget,r=a.indexOf(n),i=s[r].value;i!==t&&(l(n),o(i))},d=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const r=a.indexOf(e.currentTarget)+1;var t;n=null!==(t=a[r])&&void 0!==t?t:a[0];break}case"ArrowLeft":{const t=a.indexOf(e.currentTarget)-1;var r;n=null!==(r=a[t])&&void 0!==r?r:a[a.length-1];break}}null==n||n.focus()};return(0,r.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.Z)("tabs",{"tabs--block":n},e),children:s.map((({value:e,label:n,attributes:o})=>(0,r.jsx)("li",v(x({role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>a.push(e),onKeyDown:d,onClick:u},o),{className:(0,i.Z)("tabs__item",g.tabItem,null==o?void 0:o.className,{"tabs__item--active":t===e}),children:null!=n?n:e}),e)))})}function k({lazy:e,children:n,selectedValue:t}){const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=i.find((e=>e.props.value===t));return e?(0,o.cloneElement)(e,{className:"margin-top--md"}):null}return(0,r.jsx)("div",{className:"margin-top--md",children:i.map(((e,n)=>(0,o.cloneElement)(e,{key:n,hidden:e.props.value!==t})))})}function D(e){const n=j(e);return(0,r.jsxs)("div",{className:(0,i.Z)("tabs-container",g.tabList),children:[(0,r.jsx)(P,x({},n,e)),(0,r.jsx)(k,x({},n,e))]})}function S(e){const n=(0,O.Z)();return(0,r.jsx)(D,v(x({},e),{children:f(e.children)}),String(n))}},6698:(e,n,t)=>{t.d(n,{Z:()=>l});var r=t(24246),o=(t(27378),t(40624));const i={browserWindow:"browserWindow_my1Q",browserWindowHeader:"browserWindowHeader_jXSR",row:"row_KZDM",buttons:"buttons_uHc7",right:"right_oyze",browserWindowAddressBar:"browserWindowAddressBar_Pd8y",dot:"dot_giz1",browserWindowMenuIcon:"browserWindowMenuIcon_Vhuh",bar:"bar_rrRL",browserWindowBody:"browserWindowBody_Idgs"};function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){c(e,n,t[n])}))}return e}function a(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}function l({children:e,minHeight:n,url:t="http://localhost:3000",style:c,bodyStyle:l}){return(0,r.jsxs)("div",{className:i.browserWindow,style:a(s({},c),{minHeight:n}),children:[(0,r.jsxs)("div",{className:i.browserWindowHeader,children:[(0,r.jsxs)("div",{className:i.buttons,children:[(0,r.jsx)("span",{className:i.dot,style:{background:"#f25f58"}}),(0,r.jsx)("span",{className:i.dot,style:{background:"#fbbe3c"}}),(0,r.jsx)("span",{className:i.dot,style:{background:"#58cb42"}})]}),(0,r.jsx)("div",{className:(0,o.Z)(i.browserWindowAddressBar,"text--truncate"),children:t}),(0,r.jsx)("div",{className:i.browserWindowMenuIcon,children:(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:i.bar}),(0,r.jsx)("span",{className:i.bar}),(0,r.jsx)("span",{className:i.bar})]})})]}),(0,r.jsx)("div",{className:i.browserWindowBody,style:l,children:e})]})}},29035:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>u,default:()=>m,frontMatter:()=>l,metadata:()=>d,toc:()=>b});var r=t(24246),o=t(71670),i=t(6698),c=t(97555),s=t(61132),a=t(77773);const l={id:"admonitions",description:"Handling admonitions/callouts in Docusaurus Markdown",slug:"/markdown-features/admonitions"},u="Admonitions",d={id:"guides/markdown-features/admonitions",title:"Admonitions",description:"Handling admonitions/callouts in Docusaurus Markdown",source:"@site/docs/guides/markdown-features/markdown-features-admonitions.mdx",sourceDirName:"guides/markdown-features",slug:"/markdown-features/admonitions",permalink:"/docs/markdown-features/admonitions",draft:!1,unlisted:!1,editUrl:"https://github.com/facebook/docusaurus/edit/main/website/docs/guides/markdown-features/markdown-features-admonitions.mdx",tags:[],version:"current",lastUpdatedBy:"Azzedine E",lastUpdatedAt:1717065341e3,frontMatter:{id:"admonitions",description:"Handling admonitions/callouts in Docusaurus Markdown",slug:"/markdown-features/admonitions"},sidebar:"docs",previous:{title:"Code blocks",permalink:"/docs/markdown-features/code-blocks"},next:{title:"Headings and Table of contents",permalink:"/docs/markdown-features/toc"}},p={},b=[{value:"Usage with Prettier",id:"usage-with-prettier",level:2},{value:"Specifying title",id:"specifying-title",level:2},{value:"Nested admonitions",id:"nested-admonitions",level:2},{value:"Admonitions with MDX",id:"admonitions-with-mdx",level:2},{value:"Usage in JSX",id:"usage-in-jsx",level:2},{value:"Customizing admonitions",id:"customizing-admonitions",level:2},{value:"Customizing rendering behavior",id:"customizing-rendering-behavior",level:3},{value:"Customizing parsing behavior",id:"customizing-parsing-behavior",level:3},{value:"Custom admonition type components",id:"custom-admonition-type-components",level:3}];function f(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.a)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"admonitions",children:"Admonitions"}),"\n","\n",(0,r.jsx)(n.p,{children:"In addition to the basic Markdown syntax, we have a special admonitions syntax by wrapping text with a set of 3 colons, followed by a label denoting its type."}),"\n",(0,r.jsx)(n.p,{children:"Example:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-md",children:":::note\n\nSome **content** with _Markdown_ `syntax`. Check [this `api`](#).\n\n:::\n\n:::tip\n\nSome **content** with _Markdown_ `syntax`. Check [this `api`](#).\n\n:::\n\n:::info\n\nSome **content** with _Markdown_ `syntax`. Check [this `api`](#).\n\n:::\n\n:::warning\n\nSome **content** with _Markdown_ `syntax`. Check [this `api`](#).\n\n:::\n\n:::danger\n\nSome **content** with _Markdown_ `syntax`. Check [this `api`](#).\n\n:::\n"})}),"\n",(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["Some ",(0,r.jsx)(n.strong,{children:"content"})," with ",(0,r.jsx)(n.em,{children:"Markdown"})," ",(0,r.jsx)(n.code,{children:"syntax"}),". Check ",(0,r.jsxs)(n.a,{href:"#",children:["this ",(0,r.jsx)(n.code,{children:"api"})]}),"."]})}),(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsxs)(n.p,{children:["Some ",(0,r.jsx)(n.strong,{children:"content"})," with ",(0,r.jsx)(n.em,{children:"Markdown"})," ",(0,r.jsx)(n.code,{children:"syntax"}),". Check ",(0,r.jsxs)(n.a,{href:"#",children:["this ",(0,r.jsx)(n.code,{children:"api"})]}),"."]})}),(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:["Some ",(0,r.jsx)(n.strong,{children:"content"})," with ",(0,r.jsx)(n.em,{children:"Markdown"})," ",(0,r.jsx)(n.code,{children:"syntax"}),". Check ",(0,r.jsxs)(n.a,{href:"#",children:["this ",(0,r.jsx)(n.code,{children:"api"})]}),"."]})}),(0,r.jsx)(n.admonition,{type:"warning",children:(0,r.jsxs)(n.p,{children:["Some ",(0,r.jsx)(n.strong,{children:"content"})," with ",(0,r.jsx)(n.em,{children:"Markdown"})," ",(0,r.jsx)(n.code,{children:"syntax"}),". Check ",(0,r.jsxs)(n.a,{href:"#",children:["this ",(0,r.jsx)(n.code,{children:"api"})]}),"."]})}),(0,r.jsx)(n.admonition,{type:"danger",children:(0,r.jsxs)(n.p,{children:["Some ",(0,r.jsx)(n.strong,{children:"content"})," with ",(0,r.jsx)(n.em,{children:"Markdown"})," ",(0,r.jsx)(n.code,{children:"syntax"}),". Check ",(0,r.jsxs)(n.a,{href:"#",children:["this ",(0,r.jsx)(n.code,{children:"api"})]}),"."]})})]}),"\n",(0,r.jsx)(n.h2,{id:"usage-with-prettier",children:"Usage with Prettier"}),"\n",(0,r.jsxs)(n.p,{children:["If you use ",(0,r.jsx)(n.a,{href:"https://prettier.io",children:"Prettier"})," to format your Markdown files, Prettier might auto-format your code to invalid admonition syntax. To avoid this problem, add empty lines around the starting and ending directives. This is also why the examples we show here all have empty lines around the content."]}),"\n","\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-md",children:"\x3c!-- Prettier doesn't change this --\x3e\n:::note\n\nHello world\n\n:::\n\n\x3c!-- Prettier changes this --\x3e\n:::note\nHello world\n:::\n\n\x3c!-- to this --\x3e\n::: note Hello world:::\n"})}),"\n",(0,r.jsx)(n.h2,{id:"specifying-title",children:"Specifying title"}),"\n",(0,r.jsx)(n.p,{children:"You may also specify an optional title."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-md",children:":::note[Your Title **with** some _Markdown_ `syntax`!]\n\nSome **content** with some _Markdown_ `syntax`.\n\n:::\n"})}),"\n",(0,r.jsx)(i.Z,{children:(0,r.jsxs)(n.admonition,{type:"note",children:[(0,r.jsxs)(n.mdxAdmonitionTitle,{children:["Your Title ",(0,r.jsx)(n.strong,{children:"with"})," some ",(0,r.jsx)(n.em,{children:"Markdown"})," ",(0,r.jsx)(n.code,{children:"syntax"}),"!"]}),(0,r.jsxs)(n.p,{children:["Some ",(0,r.jsx)(n.strong,{children:"content"})," with some ",(0,r.jsx)(n.em,{children:"Markdown"})," ",(0,r.jsx)(n.code,{children:"syntax"}),"."]})]})}),"\n",(0,r.jsx)(n.h2,{id:"nested-admonitions",children:"Nested admonitions"}),"\n",(0,r.jsxs)(n.p,{children:["Admonitions can be nested. Use more colons ",(0,r.jsx)(n.code,{children:":"})," for each parent admonition level."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-md",children:":::::info[Parent]\n\nParent content\n\n::::danger[Child]\n\nChild content\n\n:::tip[Deep Child]\n\nDeep child content\n\n:::\n\n::::\n\n:::::\n"})}),"\n",(0,r.jsx)(i.Z,{children:(0,r.jsxs)(n.admonition,{title:"Parent",type:"info",children:[(0,r.jsx)(n.p,{children:"Parent content"}),(0,r.jsxs)(n.admonition,{title:"Child",type:"danger",children:[(0,r.jsx)(n.p,{children:"Child content"}),(0,r.jsx)(n.admonition,{title:"Deep Child",type:"tip",children:(0,r.jsx)(n.p,{children:"Deep child content"})})]})]})}),"\n",(0,r.jsx)(n.h2,{id:"admonitions-with-mdx",children:"Admonitions with MDX"}),"\n",(0,r.jsx)(n.p,{children:"You can use MDX inside admonitions too!"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-jsx",children:'import Tabs from \'@theme/Tabs\';\n\nimport TabItem from \'@theme/TabItem\';\n\n:::tip[Use tabs in admonitions]\n\n<Tabs>\n <TabItem value="apple" label="Apple">This is an apple \ud83c\udf4e</TabItem>\n <TabItem value="orange" label="Orange">This is an orange \ud83c\udf4a</TabItem>\n <TabItem value="banana" label="Banana">This is a banana \ud83c\udf4c</TabItem>\n</Tabs>\n\n:::\n'})}),"\n",(0,r.jsx)(i.Z,{children:(0,r.jsx)(n.admonition,{title:"Use tabs in admonitions",type:"tip",children:(0,r.jsxs)(c.Z,{children:[(0,r.jsx)(s.Z,{value:"apple",label:"Apple",children:"This is an apple \ud83c\udf4e"}),(0,r.jsx)(s.Z,{value:"orange",label:"Orange",children:"This is an orange \ud83c\udf4a"}),(0,r.jsx)(s.Z,{value:"banana",label:"Banana",children:"This is a banana \ud83c\udf4c"})]})})}),"\n",(0,r.jsx)(n.h2,{id:"usage-in-jsx",children:"Usage in JSX"}),"\n",(0,r.jsxs)(n.p,{children:["Outside of Markdown, you can use the ",(0,r.jsx)(n.code,{children:"@theme/Admonition"})," component to get the same output."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-jsx",metastring:'title="MyReactPage.jsx"',children:"import Admonition from '@theme/Admonition';\n\nexport default function MyReactPage() {\n return (\n <div>\n <Admonition type=\"info\">\n <p>Some information</p>\n </Admonition>\n </div>\n );\n}\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The types that are accepted are the same as above: ",(0,r.jsx)(n.code,{children:"note"}),", ",(0,r.jsx)(n.code,{children:"tip"}),", ",(0,r.jsx)(n.code,{children:"danger"}),", ",(0,r.jsx)(n.code,{children:"info"}),", ",(0,r.jsx)(n.code,{children:"warning"}),". Optionally, you can specify an icon by passing a JSX element or a string, or a title:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-jsx",metastring:'title="MyReactPage.jsx"',children:'<Admonition type="tip" icon="\ud83d\udca1" title="Did you know...">\n Use plugins to introduce shorter syntax for the most commonly used JSX\n elements in your project.\n</Admonition>\n'})}),"\n",(0,r.jsx)(i.Z,{children:(0,r.jsx)(a.Z,{type:"tip",icon:"\ud83d\udca1",title:"Did you know...",children:(0,r.jsx)(n.p,{children:"Use plugins to introduce shorter syntax for the most commonly used JSX\nelements in your project."})})}),"\n",(0,r.jsx)(n.h2,{id:"customizing-admonitions",children:"Customizing admonitions"}),"\n",(0,r.jsxs)(n.p,{children:["There are two kinds of customizations possible with admonitions: ",(0,r.jsx)(n.strong,{children:"parsing"})," and ",(0,r.jsx)(n.strong,{children:"rendering"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"customizing-rendering-behavior",children:"Customizing rendering behavior"}),"\n",(0,r.jsxs)(n.p,{children:["You can customize how each individual admonition type is rendered through ",(0,r.jsx)(n.a,{href:"/docs/swizzling",children:"swizzling"}),". You can often achieve your goal through a simple wrapper. For example, in the follow example, we swap out the icon for ",(0,r.jsx)(n.code,{children:"info"})," admonitions only."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-jsx",metastring:'title="src/theme/Admonition.js"',children:"import React from 'react';\nimport Admonition from '@theme-original/Admonition';\nimport MyCustomNoteIcon from '@site/static/img/info.svg';\n\nexport default function AdmonitionWrapper(props) {\n if (props.type !== 'info') {\n return <Admonition title=\"My Custom Admonition Title\" {...props} />;\n }\n return <Admonition icon={<MyCustomNoteIcon />} {...props} />;\n}\n"})}),"\n",(0,r.jsx)(n.h3,{id:"customizing-parsing-behavior",children:"Customizing parsing behavior"}),"\n",(0,r.jsxs)(n.p,{children:["Admonitions are implemented with a ",(0,r.jsx)(n.a,{href:"/docs/markdown-features/plugins",children:"Remark plugin"}),". The plugin is designed to be configurable. To customize the Remark plugin for a specific content plugin (docs, blog, pages), pass the options through the ",(0,r.jsx)(n.code,{children:"admonitions"})," key."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",metastring:'title="docusaurus.config.js"',children:"export default {\n presets: [\n [\n '@docusaurus/preset-classic',\n {\n docs: {\n admonitions: {\n keywords: ['note', 'tip', 'info', 'warning', 'danger'],\n extendDefaults: true,\n },\n },\n },\n ],\n ],\n};\n"})}),"\n",(0,r.jsx)(n.p,{children:"The plugin accepts the following options:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"keywords"}),": An array of keywords that can be used as the type for the admonition."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"extendDefaults"}),": Should the provided options (such as ",(0,r.jsx)(n.code,{children:"keywords"}),") be merged into the existing defaults. Defaults to ",(0,r.jsx)(n.code,{children:"true"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"keyword"})," will be passed as the ",(0,r.jsx)(n.code,{children:"type"})," prop of the ",(0,r.jsx)(n.code,{children:"Admonition"})," component."]}),"\n",(0,r.jsx)(n.h3,{id:"custom-admonition-type-components",children:"Custom admonition type components"}),"\n",(0,r.jsxs)(n.p,{children:["By default, the theme doesn't know what do to with custom admonition keywords such as ",(0,r.jsx)(n.code,{children:":::my-custom-admonition"}),". It is your responsibility to map each admonition keyword to a React component so that the theme knows how to render them."]}),"\n",(0,r.jsxs)(n.p,{children:["If you registered a new admonition type ",(0,r.jsx)(n.code,{children:"my-custom-admonition"})," via the following config:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",metastring:'title="docusaurus.config.js"',children:"export default {\n // ...\n presets: [\n [\n 'classic',\n {\n // ...\n docs: {\n admonitions: {\n keywords: ['my-custom-admonition'],\n extendDefaults: true,\n },\n },\n },\n ],\n ],\n};\n"})}),"\n",(0,r.jsxs)(n.p,{children:["You can provide the corresponding React component for ",(0,r.jsx)(n.code,{children:":::my-custom-admonition"})," by creating the following file (unfortunately, since it's not a React component file, it's not swizzlable):"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",metastring:'title="src/theme/Admonition/Types.js"',children:"import React from 'react';\nimport DefaultAdmonitionTypes from '@theme-original/Admonition/Types';\n\nfunction MyCustomAdmonition(props) {\n return (\n <div style={{border: 'solid red', padding: 10}}>\n <h5 style={{color: 'blue', fontSize: 30}}>{props.title}</h5>\n <div>{props.children}</div>\n </div>\n );\n}\n\nconst AdmonitionTypes = {\n ...DefaultAdmonitionTypes,\n\n // Add all your custom admonition types here...\n // You can also override the default ones if you want\n 'my-custom-admonition': MyCustomAdmonition,\n};\n\nexport default AdmonitionTypes;\n"})}),"\n",(0,r.jsx)(n.p,{children:"Now you can use your new admonition keyword in a Markdown file, and it will be parsed and rendered with your custom logic:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-md",children:":::my-custom-admonition[My Title]\n\nIt works!\n\n:::\n"})}),"\n",(0,r.jsx)(i.Z,{children:(0,r.jsx)(n.admonition,{title:"My Title",type:"my-custom-admonition",children:(0,r.jsx)(n.p,{children:"It works!"})})})]})}function m(e={}){const{wrapper:n}={...(0,o.a)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(f,{...e})}):f(e)}},71670:(e,n,t)=>{t.d(n,{Z:()=>s,a:()=>c});var r=t(27378);const o={},i=r.createContext(o);function c(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]);