import * as React from 'react'; import { motion, useTransform } from 'framer-motion'; import { SheetDraggableProps } from './types'; import { useSheetContext } from './context'; import styles from './styles'; const SheetHeader = React.forwardRef( ({ children, disableDrag = false, style = {}, ...rest }, ref) => { const { indicatorRotation, dragProps } = useSheetContext(); const indicator1Transform = useTransform( indicatorRotation, r => `translateX(2px) rotate(${r}deg)` ); const indicator2Transform = useTransform( indicatorRotation, r => `translateX(-2px) rotate(${-1 * r}deg)` ); return ( {children || (
)}
); } ); export default SheetHeader;