Skip to content

Commit

Permalink
add disabled and readOnly attr to InputField (#3923)
Browse files Browse the repository at this point in the history
  • Loading branch information
miaawong authored Jun 5, 2023
1 parent d454e11 commit c5b8d13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/src/components/shared/forms/InputField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const InputField = ({
helperText,
isFirstChange,
showError = false,
disabled = false,
readOnly = false,
}) => {
const [show, setShow] = React.useState(false);

Expand Down Expand Up @@ -53,6 +55,8 @@ const InputField = ({
onChange={(e) => onChange(e)}
onBlur={onBlur}
onFocus={onFocus}
disabled={disabled}
readOnly={readOnly}
/>
{type !== "password" && showError && (
<span className="show-input-error">
Expand Down

0 comments on commit c5b8d13

Please sign in to comment.