mirror of
https://github.com/outline/outline.git
synced 2025-12-20 10:09:43 -06:00
14 lines
342 B
TypeScript
14 lines
342 B
TypeScript
import { IconType } from "../types";
|
|
import { IconLibrary } from "./IconLibrary";
|
|
|
|
const outlineIconNames = new Set(Object.keys(IconLibrary.mapping));
|
|
|
|
export const determineIconType = (
|
|
icon?: string | null
|
|
): IconType | undefined => {
|
|
if (!icon) {
|
|
return;
|
|
}
|
|
return outlineIconNames.has(icon) ? IconType.SVG : IconType.Emoji;
|
|
};
|