Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
get label() {
if (!this.notchedEl.current) {
return null;
}
return this.notchedEl.current.querySelector(`.${MDCFloatingLabelFoundation.cssClasses.ROOT}`);
}
onShakeEnd = () => {
const {LABEL_SHAKE} = MDCFloatingLabelFoundation.cssClasses;
this.removeClassFromClassList(LABEL_SHAKE);
};
initialSyncWithDOM() {
this.notchElement_ = this.root_.querySelector(strings.NOTCH_ELEMENT_SELECTOR)!;
const label = this.root_.querySelector('.' + MDCFloatingLabelFoundation.cssClasses.ROOT);
if (label) {
label.style.transitionDuration = '0s';
this.root_.classList.add(cssClasses.OUTLINE_UPGRADED);
requestAnimationFrame(() => {
label.style.transitionDuration = '';
});
} else {
this.root_.classList.add(cssClasses.NO_LABEL);
}
}