A customizable button component for React Native applications with haptic feedback support
Prop | Type | Required | Description |
---|---|---|---|
onPress | () => void | Yes | Function to call when button is pressed |
children | React.ReactNode | Yes | Content to display inside the button |
style | ViewStyle | ViewStyle[] | No | Custom styles for the button |
textStyle | TextStyle | No | Custom styles for the text |
bgColor | string | No | Background color of the button |
disabled | boolean | No | Disables the button when true |
loading | boolean | No | Shows loading indicator when true |
icon | React.ReactNode | No | Icon component to display |
iconPosition | 'left' | 'right' | No | Position of the icon (default: ‘left’) |
borderColor | string | No | Color of the button border |
borderWidth | number | No | Width of the button border |
height | number | No | Custom height for the button |
constants/appConstants.ts
to defining your theme.BORDER_RADIUS.sm
BUTTON_HEIGHT.md
)MARGIN.sm
useTheme
hook: