Friday, 17 July 2020

Bootstrap in Storybook

To use Bootstrap modules in Storybook, you have to import NgbModule inside the story and then in the story say:
export default {
    title: 'Tooltip',
    decorators: [
        moduleMetadata({
            // imports both components to allow component composition with storybook
            declarations: [TooltipComponent],
            imports: [NgbModule]
        }),
    ],
};