/ src / components / demo / enhanced_fp / window_inner_width.tsx
window_inner_width.tsx
 1  import { numberOrNull } from "../../../impl/utils";
 2  import Code from "../../Code";
 3  import Output from "../../Output";
 4  
 5  const WindowInnerWidthDemo = () => {
 6    return (
 7      <div>
 8        <Code
 9          snippet={`
10  numberOrNull(window.innerWidth);
11          `.trim()}
12        />
13  
14        <Output
15          generator={() => {
16            return numberOrNull(window.innerWidth);
17          }}
18        />
19      </div>
20    );
21  };
22  
23  export default WindowInnerWidthDemo;