Interface CustomButton

Interface defining the structure of each custom button.

interface CustomButton {
    action: (() => void);
    show: boolean;
    backgroundColor?: string;
    disabled?: boolean;
    icon?: string;
    iconStyle?: StyleProp<TextStyle>;
    text?: string;
    textStyle?: StyleProp<TextStyle>;
    customComponent?: ReactNode;
}

Properties

action: (() => void)

Function to be called when the button is pressed.

show: boolean

Determines if the button should be displayed.

backgroundColor?: string

The background color of the button.

'transparent'
disabled?: boolean

Determines if the button should be disabled.

false
icon?: string

The name of the FontAwesome5 icon to be displayed on the button.

iconStyle?: StyleProp<TextStyle>

The style to be applied to the icon.

text?: string

The text to be displayed on the button.

textStyle?: StyleProp<TextStyle>

The style to be applied to the text.

customComponent?: ReactNode

A custom component to be rendered inside the button instead of icon and text.