@gitlab/ui
Version:
GitLab UI Components
18 lines (15 loc) • 398 B
JavaScript
/**
* 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 };