Skip to content

CnStatsBlockWidget: support icon via manifest config (icon-class or MDI name) #324

Description

@rubenvdlinde

CnStatsBlock (the primitive) supports icon: Component for an MDI Vue icon import. The dashboard widget wrapper CnStatsBlockWidget does NOT forward icon-related props from the widgetDef envelope through to the underlying component, so dashboards configured purely via JSON manifest can't put icons on their KPI tiles.

Two options to consider:

  1. iconClass: string — forward widgetDef.props.iconClass as a CSS class applied to a wrapping <div> (consumers use NC core CSS classes like icon-link, icon-mail — already in their stylesheet). Easiest to ship.
  2. iconName: string — accept an MDI icon name (e.g. 'Database') and dynamic-import the matching Vue icon. More flexible but heavier.

Used by ConductionNL/integriq#831 (KPI tiles ship icon-less for now).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions