(window.webpackJsonp=window.webpackJsonp||[]).push([[136],{729:function(n,t,a){"use strict";a.r(t),a.d(t,"default",function(){return H});var e=a(23),s=a.n(e),o=a(24),i=a.n(o),r=a(25),p=a.n(r),c=a(26),d=a.n(c),l=a(32),h=a.n(l),u=a(27),m=a.n(u),g=a(28),k=a.n(g),f=a(580),C=a.n(f),b=a(0),y=a.n(b),v=a(111),x=a(82),w=function(){return y.a.createElement(x.Bb,{style:{lineHeight:"28px"},activeIndex:1,activeStyle:{backgroundColor:"#f48f42"},highlightStyle:{backgroundColor:"#ffd54f"},searchWords:["Chain","Chomps"],textToHighlight:"Chain Chomps (occasionally Chain-Chomps) are common enemies in the Mario franchise. They first appeared in Super Mario Bros. 3. Chain Chomps bear a resemblance to a ball and chain and are typified by their large, tooth-filled maws and incessant biting. Shigeru Miyamoto's inspiration for the Chain Chomps was from a childhood experience: a dog once ran up to him and tried to bite him, but the dog's chain held it back. As a result, Chain Chomps also possess canine qualities, such as barking, and are commonly used as guard dogs throughout the Mario series. Chain Chomps were originally created as an enemy for The Legend of Zelda series, but ended up being used for the Mario franchise first. Many Chomps have been part of the Koopa Troop, though a couple of them have been shown to be independent. "})},M=function(){return y.a.createElement(x.Bb,{style:{lineHeight:"28px"},activeIndex:1,activeClassName:"zent-demo-text-mark-active",highlightClassName:"zent-demo-text-mark-highlight",searchWords:["Chomps"],textToHighlight:"Chain Chomps (occasionally Chain-Chomps) are common enemies in the Mario franchise. They first appeared in Super Mario Bros. 3. Chain Chomps bear a resemblance to a ball and chain and are typified by their large, tooth-filled maws and incessant biting. Shigeru Miyamoto's inspiration for the Chain Chomps was from a childhood experience: a dog once ran up to him and tried to bite him, but the dog's chain held it back. As a result, Chain Chomps also possess canine qualities, such as barking, and are commonly used as guard dogs throughout the Mario series. Chain Chomps were originally created as an enemy for The Legend of Zelda series, but ended up being used for the Mario franchise first. Many Chomps have been part of the Koopa Troop, though a couple of them have been shown to be independent. "})},N=function(){return y.a.createElement(x.Bb,{style:{lineHeight:"28px"},activeIndex:1,activeClassName:"zent-demo-text-mark-active",highlightClassName:{Chomps:"zent-demo-text-mark-highlight",Chain:"zent-demo-text-mark-highlight2"},searchWords:["Chomps","Chain"],textToHighlight:"Chain Chomps (occasionally Chain-Chomps) are common enemies in the Mario franchise. They first appeared in Super Mario Bros. 3. Chain Chomps bear a resemblance to a ball and chain and are typified by their large, tooth-filled maws and incessant biting. Shigeru Miyamoto's inspiration for the Chain Chomps was from a childhood experience: a dog once ran up to him and tried to bite him, but the dog's chain held it back. As a result, Chain Chomps also possess canine qualities, such as barking, and are commonly used as guard dogs throughout the Mario series. Chain Chomps were originally created as an enemy for The Legend of Zelda series, but ended up being used for the Mario franchise first. Many Chomps have been part of the Koopa Troop, though a couple of them have been shown to be independent. "})};function T(n){return y.a.createElement(n.tag,C()({},n.attributes,{dangerouslySetInnerHTML:{__html:n.html}}))}function S(n){return y.a.createElement(T,{tag:"section",html:n.html,attributes:{className:"zandoc-react-markdown"}})}function E(n){return y.a.createElement(T,{tag:"style",html:n.style})}var z=function(n){function t(){var n,a;s()(this,t);for(var e=arguments.length,o=new Array(e),i=0;iTextMark\n

Highlight selected words in a string.

\n

Demos

'}),y.a.createElement(z,{title:"Inline styles",id:"Demobasic",src:'import { TextMark } from \'zent\';\n\nReactDOM.render(\n <TextMark\n style={{ lineHeight: \'28px\' }}\n activeIndex={1}\n activeStyle={{ backgroundColor: \'#f48f42\' }}\n highlightStyle={{ backgroundColor: \'#ffd54f\' }}\n searchWords={["Chain", "Chomps"]}\n textToHighlight="Chain Chomps (occasionally Chain-Chomps) are common enemies in the Mario franchise. They first appeared in Super Mario Bros. 3. Chain Chomps bear a resemblance to a ball and chain and are typified by their large, tooth-filled maws and incessant biting. Shigeru Miyamoto\'s inspiration for the Chain Chomps was from a childhood experience: a dog once ran up to him and tried to bite him, but the dog\'s chain held it back. As a result, Chain Chomps also possess canine qualities, such as barking, and are commonly used as guard dogs throughout the Mario series. Chain Chomps were originally created as an enemy for The Legend of Zelda series, but ended up being used for the Mario franchise first. Many Chomps have been part of the Koopa Troop, though a couple of them have been shown to be independent. "\n />,\n mountNode\n);'},y.a.createElement(w)),y.a.createElement(z,{title:"External CSS",id:"Democlass",src:'import { TextMark } from \'zent\';\n\nReactDOM.render(\n <TextMark\n style={{ lineHeight: \'28px\' }}\n activeIndex={1}\n activeClassName="zent-demo-text-mark-active"\n highlightClassName="zent-demo-text-mark-highlight"\n searchWords={["Chomps"]}\n textToHighlight="Chain Chomps (occasionally Chain-Chomps) are common enemies in the Mario franchise. They first appeared in Super Mario Bros. 3. Chain Chomps bear a resemblance to a ball and chain and are typified by their large, tooth-filled maws and incessant biting. Shigeru Miyamoto\'s inspiration for the Chain Chomps was from a childhood experience: a dog once ran up to him and tried to bite him, but the dog\'s chain held it back. As a result, Chain Chomps also possess canine qualities, such as barking, and are commonly used as guard dogs throughout the Mario series. Chain Chomps were originally created as an enemy for The Legend of Zelda series, but ended up being used for the Mario franchise first. Many Chomps have been part of the Koopa Troop, though a couple of them have been shown to be independent. "\n />,\n mountNode\n);'},y.a.createElement(M)),y.a.createElement(z,{title:"Different styles for different search words",id:"Demomulti",src:'import { TextMark } from \'zent\';\n\nReactDOM.render(\n <TextMark\n style={{ lineHeight: \'28px\' }}\n activeIndex={1}\n activeClassName="zent-demo-text-mark-active"\n highlightClassName={{\n \'Chomps\': \'zent-demo-text-mark-highlight\',\n \'Chain\': \'zent-demo-text-mark-highlight2\',\n }}\n searchWords={[\'Chomps\', \'Chain\']}\n textToHighlight="Chain Chomps (occasionally Chain-Chomps) are common enemies in the Mario franchise. They first appeared in Super Mario Bros. 3. Chain Chomps bear a resemblance to a ball and chain and are typified by their large, tooth-filled maws and incessant biting. Shigeru Miyamoto\'s inspiration for the Chain Chomps was from a childhood experience: a dog once ran up to him and tried to bite him, but the dog\'s chain held it back. As a result, Chain Chomps also possess canine qualities, such as barking, and are commonly used as guard dogs throughout the Mario series. Chain Chomps were originally created as an enemy for The Legend of Zelda series, but ended up being used for the Mario franchise first. Many Chomps have been part of the Koopa Troop, though a couple of them have been shown to be independent. "\n />,\n mountNode\n);'},y.a.createElement(N)),y.a.createElement(S,{html:'

API

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
PropertyDescriptionTypeRequiredDefaultAlternative
textToHighlightText to be searchedstringYes
searchWordsSearch words, will be converted to RegExpArray<string \n|\n RegExp>Yes
highlightClassNameHighlight CSS class name, you can have different class names for each search wordstring \n|\n objectNo
highlightStyleHighlight inline styleobjectNo
activeClassNameActive CSS class namestringNo
activeStyleActive inline styleobjectNo
activeIndexActive indexnumberNo
unhighlightClassNameUnhighlight CSS class namestringNo
unhighlightStyleUnhighlight inline styleobjectNo
highlightTagComponent to render highlighted textReact.ElementTypeNo\'mark\'
sanitizePreprocessor for search words and text(str: string) => stringNoidentity
autoEscapeAutomatically escape RegExp special characters in search wordsbooleanNofalsetrue
caseSensitiveCase sensitive matchbooleanNofalsetrue
findChunksCustomize matching algorithm(options) => Array<{start: number; end: number; highlight: boolean;}>No
classNameCustom top level CSS class namestringNo
styleCustom top level inline styleobjectNo
'}))}}]),t}(b.Component)}}]);