Skip to content

Commit

Permalink
feat: default value of rubric is now inline, discretionary-placement …
Browse files Browse the repository at this point in the history
…is stylable
  • Loading branch information
Patrick de Klein committed Feb 14, 2025
1 parent 5040077 commit 23c65b2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/lib/qti-components/qti-item-body/qti-item-body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class QtiItemBody extends LitElement {
static styles: CSSResultGroup = styles;

override render() {
return html`<slot name="qti-rubric-block"></slot><slot></slot>`;
return html`<slot part="qti-rubric-block" name="qti-rubric-block"></slot><slot></slot>`;
}
}

Expand Down
6 changes: 0 additions & 6 deletions src/lib/qti-components/qti-rubric-block/qti-rubric-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ export class QtiRubricBlock extends LitElement {
override render() {
return html`<slot></slot>`;
}

override connectedCallback(): void {
super.connectedCallback();
// by default put this in a slot in the item-body
this.setAttribute('slot', 'qti-rubric-block');
}
}

declare global {
Expand Down
4 changes: 3 additions & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import type { Options } from 'tsup';
import { defineConfig } from 'tsup';
import { globby } from 'globby';

import pkgJson from './package.json' assert { type: 'json' };
import { InlineCSSPlugin } from './scripts/inline-css-plugin';

import type { Options } from 'tsup';

const peerDependencies = Object.keys(pkgJson.peerDependencies || {});

const npmOptions: Options = {
Expand Down

0 comments on commit 23c65b2

Please sign in to comment.