Base component to render button.
Button can be of type
primary
- solid filled button (with primary background color), to be used for primary actionsdefault
- bordered button (primary color) and text in primary color, to be used for secondary actionsdanger
- bordered button with error color, to be used in case of presenting any delete action to userlink
- button without any border, can be used to render menu icons where we don't want to show users any button borderGenerally the icon is placed before the button text. But that can also be changed, by configuring iconPlacement
prop to be
beforeText
- rendering the button icon before the textafterText
- rendering the button icon after the textThe Button component can be imported using
import { Button } from '@tail-kit/tail-kit'
Name | Description | Default Value |
---|---|---|
children | text rendered inside button string | undefined | -- |
className | additional class applied to button string | undefined | -- |
style | button styles CSSProperties | undefined | -- |
icon | icon rendered Element | undefined | -- |
iconPlacement | placement of icon with respect to label, whether it should be before label or after label "afterText" | "beforeText" | undefined | beforeText |
buttonType | type of the button "primary" | "default" | "danger" | "link" | undefined | default |
loading | show loading spinner in the button, if there is a icon present, it would render instead of the icon boolean | undefined | -- |