Skip to content

Commit

Permalink
fix(react): remove defaultProps from sidebar, use default parameters …
Browse files Browse the repository at this point in the history
…instead (#1764)
  • Loading branch information
scurker authored Dec 13, 2024
1 parent b598281 commit e4a3441
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/react/src/components/SideBar/SideBarItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface SideBarItemProps extends React.HTMLAttributes<HTMLLIElement> {

const SideBarItem: React.ComponentType<
React.PropsWithChildren<SideBarItemProps>
> = ({ children, autoClickLink, ...other }: SideBarItemProps) => {
> = ({ children, autoClickLink = true, ...other }: SideBarItemProps) => {
const onClick = (e: React.MouseEvent<HTMLLIElement>) => {
if (!autoClickLink) {
return;
Expand All @@ -27,8 +27,5 @@ const SideBarItem: React.ComponentType<
};

SideBarItem.displayName = 'SideBarItem';
SideBarItem.defaultProps = {
autoClickLink: true
};

export default SideBarItem;

0 comments on commit e4a3441

Please sign in to comment.