UNPKG

@gitlab/ui

Version:
18 lines (15 loc) 398 B
/** * Return a story decorator function, which wraps the given story in a `div` * element with the given `style` attributes. * * @param {object} style The style attribute to apply to the container. * @return {function} The story decorator. */ const makeContainer = style => Story => ({ render(h) { return h('div', { style }, [h(Story())]); } }); export { makeContainer };