diff --git a/src/components.d.ts b/src/components.d.ts index d01dd726..85ac00e6 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -16,9 +16,10 @@ export namespace Components { "expanded": boolean; "itemId": string; "label": string; + "labelCollapsed": string; + "labelExpanded": string; "styleClass": string; "theme": string; - "titleId": string; } interface EclBanner { "bannerTitle": string; @@ -1442,9 +1443,10 @@ declare namespace LocalJSX { "expanded"?: boolean; "itemId"?: string; "label"?: string; + "labelCollapsed"?: string; + "labelExpanded"?: string; "styleClass"?: string; "theme"?: string; - "titleId"?: string; } interface EclBanner { "bannerTitle"?: string; diff --git a/src/components/ecl-accordion/ecl-accordion-item.tsx b/src/components/ecl-accordion/ecl-accordion-item.tsx index 15bf6be0..bf12bbbd 100644 --- a/src/components/ecl-accordion/ecl-accordion-item.tsx +++ b/src/components/ecl-accordion/ecl-accordion-item.tsx @@ -13,9 +13,10 @@ export class EclAccordionItem { @Prop() styleClass: string; @Prop() label: string; @Prop() itemId: string; - @Prop() titleId: string; @Prop({reflect:true}) expanded: boolean; @Prop() theme: string = 'ec'; + @Prop() labelExpanded = ''; + @Prop() labelCollapsed = ''; getClass(): string { return [ @@ -26,24 +27,31 @@ export class EclAccordionItem { } render() { + const titleId = `${this.itemId}-title`; + const contentId = `${this.itemId}-content`; return (

- + -
-

-

- + -
-

-