Button
Modified button component (type=button by default), it can do loading and add Addons to itself 💪
jsx
import Button from 'intergalactic/button';
<Button />;import Button from 'intergalactic/button';
<Button />;ButtonProps
& & & {...}| Name | Type | Description |
|---|---|---|
| use | "primary" | "secondary" | "tertiary" | Button type |
| theme | "info" | "success" | "warning" | "danger" | "muted" | "invert" | Button theme |
| active | boolean | Button activity state |
| size | Button size | |
| disabled | boolean | Disabled button state |
| loading | boolean | Loading button state |
| addonLeft | React.ElementType | Tag for the left Addon |
| addonRight | React.ElementType | Tag for the right Addon |
Button.Addon
The addon is inside the button (most often it is an icon), it sets the correct margins depending on the size. It takes all properties of the Box.
jsx
import Button from 'intergalactic/button';
<Button.Addon />;import Button from 'intergalactic/button';
<Button.Addon />;Button.Text
Plain text, it sets the correct margins depending on the button size. If the button uses just text without addons, it will automatically turn into the Button.Text. It takes all properties of the Box.
jsx
import Button from 'intergalactic/button';
<Button.Text />;import Button from 'intergalactic/button';
<Button.Text />;