Actions
Actions are used to create one or more actions for a supported component.
Actions are used to create one or more actions for a supported component.
API Reference
Props
ActionsProps
ActionsProps is an interface that represents the possible actions that can be taken on an element. It has three optional properties:
Name | Type | Default | Description |
---|---|---|---|
button | ButtonProps | An object representing a button action | |
link | LinkProps | An object representing a link action | |
open | OpenProps | An object representing an action to open a URL in a new window |
Each of these properties represents a different type of action that can be taken on an element. The button property represents a button action, the link property represents a link action, and the open property represents an action to open a URL in a new window. All of these properties are optional, so an element can have none, one, or multiple actions associated with it.
Example
ButtonProps
Name | Type | Default | Description |
---|---|---|---|
primary | boolean | A boolean value indicating whether the button is a primary button or not | |
icon | IconEnum | A value representing the icon to be displayed on the button | |
text* | string | The text to be displayed on the button | |
url* | string | The URL to be opened when the button is clicked |
Example
If you want to have a Block
with a Cards
list and buttons on the Card.Item
, you have to specify it like this:
LinkProps
Name | Type | Default | Description |
---|---|---|---|
url* | string | The URL to be opened when the link is clicked |
Example
If you want to have a Block
with a link next to it, you have to specify it like this:
OpenProps
Name | Type | Default | Description |
---|---|---|---|
url* | string | The URL to be opened in a new window |
Example
If you want to have a Block
with a List
and open actions, you have to specify it like this:
Last updated