feat: Select article list in sight

This commit is contained in:
2025-05-31 06:35:05 +03:00
parent 5ef61bcef4
commit 2e6917406e
21 changed files with 899 additions and 498 deletions

View File

@@ -0,0 +1,32 @@
import { Box, TextField } from "@mui/material";
import { useEffect, useState } from "react";
export const CoordinatesInput = ({
setValue,
}: {
setValue: (value: { latitude: number; longitude: number }) => void;
}) => {
const [inputValue, setInputValue] = useState<string>("");
useEffect(() => {
setValue({
latitude: Number(inputValue.split(" ")[0]),
longitude: Number(inputValue.split(" ")[1]),
});
}, [inputValue]);
return (
<Box sx={{ display: "flex", alignItems: "center", gap: 1 }}>
<TextField
label="Координаты"
value={inputValue}
onChange={(e) => {
setInputValue(e.target.value);
}}
fullWidth
variant="outlined"
helperText="Формат: широта, долгота (например, 59.9398, 30.3146)"
/>
</Box>
);
};

View File

@@ -1,3 +1,4 @@
export * from "./TabPanel";
export * from "./BackButton";
export * from "./Modal";
export * from "./CoordinatesInput";