ExTeal.Cards.Greeting behaviour (ExTeal v0.21.0) View Source
Not the thing you get the mail, but a card that appears on the dashboard.
Link to this section Summary
Callbacks
64px x 64px image url to display next to the greeting
Greeting for a user viewing the card. Defaults to 'Welcome back,'
Potentially HTML Rich text to display below the users title. Beware any unescaped / unsanitary HTML.
A list of links to display on a greeting card.
The name to greet the user by, use the conn to pull the currently authorized user.
The users title, useful in applications with RBAC or permissions
Link to this section Types
Specs
Each link should be a map with the following keys:
label
(required) the text to display on the linkurl
(required) the url to link tobutton_classes
(optional) a string of classes to apply to the link
Buttons default to a btn btn-default btn-secondary class definition if an override is not provided
Link to this section Callbacks
Specs
avatar_url(Plug.Conn.t()) :: String.t() | nil
64px x 64px image url to display next to the greeting
Specs
greeting() :: String.t()
Greeting for a user viewing the card. Defaults to 'Welcome back,'
Specs
helper_text(Plug.Conn.t()) :: String.t() | nil
Potentially HTML Rich text to display below the users title. Beware any unescaped / unsanitary HTML.
Specs
links(Plug.Conn.t()) :: [link()]
A list of links to display on a greeting card.
Specs
user_name(Plug.Conn.t()) :: String.t() | nil
The name to greet the user by, use the conn to pull the currently authorized user.
Specs
user_title(Plug.Conn.t()) :: String.t() | nil
The users title, useful in applications with RBAC or permissions