Skip to content

Commit

Permalink
fix(AsideHeader): panel border in High Contrast themes (#37)
Browse files Browse the repository at this point in the history
* fix(AsideHeader): panel border in hc-themes

* chore: add divider for story moc
  • Loading branch information
Lunory authored Feb 16, 2023
1 parent 44ab5a2 commit 340f9bb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ export const globalTypes = {
defaultValue: 'light',
toolbar: {
items: [
{value: 'light', icon: 'circle', title: 'Light'},
{value: 'dark', icon: 'circlehollow', title: 'Dark'},
{value: 'light', right: '☼', title: 'Light'},
{value: 'dark', right: '☾', title: 'Dark'},
{value: 'light-hc', right: '☼', title: 'High Contrast Light'},
{value: 'dark-hc', right: '☾', title: 'High Contrast Dark'},
],
},
},
Expand Down
10 changes: 6 additions & 4 deletions src/components/AsideHeader/AsideHeader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ $block: '.#{variables.$ns}aside-header';
);
}

.yc-root_theme_light {
.yc-root_theme_light,
.yc-root_theme_light-hc {
--aside-header-divider-line-color: transparent;
--aside-header-header-divider-line-color: var(--yc-color-line-generic);
}

.yc-root_theme_dark {
--aside-header-divider-line-color: var(--yc-color-base-light-simple-hover);
--aside-header-header-divider-line-color: var(--yc-color-base-light-simple-hover);
.yc-root_theme_dark,
.yc-root_theme_dark-hc {
--aside-header-divider-line-color: var(--yc-color-line-solid);
--aside-header-header-divider-line-color: var(--yc-color-line-solid);
}

#{$block} {
Expand Down
5 changes: 5 additions & 0 deletions src/components/CompositeBar/__stories__/moc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ export const menuItemsShowcase: MenuItem[] = [
alert(JSON.stringify({id, title, current}));
},
},
{
id: 'divider2',
title: '-',
type: 'divider',
},
{
id: 'id1',
title: 'Objects',
Expand Down

0 comments on commit 340f9bb

Please sign in to comment.