better autoinfobox styling
This commit is contained in:
1 parent
8a33d05ced
commit
21adcb6973
2 files changed
+28
-18
No files matched your search
@@ -34,6 +34,13 @@
|
|||||||
border-radius: 5px;
|
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 {
|
.automation-editor--info-box--tags>h1 {
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
}
|
}
|
||||||
@@ -49,6 +56,7 @@
|
|||||||
|
|
||||||
.automation-editor--info-box--tag>div {
|
.automation-editor--info-box--tag>div {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.automation-editor--info-box--tag>div>input {
|
.automation-editor--info-box--tag>div>input {
|
||||||
@@ -56,15 +64,6 @@
|
|||||||
padding: 1em 0.25em 0.2em 0.25em;
|
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 {
|
.automation-editor--info-box--tag--error {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -82,3 +81,12 @@
|
|||||||
height: fit-content;
|
height: fit-content;
|
||||||
opacity: 1;
|
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;
|
||||||
|
}
|
||||||
@@ -94,19 +94,21 @@ export const AutoInfoBox: FC<Props> = ({
|
|||||||
/>
|
/>
|
||||||
<div className="automation-editor--info-box--tags">
|
<div className="automation-editor--info-box--tags">
|
||||||
<h1>Tags</h1>
|
<h1>Tags</h1>
|
||||||
{tags.map(([tagName, tagValue], tagIndex) => <div className="automation-editor--info-box--tag">
|
<div className="automation-editor--info-box--tag-list">
|
||||||
<Button onClick={() => onRemoveTag(tagIndex)} ><TrashIcon /></Button>
|
{tags.map(([tagName, tagValue], tagIndex) => <div className="automation-editor--info-box--tag">
|
||||||
<InputText value={tagName} label="Name" onChange={v => updateTagName(v, tagIndex)} />
|
<InputText value={tagName} label="Name" onChange={v => updateTagName(v, tagIndex)} />
|
||||||
<InputText value={tagValue} label="Tag" onChange={v => onUpdateTags(v, tagIndex)} />
|
<InputText value={tagValue} label="Tag" onChange={v => onUpdateTags(v, tagIndex)} />
|
||||||
<span className={["automation-editor--info-box--tag--error", (errorIndex === tagIndex) ? "show" : "hide"].join(" ")}>
|
<Button className="automation-editor--info-box--tag--trash" onClick={() => onRemoveTag(tagIndex)} ><TrashIcon /></Button>
|
||||||
{error}
|
<span className={["automation-editor--info-box--tag--error", (errorIndex === tagIndex) ? "show" : "hide"].join(" ")}>
|
||||||
</span>
|
{error}
|
||||||
</div>)}
|
</span>
|
||||||
|
</div>)}
|
||||||
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
<div className="automation-editor--info-box--tag">
|
<div className="automation-editor--info-box--tag">
|
||||||
<InputText value={newTag[0]} label="Name" onChange={v => setNewTag([v, newTag[1]])} onEnter={addNewTag} />
|
<InputText value={newTag[0]} label="Name" onChange={v => setNewTag([v, newTag[1]])} onEnter={addNewTag} />
|
||||||
<InputText value={newTag[1]} label="Tag" onChange={v => setNewTag([newTag[0], v])} onEnter={addNewTag} />
|
<InputText value={newTag[1]} label="Tag" onChange={v => setNewTag([newTag[0], v])} onEnter={addNewTag} />
|
||||||
<Button onClick={addNewTag} ><AddIcon /></Button>
|
<Button className="automation-editor--info-box--tag--add" onClick={addNewTag} ><AddIcon /></Button>
|
||||||
<span className={["automation-editor--info-box--tag--error", (errorIndex === 'new') ? "show" : "hide"].join(" ")}>
|
<span className={["automation-editor--info-box--tag--error", (errorIndex === 'new') ? "show" : "hide"].join(" ")}>
|
||||||
{error}
|
{error}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in new issue
Block a user