discourse/app/assets/stylesheets/common/components/d-stat-tiles.scss
Martin Brennan fae6ffcf06
UX: Introduce <DStatTiles /> component (#30238)
Introduces a new component used to show a grid of stats
on any page, mostly used for dashboards and config pages.
This component yields a hash with a `Tile` component property,
and the caller can loop through their stats and display them
using this component.

Each stat needs a @label and a @value at minimum, but can
also pass in a @tooltip and a @url.
2024-12-13 11:32:46 +10:00

27 lines
499 B
SCSS

.d-stat-tiles {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1em;
margin-bottom: 2em;
.d-stat-tile {
display: flex;
flex-direction: column;
padding: 1em;
background: var(--primary-very-low);
border-radius: 0.25em;
&__label {
color: var(--primary-medium);
font-size: 0.875em;
margin-bottom: 0.5em;
}
&__value {
color: var(--primary);
font-size: 1.5em;
font-weight: bold;
}
}
}