From ecf60dd2846d9cc1645b3bb5b2ce7fc455851569 Mon Sep 17 00:00:00 2001 From: Xavier Carron <33637571+xav-car@users.noreply.github.com> Date: Thu, 2 May 2024 15:12:16 +0200 Subject: [PATCH] add wrappedElement option on PixLabel --- addon/components/pix-label.js | 1 + addon/components/pix-radio-button.hbs | 1 + addon/styles/_pix-label.scss | 6 ++++++ addon/styles/_pix-radio-button.scss | 6 ------ app/stories/pix-label.stories.js | 9 +++++++++ 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/addon/components/pix-label.js b/addon/components/pix-label.js index ef6ba80bb..0492e4e54 100644 --- a/addon/components/pix-label.js +++ b/addon/components/pix-label.js @@ -5,6 +5,7 @@ export default class PixLabel extends Component { const classes = ['pix-label']; if (this.args.screenReaderOnly) classes.push('screen-reader-only'); + if (this.args.wrappedElement) classes.push('pix-label--wrapped-element'); if (this.args.inlineLabel) classes.push('pix-label--inline-label'); if (this.args.isDisabled) classes.push('pix-label--disabled'); diff --git a/addon/components/pix-radio-button.hbs b/addon/components/pix-radio-button.hbs index 89cbb1673..5c598734f 100644 --- a/addon/components/pix-radio-button.hbs +++ b/addon/components/pix-radio-button.hbs @@ -6,6 +6,7 @@ @screenReaderOnly={{@screenReaderOnly}} @isDisabled={{@isDisabled}} @inlineLabel={{true}} + @wrappedElement={{true}} >