Skip to content

Commit

Permalink
Reduce padding top of dashboard editor toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
cqliu1 committed Feb 8, 2023
1 parent 011e2fe commit ab51a19
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* Side Public License, v 1.
*/

import { EuiHorizontalRule } from '@elastic/eui';
import { METRIC_TYPE } from '@kbn/analytics';
import { EmbeddableFactory } from '@kbn/embeddable-plugin/public';
import {
Expand All @@ -19,6 +18,8 @@ import {
import { BaseVisType, VisTypeAlias } from '@kbn/visualizations-plugin/public';
import React from 'react';
import { useCallback } from 'react';
import { useEuiTheme } from '@elastic/eui';
import { css } from '@emotion/react';
import { dashboardReplacePanelActionStrings } from '../../dashboard_actions/_dashboard_actions_strings';
import { DASHBOARD_APP_ID, DASHBOARD_UI_METRIC_ID } from '../../dashboard_constants';
import { useDashboardContainerContext } from '../../dashboard_container/dashboard_container_renderer';
Expand All @@ -36,6 +37,7 @@ export function DashboardEditingToolbar() {
embeddable: { getStateTransfer, getEmbeddableFactory },
visualizations: { get: getVisualization, getAliases: getVisTypeAliases },
} = pluginServices.getServices();
const { euiTheme } = useEuiTheme();

const { embeddableInstance: dashboardContainer } = useDashboardContainerContext();

Expand Down Expand Up @@ -178,8 +180,11 @@ export function DashboardEditingToolbar() {
}

return (
<>
<EuiHorizontalRule margin="none" />
<div
css={css`
padding: 0 ${euiTheme.size.s} ${euiTheme.size.s} ${euiTheme.size.s};
`}
>
<SolutionToolbar isDarkModeEnabled={IS_DARK_THEME}>
{{
primaryActionButton: (
Expand All @@ -195,6 +200,6 @@ export function DashboardEditingToolbar() {
extraButtons,
}}
</SolutionToolbar>
</>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.solutionToolbar {
padding: $euiSizeS;
flex-grow: 0;

// Temporary fix for two tone icons to make them monochrome
Expand Down

0 comments on commit ab51a19

Please sign in to comment.