NERDDISCO commited on
Commit
a077d00
•
1 Parent(s): 091fca4

fix: use "required"

Browse files
Files changed (1) hide show
  1. src/components/base/secret.tsx +2 -2
src/components/base/secret.tsx CHANGED
@@ -3,7 +3,7 @@ import { useState } from "react";
3
  import { Visibility, VisibilityOff } from "@mui/icons-material";
4
 
5
  export default function Secret(props: TextFieldProps) {
6
- const { name = "secret", label = "Secret", required = false } = props;
7
  const [showSecret, setShowSecret] = useState(false);
8
 
9
  const handleShowSecret = () => setShowSecret(!showSecret);
@@ -14,7 +14,7 @@ export default function Secret(props: TextFieldProps) {
14
  label={label}
15
  name={name}
16
  type={showSecret ? "text" : "password"}
17
- required
18
  InputProps={{
19
  endAdornment: (
20
  <InputAdornment position="end">
 
3
  import { Visibility, VisibilityOff } from "@mui/icons-material";
4
 
5
  export default function Secret(props: TextFieldProps) {
6
+ const { name = "secret", label = "Secret", required = true } = props;
7
  const [showSecret, setShowSecret] = useState(false);
8
 
9
  const handleShowSecret = () => setShowSecret(!showSecret);
 
14
  label={label}
15
  name={name}
16
  type={showSecret ? "text" : "password"}
17
+ required={required}
18
  InputProps={{
19
  endAdornment: (
20
  <InputAdornment position="end">