feat: Unified icon picker (#7038)

This commit is contained in:
Hemachandar
2024-06-23 19:01:18 +05:30
committed by GitHub
parent 56d90e6bc3
commit 6fd3a0fa8a
83 changed files with 2302 additions and 852 deletions

13
shared/utils/icon.ts Normal file
View File

@@ -0,0 +1,13 @@
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.Outline : IconType.Emoji;
};