From 99db714f2f4d17327204ef8c478f909fa21d3508 Mon Sep 17 00:00:00 2001 From: alexnatalia Date: Mon, 26 Oct 2020 03:01:31 +0300 Subject: [PATCH 1/2] SMenu Component: Added ability to add the box shadow. --- src/components/Menu/SMenu.vue | 8 ++++++++ src/styles/menu.scss | 1 + 2 files changed, 9 insertions(+) diff --git a/src/components/Menu/SMenu.vue b/src/components/Menu/SMenu.vue index 21ab9dff..41169236 100644 --- a/src/components/Menu/SMenu.vue +++ b/src/components/Menu/SMenu.vue @@ -6,6 +6,7 @@ :mode="mode" :collapse="collapse" :background-color="backgroundColor" + :box-shadow="boxShadow" :text-color="textColor" :active-text-color="activeTextColor" :default-active="defaultActive" @@ -48,6 +49,10 @@ export default class SMenu extends Vue { * By default it's set to `"#2D2926"` */ @Prop({ default: '#2D2926', type: String }) readonly backgroundColor!: string + /** + * Menu shadow if it exists + */ + @Prop({ default: 'none', type: String }) readonly boxShadow!: string /** * Text color of menu in hex format. * @@ -104,6 +109,9 @@ export default class SMenu extends Vue { get computedStyles (): object { const styles = {} as any + if (this.boxShadow) { + styles['--s-menu-box-shadow'] = this.boxShadow + } if (this.activeHoverColor) { styles['--s-menu-color-hover'] = this.activeHoverColor } diff --git a/src/styles/menu.scss b/src/styles/menu.scss index 564e15e2..e9a9597f 100644 --- a/src/styles/menu.scss +++ b/src/styles/menu.scss @@ -1,6 +1,7 @@ $margin-bottom-menu-item: 8px; .s-menu { + box-shadow: var(--s-menu-box-shadow); padding: 20px 12px; &:not(.el-menu--horizontal) > :not(:last-child) { margin-bottom: $margin-bottom-menu-item; From c6a6ddc2dbc335b906d3cd2bc177e44f9c776bea Mon Sep 17 00:00:00 2001 From: alexnatalia Date: Tue, 27 Oct 2020 04:23:51 +0300 Subject: [PATCH 2/2] Icon Story: Fixed knob title. --- src/stories/SIcon.stories.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stories/SIcon.stories.ts b/src/stories/SIcon.stories.ts index 67c75152..d8cda33c 100644 --- a/src/stories/SIcon.stories.ts +++ b/src/stories/SIcon.stories.ts @@ -21,7 +21,7 @@ export const configurable = () => ({ default: select('Name', Object.values(Icons), Icons.Activity) }, size: { - default: number('Content position', 16) + default: number('Icon Size', 16) } } })