@cascateer/core 2.4.12 → 2.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/component.ts +5 -5
package/package.json
CHANGED
package/src/component.ts
CHANGED
|
@@ -23,7 +23,7 @@ export function createComponent(customElement?: string) {
|
|
|
23
23
|
>(
|
|
24
24
|
constructor: (
|
|
25
25
|
ctx: Context,
|
|
26
|
-
...
|
|
26
|
+
...classNames: { -readonly [K in keyof Styles]: Awaited<Styles[K]> }
|
|
27
27
|
) => JSX.Component<Props>,
|
|
28
28
|
) =>
|
|
29
29
|
class extends ComponentConstructor<Props> {
|
|
@@ -64,14 +64,14 @@ export function createStandaloneComponent(customElement?: string) {
|
|
|
64
64
|
<Styles extends Promise<unknown>[]>(...styles: Styles) =>
|
|
65
65
|
<Props extends JSX.Props>(
|
|
66
66
|
constructor: (
|
|
67
|
-
...
|
|
67
|
+
...classNames: { -readonly [K in keyof Styles]: Awaited<Styles[K]> }
|
|
68
68
|
) => JSX.Component<Props>,
|
|
69
69
|
): JSX.Component<Props> =>
|
|
70
70
|
new (createComponent(customElement)
|
|
71
71
|
.withStyles(...styles)
|
|
72
|
-
.withTemplate<{}, Props>((_, ...
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
.withTemplate<{}, Props>((_, ...classNames) =>
|
|
73
|
+
constructor(...classNames),
|
|
74
|
+
))({}).predicate("cct");
|
|
75
75
|
|
|
76
76
|
return {
|
|
77
77
|
withStyles: <Styles extends Promise<unknown>[]>(...styles: Styles) => ({
|