Interface UseOnPressByStyleOptions

A hook to create a conditional onPress handler based on the presence of a specified style.

Options for the hook.

The name of the style key to check for.

The onPress function to be executed if the style is present.

  • A function that takes styles as an argument and returns the onPress function if the specified style is present, otherwise undefined.
interface UseOnPressByStyleOptions {
    onPress: (() => void);
    styleName: string;
}

Properties

Properties

onPress: (() => void)
styleName: string