From 11147862fec29d5ae36d077c4e1ae720a0c90bf4 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Wed, 6 Dec 2023 11:22:03 +0100 Subject: [PATCH 1/4] feat: added possibility to define an individual icon --- .../db-overflow-menu/db-overflow-menu.tsx | 9 ++++++++- .../stories/db-overflow-menu.stories.mdx | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/packages/db-ui-elements-stencil/src/components/db-overflow-menu/db-overflow-menu.tsx b/packages/db-ui-elements-stencil/src/components/db-overflow-menu/db-overflow-menu.tsx index 9eb72917d..9977f4bd5 100644 --- a/packages/db-ui-elements-stencil/src/components/db-overflow-menu/db-overflow-menu.tsx +++ b/packages/db-ui-elements-stencil/src/components/db-overflow-menu/db-overflow-menu.tsx @@ -22,6 +22,11 @@ export class DbOverflowMenu { */ @Prop({ reflect: true }) summary = ''; + /** + * Define an icon by it's identifier (like e.g. _download_, compare to [DB UI Icons](https://db-ui.github.io/core/patterns/base-icons/index.html)) to get displayed in front of the elements content. + */ + @Prop({ reflect: true }) icon?: string; + private compData: DbLinkType[]; private hasItemsWrapper: boolean; @@ -56,7 +61,9 @@ export class DbOverflowMenu { class="cmp-overflow-menu" data-horizontal-position={this.opposite && 'opposite'} > - {this.summary} + + {this.icon ? : this.summary} + {this.compData && ( )} diff --git a/packages/db-ui-elements-stencil/src/components/db-overflow-menu/stories/db-overflow-menu.stories.mdx b/packages/db-ui-elements-stencil/src/components/db-overflow-menu/stories/db-overflow-menu.stories.mdx index 4de28ce01..ba9e4c3f9 100644 --- a/packages/db-ui-elements-stencil/src/components/db-overflow-menu/stories/db-overflow-menu.stories.mdx +++ b/packages/db-ui-elements-stencil/src/components/db-overflow-menu/stories/db-overflow-menu.stories.mdx @@ -67,6 +67,21 @@ Only `