diff --git a/packages/utils/src/loader/custom.ts b/packages/utils/src/loader/custom.ts index 6037e8a..10c820f 100644 --- a/packages/utils/src/loader/custom.ts +++ b/packages/utils/src/loader/custom.ts @@ -41,6 +41,7 @@ export async function getCustomIcon( collection, icon, additionalProps, + options?.scale ?? 1.2, undefined, iconCustomizer, ); diff --git a/packages/utils/src/loader/modern.ts b/packages/utils/src/loader/modern.ts index 083541b..7913d27 100644 --- a/packages/utils/src/loader/modern.ts +++ b/packages/utils/src/loader/modern.ts @@ -37,6 +37,7 @@ export async function searchForIcon( collection, id, additionalProps, + options?.scale ?? 1.2, () => attributes, iconCustomizer ); diff --git a/packages/utils/src/loader/utils.ts b/packages/utils/src/loader/utils.ts index 426d2f2..21dbbe4 100644 --- a/packages/utils/src/loader/utils.ts +++ b/packages/utils/src/loader/utils.ts @@ -8,10 +8,14 @@ export async function mergeIconProps( collection: string, icon: string, additionalProps: Record, + scale: number, propsProvider?: () => Awaitable>, - iconCustomizer?: IconCustomizer + iconCustomizer?: IconCustomizer, ): Promise { - const props: Record = (await propsProvider?.()) ?? {}; + const props: Record = (await propsProvider?.()) ?? { + height: `${scale ?? 1}em`, + width: `${scale ?? 1}em`, + }; await iconCustomizer?.(collection, icon, props); Object.keys(additionalProps).forEach((p) => { const v = additionalProps[p];