upd: tampilan
Deskripsi: - tampilan form tambah banner - button save header tambah banner - tampilan form edit banner - button save header edit banner - padding form input with icon left or right No Issues
This commit is contained in:
30
components/buttonSaveHeader.tsx
Normal file
30
components/buttonSaveHeader.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { Feather } from "@expo/vector-icons"
|
||||
import { ButtonHeader } from "./buttonHeader"
|
||||
import AlertKonfirmasi from "./alertKonfirmasi"
|
||||
|
||||
type Props = {
|
||||
category: 'create' | 'update'
|
||||
onPress?: () => void
|
||||
disable?: boolean
|
||||
}
|
||||
|
||||
export default function ButtonSaveHeader({ category, onPress, disable }: Props) {
|
||||
return (
|
||||
<>
|
||||
<ButtonHeader
|
||||
item={<Feather name="check" size={20} color={disable == false ? "grey" : "white"} />}
|
||||
onPress={() => {
|
||||
AlertKonfirmasi({
|
||||
title: 'Konfirmasi',
|
||||
desc: category == 'create' ? 'Apakah anda yakin ingin menambahkan data?' : 'Apakah anda yakin mengubah data?',
|
||||
onPress: () => {
|
||||
onPress && onPress()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user