Skip to content

Commit

Permalink
docs: link to versioned docs on homepage "Read docs" CTA
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Dec 21, 2023
1 parent ca17e97 commit 1a223ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion apps/docs/components/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from "react";
import styles from "./styles.module.css";
import getClassNameFactory from "@/core/lib/get-class-name-factory";
import { Button } from "@/core/components/Button";
import Link from "next/link";

const getClassName = getClassNameFactory("Home", styles);

Expand All @@ -26,7 +27,9 @@ export const Home = () => {
<div style={{ paddingTop: 32 }} />
<div className={getClassName("ctas")}>
<div className={getClassName("actions")}>
<Button href="/docs">Read docs</Button>
<Link href="/docs" style={{ display: "flex" }}>
<Button>Read docs</Button>
</Link>
<Button href="https://demo.puckeditor.com/edit" variant="secondary">
View demo
</Button>
Expand Down
2 changes: 1 addition & 1 deletion packages/core/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const Button = ({
}) => {
const [loading, setLoading] = useState(false);

const ElementType = href ? "a" : "button";
const ElementType = href ? "a" : onClick ? "button" : "div";

const el = (
<ElementType
Expand Down

0 comments on commit 1a223ad

Please sign in to comment.