【发布时间】:2022-01-07 11:58:09
【问题描述】:
我正在尝试在我的 storybook / typescript / styled-components 项目中使用tippy.js css
我在我的样式组件中导入了 css 文件,但我打字要求我声明类型以使用它。
Cannot find module 'tippy.js/themes/material.css' or its corresponding type declarations.
这是我的样式化组件文件:
import styled from 'styled-components';
import Tippy from '@tippyjs/react';
import tippyCss from 'tippy.js/dist/tippy.css';
import tippyMaterialCss from 'tippy.js/themes/material.css';
export const TooltipStyle = styled(Tippy)`
${tippyCss}
${tippyMaterialCss}
`;
你知道我应该在声明类型文件中放什么吗? 非常感谢。
【问题讨论】:
标签: css typescript styled-components storybook tippyjs