-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- Thanks for sending a pull request! Before submitting your pull request, please make sure the checklist below is confirmed. Your pull requests will be merged after one of the collaborators approve. --> ### What type of PR is this? <!-- Add one of the following kinds: /kind feat /kind bug /kind cleanup /kind doc Optionally add one or more of the following kinds if applicable: /kind api-change /kind deprecation /kind failing-test /kind flake /kind regression --> ### What this PR does? ### Which issue(s) this PR fixes: <!-- *Automatically closes linked issue when PR is merged. Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_* --> Fixes # #### Does this PR introduce a user-facing change? <!-- If no, just write "NONE" in the release-note block below. If yes, a release note is required: Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". --> ```release-note ```
- Loading branch information
1 parent
ae90eef
commit 013a64e
Showing
7 changed files
with
76 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { ThemeType } from '@/context' | ||
import { GlobalToken } from 'antd' | ||
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api' | ||
|
||
export const foregroundColor = '#fa541c' | ||
export const tokenForegroundColor = '#9254de' | ||
|
||
export const defaultTheme = ( | ||
token: GlobalToken, | ||
theme?: ThemeType | ||
): monaco.editor.IStandaloneThemeData => { | ||
return { | ||
base: theme == 'dark' ? 'vs-dark' : 'vs', | ||
inherit: false, | ||
rules: [ | ||
{ | ||
token: 'keyword', | ||
foreground: tokenForegroundColor, | ||
fontStyle: 'bold' | ||
} | ||
], | ||
colors: { | ||
'editor.foreground': foregroundColor, | ||
'editor.background': token.colorBgContainer | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters