kopia lustrzana https://github.com/bugout-dev/moonstream
button with nextlink wrapping as component
rodzic
ec2e780ba9
commit
ed36f6d5b0
|
@ -0,0 +1,17 @@
|
|||
import React from "react";
|
||||
import { chakra, Button, Link } from "@chakra-ui/react";
|
||||
import NextLink from "next/link";
|
||||
|
||||
const _RouteButton = (props) => {
|
||||
return (
|
||||
<NextLink href={props.href} passHref>
|
||||
<Button as={Link} {...props}>
|
||||
{props.children}
|
||||
</Button>
|
||||
</NextLink>
|
||||
);
|
||||
};
|
||||
|
||||
const RouteButton = chakra(_RouteButton, "button");
|
||||
|
||||
export default RouteButton;
|
Ładowanie…
Reference in New Issue