UNPKG

@gechiui/components

Version:
30 lines (26 loc) 761 B
import _extends from "@babel/runtime/helpers/esm/extends"; import { createElement } from "@gechiui/element"; /** * @typedef OwnProps * * @property {import('./types').IconKey} icon Icon name * @property {string} [className] Class name */ /** @typedef {import('react').ComponentPropsWithoutRef<'span'> & OwnProps} Props */ /** * @param {Props} props * @return {JSX.Element} Element */ function Dashicon(_ref) { let { icon, className, ...extraProps } = _ref; const iconClass = ['dashicon', 'dashicons', 'dashicons-' + icon, className].filter(Boolean).join(' '); return createElement("span", _extends({ className: iconClass }, extraProps)); } export default Dashicon; //# sourceMappingURL=index.js.map