// __SDEFILE__ - This file is a dependency for the stand-alone environment import { useState } from 'react' import { CloseIcon } from 'shared/components/icons.mjs' import { useTranslation } from 'next-i18next' const colors = { comment: 'secondary', note: 'primary', tip: 'accent', warning: 'error', error: 'error', fixme: 'warning', link: 'secondary', related: 'info', tldr: 'info', none: '', } export const ns = ['popout'] export const Popout = (props) => { const { t } = useTranslation(ns) const [hide, setHide] = useState(false) if (hide) return null let type = 'none' for (const t in colors) { if (props[t]) type = t } const color = colors[type] const { className = '' } = props return props.compact ? (
{props.children}
}