From d826ca7f2db7166cc39542ae4e67c4f8630f3b7b Mon Sep 17 00:00:00 2001 From: Nikita Gorin <36075690+NikitaCG@users.noreply.github.com> Date: Tue, 9 Apr 2024 17:01:46 +0300 Subject: [PATCH] feat: userLabel text depends on vars (#1493) --- src/components/UserLabel/README.md | 7 +++++++ src/components/UserLabel/UserLabel.scss | 2 ++ 2 files changed, 9 insertions(+) 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;