Skip to content

Commit

Permalink
Wrap text in inputs render
Browse files Browse the repository at this point in the history
  • Loading branch information
electrikmilk committed Apr 26, 2024
1 parent 2318446 commit c8096d4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,15 +325,21 @@ export function renderInputs(shortcut: ShortcutData) {
}
}

const inputsValue = renderValue(inputs.length !== 0 ? inputs.join(', ') : null, 'No');
const outputsValue = renderValue(workflows.length !== 0 ? workflows.join(', ') : null, 'Nowhere');

inputsValue.classList.add('no-wrap');
outputsValue.classList.add('no-wrap');

const render = renderActionHeader({
title: 'Receives',
icon: 'layers_fill',
color: '#007aff',
background: 'transparent',
},
renderValue(inputs.length !== 0 ? inputs.join(', ') : null, 'No'),
inputsValue,
actionText('input from'),
renderValue(workflows.length !== 0 ? workflows.join(', ') : null, 'Nowhere')
outputsValue
);

card.innerHTML = renderCardContent(render).outerHTML;
Expand Down
5 changes: 5 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@
color: #067aff;
}

.sp-container .sp-value.no-wrap {
white-space: pre-wrap !important;
text-align: left !important;
}

.sp-container .sp-variable-value {
background: #e2f0ff;
padding: 0 5px;
Expand Down

0 comments on commit c8096d4

Please sign in to comment.