import environment from "../utils/environment" ; export const Sticky = ( left = 50 , top = 50 ) => ( { in : { style : { left : ( ) => `${ ( left * environment . width ) / 100 }px` , top : ( ) => `${ ( top * environment . height ) / 100 }px` , transform : "translate(-50%, -50%)" , position : "fixed" , } , } , out : { style : { left : ( ) => `${ ( left * environment . width ) / 100 }px` , top : ( ) => `${ ( top * environment . height ) / 100 }px` , transform : "translate(-50%, -50%)" , position : "fixed" , } , } , } ) ; export const StickyIn = ( left = 50 , top = 50 ) => ( { in : { style : { left : ( ) => `${ ( left * environment . width ) / 100 }px` , top : ( ) => `${ ( top * environment . height ) / 100 }px` , transform : "translate(-50%, -50%)" , position : "fixed" , } , } , out : { style : { left : ( ) => `${ ( left * environment . width ) / 100 }px` , top : ( ) => `${ ( top * environment . height ) / 100 }px` , transform : "translate(-50%, -50%)" , position : "absolute" , } , } , } ) ; export const StickyOut = ( left = 50 , top = 50 ) => ( { in : { style : { left : `${ ( left * environment . width ) / 100 }px` , top : `${ ( top * environment . height ) / 100 }px` , transform : "translate(-50%, -50%)" , position : "absolute" , } , } , out : { style : { left : `${ ( left * environment . width ) / 100 }px` , top : `${ ( top * environment . height ) / 100 }px` , transform : "translate(-50%, -50%)" , position : "fixed" , } , } , } ) ;