/** * Copyright (c) Paymium. * * This source code is licensed under the MIT license found in the * LICENSE file in the root of this projects source tree. */ import { ComponentType, forwardRef } from 'react'; import type { RequiredAccessibilityProps } from '../types'; import { useContext } from './context'; import { composeEventHandlers } from '@crossed/core'; export const createSheetTrigger = (Styled: ComponentType

) => // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore forwardRef>((props, ref) => { const { open, setOpen } = useContext(); return ( { setOpen(!open); })} /> ); });