Initial commit
This commit is contained in:
commit
864f37a652
48 changed files with 45596 additions and 0 deletions
27
app/client/components/ui/link.tsx
Normal file
27
app/client/components/ui/link.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { Link as ChakraLink } from "@chakra-ui/react";
|
||||
import { createLink, LinkComponent } from "@tanstack/react-router";
|
||||
import * as React from "react";
|
||||
|
||||
interface ChakraLinkProps
|
||||
extends Omit<React.ComponentPropsWithoutRef<typeof ChakraLink>, "href"> {}
|
||||
|
||||
const ChakraLinkComponent = React.forwardRef<
|
||||
HTMLAnchorElement,
|
||||
ChakraLinkProps
|
||||
>((props, ref) => {
|
||||
return <ChakraLink ref={ref} {...props} />;
|
||||
});
|
||||
|
||||
const CreatedLinkComponent = createLink(ChakraLinkComponent);
|
||||
|
||||
export const Link: LinkComponent<typeof ChakraLinkComponent> = (props) => {
|
||||
return (
|
||||
<CreatedLinkComponent
|
||||
textDecoration={"underline"}
|
||||
_hover={{ textDecoration: "none" }}
|
||||
_focus={{ textDecoration: "none" }}
|
||||
preload={"intent"}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue