@@ -4,6 +4,7 @@ interface DropdownItem {
44 label : string
55 url : string
66 trackable : string
7+ selected ?: boolean
78}
89
910interface SubNavDropdownProps {
@@ -23,24 +24,33 @@ const SubNavDropdown: React.FC<SubNavDropdownProps> = ({ id, items, ariaLabelled
2324 aria-modal = "true"
2425 aria-labelledby = { ariaLabelledBy }
2526 >
26- { title && < h2 className = "o-header__subnav-dropdown-title" > { title } </ h2 > }
27- < button
28- className = "o-header__subnav-dropdown-close"
29- data-o-header-subnav-dropdown-close
30- aria-label = "Close menu"
31- type = "button"
32- >
33- < span className = "o-header__subnav-dropdown-close-icon" />
34- </ button >
35- < ul className = "o-header__subnav-dropdown-list" >
36- { items . map ( ( item , index ) => (
37- < li key = { index } className = "o-header__subnav-dropdown-item" >
38- < a href = { item . url } data-trackable = { item . trackable } className = "o-header__subnav-dropdown-link" >
39- { item . label }
40- </ a >
41- </ li >
42- ) ) }
43- </ ul >
27+ < div className = "o-header__subnav-dropdown-content" >
28+ < button
29+ className = "o-header__subnav-dropdown-close"
30+ data-o-header-subnav-dropdown-close
31+ aria-label = "Close menu"
32+ type = "button"
33+ >
34+ < span className = "o-header__subnav-dropdown-close-icon" />
35+ </ button >
36+ { title && < h2 className = "o-header__subnav-dropdown-title" > { title } </ h2 > }
37+
38+ < ul className = "o-header__subnav-dropdown-list" >
39+ { items . map ( ( item , index ) => (
40+ < li key = { index } className = "o-header__subnav-dropdown-item" >
41+ < a
42+ href = { item . url }
43+ data-trackable = { item . trackable }
44+ className = { `o-header__subnav-dropdown-link ${
45+ item . selected ? 'o-header__subnav-dropdown-link--selected' : ''
46+ } `}
47+ >
48+ { item . label }
49+ </ a >
50+ </ li >
51+ ) ) }
52+ </ ul >
53+ </ div >
4454 </ div >
4555 )
4656}
0 commit comments