Configuration for a single touch-optimized control button.

ButtonTouch

interface ButtonTouch {
    name?: string;
    icon?: string | number | symbol;
    alternateIcon?: string | number | symbol;
    onPress?: (() => void);
    backgroundColor?: {
        default?: string;
        pressed?: string;
    };
    active?: boolean;
    alternateIconComponent?: Element;
    iconComponent?: Element;
    customComponent?: Element;
    color?: string;
    activeColor?: string;
    inActiveColor?: string;
    show?: boolean;
    disabled?: boolean;
}

Properties

name?: string

Button label/name

icon?: string | number | symbol

Icon name from FontAwesome5 glyphMap

alternateIcon?: string | number | symbol

Alternate icon name (shown when active)

onPress?: (() => void)

Click handler

backgroundColor?: {
    default?: string;
    pressed?: string;
}

Background colors with default and pressed states

active?: boolean

Whether button is in active state

alternateIconComponent?: Element

Custom alternate icon component

iconComponent?: Element

Custom icon component

customComponent?: Element

Completely custom button component

color?: string

Icon color

activeColor?: string

Icon color when active

inActiveColor?: string

Icon color when inactive

show?: boolean

Whether to show the button

disabled?: boolean

Whether button is disabled