mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-01-24 14:09:33 -06:00
Added the select option to the DialogContext
This commit is contained in:
@@ -63,6 +63,9 @@ const Dialog = ({dialog, setDialog}) => {
|
||||
{dialog.description ? <h3 className="dialog-description">{dialog.description}</h3>: ""}
|
||||
{dialog.placeholder ? <input className="dialog-input" type={dialog.type ? dialog.type : "text"} placeholder={dialog.placeholder} value={value}
|
||||
onChange={updateValue}/> : ""}
|
||||
{dialog.select ? <select value={value} onChange={updateValue} className="dialog-input">
|
||||
{Object.keys(dialog.selectOptions).map(key => <option key={key} value={key}>{dialog.selectOptions[key]}</option>)}
|
||||
</select> : ""}
|
||||
</div>
|
||||
<div className="dialog-buttons">
|
||||
{dialog.unsetButton ? <button className="dialog-btn dialog-secondary" onClick={clear}>{dialog.unsetButtonText || "Entfernen"}</button> : ""}
|
||||
|
||||
Reference in New Issue
Block a user