File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,24 @@ If you are using purely constructors:
126126import HTMLCodeBlockElement from ' @heppokofrontend/html-code-block-element/dist/class/HTMLCodeBlockElement' ;
127127```
128128
129+ #### Use in React
130+
131+ This package contains the global type files for React.
132+
133+ - ` React.CodeBlockHTMLAttributes `
134+ - ` code-block ` in ` JSX.IntrinsicElements `
135+
136+ ``` tsx
137+ import React , {CodeBlockHTMLAttributes } from ' react' ;
138+ import ' @heppokofrontend/html-code-block-element' ;
139+
140+ export const CodeBlock: React .FC <CodeBlockHTMLAttributes <HTMLElement >> = ({children , ... props }) => {
141+ return (
142+ <code-block { ... props } >{ children } </code-block >
143+ );
144+ };
145+ ```
146+
129147#### Use as constructor
130148
131149Manual setup:
You can’t perform that action at this time.
0 commit comments