File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { type Extension } from '@codemirror/state';
66import CodeMirror , { ReactCodeMirrorProps , BasicSetupOptions } from '@uiw/react-codemirror' ;
77import styled from 'styled-components' ;
88import * as alls from '@uiw/codemirror-themes-all' ;
9- import { langs } from '@uiw/codemirror-extensions-langs' ;
9+ import { langs , LanguageName } from '@uiw/codemirror-extensions-langs' ;
1010import { Select } from './Select' ;
1111import { Options } from '../extensions/basic-setup/example' ;
1212import { useTheme } from '../../utils/useTheme' ;
@@ -69,7 +69,7 @@ export default function Example() {
6969 crosshairCursor : false ,
7070 } ) ;
7171
72- function handleLangChange ( lang : string ) {
72+ function handleLangChange ( lang : LanguageName ) {
7373 try {
7474 import ( `code-example/txt/sample.${ lang . toLocaleLowerCase ( ) } .txt` )
7575 . then ( ( data ) => {
@@ -125,7 +125,7 @@ export default function Example() {
125125 label = "Lang"
126126 options = { Object . keys ( langs ) . sort ( ) }
127127 value = { mode }
128- onChange = { ( evn ) => handleLangChange ( evn . target . value ) }
128+ onChange = { ( evn ) => handleLangChange ( evn . target . value as LanguageName ) }
129129 />
130130 < Select
131131 label = "Website Theme"
You can’t perform that action at this time.
0 commit comments