Skip to content

Commit

Permalink
fix(ui): NavigatingButton missing forwardref
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandarDev committed Oct 20, 2024
1 parent 50b88c8 commit ee94a34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions web/packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@signalco/ui",
"version": "0.0.0",
"private": true,
"version": "0.1.1",
"license": "MIT",
"type": "module",
"exports": {
Expand Down
10 changes: 7 additions & 3 deletions web/packages/ui/src/NavigatingButton/NavigatingButton.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import { cx } from '@signalco/ui-primitives/cx';
import { Button, ButtonProps } from '@signalco/ui-primitives/Button';
import { Navigate } from '@signalco/ui-icons';
import { forwardRef } from 'react';

export type NavigatingButtonProps = ButtonProps & {
hideArrow?: boolean;
};

export function NavigatingButton({
const NavigatingButton = forwardRef<HTMLElement, NavigatingButtonProps>(({
hideArrow,
className,
...rest
}: NavigatingButtonProps) {
}, ref) => {
return (
<Button
ref={ref}
color="primary"
variant={hideArrow ? 'plain' : 'solid'}
className={cx(hideArrow && 'group/nav-button', className)}
Expand All @@ -30,4 +32,6 @@ export function NavigatingButton({
{...rest}
/>
);
}
});
NavigatingButton.displayName = 'NavigatingButton';
export { NavigatingButton };

0 comments on commit ee94a34

Please sign in to comment.