Skip to content

Commit da8f110

Browse files
authored
Merge pull request #542 from Windvis/template-tag-conversion
`.gjs` conversion
2 parents ffcdb2a + 3eae30f commit da8f110

48 files changed

Lines changed: 523 additions & 456 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# running prettier on hbs files
22
41fab357234f02fd59519ccee1b1121114dedf62
3+
4+
3e7dbbde705866f3e3a2418951dcbec39c5777b5

addon/components/es-banner.gjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<template>
2+
<div class="es-banner" data-test-es-banner>
3+
{{yield}}
4+
</div>
5+
</template>

addon/components/es-banner.hbs

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Component from '@glimmer/component';
2+
import { on } from '@ember/modifier';
23
import { action } from '@ember/object';
34

45
export default class EsButtonComponent extends Component {
@@ -32,4 +33,20 @@ export default class EsButtonComponent extends Component {
3233
buttonClicked() {
3334
this._onClicked();
3435
}
36+
37+
<template>
38+
<button
39+
class={{if @secondary "es-button-secondary" "es-button"}}
40+
aria-label={{@label}}
41+
type={{this._type}}
42+
...attributes
43+
{{on "click" this.buttonClicked}}
44+
>
45+
{{#if (has-block)}}
46+
{{yield}}
47+
{{else}}
48+
{{@label}}
49+
{{/if}}
50+
</button>
51+
</template>
3552
}

addon/components/es-button.hbs

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import EsIcon from './es-icon';
2+
3+
<template>
4+
{{! template-lint-disable require-valid-alt-text }}
5+
{{! Bug link: https://github.com/ember-template-lint/ember-template-lint/issues/1286 }}
6+
7+
{{#if @icon}}
8+
<EsIcon @icon={{@icon}} @class="card__icon" width="60px" />
9+
{{/if}}
10+
11+
{{#if @image}}
12+
<img
13+
class="card__image"
14+
src={{@image.src}}
15+
alt={{if @image.alt @image.alt ""}}
16+
role={{unless @image.alt "presentation"}}
17+
width={{@image.width}}
18+
height={{@image.width}}
19+
/>
20+
{{/if}}
21+
22+
<div class="card__content">
23+
{{yield}}
24+
</div>
25+
</template>

addon/components/es-card-content.hbs

Lines changed: 0 additions & 21 deletions
This file was deleted.

addon/components/es-card-content.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

addon/components/es-card.gjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import EsCardContent from './es-card-content';
2+
3+
<template>
4+
<li class="card {{if @image 'card--image'}}" ...attributes>
5+
<EsCardContent @icon={{@icon}} @image={{@image}}>
6+
{{yield}}
7+
</EsCardContent>
8+
</li>
9+
</template>

addon/components/es-card.hbs

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)