Button
Overview
LMButton
is a customizable button component that supports text and icon display, with options to define actions, style, placement, and active/inactive states. It also allows for different content when the button is active and includes flexibility in design and interaction.
Callbacks
onTap
: Callback to handle tap events trigerred by on clicking on the button.
Customisation
Property | Type | Description | Required |
---|---|---|---|
text | LMTextProps | Represents the text displayed on the button | |
icon | LMIconProps | Represents the icon displayed on the button | |
onTap | Function | Functionality executed when the button is clicked | ✔️ |
placement | 'start' or 'end' | Placement of the icon on the button | |
isActive | boolean | Represents the active/inactive state of the button | |
activeIcon | LMIconProps | Icon displayed when the button is in the active state | |
activeText | LMTextProps | Text displayed when the button is in the active state | |
buttonStyle | ViewStyle | Style of the button | |
isClickable | boolean | Indicates if the button is clickable or disabled |