import React, { useState } from 'react' interface CurrTimeStampAttrInt { type: string; handlePropertyChange: (changeTo: string, changeWith: string | boolean | number) => void; } const CurrTimeStampAttr: React.FC = ({ type, handlePropertyChange}) => { const [isCurrentTimeStamp, setIsCurrentTimeStamp] = useState(true); const handleIsCurrentTimeStamp = (checked: boolean) => { if (type.toLowerCase() === "temporal") { setIsCurrentTimeStamp(checked) handlePropertyChange("currentTimeStamp", checked); } } return (
handleIsCurrentTimeStamp(e.target.checked)} id="use_current_timestamp" type="checkbox" />
) } export default CurrTimeStampAttr