From f816c326d9bd0461a6308116885dd5bb23e687bf Mon Sep 17 00:00:00 2001 From: Sharath Sriram <59554914+sharath-sriram@users.noreply.github.com> Date: Thu, 6 Feb 2020 10:55:05 +0530 Subject: [PATCH] feat(banner): additional props for banner localisation (#103) * Added new props for localisation * Renamed labels * Modified descriptions * Changed field names --- .../banner/addon/components/nucleus-banner.js | 20 +++++++++++++++++++ .../templates/components/nucleus-banner.hbs | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/packages/banner/addon/components/nucleus-banner.js b/packages/banner/addon/components/nucleus-banner.js index 5ad6c786..224a1d28 100644 --- a/packages/banner/addon/components/nucleus-banner.js +++ b/packages/banner/addon/components/nucleus-banner.js @@ -46,6 +46,26 @@ class NucleusBanner extends Component { */ @defaultProp isFixed = false; + + /** + * Button Label that describes the presence of multiple banners + * + * @field showMoreLabel + * @type string + * @public + */ + @defaultProp + showMoreLabel = 'more'; + + /** + * Title text that describes the stack of multiple banners + * + * @field stackTitle + * @type string + * @public + */ + @defaultProp + stackTitle = 'System Alerts'; /** * List of banner items to be rendered. diff --git a/packages/banner/addon/templates/components/nucleus-banner.hbs b/packages/banner/addon/templates/components/nucleus-banner.hbs index f179c5cb..a278cc5d 100644 --- a/packages/banner/addon/templates/components/nucleus-banner.hbs +++ b/packages/banner/addon/templates/components/nucleus-banner.hbs @@ -11,12 +11,12 @@ ariaLabel="Show more" block=true type="link" - label=(concat "+ " stackedItems.length " more") + label=(concat "+ " stackedItems.length " " showMoreLabel) onClick=(action "toggleShowMore")}} {{#if _isShowMore}} {{#transition-group transitionClass="fade"}}