UNPKG

@aptpod/data-viz-create-visual-parts-react

Version:

template of npm project with typescript

18 lines (15 loc) 602 B
import React from 'react' import { addDecorator } from '@storybook/react' import { withScreenshot } from 'storycap' import { FONT_FAMILIES, FONT_LOADER_SPECS } from 'storybook/src/constant/font' import { FontStyle } from 'storybook/src/components/font-style' import { FontProvider } from 'storybook/src/components/font-provider' import { StyledGlobal } from 'storybook/src/style' addDecorator(withScreenshot) addDecorator((storyFn) => ( <> <StyledGlobal /> <FontStyle fontLoaderSpecs={FONT_LOADER_SPECS} /> <FontProvider fontFamilies={FONT_FAMILIES}>{storyFn()}</FontProvider> </> ))