ITADN

`CopyBlock` prop 'theme' incompatible with `CodeBlock` prop 'theme'

#161Openfnune 创建于 2024-06-19
F
fnunecommented
![image](https://github.com/rajinwonderland/react-code-blocks/assets/16181067/809d1c7f-0e47-4918-9ffe-6edf9a23d640) I'd have expected the types to be compatible, but they don't overlap sufficiently. It seems like `CodeBlock`'s `theme` prop is `styled-component`'s `DefaultTheme` interface, whereas `CopyBlock`'s is this library's own `Theme` interface. Should they be the same? Otherwise how can I safely pass e.g. the `monoBlue` theme to `CodeBlock`?
0 条评论