Skip to content

Commit

Permalink
Set icon for action output references
Browse files Browse the repository at this point in the history
  • Loading branch information
electrikmilk committed Nov 16, 2023
1 parent 49ef108 commit e842ac8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
.sp-container .sp-variable-icon {
width: 18px;
height: 18px;
background: #fc880f !important;
background: #fc880f;
color: white;
margin-right: 0.25rem;
}
Expand Down
11 changes: 10 additions & 1 deletion src/value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ function renderObjectValue(container: HTMLElement, value?: any) {
container.innerHTML = str;
} else if (value && value.Value) {
if (value.Value.OutputName) {
const inlineVar = renderInlineVariable(value.Value.OutputName);
let char;
switch (value.Value.Type) {
case 'ActionOutput':
char = 'wand_stars';
}
const inlineVar = renderInlineVariable(value.Value.OutputName, char);
container.appendChild(inlineVar);
} else {
let char;
Expand Down Expand Up @@ -112,6 +117,10 @@ function renderInlineVariable(v: string, char?: string) {
i.innerText = char ?? 'f_cursive';
icon.appendChild(i);

if (char && char === 'wand_stars') {
icon.style.backgroundColor = '#8e8e93';
}

variable.appendChild(icon);
const name = document.createElement('div');
name.innerText = v;
Expand Down

0 comments on commit e842ac8

Please sign in to comment.