@@ -22,7 +22,7 @@ export interface Link extends Omit<ListItemProps, 'onClick'> {
22
22
id : string ;
23
23
onClick ?: (
24
24
event : SyntheticEvent ,
25
- item : Pick < ListItemProps , 'id' | 'active' | 'disabled' | 'title' >
25
+ item : Pick < ListItemProps , 'id' | 'active' | 'disabled' | 'title' | 'href' >
26
26
) => void ;
27
27
}
28
28
@@ -31,11 +31,11 @@ interface ItemProps extends Link {
31
31
}
32
32
33
33
const Item = ( { id, onClick, ...rest } : ItemProps ) => {
34
- const { active, disabled, title } = rest ;
34
+ const { active, disabled, title, href } = rest ;
35
35
36
36
const handleClick = useCallback (
37
- ( event : SyntheticEvent ) => onClick ?.( event , { id, active, disabled, title } ) ,
38
- [ onClick , id , active , disabled , title ]
37
+ ( event : SyntheticEvent ) => onClick ?.( event , { id, active, disabled, title, href } ) ,
38
+ [ onClick , id , active , disabled , title , href ]
39
39
) ;
40
40
41
41
return < ListItem id = { `list-item-${ id } ` } { ...rest } { ...( onClick && { onClick : handleClick } ) } /> ;
0 commit comments