Skip to content

Commit

Permalink
[FEATURE] Remplacer les icônes stockées par le composant PixIcon (Pix…
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge authored Dec 11, 2024
2 parents 98bcab0 + 523aede commit f175857
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 28 deletions.
17 changes: 9 additions & 8 deletions mon-pix/app/components/module/grain/tag.gjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import PixIcon from '@1024pix/pix-ui/components/pix-icon';
import { service } from '@ember/service';
import Component from '@glimmer/component';

Expand All @@ -8,26 +9,26 @@ export default class ModulixGrainTag extends Component {
return this.intl.t(`pages.modulix.grain.tag.${this.args.type}`);
}

get iconPath() {
get iconName() {
switch (this.args.type) {
case 'lesson':
return '/images/icons/icon-book.svg';
return 'book';
case 'activity':
return '/images/icons/icon-cog.svg';
return 'cogsMagic';
case 'discovery':
return '/images/icons/icon-door-open.svg';
return 'doorOpen';
case 'challenge':
return '/images/icons/icon-cognition.svg';
return 'think';
case 'summary':
return '/images/icons/icon-mountain.svg';
return 'mountain';
default:
return '/images/icons/icon-book.svg';
return 'book';
}
}

<template>
<div class="tag tag--{{@type}}">
<img src={{this.iconPath}} class="tag_icon" alt="" aria-hidden="true" />
<PixIcon @name={{this.iconName}} @ariaHidden={{true}} />
<span>{{this.typeText}}</span>
</div>
</template>
Expand Down
3 changes: 0 additions & 3 deletions mon-pix/public/images/icons/icon-book.svg

This file was deleted.

3 changes: 0 additions & 3 deletions mon-pix/public/images/icons/icon-cog.svg

This file was deleted.

4 changes: 0 additions & 4 deletions mon-pix/public/images/icons/icon-cognition.svg

This file was deleted.

7 changes: 0 additions & 7 deletions mon-pix/public/images/icons/icon-door-open.svg

This file was deleted.

3 changes: 0 additions & 3 deletions mon-pix/public/images/icons/icon-mountain.svg

This file was deleted.

0 comments on commit f175857

Please sign in to comment.