Skip to content

Commit

Permalink
feat: add required prop to BasicTextField
Browse files Browse the repository at this point in the history
  • Loading branch information
seankwarren committed Sep 21, 2023
1 parent 817babf commit 076a12c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/mui/components/textField/BasicTextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type BasicTextFieldProps = {
sx?: SxProps;
type?: HTMLInputTypeAttribute;
variant?: "standard" | "filled" | "outlined";
required?: boolean;
};

function BasicTextField({
Expand All @@ -28,6 +29,7 @@ function BasicTextField({
sx = {},
type = "text",
variant = "outlined",
required = false,
}: BasicTextFieldProps) {
const inputLabelProps = labelAsPlaceholder ? {} : { shrink: true };

Expand Down Expand Up @@ -62,6 +64,7 @@ function BasicTextField({
disabled={disabled}
variant={variant}
size={size}
required={required}
InputLabelProps={inputLabelProps}
onChange={(e) => onChange(e.target.value)}
/>
Expand Down

0 comments on commit 076a12c

Please sign in to comment.