feat(select): make required asterisk optional

This commit is contained in:
Nino Peters 2024-05-22 14:46:03 +02:00 committed by Nino Peters
parent be5bb43100
commit 8f194a51db

View File

@ -106,6 +106,12 @@ export abstract class Select extends selectBaseClass {
*/
@property() label = '';
/**
* Disables the asterisk on the floating label, when the select is
* required.
*/
@property({type: Boolean, attribute: 'no-asterisk'}) noAsterisk = false;
/**
* Conveys additional information below the select, such as how it should
* be used.
@ -395,6 +401,7 @@ export abstract class Select extends selectBaseClass {
aria-controls="listbox"
class="field"
label=${this.label}
?no-asterisk=${this.noAsterisk}
.focused=${this.focused || this.open}
.populated=${!!this.displayText}
.disabled=${this.disabled}