MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / renderLabel

Method renderLabel

core/src/components/input/input.tsx:729–751  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

727 }
728
729 private renderLabel() {
730 const { label, labelTextId } = this;
731
732 return (
733 <div
734 class={{
735 'label-text-wrapper': true,
736 'label-text-wrapper-hidden': !this.hasLabel,
737 }}
738 // Prevents Android TalkBack from focusing the label separately.
739 // The input remains labelled via aria-labelledby.
740 aria-hidden={this.hasLabel ? 'true' : null}
741 >
742 {label === undefined ? (
743 <slot name="label"></slot>
744 ) : (
745 <div class="label-text" id={labelTextId}>
746 {label}
747 </div>
748 )}
749 </div>
750 );
751 }
752
753 /**
754 * Gets any content passed into the `label` slot,

Callers 1

renderLabelContainerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected