import type { ComponentPropsWithoutRef, Ref } from 'react'; import { useCropperState } from './context.ts'; export interface CropperWindowProps extends ComponentPropsWithoutRef<'div'> { ref?: Ref; } /** * fixed crop window. * * @param props div props. * @returns the crop window element. * @throws when rendered outside a ``. */ export const Window = (props: CropperWindowProps) => { const { children, style, ...rest } = props; const cropWindow = useCropperState((state) => state.cropWindow); return (
{children}
); };