Skip to content

Commit

Permalink
Merge pull request #8 from shezhangzhang/length
Browse files Browse the repository at this point in the history
release v0.3.6
  • Loading branch information
shezhangzhang authored Sep 15, 2022
2 parents 1dc1432 + 5e49afd commit d2961c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
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

0 comments on commit d2961c3

Please sign in to comment.