From a99c2fca3cd3e37413f0eb52dae37472c603c1ad Mon Sep 17 00:00:00 2001 From: Aaron Pettengill Date: Tue, 30 Apr 2024 15:48:38 -0400 Subject: [PATCH] Merge pull request #367 from airjp73/announcement feat: add v6 announcement to docs --- apps/docs/app/components/Alert.tsx | 2 +- apps/docs/app/components/Button.tsx | 40 +++++++++++++++++++++++++++-- apps/docs/app/components/Layout.tsx | 23 ++++++++++++++++- apps/docs/styles/index.css | 2 +- package.json | 1 + 5 files changed, 63 insertions(+), 5 deletions(-) diff --git a/apps/docs/app/components/Alert.tsx b/apps/docs/app/components/Alert.tsx index 7343d6f1..9282f156 100644 --- a/apps/docs/app/components/Alert.tsx +++ b/apps/docs/app/components/Alert.tsx @@ -50,7 +50,7 @@ export const Alert: FC = ({ className )} > -
+
) ); + +export type ButtonLinkProps = BaseButtonProps & + JSX.IntrinsicElements["a"]; + +export const ButtonLink = forwardRef< + HTMLAnchorElement, + ButtonLinkProps +>( + ( + { + className, + variant = "primary", + label, + icon, + rightIcon, + ...rest + }, + ref + ) => ( + + {icon && + cloneElement(icon, { className: "h-4 w-4 mr-2" })} + {label} + {rightIcon && + cloneElement(rightIcon, { + className: "h-4 w-4 ml-2", + })} + + ) +); diff --git a/apps/docs/app/components/Layout.tsx b/apps/docs/app/components/Layout.tsx index 3aba6133..bf7a9552 100644 --- a/apps/docs/app/components/Layout.tsx +++ b/apps/docs/app/components/Layout.tsx @@ -1,5 +1,9 @@ import { MenuAlt2Icon } from "@heroicons/react/outline"; -import { useLocation, useMatches } from "@remix-run/react"; +import { + Link, + useLocation, + useMatches, +} from "@remix-run/react"; import React, { Fragment, PropsWithChildren, @@ -9,6 +13,8 @@ import React, { import { Sidebar } from "../components/Sidebar"; import { Footer } from "./Footer"; import { GithubIcon } from "./GithubIcon"; +import { Alert } from "./Alert"; +import { Button, ButtonLink } from "./Button"; type Section = { header: string; @@ -225,6 +231,21 @@ export const Layout = ({ children }: LayoutProps) => {
+ + } + /> +
{children}
diff --git a/apps/docs/styles/index.css b/apps/docs/styles/index.css index e451d31a..1bdcaa16 100644 --- a/apps/docs/styles/index.css +++ b/apps/docs/styles/index.css @@ -25,7 +25,7 @@ .overrides { code.hljs { margin: -11px -15px; - border-radius: .375rem; + border-radius: 0.375rem; } } } diff --git a/package.json b/package.json index a0d12700..0562dd2b 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "vitest:run": "vitest run", "lint": "eslint --cache .", "prettier": "prettier --cache --check .", + "format": "prettier --write .", "build": "turbo run build", "prepare": "husky install" },