diff --git a/src/components/UserLabel/README.md b/src/components/UserLabel/README.md index 1f592f0f3f..191098bacc 100644 --- a/src/components/UserLabel/README.md +++ b/src/components/UserLabel/README.md @@ -97,3 +97,10 @@ LANDING_BLOCK--> | className | Custom CSS class for root element | `string` | | | style | HTML style attribute | `React.CSSProperties` | | | qa | HTML `data-qa` attribute, used in tests | `string` | | + +## CSS API + +| Name | Description | +| :--------------------------- | :--------------- | +| `--g-user-label-font-size` | Text font size | +| `--g-user-label-line-height` | Text line height | diff --git a/src/components/UserLabel/UserLabel.scss b/src/components/UserLabel/UserLabel.scss index 3ed49391ae..0a44846819 100644 --- a/src/components/UserLabel/UserLabel.scss +++ b/src/components/UserLabel/UserLabel.scss @@ -77,6 +77,8 @@ $block: '.#{variables.$ns}user-label'; } &__text { + font-size: var(--g-user-label-font-size, inherit); + line-height: var(--g-user-label-line-height, inherit); min-width: 0; margin-inline-end: 6px; white-space: nowrap;