Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(addon/components/paper-card): migrates to tagless native class. #1265

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions addon/components/paper-card-title-media.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{{#if (has-block)}}
<div class="md-media-{{this.size}}">
{{yield}}
</div>
{{else}}
<img class="md-media-{{this.size}}" src={{@src}} alt={{@alt}} title={{@title}}>
{{/if}}
<md-card-title-media ...attributes>
{{#if (has-block)}}
<div class="md-media-{{this.size}}">
{{yield}}
</div>
{{else}}
<img class="md-media-{{this.size}}" src={{@src}} alt={{@alt}} title={{@title}}>
{{/if}}
</md-card-title-media>
10 changes: 5 additions & 5 deletions addon/components/paper-card-title-media.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable ember/no-classic-components, ember/require-tagless-components */
/* eslint-disable ember/no-classic-components */
/**
* @module ember-paper
*/
Expand All @@ -8,7 +8,7 @@ import Component from '@ember/component';
* @class PaperCardTitleMedia
* @extends Ember.Component
*/
export default Component.extend({
tagName: 'md-card-title-media',
size: 'md',
});
export default class PaperCardTitleMedia extends Component {
tagName = '';
size = 'md';
}
10 changes: 6 additions & 4 deletions addon/components/paper-card-title-text.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{yield (hash
headline=(component "paper-card-header-headline")
subhead=(component "paper-card-header-subhead")
)}}
<md-card-title-text ...attributes>
{{yield (hash
headline=(component "paper-card-header-headline")
subhead=(component "paper-card-header-subhead")
)}}
</md-card-title-text>
8 changes: 4 additions & 4 deletions addon/components/paper-card-title-text.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable ember/no-classic-components, ember/require-tagless-components */
/* eslint-disable ember/no-classic-components */
/**
* @module ember-paper
*/
Expand All @@ -8,6 +8,6 @@ import Component from '@ember/component';
* @class PaperCardTitleText
* @extends Ember.Component
*/
export default Component.extend({
tagName: 'md-card-title-text',
});
export default class PaperCardTitleText extends Component {
tagName = '';
}
18 changes: 10 additions & 8 deletions addon/components/paper-card.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{{yield (hash
title=(component "paper-card-title")
content=(component "paper-card-content")
actions=(component "paper-card-actions")
header=(component "paper-card-header")
image=(component "paper-card-image")
media=(component "paper-card-media")
)}}
<md-card ...attributes>
{{yield (hash
title=(component "paper-card-title")
content=(component "paper-card-content")
actions=(component "paper-card-actions")
header=(component "paper-card-header")
image=(component "paper-card-image")
media=(component "paper-card-media")
)}}
</md-card>
8 changes: 4 additions & 4 deletions addon/components/paper-card.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable ember/no-classic-components, ember/require-tagless-components */
/* eslint-disable ember/no-classic-components */
/**
* @module ember-paper
*/
Expand All @@ -8,6 +8,6 @@ import Component from '@ember/component';
* @class PaperCard
* @extends Ember.Component
*/
export default Component.extend({
tagName: 'md-card',
});
export default class PaperCard extends Component {
tagName = '';
}
Loading