diff --git a/src/components/src/map/map-legend-panel.tsx b/src/components/src/map/map-legend-panel.tsx index 72083da8d7..2d5e8775e3 100644 --- a/src/components/src/map/map-legend-panel.tsx +++ b/src/components/src/map/map-legend-panel.tsx @@ -282,11 +282,14 @@ export type MapLegendPanelProps = { settings: MapLegendControlSettings; isSidePanelShown: boolean; }; + +type MapLegendPanelComponentType = React.FC; + function MapLegendPanelFactory( MapControlTooltip: ReturnType, MapControlPanel: ReturnType, MapLegend: ReturnType -): React.FC { +): MapLegendPanelComponentType { const defaultActionIcons = { legend: Legend }; @@ -394,7 +397,7 @@ function MapLegendPanelFactory( ); MapLegendPanel.displayName = 'MapLegendPanel'; - return withTheme(MapLegendPanel) as React.FC; + return withTheme(MapLegendPanel as MapLegendPanelComponentType) as MapLegendPanelComponentType; } export default MapLegendPanelFactory;