diff --git a/plugins/gatsby-theme-iterative-docs/src/components/Documentation/Markdown/Admonition/index.tsx b/plugins/gatsby-theme-iterative-docs/src/components/Documentation/Markdown/Admonition/index.tsx index df30cb7f9b..176393a07f 100644 --- a/plugins/gatsby-theme-iterative-docs/src/components/Documentation/Markdown/Admonition/index.tsx +++ b/plugins/gatsby-theme-iterative-docs/src/components/Documentation/Markdown/Admonition/index.tsx @@ -2,14 +2,15 @@ import React from 'react' import cn from 'classnames' import * as styles from './styles.module.css' -const icons = { +const icons: { [key: string]: string } = { tip: 'đĄ', info: 'âšī¸', warn: 'â ī¸', fire: 'đĨ', exclamation: 'â', lady_beetle: 'đ', - bug: 'đ' + bug: 'đ', + none: '' } const typeOptions = ['info', 'tip', 'warn'] const defaultType = 'info' @@ -25,10 +26,10 @@ const Admonition: React.FC<{ | 'exclamation' | 'lady_beetle' | 'bug' -}> = ({ title, type = defaultType, children, icon = type }) => { + | 'none' +}> = ({ title, type = defaultType, children, icon = '' }) => { const setType = typeOptions.includes(type) ? type : defaultType - const iconContent = icons[icon] || '' - + const iconContent = icon in icons ? icons[icon] : icons[setType] return (