Skip to content

Commit

Permalink
fix: feedback inline was initially not set and added a story for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick de Klein committed Feb 14, 2025
1 parent 7568a84 commit d6607ea
Show file tree
Hide file tree
Showing 2 changed files with 417 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { css, html } from 'lit';
import { customElement } from 'lit/decorators.js';
import { ifDefined } from 'lit/directives/if-defined.js';

import { QtiFeedback } from '../qti-feedback';

import type { PropertyValueMap } from 'lit';

@customElement('qti-feedback-inline')
export class QtiFeedbackInline extends QtiFeedback {
static override styles = css`
Expand All @@ -14,7 +17,11 @@ export class QtiFeedbackInline extends QtiFeedback {
}
`;

override render = () => html` <slot part="feedback" class="${this.showStatus}"></slot> `;
override render = () => html` <slot part="feedback" class="${ifDefined(this.showStatus)}"></slot> `;

protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void {
this.checkShowFeedback(this.outcomeIdentifier);
}
}

declare global {
Expand Down
Loading

0 comments on commit d6607ea

Please sign in to comment.