@lotte-innovate/ui-component-test 0.2.69 → 0.2.70

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +0,0 @@
1
- export declare function useWindowSize(): number;
@@ -1,17 +1,18 @@
1
- import { useState, useEffect } from 'react';
2
- var MIN_SIZE = 250;
3
- export function useWindowSize() {
4
- var _a = useState(MIN_SIZE), size = _a[0], setSize = _a[1];
5
- useEffect(function () {
6
- function handleResize() {
7
- var width = 130 + window.innerWidth * 0.15;
8
- width = Math.max(width, MIN_SIZE);
9
- width = Math.min(width, 300);
10
- setSize(width);
11
- }
12
- window.addEventListener('resize', handleResize);
13
- handleResize();
14
- return function () { return window.removeEventListener('resize', handleResize); };
15
- }, []);
16
- return size;
17
- }
1
+ "use strict";
2
+ // import { useState, useEffect } from 'react';
3
+ // const MIN_SIZE = 250;
4
+ // export function useWindowSize() {
5
+ // const [size, setSize] = useState(MIN_SIZE);
6
+ // useEffect(() => {
7
+ // function handleResize() {
8
+ // let width = 130 + window.innerWidth * 0.15;
9
+ // width = Math.max(width, MIN_SIZE);
10
+ // width = Math.min(width, 300);
11
+ // setSize(width);
12
+ // }
13
+ // window.addEventListener('resize', handleResize);
14
+ // handleResize();
15
+ // return () => window.removeEventListener('resize', handleResize);
16
+ // }, []);
17
+ // return size;
18
+ // }