Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "antd-design-token",
"displayName": "antd Design Token",
"description": "VSCode extension for antd v5 design token.",
"version": "0.3.5",
"version": "0.3.6",
"publisher": "shezhangzhang",
"engines": {
"vscode": "^1.68.0"
Expand Down Expand Up @@ -59,7 +59,7 @@
"webpack-cli": "^4.9.2"
},
"dependencies": {
"antd-token-previewer": "^1.0.0-alpha.22",
"antd-token-previewer": "^1.0.3",
"rgb-hex": "^4.0.0"
},
"repository": {
Expand Down
7 changes: 6 additions & 1 deletion src/decoration-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,14 @@ export default class DecorationManager {
valueDecorations.push(decoration);

const themeFocusBorderColor = new vscode.ThemeColor("focusBorder");
const stringValue = String(this.fullToken[key]);
const decorationType = vscode.window.createTextEditorDecorationType({
after: {
contentText: colorValue ? "--" : `${String(this.fullToken[key])}`,
contentText: colorValue
? "--"
: stringValue.length > 36
? `${stringValue.slice(0, 36)}...`
: stringValue,
color: colorValue ? "transparent" : "#b37feb",
backgroundColor: colorValue || "",
border: "2px solid",
Expand Down