Merged in chore/fix-material-icons-types (pull request #3497)

chore: Fix MaterialIconName type

* Fix MaterialIconName type


Approved-by: Bianca Widstam
Approved-by: Matilda Landström
This commit is contained in:
Anton Gunnarsson
2026-01-28 14:52:59 +00:00
parent 1f8b2c8c14
commit bae2ca288f
2 changed files with 17 additions and 11 deletions

View File

@@ -349,19 +349,22 @@ import type { FunctionComponent, SVGProps } from "react"
${imports.join("\n")}
type SvgIcon = FunctionComponent<SVGProps<SVGSVGElement>>
export const materialIcons: Record<
type IconMap = Record<
string,
Partial<{
outlined: { outlined: SvgIcon; filled?: SvgIcon }
rounded: { outlined: SvgIcon; filled?: SvgIcon }
sharp: { outlined: SvgIcon; filled?: SvgIcon }
}>
> = {
${registryEntries.join("\n")}
}
>
export type MaterialIconName = keyof typeof materialIcons
const _materialIcons = {
${registryEntries.join("\n")}
} satisfies IconMap
export const materialIcons = _materialIcons as IconMap
export type MaterialIconName = keyof typeof _materialIcons
`.trim() + "\n"
await writeFile(OUT, content, "utf8")