diff --git a/extensions/basic-setup/src/index.ts b/extensions/basic-setup/src/index.ts index 4d22da57d..180cf6ea0 100644 --- a/extensions/basic-setup/src/index.ts +++ b/extensions/basic-setup/src/index.ts @@ -92,6 +92,8 @@ and an array literal), copy it into your own code, and adjust it as desired. */ export const basicSetup = (options: BasicSetupOptions = {}): Extension[] => { + const { crosshairCursor: initCrosshairCursor = false } = options; + let keymaps: KeyBinding[] = []; if (options.closeBracketsKeymap !== false) { keymaps = keymaps.concat(closeBracketsKeymap); @@ -130,7 +132,7 @@ export const basicSetup = (options: BasicSetupOptions = {}): Extension[] => { if (options.closeBrackets !== false) extensions.push(closeBrackets()); if (options.autocompletion !== false) extensions.push(autocompletion()); if (options.rectangularSelection !== false) extensions.push(rectangularSelection()); - if (options.crosshairCursor !== false) extensions.push(crosshairCursor()); + if (initCrosshairCursor !== false) extensions.push(crosshairCursor()); if (options.highlightActiveLine !== false) extensions.push(highlightActiveLine()); if (options.highlightSelectionMatches !== false) extensions.push(highlightSelectionMatches()); if (options.tabSize && typeof options.tabSize === 'number') diff --git a/www/src/pages/theme/Preview.tsx b/www/src/pages/theme/Preview.tsx index 3121a269f..88be12490 100644 --- a/www/src/pages/theme/Preview.tsx +++ b/www/src/pages/theme/Preview.tsx @@ -1,4 +1,4 @@ -import { FC, Children, PropsWithChildren, cloneElement, useState } from 'react'; +import { FC, PropsWithChildren, useState } from 'react'; import styled from 'styled-components'; import Npm from '@uiw/react-shields/npm'; import { useMdData } from '../../components/useMdData';