react-diff-viewer
react-diff-viewer copied to clipboard
Add missing code fold styles to types
-
Add
codeFold
andcodeFoldContent
values toReactDiffViewerStylesOverride
. This fixes a type error that occurs when attempting to override these styles:Type '{ variables: { light: { removedBackground: string; addedBackground: string; }; }; codeFold: { background: string; borderTop: string; borderBottom: string; textAlign: string; }; codeFoldContent: { ...; }; ... 7 more ...; content: { ...; }; }' is not assignable to type 'ReactDiffViewerStylesOverride'. Object literal may only specify known properties, and 'codeFold' does not exist in type 'ReactDiffViewerStylesOverride'.
-
Add
codeFoldContent
toReactDiffViewerStyles
. For completeness, since all other styles are specified here. -
Add
codeFoldContent
to README. -
Add a test for rendering the component with all available styles. This will fail if there are any type errors.