import {Modal} from 'antd' import '../styles/smbo.css' import {useState} from "react"; export const SqueareIndicator = ({state}) =>{ let bgColor = "#AAA" switch (state){ case 1: bgColor = "#1B1" break; case 2: bgColor = "#DD1" break; case 3: bgColor = "#D11" break; } return ( ) } export default function SmboPlate({title, state, operatingTime, units, children}){ const [isModalVisible, setIsModalVisible] = useState(false) const openModal = () => { setIsModalVisible(!!children) } const closeModal = () => { setIsModalVisible(false) } return(<>
{title}
наработка:
{operatingTime}
{units??'ч'}
{children}
) }