// This file is auto-generated by "@aria-ui/cli". Do not edit this file directly. import { registerResizableHandleElement, type ResizableHandleElement, type ResizableHandleProps as ResizableHandleElementProps } from "@prosekit/web/resizable"; import { createEffect, createSignal, mergeProps, splitProps } from "solid-js"; import type { Component, JSX } from "solid-js"; import h from "solid-js/h"; /** Props for the {@link ResizableHandle} Solid component. */ export interface ResizableHandleProps { /** * The position of the handle. * * @default "bottom-right" */ position?: ResizableHandleElementProps['position']; } /** A Solid component that renders an `prosekit-resizable-handle` custom element. */ export const ResizableHandle: Component> = (props): any => { registerResizableHandleElement() const [getElement, setElement] = createSignal(null) const [ elementProps, restProps ] = splitProps(props, ["position"]) createEffect(() => { const element = getElement() if (!element) return Object.assign(element, { position: elementProps.position }) }) return () => h( 'prosekit-resizable-handle', mergeProps(restProps, { ref: (el: ResizableHandleElement | null ) => { setElement(el) }, }), ) };