forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Maps] refactor StyleTabs into StyleSettings (elastic#35893)
* [Maps] refactor StyleTabs into StyleSettings * fix unit test
- Loading branch information
Showing
14 changed files
with
76 additions
and
144 deletions.
There are no files selected for viewing
13 changes: 1 addition & 12 deletions
13
x-pack/plugins/maps/public/components/layer_panel/__snapshots__/view.test.js.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
51 changes: 51 additions & 0 deletions
51
x-pack/plugins/maps/public/components/layer_panel/style_settings/style_settings.js
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,51 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React, { Fragment } from 'react'; | ||
|
||
import { | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiTitle, | ||
EuiPanel, | ||
EuiSpacer, | ||
} from '@elastic/eui'; | ||
|
||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
|
||
export function StyleSettings({ layer, updateStyleDescriptor }) { | ||
|
||
const settingsEditor = layer.renderStyleEditor({ onStyleDescriptorChange: updateStyleDescriptor }); | ||
|
||
if (!settingsEditor) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<Fragment> | ||
<EuiPanel> | ||
<EuiFlexGroup> | ||
<EuiFlexItem> | ||
<EuiTitle size="xs"> | ||
<h5> | ||
<FormattedMessage | ||
id="xpack.maps.layerPanel.styleSettingsTitle" | ||
defaultMessage="Layer Style" | ||
/> | ||
</h5> | ||
</EuiTitle> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
|
||
<EuiSpacer size="m"/> | ||
|
||
{settingsEditor} | ||
</EuiPanel> | ||
|
||
<EuiSpacer size="s" /> | ||
</Fragment> | ||
); | ||
} |
28 changes: 0 additions & 28 deletions
28
x-pack/plugins/maps/public/components/layer_panel/style_tabs/resources/style_tab.js
This file was deleted.
Oops, something went wrong.
48 changes: 0 additions & 48 deletions
48
x-pack/plugins/maps/public/components/layer_panel/style_tabs/view.js
This file was deleted.
Oops, something went wrong.
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
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
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
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
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