Skip to content

Commit

Permalink
feat(cc-header-addon): make use of the cc-notice instead of cc-error
Browse files Browse the repository at this point in the history
  • Loading branch information
Galimede committed Jun 30, 2023
1 parent 0f424fd commit f8574f9
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/components/cc-header-addon/cc-header-addon.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import '../cc-img/cc-img.js';
import '../cc-input-text/cc-input-text.js';
import '../cc-error/cc-error.js';
import '../cc-notice/cc-notice.js';
import '../cc-zone/cc-zone.js';
import { css, html, LitElement } from 'lit';
import { classMap } from 'lit/directives/class-map.js';
Expand Down Expand Up @@ -39,7 +39,7 @@ export class CcHeaderAddon extends LitElement {
static get properties () {
return {
addon: { type: Object },
error: { type: Boolean },
error: { type: Boolean, reflect: true },
noVersion: { type: Boolean, attribute: 'no-version' },
version: { type: String },
zone: { type: Object },
Expand Down Expand Up @@ -114,7 +114,7 @@ export class CcHeaderAddon extends LitElement {
` : ''}
${this.error ? html`
<cc-error></img>${i18n('cc-header-addon.error')}</cc-error>
<cc-notice intent="warning" message="${i18n('cc-header-addon.error')}"></cc-notice>
` : ''}
`;
}
Expand All @@ -133,6 +133,10 @@ export class CcHeaderAddon extends LitElement {
background-color: var(--cc-color-bg-default, #fff);
border-radius: var(--cc-border-radius-default, 0.25em);
}
:host([error]) {
border: none;
}
.main {
display: flex;
Expand Down Expand Up @@ -182,11 +186,6 @@ export class CcHeaderAddon extends LitElement {
font-weight: bold;
}
cc-error {
padding: var(--cc-gap);
text-align: center;
}
.messages {
display: flex;
box-sizing: border-box;
Expand Down

0 comments on commit f8574f9

Please sign in to comment.