File tree Expand file tree Collapse file tree 3 files changed +41
-2
lines changed
Expand file tree Collapse file tree 3 files changed +41
-2
lines changed Original file line number Diff line number Diff line change 3232
3333 /* variant="tertiary" (only has fill when hovered) */
3434 --reactist-actionable-tertiary-idle-tint : # 006f85 ;
35+ --reactist-actionable-tertiary-idle-fill : transparent;
3536 --reactist-actionable-tertiary-hover-tint : # 006f85 ;
3637 --reactist-actionable-tertiary-hover-fill : # f2f6f7 ;
3738 --reactist-actionable-tertiary-disabled-tint : # 99c5ce ;
Original file line number Diff line number Diff line change 11: root {
22 --reactist-text-link-idle-tint : var (--reactist-actionable-tertiary-idle-tint );
33 --reactist-text-link-hover-tint : var (--reactist-actionable-tertiary-hover-tint );
4- --reactist-text-link-idle-decoration : underline;
5- --reactist-text-link-hover-decoration : underline;
4+ --reactist-text-link-idle-decoration : underline var ( --reactist-actionable-tertiary-idle-fill ) ;
5+ --reactist-text-link-hover-decoration : underline var ( --reactist-text-link-hover-tint ) ;
66}
77
88.container {
1414 cursor : pointer;
1515}
1616
17+ .container > * {
18+ text-decoration : var (--reactist-text-link-idle-decoration );
19+ color : var (--reactist-text-link-idle-tint );
20+ }
21+
1722/**
1823 * We need to target the child elements to ensure that styles are
1924 * applied to the text independently of the DOM elements hierarchy.
Original file line number Diff line number Diff line change @@ -41,3 +41,36 @@ A component used to create text-based hyperlinks.
4141## Props
4242
4343<ArgsTable of = { TextLink } />
44+
45+ ## Nested elements
46+
47+ When using nested elements inside a ` TextLink ` , hover styles are properly applied to all children.
48+
49+ <Canvas >
50+ <Story
51+ name = " Nested elements"
52+ parameters = { {
53+ docs: { source: { type: ' code' } },
54+ chromatic: { disableSnapshot: false },
55+ }}
56+ >
57+ <Stack space = " medium" align = " start" >
58+ <TextLink href = " https://www.doist.com/" >
59+ <span >Link with nested span</span >
60+ </TextLink >
61+ <TextLink href = " https://www.doist.com/" >
62+ <div >Link with nested div</div >
63+ </TextLink >
64+ <TextLink href = " https://www.doist.com/" >
65+ Text with <strong >bold</strong > section
66+ </TextLink >
67+ <TextLink href = " https://www.doist.com/" >
68+ Text with{ ' ' }
69+ <a href = " https://www.doist.com" target = " _blank" >
70+ link
71+ </a >{ ' ' }
72+ section
73+ </TextLink >
74+ </Stack >
75+ </Story >
76+ </Canvas >
You can’t perform that action at this time.
0 commit comments