Skip to content

Commit

Permalink
bug fixed : Password Input widget is not consistent with the dark the…
Browse files Browse the repository at this point in the history
…me (ToolJet#3992)
  • Loading branch information
manishkushare authored Sep 12, 2022
1 parent 4119196 commit 1cf6b33
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
14 changes: 12 additions & 2 deletions frontend/src/Editor/Components/PasswordInput.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import React from 'react';

export const PasswordInput = ({ height, validate, properties, styles, exposedVariables, setExposedVariable }) => {
export const PasswordInput = ({
height,
validate,
properties,
styles,
exposedVariables,
setExposedVariable,
darkMode,
}) => {
const value = exposedVariables.value;
const { visibility, disabledState, borderRadius } = styles;
const placeholder = properties.placeholder;
Expand All @@ -23,7 +31,9 @@ export const PasswordInput = ({ height, validate, properties, styles, exposedVar
setExposedVariable('value', e.target.value);
}}
type={'password'}
className={`form-control ${!isValid ? 'is-invalid' : ''} validation-without-icon`}
className={`form-control ${!isValid ? 'is-invalid' : ''} validation-without-icon ${
darkMode && 'dark-theme-placeholder'
}`}
placeholder={placeholder}
value={exposedVariables.value}
style={{ height, display: visibility ? '' : 'none', borderRadius: `${borderRadius}px` }}
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/_styles/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6103,4 +6103,7 @@ input.hide-input-arrows{
padding:0 10px;
}
}
}
.dark-theme-placeholder::placeholder{
color: #E0E0E0;
}

0 comments on commit 1cf6b33

Please sign in to comment.