react-diff-viewer icon indicating copy to clipboard operation
react-diff-viewer copied to clipboard

Add missing code fold styles to types

Open mabeyj opened this issue 4 years ago • 0 comments

  • Add codeFold and codeFoldContent values to ReactDiffViewerStylesOverride. 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 to ReactDiffViewerStyles. 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.

mabeyj avatar Dec 15 '20 19:12 mabeyj