base-styled-text-field.tsx 626 B

123456789101112131415161718192021222324
  1. import { TextField, type TextFieldProps, styled } from "@mui/material";
  2. import { useTranslation } from "react-i18next";
  3. export const BaseStyledTextField = styled((props: TextFieldProps) => {
  4. const { t } = useTranslation();
  5. return (
  6. <TextField
  7. autoComplete="off"
  8. hiddenLabel
  9. fullWidth
  10. size="small"
  11. variant="outlined"
  12. spellCheck="false"
  13. placeholder={t("Filter conditions")}
  14. sx={{ input: { py: 0.65, px: 1.25 } }}
  15. {...props}
  16. />
  17. );
  18. })(({ theme }) => ({
  19. "& .MuiInputBase-root": {
  20. background: theme.palette.mode === "light" ? "#fff" : undefined,
  21. },
  22. }));