diff --git a/.changeset/swift-kangaroos-argue.md b/.changeset/swift-kangaroos-argue.md new file mode 100644 index 00000000..b80f2efd --- /dev/null +++ b/.changeset/swift-kangaroos-argue.md @@ -0,0 +1,7 @@ +--- +'@watching/clips-preact': patch +'@watching/clips-react': patch +'@watching/clips': patch +--- + +Fix some more element definition issues diff --git a/packages/clips-preact/source/components/Action.tsx b/packages/clips-preact/source/components/Action.tsx index f6660220..a1fc4529 100644 --- a/packages/clips-preact/source/components/Action.tsx +++ b/packages/clips-preact/source/components/Action.tsx @@ -26,12 +26,13 @@ declare module 'preact' { } } -export function Action({overlay, onPress, ...props}: ActionProps) { +export function Action({overlay, children, onPress, ...props}: ActionProps) { return ( event.respondWith(onPress()) : undefined} + {...props} > + {children} {overlay && isValidElement(overlay) ? cloneElement(overlay, {slot: 'overlay'}) : null} diff --git a/packages/clips-react/source/components/Action.tsx b/packages/clips-react/source/components/Action.tsx index da854970..4b18659d 100644 --- a/packages/clips-react/source/components/Action.tsx +++ b/packages/clips-react/source/components/Action.tsx @@ -30,7 +30,7 @@ declare module 'react' { } export const Action = forwardRef(function Action( - {overlay, onPress, ...props}, + {overlay, children, onPress, ...props}, ref, ) { return ( @@ -39,6 +39,7 @@ export const Action = forwardRef(function Action( {...props} onpress={onPress ? (event) => event.respondWith(onPress()) : undefined} > + {children} {overlay && isValidElement(overlay) ? cloneElement(overlay, {slot: 'overlay'}) : null} diff --git a/packages/clips/source/extension.ts b/packages/clips/source/extension.ts index 478a0ac6..c67334ab 100644 --- a/packages/clips/source/extension.ts +++ b/packages/clips/source/extension.ts @@ -14,6 +14,8 @@ import { } from './extension-points.ts'; import {acceptSignals} from './signals.ts'; +import './elements.ts'; + customElements.define('remote-root', RemoteRootElement); customElements.define('remote-fragment', RemoteFragmentElement);