Files
community-rule/app/components/NavigationItem/NavigationItem.view.tsx
T
2026-01-29 17:59:11 -07:00

29 lines
550 B
TypeScript

import { memo } from "react";
import type { NavigationItemViewProps } from "./NavigationItem.types";
function NavigationItemView({
href,
children,
disabled,
combinedStyles,
...props
}: NavigationItemViewProps) {
if (disabled) {
return (
<span className={combinedStyles} {...props}>
{children}
</span>
);
}
return (
<a href={href} className={combinedStyles} {...props}>
{children}
</a>
);
}
NavigationItemView.displayName = "NavigationItemView";
export default memo(NavigationItemView);