View Source LivePalette.Action (LivePalette v0.1.1)
LivePalette.Action
defines the action struct that is used internally in LivePalette
.
It contains details that allow us to render the action in the results list.
Summary
Types
LivePalette.Action
contains multiple fields that can be used to determine how to render an action in the LivePalette
.
Types
@type t() :: %LivePalette.Action{ always_show?: boolean(), icon_name: String.t() | nil, subtitle: String.t() | nil, title: String.t() }
LivePalette.Action
contains multiple fields that can be used to determine how to render an action in the LivePalette
.
:title
and :always_show?
are required when creating a LivePalette.Action
- they determine what the action is called,
and whether is is statically shown in all results all the time. Results that match will be shown before those that are defined
with :always_show?
set to true
.