@devtron-labs/devtron-fe-common-lib 1.0.9-beta-2 → 1.0.9-beta-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Shared/Components/DiffViewer/DiffViewer.component.d.ts +38 -0
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-CoeiuuPa.js → cssMode-CKJ-QzWl.js} +1 -1
- package/dist/{freemarker2-97uWc82u.js → freemarker2-CebLwjx-.js} +1 -1
- package/dist/{handlebars-Tf_kvstE.js → handlebars-CCEdEQCV.js} +1 -1
- package/dist/{html-Dd47jhjY.js → html-DegamaFU.js} +1 -1
- package/dist/{htmlMode-DlDt58fe.js → htmlMode-CzWMQVqf.js} +1 -1
- package/dist/{index-D0YUiZuj.js → index-C3NRtg0B.js} +24 -24
- package/dist/index.js +1 -1
- package/dist/{javascript-Bvi6tQYc.js → javascript-f1PUFldd.js} +1 -1
- package/dist/{jsonMode-fCriqpOs.js → jsonMode-Dc4M9f37.js} +1 -1
- package/dist/{liquid-CKwB_9dE.js → liquid-BIb9wLLB.js} +1 -1
- package/dist/{mdx-D1D4MIj0.js → mdx-BAQnXbt9.js} +1 -1
- package/dist/{python-DWGuvf19.js → python-CiINw4RP.js} +1 -1
- package/dist/{razor-DHUQuo_2.js → razor-CBJ9qDPY.js} +1 -1
- package/dist/{tsMode-DTJV2o6y.js → tsMode-BG5KYv7b.js} +1 -1
- package/dist/{typescript-Bit2NA7Q.js → typescript-C_D6UcYW.js} +1 -1
- package/dist/{xml-Ds2_kRDF.js → xml-Da2izIit.js} +1 -1
- package/dist/{yaml-BYgGMVLT.js → yaml-D2sxh1VI.js} +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,41 @@
|
|
|
1
1
|
import { DiffViewerProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Component for showing diff between two string or object.
|
|
4
|
+
*
|
|
5
|
+
* Note: Pass down the object as stringified for optimized performance.
|
|
6
|
+
*
|
|
7
|
+
* @example Usage
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <DiffViewer
|
|
11
|
+
* oldValue={oldValue}
|
|
12
|
+
* newValue={newValue}
|
|
13
|
+
* />
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @example With left/right title for lhs/rhs
|
|
17
|
+
*
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <DiffViewer
|
|
20
|
+
* oldValue={oldValue}
|
|
21
|
+
* newValue={newValue}
|
|
22
|
+
* leftTitle="Title for LHS"
|
|
23
|
+
* rightTitle={
|
|
24
|
+
* <span>Title for RHS</span>
|
|
25
|
+
* }
|
|
26
|
+
* />
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @example With custom message for folded code
|
|
30
|
+
* Note: the entire section would be clickable
|
|
31
|
+
*
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <DiffViewer
|
|
34
|
+
* oldValue={oldValue}
|
|
35
|
+
* newValue={newValue}
|
|
36
|
+
* codeFoldMessageRenderer={(totalFoldedLines, leftStartLineNumber, rightStartLineNumber) => <span>Custom text</span>}
|
|
37
|
+
* />
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
2
40
|
declare const DiffViewer: ({ oldValue, newValue, leftTitle, rightTitle, ...props }: DiffViewerProps) => JSX.Element;
|
|
3
41
|
export default DiffViewer;
|