Skip to content

Commit 2b2a997

Browse files
igera93HerrTopi
authored andcommitted
feat(link): add textUnderlineOffset to Link component theme override
1 parent 3bd4c99 commit 2b2a997

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

packages/shared-types/src/ComponentThemeVariables.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ export type LinkTheme = {
653653
focusInverseIconOutlineColor: Colors['contrasts']['white1010']
654654
iconSize: string
655655
iconPlusTextMargin: Spacing['xxSmall']
656+
textUnderlineOffset: string
656657
}
657658

658659
export type InlineListItemTheme = {

packages/ui-link/src/Link/styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const generateStyle = (
5757
outlineStyle: componentTheme.focusOutlineStyle,
5858
borderRadius: componentTheme.focusOutlineBorderRadius,
5959
outlineOffset: '0.25rem',
60+
textUnderlineOffset: componentTheme.textUnderlineOffset,
6061

6162
// If TruncateText is used in Link with icon, align the icon and the text vertically
6263
...(renderIcon &&

packages/ui-link/src/Link/theme.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ const generateComponentTheme = (theme: Theme): LinkTheme => {
7171
focusInverseIconOutlineColor: colors?.contrasts?.white1010,
7272

7373
iconSize: '1.125em', // make icon slightly larger than inherited font-size,
74-
iconPlusTextMargin: spacing?.xxSmall
74+
iconPlusTextMargin: spacing?.xxSmall,
75+
textUnderlineOffset: 'auto'
7576
}
7677

7778
return {

0 commit comments

Comments
 (0)