import { forwardRef, type ComponentRef } from 'react'; import { View } from 'react-native'; import type { MarqueeProps } from './types'; import { getViewProps } from './view-props'; export const Marquee = forwardRef, MarqueeProps>( (props, ref) => { const { accessibilityLabel, children, contentContainerStyle, onContentPress, style, } = props; const viewProps = getViewProps(props); return ( onContentPress?.({ x: event.nativeEvent.locationX }) } onStartShouldSetResponder={() => onContentPress !== undefined} pointerEvents={onContentPress ? 'box-only' : 'none'} style={contentContainerStyle} > {children} ); } ); Marquee.displayName = 'Marquee';