mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-01 13:10:44 -03:00
17 lines
380 B
TypeScript
17 lines
380 B
TypeScript
export class MostrarVolver {
|
|
scrollY = $state(0);
|
|
value = $derived(this.scrollY > 500);
|
|
|
|
constructor() {
|
|
if (typeof window !== 'undefined') {
|
|
$effect(() => {
|
|
const handleScroll = () => {
|
|
this.scrollY = window.scrollY;
|
|
};
|
|
window.addEventListener('scroll', handleScroll);
|
|
return () => window.removeEventListener('scroll', handleScroll);
|
|
});
|
|
}
|
|
}
|
|
}
|