Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/eui-theme-borealis/src/variables/_overrides.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ export const overrides: _EuiThemeOverrides = {
colors: {
ink: PRIMITIVE_COLORS.black,
ghost: PRIMITIVE_COLORS.white,
LIGHT: {
primary: '#00ff00',
},
DARK: {
primary: '#0000ff',
},
},
},
};
4 changes: 4 additions & 0 deletions packages/eui-theme-common/changelogs/upcoming/8742.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**Bug fixes**

- Fixed a wrong variable in `getComputed` theme function which prevented high contrast overrides from being applied

2 changes: 1 addition & 1 deletion packages/eui-theme-common/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ export const getComputed = <T = EuiThemeShape>(

// combine internal overrides with manual overrides
const combinedOverValue =
isObject(overValue) && isObject(hcmOverValue)
isObject(overValue) && isObject(hcmCombinedOverValue)
? mergeDeep(overValue, hcmCombinedOverValue)
: // optional overrides e.g. on provider level should still override theme level
overValue ?? hcmCombinedOverValue;
Expand Down
4 changes: 4 additions & 0 deletions packages/eui/changelogs/upcoming/8742.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**Bug fixes**

- Fixed high contrast theme token overrides not being applied

14 changes: 14 additions & 0 deletions packages/eui/src/components/button/button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {

import { EuiButtonEmpty } from './button_empty';
import { EuiButton, Props as EuiButtonProps } from './button';
import { useEuiTheme } from '../../services';

const meta: Meta<EuiButtonProps> = {
title: 'Navigation/EuiButton',
Expand Down Expand Up @@ -64,3 +65,16 @@ export const HighContrast: Story = {
</div>
),
};

export const TESTING_EXAMPLE: Story = {
render: function Render() {
const { euiTheme } = useEuiTheme();

return (
<>
<EuiButton>ink: {euiTheme.colors.ink}</EuiButton>
<EuiButton>primary: {euiTheme.colors.primary}</EuiButton>
</>
);
},
};