UNPKG

@alauda/doom

Version:

Doctor Doom making docs.

15 lines (14 loc) 413 B
import { jsx as _jsx } from "react/jsx-runtime"; /** * A wrapper for custom SVG icon. * When the user uses a custom SVG, the imported icon can be a string or a React component. */ export function SvgWrapper({ icon: Icon, ...rest }) { if (!Icon) { return null; } if (typeof Icon === 'string') { return _jsx("img", { src: Icon, ...rest }); } return _jsx(Icon, { ...rest }); }