improve CreateBoardModal design

This commit is contained in:
plebeius.eth
2023-07-19 21:28:03 +02:00
parent f82c4babf8
commit 07db7c791d
2 changed files with 28 additions and 14 deletions
+8 -1
View File
@@ -122,9 +122,15 @@ const CreateBoardModal = ({ isOpen, closeModal }) => {
placeholder="Add a rule" placeholder="Add a rule"
/> />
</div> </div>
<button style={{display: rules.length > 0 ? 'none' : 'block'}} id="rule-btn" className={rules.length > 0 ? "relative" : ""} onClick={handleAddRule}>
{editIndex > -1 ? "Update Rule" : "Add Rule"}
</button>
{rules.length > 0 && (
<fieldset> <fieldset>
<legend> <legend>
<button id="rule-btn" onClick={handleAddRule}>{editIndex > -1 ? "Update Rule" : "Add Rule"}</button> <button className={rules.length > 0 ? "relative" : ""} onClick={handleAddRule}>
{editIndex > -1 ? "Update Rule" : "Add Rule"}
</button>
</legend> </legend>
{rules.map((rule, index) => ( {rules.map((rule, index) => (
<div key={index} className="rule-item"> <div key={index} className="rule-item">
@@ -134,6 +140,7 @@ const CreateBoardModal = ({ isOpen, closeModal }) => {
</div> </div>
))} ))}
</fieldset> </fieldset>
)}
<button id="create-board-btn">Create Board</button> <button id="create-board-btn">Create Board</button>
</ul> </ul>
</div> </div>
@@ -71,10 +71,17 @@ export const StyledModal = styled(Modal)`
font-size: 0.8em; font-size: 0.8em;
} }
#rule {
}
#rule-btn {
margin-left: 281px;
}
fieldset { fieldset {
margin-left: 24px; margin-left: 5px;
width: auto; width: 90%;
} }
legend { legend {