Skip to content

Commit

Permalink
doc(vscode): update document. #145
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jun 7, 2024
1 parent 4de4373 commit 7f4abc9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions themes/all/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,10 @@ export * from '@uiw/codemirror-theme-xcode';
<img width="436" alt="codemirror-theme-vscode dark" src="https://user-images.githubusercontent.com/1680273/202690670-385808e2-6346-4e36-a3d6-6d9fc1f216dc.png">
</a>

<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/vscode/light">
<img width="436" alt="codemirror-theme-vscode light" src="https://github.com/uiwjs/react-codemirror/assets/1680273/e22d099e-7e88-4711-bb07-7330047adfe1">
</a>

### white

<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/white/dark">
Expand Down
16 changes: 15 additions & 1 deletion themes/vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,25 @@
<img width="436" alt="codemirror-theme-vscode dark" src="https://user-images.githubusercontent.com/1680273/202690670-385808e2-6346-4e36-a3d6-6d9fc1f216dc.png">
</a>

<a href="https://uiwjs.github.io/react-codemirror/#/theme/data/vscode/light">
<img width="436" alt="codemirror-theme-vscode light" src="https://github.com/uiwjs/react-codemirror/assets/1680273/e22d099e-7e88-4711-bb07-7330047adfe1">
</a>

## Install

```bash
npm install @uiw/codemirror-theme-vscode --save
```

```jsx
import { vscodeDark, vscodeDarkInit } from '@uiw/codemirror-theme-vscode';
import { vscodeLight, vscodeLightInit } from '@uiw/codemirror-theme-vscode';
```

```js
import { EditorState } from '@codemirror/state';
import { javascript } from '@codemirror/lang-javascript';
import { vscodeDark } from '@uiw/codemirror-theme-vscode';
import { vscodeDark, vscodeLight } from '@uiw/codemirror-theme-vscode';

const state = EditorState.create({
doc: 'my source code',
Expand Down Expand Up @@ -48,9 +57,14 @@ import { vscodeDark, vscodeDarkInit } from '@uiw/codemirror-theme-vscode';

```tsx
import { CreateThemeOptions } from '@uiw/codemirror-themes';
// Dark
export declare const defaultSettingsVscodeDark: CreateThemeOptions['settings'];
export declare function vscodeDarkInit(options?: Partial<CreateThemeOptions>): import('@codemirror/state').Extension;
export declare const vscodeDark: import('@codemirror/state').Extension;
// Light
export declare const defaultSettingsVscodeLight: CreateThemeOptions['settings'];
export declare function vscodeLightInit(options?: Partial<CreateThemeOptions>): import('@codemirror/state').Extension;
export declare const vscodeLight: import('@codemirror/state').Extension;
```

## Usage
Expand Down

1 comment on commit 7f4abc9

@jaywcjlove
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.