Skip to content

Commit 175ea0b

Browse files
committed
spread default icons
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
1 parent 1546686 commit 175ea0b

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/components/src/side-panel/layer-panel/layer-panel-header.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export type LayerPanelHeaderProps = {
7171
visible: ComponentType<Partial<BaseProps>>;
7272
hidden: ComponentType<Partial<BaseProps>>;
7373
enableConfig: ComponentType<Partial<BaseProps>>;
74-
disableConfig: ComponentType<Partial<BaseProps>>;
74+
disableConfig?: ComponentType<Partial<BaseProps>>;
7575
resetIsValid: ComponentType<Partial<BaseProps>>;
7676
duplicate: ComponentType<Partial<BaseProps>>;
7777
crosshairs: ComponentType<Partial<BaseProps>>;
@@ -281,9 +281,10 @@ export function LayerPanelHeaderActionSectionFactory(
281281
onZoomToLayer,
282282
showRemoveLayer = true,
283283
isEditingLabel,
284-
// TODO: may not contain all necessary icons for all actions, e.g. actionIcons.duplicate. Need to to merge rather than replace
285-
actionIcons = defaultActionIcons
284+
actionIcons: customActionIcons
286285
} = props;
286+
// Merge custom actionIcons with defaults to avoid breaking changes
287+
const actionIcons = {...defaultActionIcons, ...customActionIcons};
287288
return (
288289
<HeaderActionSection className="layer-panel__header__actions" isEditingLabel={isEditingLabel}>
289290
<StyledPanelHeaderHiddenActions isConfigActive={isConfigActive}>

0 commit comments

Comments
 (0)