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 7bf4851 commit 4498467
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 @@ -36,7 +36,7 @@ export const Button = ({

useEffect(() => setLoading(loadingProp), [loadingProp]);

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

const el = (
<ElementType
Expand Down

0 comments on commit 4498467

Please sign in to comment.