How to use the @material/notched-outline.MDCNotchedOutlineFoundation function in @material/notched-outline

To help you get started, we’ve selected a few @material/notched-outline examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jamesmfriedman / rmwc / src / notched-outline / index.tsx View on Github external
getDefaultFoundation() {
    return new MDCNotchedOutlineFoundation({
      addClass: (className: string) => this.root.addClass(className),
      removeClass: (className: string) => this.root.removeClass(className),
      setNotchWidthProperty: (width: number) =>
        this.notchElement.setStyle('width', width + 'px'),
      removeNotchWidthProperty: () => this.notchElement.setStyle('width', '')
    });
  }
github trimox / angular-mdc-web / packages / notched-outline / notched-outline.ts View on Github external
getDefaultFoundation() {
    const adapter: MDCNotchedOutlineAdapter = {
      addClass: (className: string) => this.elementRef.nativeElement.classList.add(className),
      removeClass: (className: string) =>
        this.elementRef.nativeElement.classList.remove(className),
      setNotchWidthProperty: (width: number) =>
        this._notchElement.nativeElement.style.setProperty('width', `${width}px`),
      removeNotchWidthProperty: () => this._notchElement.nativeElement.style.removeProperty('width')
    };
    return new MDCNotchedOutlineFoundation(adapter);
  }