react-diff-viewer-continued
Version:
Continuation of a simple and beautiful text diff viewer component made with diff and React
99 lines (98 loc) • 3.07 kB
TypeScript
import type { Interpolation } from "@emotion/react";
export interface ReactDiffViewerStyles {
diffContainer?: string;
diffRemoved?: string;
diffAdded?: string;
diffChanged?: string;
line?: string;
highlightedGutter?: string;
contentText?: string;
lineContent?: string;
gutter?: string;
highlightedLine?: string;
lineNumber?: string;
marker?: string;
wordDiff?: string;
wordAdded?: string;
wordRemoved?: string;
codeFoldGutter?: string;
codeFoldExpandButton?: string;
summary?: string;
codeFoldContentContainer?: string;
emptyGutter?: string;
emptyLine?: string;
codeFold?: string;
stickyHeader?: string;
columnHeaders?: string;
titleBlock?: string;
content?: string;
column?: string;
noSelect?: string;
noWrap?: string;
splitView?: string;
allExpandButton?: string;
[key: string]: string | undefined;
}
export interface ReactDiffViewerStylesVariables {
diffViewerBackground?: string;
diffViewerTitleBackground?: string;
diffViewerColor?: string;
diffViewerTitleColor?: string;
diffViewerTitleBorderColor?: string;
addedBackground?: string;
addedColor?: string;
removedBackground?: string;
removedColor?: string;
changedBackground?: string;
wordAddedBackground?: string;
wordRemovedBackground?: string;
addedGutterBackground?: string;
removedGutterBackground?: string;
gutterBackground?: string;
gutterBackgroundDark?: string;
highlightBackground?: string;
highlightGutterBackground?: string;
codeFoldGutterBackground?: string;
codeFoldBackground?: string;
emptyLineBackground?: string;
gutterColor?: string;
addedGutterColor?: string;
removedGutterColor?: string;
codeFoldContentColor?: string;
}
export interface ReactDiffViewerStylesOverride {
variables?: {
dark?: ReactDiffViewerStylesVariables;
light?: ReactDiffViewerStylesVariables;
};
diffContainer?: Interpolation;
diffRemoved?: Interpolation;
diffAdded?: Interpolation;
diffChanged?: Interpolation;
marker?: Interpolation;
emptyGutter?: Interpolation;
highlightedLine?: Interpolation;
lineNumber?: Interpolation;
highlightedGutter?: Interpolation;
contentText?: Interpolation;
gutter?: Interpolation;
lineContent?: Interpolation;
line?: Interpolation;
wordDiff?: Interpolation;
wordAdded?: Interpolation;
wordRemoved?: Interpolation;
codeFoldGutter?: Interpolation;
codeFoldExpandButton?: Interpolation;
summary?: Interpolation;
codeFoldContentContainer?: Interpolation;
codeFold?: Interpolation;
emptyLine?: Interpolation;
content?: Interpolation;
noSelect?: Interpolation;
column?: Interpolation;
titleBlock?: Interpolation;
splitView?: Interpolation;
allExpandButton?: Interpolation;
}
declare const _default: (styleOverride: ReactDiffViewerStylesOverride, useDarkTheme?: boolean, nonce?: string) => ReactDiffViewerStyles;
export default _default;