Skip to content

Commit

Permalink
tech(pix-message): update icon
Browse files Browse the repository at this point in the history
  • Loading branch information
xav-car committed Sep 24, 2024
1 parent 0dcd0e7 commit 0ca2140
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion addon/components/pix-message.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p class="pix-message {{concat 'pix-message--' this.type}}" ...attributes>
{{#if @withIcon}}
<FaIcon @icon={{this.iconClass}} />
<PixIcon @name={{this.iconName}} />
{{/if}}
<span class="pix-message__content">
{{yield}}
Expand Down
12 changes: 6 additions & 6 deletions addon/components/pix-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ export default class PixMessage extends Component {
return correctTypes.includes(this.args.type) ? this.args.type : 'info';
}

get iconClass() {
get iconName() {
const classes = {
[TYPE_INFO]: 'circle-info',
[TYPE_SUCCESS]: 'circle-check',
[TYPE_WARNING]: 'circle-exclamation',
[TYPE_ALERT]: 'triangle-exclamation',
[TYPE_ERROR]: 'triangle-exclamation',
[TYPE_INFO]: 'info',
[TYPE_SUCCESS]: 'checkCircle',
[TYPE_WARNING]: 'error',
[TYPE_ALERT]: 'warning',
[TYPE_ERROR]: 'warning',
};
return classes[this.type];
}
Expand Down

0 comments on commit 0ca2140

Please sign in to comment.