lsd/packages/lsd-react/.storybook/preview-head.html
2023-11-07 13:27:17 +00:00

17 lines
474 B
HTML

<script>
// This script is used to send the height of the storybook iframe to the parent window.
window.addEventListener('message', function (event) {
if (event.data && event.data.type === 'requestHeight') {
const height =
document.documentElement.scrollHeight || document.body.scrollHeight
event.source.postMessage(
{
type: 'iframeHeightResponse',
height: height,
},
'*',
)
}
})
</script>