Skip to content

Commit

Permalink
Update error list to use Alert-Card variant in form
Browse files Browse the repository at this point in the history
Refs: #7035
  • Loading branch information
anicyne committed Nov 8, 2024
1 parent c4d1706 commit cb01d57
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 1 addition & 2 deletions packages/components/src/components/form/shadow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ export class KolForm implements FormAPI {

private renderErrorList(errorList?: ErrorListPropType[]): JSX.Element {
return (
<KolAlertFc type="error" variant="msg">
{translate('kol-error-list-message')}
<KolAlertFc type="error" variant="card" label={translate('kol-error-list-message')}>
<nav aria-label={translate('kol-error-list')}>
<ul>
{errorList?.map((error, index) => (
Expand Down
9 changes: 9 additions & 0 deletions packages/themes/default/src/components/form.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
@import '../mixins/alert-wc';
@import '../mixins/indented-text';
@import '../mixins/link';
@import '../mixins/rem';

@layer kol-theme-component {
:host {
font-family: var(--font-family);
@include kol-alert-theme;

.card > .content ul {
color: var(--color-danger);
}
}

.kol-link-wc {
@include kol-link;
display: inline-block;

:is(a, button) {
color: var(--color-danger);
}
}

.mandatory-fields-hint {
Expand Down

0 comments on commit cb01d57

Please sign in to comment.