Skip to content

Commit

Permalink
Pass correct props through LinkButtons
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptronicek committed Oct 29, 2023
1 parent 547b09f commit ece9754
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export interface LinkButtonProps extends ButtonProps {
* A HTML anchor element styled as a button.
*/
export const LinkButton = React.forwardRef<HTMLButtonElement, LinkButtonProps>(
({ className, variant, size, asChild, children, href, ...props }, ref) => {
({ asChild, children, href, ...props }, ref) => {
return (
<Button asChild {...props} ref={ref}>
<Button ref={ref} {...props} asChild>
<Link to={href}>{children}</Link>
</Button>
);
Expand Down
4 changes: 2 additions & 2 deletions components/dashboard/src/projects/Projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default function ProjectsPage() {
)}
{(data?.projects || []).length > 0 && (
<div className="app-container">
<div className="mt-3 pb-3 flex border-b border-gray-200 dark:border-gray-800">
<div className="mt-3 pb-3 flex border-b border-gray-200 dark:border-gray-800 items-center">
<div className="flex relative h-10 my-auto">
<img
src={search}
Expand All @@ -129,7 +129,7 @@ export default function ProjectsPage() {
<div className="flex-1" />
<div className="py-2 pl-3"></div>
{team && (
<LinkButton href="./members" variant="secondary" className="ml-2 flex">
<LinkButton href="./members" variant="secondary" className="ml-2">
Invite Members
</LinkButton>
)}
Expand Down

0 comments on commit ece9754

Please sign in to comment.