f37a163814
Co-authored-by: DS Boyce <260543580+ds-boyce@users.noreply.github.com> Co-authored-by: Samuel Newman <mozzius@protonmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
28 lines
606 B
TypeScript
28 lines
606 B
TypeScript
import {View} from 'react-native'
|
|
|
|
import {atoms as a} from '#/alf'
|
|
import {useInteractionState} from '#/components/hooks/useInteractionState'
|
|
import {SubtleHover} from '#/components/SubtleHover'
|
|
|
|
export function SubtleHoverWrapper({
|
|
children,
|
|
}: React.PropsWithChildren<unknown>) {
|
|
const {
|
|
state: hover,
|
|
onIn: onHoverIn,
|
|
onOut: onHoverOut,
|
|
} = useInteractionState()
|
|
|
|
return (
|
|
<View
|
|
// Web-only
|
|
onPointerEnter={onHoverIn}
|
|
// Web-only
|
|
onPointerLeave={onHoverOut}
|
|
style={a.pointer}>
|
|
<SubtleHover hover={hover} />
|
|
{children}
|
|
</View>
|
|
)
|
|
}
|