File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/kit-codemirror/src/CodeMirror Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -13,22 +13,21 @@ export interface CodeMirrorComponentProps {
1313 style ?: React . CSSProperties
1414}
1515
16- export interface CodeMirrorProps extends CodeMirrorComponentProps {
16+ export interface CodeMirrorProps extends CodeMirrorComponentProps , Omit < React . HTMLProps < HTMLDivElement > , 'onChange' | 'value' > {
1717 onViewLifecycle ?: CodeMirrorOnViewLifeCycle
1818 onExternalChange ?: CodeMirrorOnExternalChange
1919 className ?: string
2020}
2121
2222export const CodeMirror : React . FC < CodeMirrorProps > = (
2323 {
24- className,
2524 classNamesContent,
2625 onChange,
2726 onViewLifecycle, onExternalChange,
2827 value = '' ,
29- style,
3028 extensions,
3129 effects,
30+ ...props
3231 } ,
3332) => {
3433 const containerRef = React . useRef < HTMLDivElement | null > ( null )
@@ -54,5 +53,8 @@ export const CodeMirror: React.FC<CodeMirrorProps> = (
5453 // to be able to dispatch the correct effects
5554 useEditorClasses ( editorAttributesCompartment . current , editor , classNamesContent )
5655
57- return < div className = { className } style = { style } ref = { containerRef } />
56+ return < div
57+ ref = { containerRef }
58+ { ...props }
59+ />
5860}
You can’t perform that action at this time.
0 commit comments