ScalesCmsWeb.Components.DashboardTile (scales_cms v0.2.0)

Copy Markdown

A struct representing a configurable dashboard tile.

Fields

  • :title - The title displayed on the tile (required)
  • :description - A brief description shown below the title (optional)
  • :icon - The hero icon name to display (required)
  • :route - The route to navigate to when clicked (required)
  • :color - The color theme for the tile, defaults to "blue" (optional) Supported colors: "blue", "green", "purple", "orange", "red", "gray"
  • :external - Whether the link is external (opens in new tab), defaults to false (optional)

Example

%ScalesCmsWeb.Components.DashboardTile{
  title: "Documentation",
  description: "Read the CMS handbook",
  icon: "hero-book-open",
  route: "https://docs.example.com",
  color: "blue",
  external: true
}

Summary

Types

t()

@type t() :: %ScalesCmsWeb.Components.DashboardTile{
  color: String.t(),
  description: String.t() | nil,
  external: boolean(),
  icon: String.t(),
  route: String.t(),
  title: String.t()
}