import {Modal} from 'antd' import '../styles/smbo.css' import {useState} from "react"; export const SquareIndicator = ({state}) =>{ let bgColor = "#AAA" switch (state){ case 1: bgColor = "#1B1" break; case 2: bgColor = "#DD1" break; case 3: bgColor = "#D11" break; } return () } const platesData = [ {id: '1', title: 'equipToolName', placeHolderId: '', state: '', units: 'ч', value: SquareIndicator, captionValue: 'Подпись', custom: 'Я не понял про это'} ] export default function SmboPlate({title, state, operatingTime, units, children, captionValue}){ const [isModalVisible, setIsModalVisible] = useState(false) const openModal = () => { setIsModalVisible(!!children) } const closeModal = () => { setIsModalVisible(false) } const plates_smbo_equip = platesData.map((items) => (