From 186f3f5b865e47b4e075e1b00b1140a303899cda Mon Sep 17 00:00:00 2001 From: Keith Daulton Date: Wed, 14 Dec 2022 01:32:14 -0500 Subject: [PATCH] Updates menu component styles --- src/webviews/apps/shared/components/menu/index.ts | 1 + .../apps/shared/components/menu/menu-divider.ts | 18 ++++++++++++++++++ .../apps/shared/components/menu/menu-item.ts | 21 ++++++++++++++++----- .../apps/shared/components/menu/menu-label.ts | 3 +++ src/webviews/apps/shared/components/menu/react.tsx | 8 +++++++- .../shared/components/overlays/pop-menu/pop-menu.ts | 6 ++++-- .../apps/shared/components/search/search-input.ts | 1 + 7 files changed, 50 insertions(+), 8 deletions(-) create mode 100644 src/webviews/apps/shared/components/menu/menu-divider.ts diff --git a/src/webviews/apps/shared/components/menu/index.ts b/src/webviews/apps/shared/components/menu/index.ts index 73f97d6..36108b2 100644 --- a/src/webviews/apps/shared/components/menu/index.ts +++ b/src/webviews/apps/shared/components/menu/index.ts @@ -1,3 +1,4 @@ export * from './menu-list'; export * from './menu-item'; export * from './menu-label'; +export * from './menu-divider'; diff --git a/src/webviews/apps/shared/components/menu/menu-divider.ts b/src/webviews/apps/shared/components/menu/menu-divider.ts new file mode 100644 index 0000000..609170f --- /dev/null +++ b/src/webviews/apps/shared/components/menu/menu-divider.ts @@ -0,0 +1,18 @@ +import { css, customElement, FASTElement, html } from '@microsoft/fast-element'; +import { elementBase } from '../styles/base'; + +const template = html``; + +const styles = css` + ${elementBase} + + :host { + display: block; + height: 0; + margin: 0.6rem; + border-top: 0.1rem solid var(--vscode-menu-separatorBackground); + } +`; + +@customElement({ name: 'menu-divider', template: template, styles: styles }) +export class MenuDivider extends FASTElement {} diff --git a/src/webviews/apps/shared/components/menu/menu-item.ts b/src/webviews/apps/shared/components/menu/menu-item.ts index 9641ae8..4804f72 100644 --- a/src/webviews/apps/shared/components/menu/menu-item.ts +++ b/src/webviews/apps/shared/components/menu/menu-item.ts @@ -1,8 +1,8 @@ -import { attr, css, customElement, FASTElement, html } from '@microsoft/fast-element'; +import { attr, css, customElement, FASTElement, html, volatile } from '@microsoft/fast-element'; import { elementBase } from '../styles/base'; const template = html` -