import React from 'react' import { type Meta, type StoryObj } from '@storybook/react-vite' import { useWindowSize } from '..' import { DocsTemplate } from '../../../.storybook' import OutputForDemo from '../../../.storybook/templates/OutputForDemo' const WindowSizeTemplate = (args): React.JSX.Element => { const { width, height } = useWindowSize(args.ignoreHeaderHeight) return (
useWindowSize is a hook and will run anytime the
window size is changed.
,
This hook give you access to the width and{' '}
height of the browser window.
,
If you do not want the app's header height to be part of the
calculation, pass in true to the hook.
,
]}
noArgs
/>
>
),
},
},
} as Meta