/* eslint-disable @typescript-eslint/naming-convention */ // Icons source: https://material.io/ import bold from './bold'; import italic from './italic'; import code from './code'; import underline from './underline'; import strike from './strike'; import orderedList from './ordered_list'; import bulletList from './bullet_list'; import quote from './quote'; import link from './link'; import unlink from './unlink'; import image from './image'; import alignLeft from './align_left'; import alignCenter from './align_center'; import alignRight from './align_right'; import alignJustify from './align_justify'; import textColor from './text_color'; import colorFill from './color_fill'; import horizontalRule from './horizontal_rule'; import formatClear from './format_clear'; const DEFAULT_ICON_HEIGHT = 20; const DEFAULT_ICON_WIDTH = 20; const DEFAULT_ICON_FILL = 'currentColor'; export const icons = { bold, italic, code, underline, strike, ordered_list: orderedList, bullet_list: bulletList, blockquote: quote, link, unlink, image, align_left: alignLeft, align_center: alignCenter, align_right: alignRight, align_justify: alignJustify, text_color: textColor, color_fill: colorFill, horizontal_rule: horizontalRule, format_clear: formatClear, path: '', }; class Icon { static get(name, fill = DEFAULT_ICON_FILL) { const fullPath = icons[name]; if (fullPath && (fullPath.includes(' ${fullPath} `; } return fullPath; } } export default Icon; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtZWRpdG9yL3NyYy9saWIvaWNvbnMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEseURBQXlEO0FBQ3pELHFDQUFxQztBQUVyQyxPQUFPLElBQUksTUFBTSxRQUFRLENBQUM7QUFDMUIsT0FBTyxNQUFNLE1BQU0sVUFBVSxDQUFDO0FBQzlCLE9BQU8sSUFBSSxNQUFNLFFBQVEsQ0FBQztBQUMxQixPQUFPLFNBQVMsTUFBTSxhQUFhLENBQUM7QUFDcEMsT0FBTyxNQUFNLE1BQU0sVUFBVSxDQUFDO0FBQzlCLE9BQU8sV0FBVyxNQUFNLGdCQUFnQixDQUFDO0FBQ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