Skip to content

Commit e307c3c

Browse files
rtibblesclaude
andcommitted
Simplify SafeHtmlImage and SafeHtmlTable attribute passing
Replace v-bind="$attrs" with explicit class="safe-html" and remove inheritAttrs: false, reducing the component API surface area. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b69799b commit e307c3c

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

packages/kolibri-common/components/SafeHTML/SafeHtmlImage.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
>
77
<div class="img-wrapper">
88
<img
9+
class="safe-html"
910
:src="src"
1011
:alt="alt"
1112
:style="imageStyle"
12-
v-bind="$attrs"
1313
@click="openLightbox"
1414
>
1515
<KIconButton
@@ -42,7 +42,6 @@
4242
components: {
4343
Lightbox,
4444
},
45-
inheritAttrs: false,
4645
props: {
4746
src: { type: String, required: true },
4847
alt: { type: String, default: '' },

packages/kolibri-common/components/SafeHTML/SafeHtmlTable.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
data-testid="table-container"
66
>
77
<table
8-
v-bind="$attrs"
8+
class="safe-html"
99
:style="tableStyle"
1010
>
1111
<slot></slot>
@@ -19,8 +19,6 @@
1919
2020
export default {
2121
name: 'SafeHtmlTable',
22-
inheritAttrs: false,
23-
2422
props: {
2523
node: {
2624
required: true,

0 commit comments

Comments
 (0)