Skip to content

Commit

Permalink
feat: userLabel text depends on vars (#1493)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaCG authored Apr 9, 2024
1 parent 820dd60 commit d826ca7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/UserLabel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
2 changes: 2 additions & 0 deletions src/components/UserLabel/UserLabel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d826ca7

Please sign in to comment.