34 lines
1.7 KiB
TypeScript
34 lines
1.7 KiB
TypeScript
import { useLocation } from "react-router";
|
|
import { t as i18nT } from "i18next";
|
|
import ButtonPrimary from "./ButtonPrimary";
|
|
import ButtonSecondary from "./ButtonSecondary";
|
|
import ButtonTertiary from "./ButtonTertiary";
|
|
|
|
export default function PreviewButtonsAsLinks() {
|
|
const currentRoute = useLocation().pathname;
|
|
return (
|
|
<div id="buttons-as-links">
|
|
<div className="not-prose border-border bg-background border border-dashed p-6">
|
|
<div className="w-full space-y-2">
|
|
<div className="mx-auto flex max-w-3xl flex-col items-center justify-center space-y-4 sm:flex-row sm:items-end sm:justify-center sm:space-y-0 sm:space-x-4">
|
|
<ButtonPrimary to={currentRoute}>{i18nT("components.buttons.preview.primary")}</ButtonPrimary>
|
|
<ButtonSecondary to={currentRoute}>{i18nT("components.buttons.preview.secondary")}</ButtonSecondary>
|
|
<ButtonTertiary to={currentRoute}>{i18nT("components.buttons.preview.tertiary")}</ButtonTertiary>
|
|
</div>
|
|
<div className="mx-auto flex max-w-3xl flex-col items-center justify-center space-y-4 sm:flex-row sm:items-end sm:justify-center sm:space-y-0 sm:space-x-4">
|
|
<ButtonPrimary disabled={true} to={currentRoute}>
|
|
{i18nT("components.buttons.preview.primary")}
|
|
</ButtonPrimary>
|
|
<ButtonSecondary disabled={true} to={currentRoute}>
|
|
{i18nT("components.buttons.preview.secondary")}
|
|
</ButtonSecondary>
|
|
<ButtonTertiary disabled={true} to={currentRoute}>
|
|
{i18nT("components.buttons.preview.tertiary")}
|
|
</ButtonTertiary>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|