Add GlSingleStat to haml
What does this MR do and why?
Add GlSingleStat
HAML component
In Create single stats component in Ruby (GlSingle... (#439205 - closed) we discussed to add the GlSingleStat
as a HAML component for better reuse. This MR adds the HAML component.
- Uses the same structure as it's GitLab UI counterpart
- Uses the same classes
- The part with the animated number has been omitted
Lookbook: http://gdk.test:3000/rails/lookbook/inspect/pajamas/single_stat/default
There is currently a styling issue with the tile as we recently have changed it in GitLab UI via feat(GlSingleStat): Use typescale headline (gitlab-ui!3913 - merged)
Usage
# @param [String] title
# @param [String] stat_value
# @param [String] unit
# @param [String] title_icon
# @param [String] meta_text
# @param [String] meta_icon
# @param [Symbol] variant
# @param [Boolean] hide_units
render Pajamas::SingleStatComponent([@param])
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
–
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Related to ✂️ UX Paper Cuts 16.9 → Pajamas Migrations (#430246 - closed)
Closes #439205 (closed)