diff --git a/packages/kbn-coloring/emotion.d.ts b/packages/kbn-coloring/emotion.d.ts new file mode 100644 index 0000000000000..cdcacdcc90f38 --- /dev/null +++ b/packages/kbn-coloring/emotion.d.ts @@ -0,0 +1,16 @@ +/* + * 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", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +import '@emotion/react'; +import type { UseEuiTheme } from '@elastic/eui'; + +declare module '@emotion/react' { + // eslint-disable-next-line @typescript-eslint/no-empty-interface + export interface Theme extends UseEuiTheme {} +} diff --git a/packages/kbn-coloring/src/shared_components/color_mapping/components/color_picker/color_picker.tsx b/packages/kbn-coloring/src/shared_components/color_mapping/components/color_picker/color_picker.tsx index dbcf3a3de5c65..c8978d15156b4 100644 --- a/packages/kbn-coloring/src/shared_components/color_mapping/components/color_picker/color_picker.tsx +++ b/packages/kbn-coloring/src/shared_components/color_mapping/components/color_picker/color_picker.tsx @@ -79,7 +79,9 @@ export function ColorPicker({ close(); deleteStep(); }} - css={{ paddingBottom: 8 }} + css={({ euiTheme }) => ({ + paddingBottom: euiTheme.size.s, + })} > {i18n.translate('coloring.colorMapping.colorPicker.removeGradientColorButtonLabel', { defaultMessage: 'Remove color stop', diff --git a/packages/kbn-coloring/src/shared_components/color_mapping/components/color_picker/palette_colors.tsx b/packages/kbn-coloring/src/shared_components/color_mapping/components/color_picker/palette_colors.tsx index a954532004000..6a8f86c38ea8b 100644 --- a/packages/kbn-coloring/src/shared_components/color_mapping/components/color_picker/palette_colors.tsx +++ b/packages/kbn-coloring/src/shared_components/color_mapping/components/color_picker/palette_colors.tsx @@ -52,7 +52,7 @@ export function PaletteColors({ const selectedColorSwatchStyle = { outline: 'currentcolor solid 2px', outlineOffset: '-1px', - border: `2px solid ${euiTheme.colors.borderBaseFormsColorSwatch}`, + border: `${euiTheme.border.width.thick} solid ${euiTheme.colors.borderBaseFormsColorSwatch}`, }; return ( <> diff --git a/packages/kbn-coloring/tsconfig.json b/packages/kbn-coloring/tsconfig.json index c3be4a82e8baa..bfd6cd5f8cb54 100644 --- a/packages/kbn-coloring/tsconfig.json +++ b/packages/kbn-coloring/tsconfig.json @@ -11,7 +11,9 @@ }, "include": [ "**/*.ts", - "**/*.tsx" + "**/*.tsx", + // Emotion theme typing + "./emotion.d.ts" ], "kbn_references": [ "@kbn/i18n", diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx index d1b598d0a0130..7715548b2b3ab 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx @@ -363,7 +363,7 @@ export function LayerPanel(props: LayerPanelProps) { className="lnsLayerPanel" data-test-subj={`lns-layerPanel-${layerIndex}`} > - +