File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
core/src/components/input-otp Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 130130 text-align : center ;
131131}
132132
133+ .input-otp-description-hidden {
134+ display : none ;
135+ }
136+
133137// Input Separator
134138// ----------------------------------------------------------------
135139
Original file line number Diff line number Diff line change @@ -726,6 +726,7 @@ export class InputOTP implements ComponentInterface {
726726 autocapitalize,
727727 color,
728728 disabled,
729+ el,
729730 fill,
730731 hasFocus,
731732 inheritedAttributes,
@@ -741,6 +742,7 @@ export class InputOTP implements ComponentInterface {
741742 const inputmode = this . getInputmode ( ) ;
742743 const tabbableIndex = this . getTabbableIndex ( ) ;
743744 const pattern = this . getPattern ( ) ;
745+ const hasDescription = el . querySelector ( '.input-otp-description' ) ?. textContent ?. trim ( ) !== '' ;
744746
745747 return (
746748 < Host
@@ -784,7 +786,11 @@ export class InputOTP implements ComponentInterface {
784786 </ >
785787 ) ) }
786788 </ div >
787- < div class = "input-otp-description" >
789+ < div
790+ class = { {
791+ 'input-otp-description' : true ,
792+ 'input-otp-description-hidden' : ! hasDescription ,
793+ } } >
788794 < slot > </ slot >
789795 </ div >
790796 </ Host >
You can’t perform that action at this time.
0 commit comments