How to use the @material/list/foundation.MDCListFoundation.cssClasses function in @material/list

To help you get started, we’ve selected a few @material/list 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 SpringflowNL / aurelia-mdc-elements / node_modules / @material / drawer / component.js View on Github external
focusActiveNavigationItem: function () {
                var activeNavItemEl = _this.root_.querySelector("." + MDCListFoundation.cssClasses.LIST_ITEM_ACTIVATED_CLASS);
                if (activeNavItemEl) {
                    activeNavItemEl.focus();
                }
            },
            notifyClose: function () { return _this.emit(strings.CLOSE_EVENT, {}, true /* shouldBubble */); },
github material-components / material-components-web-react / packages / list / ListItem.tsx View on Github external
get listElements(): Element[] {
    if (this.listItemElement.current) {
      const listElement = closest(
        this.listItemElement.current,
        `.${MDCListFoundation.cssClasses.ROOT}`
      );
      if (!listElement) return [];
      return [].slice.call(
        listElement.querySelectorAll(
          MDCListFoundation.strings.ENABLED_ITEMS_SELECTOR
        )
      );
    }
    return [];
  }
github material-components / material-components-web-react / packages / list / ListItem.tsx View on Github external
get classes() {
    const {
      className,
      activated,
      disabled,
      selected,
      getClassNamesFromList,
    } = this.props;
    let classesFromList = [''];
    if (this.listItemElement.current) {
      const index = this.getIndex(this.listItemElement.current);
      classesFromList = getClassNamesFromList!()[index];
    }
    return classnames('mdc-list-item', className, classesFromList, {
      [MDCListFoundation.cssClasses.LIST_ITEM_ACTIVATED_CLASS]: activated,
      [MDCListFoundation.cssClasses.LIST_ITEM_SELECTED_CLASS]: selected,
      'mdc-list-item--disabled': disabled,
    });
  }