Skip to content

Commit

Permalink
feat(addon/components/paper-ink-bar): converts to a glimmer component.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewhartstonge committed Dec 17, 2024
1 parent 78c3c36 commit e04003c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
2 changes: 2 additions & 0 deletions addon/components/paper-ink-bar.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<md-ink-bar class={{if @movingRight 'md-right' 'md-left'}} style={{this.style}}>
</md-ink-bar>
19 changes: 6 additions & 13 deletions addon/components/paper-ink-bar.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
/* eslint-disable ember/no-classic-components, ember/require-tagless-components, prettier/prettier */
import { computed } from '@ember/object';
import Component from '@ember/component';
import Component from '@glimmer/component';
import { htmlSafe } from '@ember/template';

export default Component.extend({
tagName: 'md-ink-bar',

attributeBindings: ['style'],
classNameBindings: ['movingRight:md-right:md-left'],

style: computed('left', 'right', function() {
return htmlSafe(`left: ${this.left}px; right: ${this.right}px;`);
})
});
export default class PaperInkBar extends Component {
get style() {
return htmlSafe(`left: ${this.args.left}px; right: ${this.args.right}px;`);
}
}

0 comments on commit e04003c

Please sign in to comment.