onehilltech / ember-cli-mdc

ember-cli addon for material-components-web
Apache License 2.0
44 stars 15 forks source link

Trying to create a glimmer component based fork #25

Closed ahemed-haneen closed 4 years ago

ahemed-haneen commented 4 years ago

hi im trying to create a glimmer component version of ember-cli-mdc but

import Mixin from '@ember/object/mixin';

import { computed } from '@ember/object';
import { isPresent } from '@ember/utils';

const { MDCRipple } = mdc.ripple;

export default Mixin.create ({
  classNames: ['mdc-ripple-surface'],

  classNameBindings: ['mdcRippleColorClassName'],

  attributeBindings: ['unbounded:data-mdc-ripple-is-unbounded'],

  mdcRippleColorClassName: computed ('rippleColor', function () {
    const rippleColor = this.get ('rippleColor');
    return isPresent (rippleColor) ? `mdc-ripple-surface--${rippleColor}` : null;
  }),

i don't know how to solve the issue "mdc not defined" in line 4 mdc.ripple for mdc-ripple mixin and similary i have the same issue with

_createComponent () {
    this._textField = new mdc.textfield.MDCTextField (this.element);
    this._textField.listen ('MDCTextField:icon', this._iconClickListener);

    this.didCreateComponent ();

    // Check the value of the component against the native input.
    this._checkValue ();
  },

line 2

can you please help me with that?