-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
patrick
committed
Sep 12, 2023
1 parent
dca9092
commit 9852a9a
Showing
4 changed files
with
38 additions
and
49 deletions.
There are no files selected for viewing
34 changes: 14 additions & 20 deletions
34
src/lib/qti-components/qti-feedback/qti-feedback-block/qti-feedback-block.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,23 @@ | ||
import { PropertyValueMap, html } from 'lit'; | ||
import { PropertyValueMap, css, html } from 'lit'; | ||
import { QtiFeedback } from '../qti-feedback'; | ||
|
||
export class QtiFeedbackBlock extends QtiFeedback { | ||
static override styles = css` | ||
.on { | ||
display: block; | ||
} | ||
.off { | ||
display: none; | ||
} | ||
`; | ||
|
||
override render() { | ||
return html` | ||
<style> | ||
:host { | ||
display: block; | ||
} | ||
.on { | ||
display: block; | ||
} | ||
.off { | ||
display: none; | ||
} | ||
</style> | ||
<div part="feedback" class="feedback ${this.showStatus}"> | ||
<slot></slot> | ||
</div> | ||
`; | ||
return html` <slot part="feedback" class="feedback ${this.showStatus}"></slot> `; | ||
} | ||
|
||
protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void { | ||
this.checkShowFeedback(this.outcomeIdentifier); | ||
} | ||
// protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void { | ||
// this.checkShowFeedback(this.outcomeIdentifier); | ||
// } | ||
} | ||
|
||
customElements.define('qti-feedback-block', QtiFeedbackBlock); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 11 additions & 16 deletions
27
src/lib/qti-components/qti-feedback/qti-modal-feedback/qti-modal-feedback.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
import { html } from 'lit'; | ||
import { css, html } from 'lit'; | ||
import { QtiFeedback } from '../qti-feedback'; | ||
|
||
export class QtiModalFeedback extends QtiFeedback { | ||
override render() { | ||
return html` | ||
<style> | ||
.on { | ||
display: inline-block; | ||
} | ||
.off { | ||
display: none; | ||
} | ||
</style> | ||
<div class="feedback ${this.showStatus}"> | ||
<slot></slot> | ||
</div> | ||
`; | ||
} | ||
static override styles = css` | ||
.on { | ||
display: inline-block; | ||
} | ||
.off { | ||
display: none; | ||
} | ||
`; | ||
|
||
override render = () => html` <slot part="feedback" class="${this.showStatus}"></slot> `; | ||
} | ||
|
||
customElements.define('qti-modal-feedback', QtiModalFeedback); |