1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
This commit is contained in:
xmflsct
2023-07-13 21:55:26 +02:00
parent f7729f33db
commit 6e5b06f3a7
8 changed files with 175 additions and 9 deletions

View File

@ -17,6 +17,7 @@ export type Props = {
loading?: boolean
disabled?: boolean
destructive?: boolean
destructiveColor?: string
onPress: () => void
} & ({ type?: undefined; content: IconName } | { type: 'text'; content: string })
@ -34,6 +35,7 @@ const HeaderRight: React.FC<Props> = ({
loading,
disabled,
destructive = false,
destructiveColor,
onPress
}) => {
const { colors } = useTheme()
@ -57,7 +59,7 @@ const HeaderRight: React.FC<Props> = ({
color: disabled
? colors.secondary
: destructive
? colors.red
? destructiveColor || colors.red
: colors.primaryDefault,
opacity: loading ? 0 : 1
}}