Skip to content

Commit

Permalink
include renderNoLabel to hide label for inputs
Browse files Browse the repository at this point in the history
Refs: #6251
  • Loading branch information
AlexanderSchmidtCE committed Oct 24, 2024
1 parent de54906 commit 3b214d2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/components/src/components/input/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ export class KolInputWc implements Props {
'hidden-error': this._hideError === true,
})}
>
<label class="input-label" id={!useTooltopInsteadOfLabel ? `${this._id}-label` : undefined} hidden={useTooltopInsteadOfLabel} htmlFor={this._id}>
<KolSpanWcTag _badgeText={this._accessKey || this._shortKey} _hideLabel={this._hideLabel} _label={hasExpertSlot ? '' : this._label}>
<slot name="expert" slot="expert"></slot>
</KolSpanWcTag>
</label>
{!this._renderNoLabel && (
<label class="input-label" id={!useTooltopInsteadOfLabel ? `${this._id}-label` : undefined} hidden={useTooltopInsteadOfLabel} htmlFor={this._id}>
<KolSpanWcTag _badgeText={this._accessKey || this._shortKey} _hideLabel={this._hideLabel} _label={hasExpertSlot ? '' : this._label}>
<slot name="expert" slot="expert"></slot>
</KolSpanWcTag>
</label>
)}
{hasHint && (
<span class="hint" id={`${this._id}-hint`}>
{this._hint}
Expand Down

0 comments on commit 3b214d2

Please sign in to comment.