bugfix - fixed build bug

This commit is contained in:
James Wyndham 2024-02-27 15:56:41 +08:00
parent a2fd4e8756
commit 70fc1a2826
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ function Icon({
}: IconProps) {
const fluentIcons = Object.assign(
{},
...Object.keys(FluentIcons).map((name) => {
...Object.keys(FluentIcons).map((name: any) => {
return {
[name]: (
<IconContainer
@ -25,7 +25,7 @@ function Icon({
nestedComponent={nestedComponent}
style={style}
>
{React.createElement(FluentIcons[name], {
{React.createElement((FluentIcons as any)[name as any], {
color: isActive ? color ?? undefined : undefined,
style: { width: iconSize[size], height: iconSize[size] },
})}