|
|
@ -29,7 +29,7 @@ const LableInput = () => { |
|
|
|
<div className="flex px-4 mb-2"> |
|
|
|
<div className="flex px-4 mb-2"> |
|
|
|
<input type="text" className="bg-white border border-grayE0 h-12 w-full outline-none px-2 ml-2 rounded-md" id="lableInput" |
|
|
|
<input type="text" className="bg-white border border-grayE0 h-12 w-full outline-none px-2 ml-2 rounded-md" id="lableInput" |
|
|
|
onKeyDown={(e) => { |
|
|
|
onKeyDown={(e) => { |
|
|
|
if (e.key == 'Enter' && document.getElementById('colorInput').value) { |
|
|
|
if (e.key == 'Enter' && document.getElementById('colorInput').value && document.getElementById('colorInput').value && tags.length < 3) { |
|
|
|
setTag({ |
|
|
|
setTag({ |
|
|
|
title: e.target.value, |
|
|
|
title: e.target.value, |
|
|
|
color: document.getElementById('colorInput').value |
|
|
|
color: document.getElementById('colorInput').value |
|
|
@ -57,7 +57,7 @@ const LableInput = () => { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<button className="bg-grayE0 w-24 h-14 mx-2 font-bold text-gray-600 rounded-lg" onClick={() => { |
|
|
|
<button className="bg-grayE0 w-24 h-14 mx-2 font-bold text-gray-600 rounded-lg" onClick={() => { tags.length < 3 && document.getElementById('lableInput').value && |
|
|
|
setTag({ |
|
|
|
setTag({ |
|
|
|
title: document.getElementById('lableInput').value, |
|
|
|
title: document.getElementById('lableInput').value, |
|
|
|
color: document.getElementById('colorInput').value |
|
|
|
color: document.getElementById('colorInput').value |
|
|
|