From 21adcb697359b5f8f23cac110f33a6c7d44cd9e8 Mon Sep 17 00:00:00 2001 From: Ari Date: Tue, 24 May 2022 22:11:42 -0400 Subject: [PATCH] better autoinfobox styling --- .../AutomationEditor/AutoInfoBox.css | 26 ++++++++++++------- .../AutomationEditor/AutoInfoBox.tsx | 20 +++++++------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/webapp/src/components/AutomationEditor/AutoInfoBox.css b/webapp/src/components/AutomationEditor/AutoInfoBox.css index 3d70a08..fa862a5 100644 --- a/webapp/src/components/AutomationEditor/AutoInfoBox.css +++ b/webapp/src/components/AutomationEditor/AutoInfoBox.css @@ -34,6 +34,13 @@ border-radius: 5px; } +.automation-editor--info-box--tag-list { + max-height: 30vh; + overflow-y: scroll; + padding-left: 0.25em; + padding-right: 0.25em; +} + .automation-editor--info-box--tags>h1 { font-size: 1.5em; } @@ -49,6 +56,7 @@ .automation-editor--info-box--tag>div { margin: 0; + flex: 1; } .automation-editor--info-box--tag>div>input { @@ -56,15 +64,6 @@ padding: 1em 0.25em 0.2em 0.25em; } -.automation-editor--info-box--tag>button { - height: 1.25em; - width: 1.25em; - font-size: 1em; - display: flex; - justify-content: center; - align-items: center; -} - .automation-editor--info-box--tag--error { width: 100%; display: flex; @@ -81,4 +80,13 @@ .automation-editor--info-box--tag--error.show { height: fit-content; opacity: 1; +} + +.automation-editor--info-box--tag--trash, .automation-editor--info-box--tag--add { + height: 2em; + width: 2em; + font-size: 1em; + display: flex; + justify-content: center; + align-items: center; } \ No newline at end of file diff --git a/webapp/src/components/AutomationEditor/AutoInfoBox.tsx b/webapp/src/components/AutomationEditor/AutoInfoBox.tsx index 3f4f753..94e0a4a 100644 --- a/webapp/src/components/AutomationEditor/AutoInfoBox.tsx +++ b/webapp/src/components/AutomationEditor/AutoInfoBox.tsx @@ -94,19 +94,21 @@ export const AutoInfoBox: FC = ({ />

Tags

- {tags.map(([tagName, tagValue], tagIndex) =>
- - updateTagName(v, tagIndex)} /> - onUpdateTags(v, tagIndex)} /> - - {error} - -
)} +
+ {tags.map(([tagName, tagValue], tagIndex) =>
+ updateTagName(v, tagIndex)} /> + onUpdateTags(v, tagIndex)} /> + + + {error} + +
)} +

setNewTag([v, newTag[1]])} onEnter={addNewTag} /> setNewTag([newTag[0], v])} onEnter={addNewTag} /> - + {error}