Skip to content

Commit

Permalink
chore: remove color mixin.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhartstonge committed Oct 30, 2024
1 parent 0882cc1 commit 2d7cf79
Show file tree
Hide file tree
Showing 14 changed files with 290 additions and 251 deletions.
7 changes: 4 additions & 3 deletions addon/components/paper-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@ import { reads } from '@ember/object/computed';

import Component from '@ember/component';
import FocusableMixin from 'ember-paper/mixins/focusable-mixin';
import ColorMixin from 'ember-paper/mixins/color-mixin';
import ProxiableMixin from 'ember-paper/mixins/proxiable-mixin';
import { invokeAction } from 'ember-paper/utils/invoke-action';

/**
* @class PaperButton
* @extends Ember.Component
* @uses FocusableMixin
* @uses ColorMixin
* @uses ProxiableMixin
*/
export default Component.extend(FocusableMixin, ColorMixin, ProxiableMixin, {
export default Component.extend(FocusableMixin, ProxiableMixin, {
tagName: 'button',
classNames: ['md-default-theme', 'md-button'],
raised: false,
Expand All @@ -38,6 +36,9 @@ export default Component.extend(FocusableMixin, ColorMixin, ProxiableMixin, {
'iconButton:md-icon-button',
'fab:md-fab',
'mini:md-mini',
'warn:md-warn',
'accent:md-accent',
'primary:md-primary',
],

init() {
Expand Down
12 changes: 8 additions & 4 deletions addon/components/paper-checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,24 @@ import { not, and } from '@ember/object/computed';
import Component from '@ember/component';
import { assert } from '@ember/debug';
import FocusableMixin from 'ember-paper/mixins/focusable-mixin';
import ColorMixin from 'ember-paper/mixins/color-mixin';
import ProxiableMixin from 'ember-paper/mixins/proxiable-mixin';
import { invokeAction } from 'ember-paper/utils/invoke-action';
/**
* @class PaperCheckbox
* @extends Ember.Component
* @uses FocusableMixin
* @uses ColorMixin
* @uses ProxiableMixin
*/
export default Component.extend(FocusableMixin, ColorMixin, ProxiableMixin, {
export default Component.extend(FocusableMixin, ProxiableMixin, {
tagName: 'md-checkbox',
classNames: ['md-checkbox', 'md-default-theme'],
classNameBindings: ['isChecked:md-checked', 'indeterminate:md-indeterminate'],
classNameBindings: [
'isChecked:md-checked',
'indeterminate:md-indeterminate',
'warn:md-warn',
'accent:md-accent',
'primary:md-primary',
],

attributeBindings: [
'role:role',
Expand Down
14 changes: 8 additions & 6 deletions addon/components/paper-icon.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable ember/no-classic-components, ember/no-get-with-default, ember/no-mixins, ember/require-tagless-components */
/* eslint-disable ember/no-classic-components, ember/no-get-with-default, ember/require-tagless-components */
/**
* @module ember-paper
*/
Expand All @@ -8,17 +8,19 @@ import { computed } from '@ember/object';
import { reads } from '@ember/object/computed';
import { htmlSafe } from '@ember/template';

import ColorMixin from 'ember-paper/mixins/color-mixin';

/**
* @class PaperIcon
* @extends Ember.Component
* @uses ColorMixin
*/
let PaperIconComponent = Component.extend(ColorMixin, {
let PaperIconComponent = Component.extend({
tagName: 'md-icon',
classNames: ['paper-icon', 'md-font', 'material-icons', 'md-default-theme'],
classNameBindings: ['spinClass'],
classNameBindings: [
'spinClass',
'warn:md-warn',
'accent:md-accent',
'primary:md-primary',
],
attributeBindings: [
'aria-hidden',
'aria-label',
Expand Down
Loading

0 comments on commit 2d7cf79

Please sign in to comment.