import { Feather } from "@expo/vector-icons" import ModalConfirmation from "./ModalConfirmation" import { ButtonHeader } from "./buttonHeader" import { useState } from "react" type Props = { category: 'create' | 'update' | 'cancel' | 'update-calendar' onPress?: () => void disable?: boolean } export default function ButtonSaveHeader({ category, onPress, disable }: Props) { const [showModal, setShowModal] = useState(false) return ( <> } onPress={() => { if (!disable) { setShowModal(true) } }} /> { setShowModal(false) onPress && onPress() }} onCancel={() => setShowModal(false)} confirmText="Ya" cancelText="Batal" /> ) }