File tree Expand file tree Collapse file tree 2 files changed +19
-10
lines changed
Expand file tree Collapse file tree 2 files changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -54,15 +54,22 @@ const ButtonTabs: React.FC<ButtonTabsProps> = ({
5454
5555 return (
5656 < div className = { b ( null , className ) } data-qa = { qa } >
57- { items . map ( ( { id, title} ) => (
58- < Button
59- text = { title }
60- className = { b ( 'item' , { active : id === activeTabId } ) }
61- key = { title }
62- size = { tabSize }
63- onClick = { handleClick ( id ) }
64- />
65- ) ) }
57+ { items . map ( ( { id, title} ) => {
58+ const isActive = id === activeTabId ;
59+
60+ return (
61+ < Button
62+ text = { title }
63+ className = { b ( 'item' , { active : isActive } ) }
64+ key = { title }
65+ size = { tabSize }
66+ onClick = { handleClick ( id ) }
67+ extraProps = { {
68+ 'aria-current' : isActive ,
69+ } }
70+ />
71+ ) ;
72+ } ) }
6673 </ div >
6774 ) ;
6875} ;
Original file line number Diff line number Diff line change @@ -180,7 +180,9 @@ export type ButtonTheme =
180180 | 'scale'
181181 | 'monochrome' ;
182182
183- export interface ButtonProps extends AnalyticsEventsBase , Pick < UikitButtonProps , 'size' | 'width' > {
183+ export interface ButtonProps
184+ extends AnalyticsEventsBase ,
185+ Pick < UikitButtonProps , 'size' | 'width' | 'extraProps' > {
184186 text : string ;
185187 url : string ;
186188 primary ?: boolean ;
You can’t perform that action at this time.
0 commit comments