import { Typography } from 'antd' import react from 'react' import { Temperature, Vibration } from './status' import './style.css' interface IBearingCard { name: string; tags: { name: "temp" | "vibration" | "oil", type: "danger" | "bare" | "warning" }[] } export const BearingCard: react.FC = (props) => { const cardMapping = { "temp": (type: "danger" | "bare" | "warning") => , "vibration": (type: "danger" | "bare" | "warning") => } return
{props.name}
{ props.tags.map((e) => { return ((cardMapping as any)![e.name as any] as any)(e.type) }) }
}