Skip to content

Commit a4ee455

Browse files
authored
implement a password input
1 parent b581dbe commit a4ee455

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/addons/settings/settings.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -428,23 +428,23 @@ const Setting = ({
428428
/>
429429
</React.Fragment>
430430
)}
431-
{(setting.type === 'string' || setting.type === 'long_string' || setting.type === 'untranslated') && (
431+
{(setting.type === 'string' || setting.type === 'long_string' || setting.type === 'untranslated' || setting.type === 'password') && (
432432
<React.Fragment>
433433
{label}
434434
<TextInput
435435
id={uniqueId}
436-
type="text"
436+
type={setting.type === 'password' ? 'password' : 'text'}
437437
value={value}
438438
className={setting.type === 'long_string' ? styles.longStringSetting : ''}
439439
onChange={newValue => SettingsStore.setAddonSetting(addonId, settingId, newValue)}
440440
/>
441441
{setting.type !== 'long_string' && (
442-
<ResetButton
443-
addonId={addonId}
444-
settingId={settingId}
445-
forTextInput
446-
/>
447-
)}
442+
<ResetButton
443+
addonId={addonId}
444+
settingId={settingId}
445+
forTextInput
446+
/>
447+
)}
448448
</React.Fragment>
449449
)}
450450
{setting.type === 'color' && (

0 commit comments

Comments
 (0)