-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: typo initalCollapsedDepth > initialCollapsedDepth (#85)
- Loading branch information
1 parent
48b7c9b
commit dc0fe95
Showing
9 changed files
with
70 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,104 @@ | ||
export interface Theme { | ||
/** | ||
* The tag name color (`<tag-name />`) | ||
* | ||
* @default #d43900 | ||
*/ | ||
tagColor?: string; | ||
/** | ||
* The text color (`<tag>Text</tag>`) | ||
* | ||
* @default #333 | ||
*/ | ||
textColor?: string; | ||
/** | ||
* The attribute key color (`<tag attribute-key="hello" />`) | ||
* | ||
* @default #2a7ab0 | ||
*/ | ||
attributeKeyColor?: string; | ||
/** | ||
* The attribute value color (` <tag attr="Attribute value">`) | ||
* | ||
* @default #008000 | ||
*/ | ||
attributeValueColor?: string; | ||
/** | ||
* The separators colors (`<, >, </, />, =, <?, ?>`) | ||
* | ||
* @default #333 | ||
*/ | ||
separatorColor?: string; | ||
/** | ||
* The comment color (`<!-- this is a comment -->`) | ||
* | ||
* @default #aaa | ||
*/ | ||
commentColor?: string; | ||
/** | ||
* the cdata element color (`<![CDATA[some stuff]]>`) | ||
* | ||
* @default #1D781D | ||
*/ | ||
cdataColor?: string; | ||
/** | ||
* The font family | ||
* | ||
* @default monospace | ||
*/ | ||
fontFamily?: string; | ||
} | ||
|
||
export interface XMLViewerProps { | ||
/** | ||
* A xml in string format | ||
* A xml string to prettify. | ||
*/ | ||
xml: string; | ||
/** | ||
* An object to customize the default theme. | ||
* | ||
* @default | ||
* ```js | ||
* { | ||
* tagColor: '#d43900', | ||
* textColor: '#333', | ||
* attributeKeyColor: '#2a7ab0', | ||
* attributeValueColor: '#008000', | ||
* separatorColor: '#333', | ||
* commentColor: '#aaa', | ||
* cdataColor: '#1d781d', | ||
* fontFamily: 'monospace', | ||
* } | ||
* ``` | ||
*/ | ||
theme?: Theme; | ||
/** | ||
* | ||
* The size of the indentation. | ||
* | ||
* @default 2 | ||
*/ | ||
indentSize?: number; | ||
/** | ||
* When the xml is invalid, invalidXml component will be returned. | ||
* | ||
* @default <div>Invalid XML!</div> | ||
*/ | ||
invalidXml?: JSX.Element; | ||
/** | ||
* Allow collapse/expand tags by click on them. When tag is collapsed its content and attributes are hidden. | ||
* | ||
* @default false | ||
*/ | ||
collapsible?: boolean; | ||
/** | ||
* | ||
* @deprecated use the initialCollapsedDepth instead | ||
*/ | ||
initalCollapsedDepth?: number; | ||
/** | ||
* When the **collapsible** is true, this set the level that will be started as collapsed. | ||
* For example, if you want to everything starts as collapsed, set 0. | ||
* | ||
* @default undefined | ||
*/ | ||
initialCollapsedDepth?: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters