File tree Expand file tree Collapse file tree
src/components/src/side-panel/layer-panel Expand file tree Collapse file tree Original file line number Diff line number Diff 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 } >
You can’t perform that action at this time.
0 commit comments