From c8096d469a0a9e7e27375f1c0bb7fc205a2722b8 Mon Sep 17 00:00:00 2001 From: Brandon Jordan Date: Fri, 26 Apr 2024 19:30:49 -0400 Subject: [PATCH] Wrap text in inputs render --- src/render.ts | 10 ++++++++-- src/style.css | 5 +++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/render.ts b/src/render.ts index c487ed5..1a738c1 100644 --- a/src/render.ts +++ b/src/render.ts @@ -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; diff --git a/src/style.css b/src/style.css index 616895c..2e4e04f 100644 --- a/src/style.css +++ b/src/style.css @@ -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;