Feature/new fields

This commit is contained in:
2024-11-11 11:48:54 +00:00
committed by AmirHossein Mahmoodi
parent e39be7d0b7
commit 87219fbe24
8 changed files with 758 additions and 10 deletions

View File

@@ -0,0 +1,11 @@
import { styled, TextField } from "@mui/material";
const LtrTextField = styled(TextField)`
.MuiInputBase-input {
/* @noflip */
direction: ltr;
text-align: left;
}
`;
export default LtrTextField;

View File

@@ -0,0 +1,23 @@
import { Stack, Typography } from "@mui/material";
import { useTranslations } from "next-intl";
import LtrTextField from "@/core/components/LtrTextField";
const PriceField = (props) => {
const t = useTranslations();
return (
<Stack spacing={1}>
<Stack>
<LtrTextField {...props} />
</Stack>
<Stack direction="row" alignItems="center">
<Typography sx={{ margin: 1 }} component="span">
{(props.value / 10).toLocaleString()}
</Typography>
<Typography component="span" variant="caption" color={"gray"}>
{t("PriceField.toman")}
</Typography>
</Stack>
</Stack>
);
};
export default PriceField;