Button
A reusable button component can be used in multiple parts of an application to create various UI instances. For example, a button component can display different colors in multiple parts of an application.
It typically includes customizable attributes such as text, color, size, and style, allowing developers to easily incorporate buttons into their user interface designs without duplicating code. This component promotes code reusability, improves maintainability, and ensures a cohesive user experience.
Props
Props | Datatype | Values/Example |
---|---|---|
type | string | "primary" | "dark" | "danger" | "transparent" | "other" | "icon" |
disable | boolean | "true" | "false" |
loader | boolean | "true" | "false" |
loaderSize | number | 16 | 16 |
title | string | "Cancel" |
onClick | function | function from parent component |
textStyleProp | Object | {"font-size: var(--base-text)"} |
textClassProp | Object | {"font-size: var(--base-text)"} |
buttonClassProp | Object | {"font-size: var(--base-text)"} |
buttonStyleProp | Object | {"font-size: var(--base-text)"} |
allowChild | boolean | "true" | "false" |