0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-22 06:48:11 +00:00

small changes

This commit is contained in:
Víctor Losada Hernández
2026-02-19 11:32:49 +01:00
parent 8edf517b7a
commit 904548521e
3 changed files with 60 additions and 60 deletions

View File

@@ -146,9 +146,7 @@ const TagInput = ({ label, valuePatterns, values = [], unique = true, placeholde
type='text'
value={t.draft} // always use draft
pattern={valuePatterns.source}
onChange={(e)=>setTagList((prev)=>prev.map((tag, idx)=>(idx === i ? { ...tag, draft: e.target.value } : tag)),
)
}
onChange={(e)=>setTagList((prev)=>prev.map((tag, idx)=>(idx === i ? { ...tag, draft: e.target.value } : tag)))}
onKeyDown={(e)=>{
if(e.key === 'Enter') {
e.preventDefault();
@@ -198,7 +196,6 @@ const TagInput = ({ label, valuePatterns, values = [], unique = true, placeholde
onSelect={(value)=>submitTag(value)}
onEntry={(e)=>{
if(e.key === 'Enter') {
console.log('submit');
e.preventDefault();
submitTag(e.target.value);
}

View File

@@ -1,21 +1,24 @@
.list input {
border-radius: 5px;
}
.tags {
.tagInput-dropdown {
.dropdown-options {
.item {
&.type {
background-color: #00800035;
}
&.group {
background-color: #50505035;
}
&.meta {
background-color: #00008035;
}
&.system {
background-color: #80000035;
.list input {
border-radius: 5px;
}
.tagInput-dropdown {
.dropdown-options {
.item {
&.type {
background-color: #00800035;
}
&.group {
background-color: #50505035;
}
&.meta {
background-color: #00008035;
}
&.system {
background-color: #80000035;
}
}
}
}