-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move layer settings action to layer panel
- Loading branch information
1 parent
4152ecc
commit 3a326a4
Showing
5 changed files
with
58 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...blic/editor_frame_service/editor_frame/config_panel/layer_actions/open_layer_settings.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
import type { LayerAction } from '../../../../types'; | ||
|
||
export const getOpenLayerSettingsAction = (props: { | ||
openLayerSettings: () => void; | ||
hasLayerSettings: boolean; | ||
}): LayerAction => { | ||
const displayName = i18n.translate('xpack.lens.layerActions.layerSettingsAction', { | ||
defaultMessage: 'Layer settings', | ||
}); | ||
|
||
return { | ||
id: 'openLayerSettings', | ||
displayName, | ||
execute: props.openLayerSettings, | ||
icon: 'gear', | ||
isCompatible: props.hasLayerSettings, | ||
'data-test-subj': 'lnsLayerSettings', | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters