Skip to content

Commit 0635fdb

Browse files
committed
feat: pass props to get template method
1 parent 92f7f64 commit 0635fdb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ce-la-react.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ type EventListeners<R extends EventNames> = {
8787
};
8888

8989
type CustomElementConstructor<T> = {
90-
getTemplateHTML?: (attrs: Record<string, string>) => string;
90+
getTemplateHTML?: (attrs: Record<string, string>, props?: Record<string, any>) => string;
9191
shadowRootOptions?: {
9292
mode?: string;
9393
delegatesFocus?: boolean;
@@ -304,7 +304,7 @@ export function createComponent<I extends HTMLElement, E extends EventNames = {}
304304
shadowrootmode: mode,
305305
shadowrootdelegatesfocus: delegatesFocus,
306306
dangerouslySetInnerHTML: {
307-
__html: elementClass.getTemplateHTML(attrs),
307+
__html: elementClass.getTemplateHTML(attrs, props),
308308
},
309309
});
310310

0 commit comments

Comments
 (0)