From 35c148d9f9a8aea2dc3b590ef3daa7ae72593f39 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Fri, 10 Mar 2023 23:26:13 +0000 Subject: [PATCH] feat: head follow button style --- public/locales/zh/site.json | 3 ++- src/components/common/FollowingButton.tsx | 4 ++-- src/components/site/SiteHeader.tsx | 16 ++++++++++++++-- src/components/ui/Button.tsx | 3 +++ src/css/tailwind.css | 5 +++++ 5 files changed, 26 insertions(+), 5 deletions(-) diff --git a/public/locales/zh/site.json b/public/locales/zh/site.json index b9145fa0..8760e4f5 100644 --- a/public/locales/zh/site.json +++ b/public/locales/zh/site.json @@ -8,5 +8,6 @@ "Write a comment on the blockchain": "在区块链上写下你的评论", "powered by": "由 提供支持", "This address is in local editing preview mode and cannot be viewed by the public. The expected online address is:": - "此地址处于本地编辑预览模式,无法被公众查看。预期的在线地址是:" + "此地址处于本地编辑预览模式,无法被公众查看。预期的在线地址是:", + "Support": "支持" } \ No newline at end of file diff --git a/src/components/common/FollowingButton.tsx b/src/components/common/FollowingButton.tsx index df21d909..71dc3731 100644 --- a/src/components/common/FollowingButton.tsx +++ b/src/components/common/FollowingButton.tsx @@ -63,7 +63,7 @@ export const FollowingButton: React.FC<{ return ( */} @@ -278,7 +290,7 @@ export const SiteHeader: React.FC<{
-
+
{leftLinks.map((link, i) => { return })} diff --git a/src/components/ui/Button.tsx b/src/components/ui/Button.tsx index 27edcb84..b0606b1b 100644 --- a/src/components/ui/Button.tsx +++ b/src/components/ui/Button.tsx @@ -25,6 +25,7 @@ type ButtonProps = { isAutoWidth?: boolean variant?: Variant variantColor?: VariantColor + outlineColor?: VariantColor size?: "sm" | "xl" | "2xl" rounded?: "full" | "lg" } @@ -42,6 +43,7 @@ export const Button = React.forwardRef< isBlock, variant, variantColor, + outlineColor, size, rounded, isAutoWidth, @@ -61,6 +63,7 @@ export const Button = React.forwardRef< isLoading && "is-loading", isBlock && `is-block`, variantColor && `is-${variantColor}`, + variant === "outline" && outlineColor && `is-outline-${outlineColor}`, isDisabled && `is-disabled`, isAutoWidth && `is-auto-width`, size && `is-${size}`, diff --git a/src/css/tailwind.css b/src/css/tailwind.css index f19f3106..a81ec3b4 100644 --- a/src/css/tailwind.css +++ b/src/css/tailwind.css @@ -171,6 +171,11 @@ a { @apply bg-gray-400 hover:bg-gray-500 focus:bg-gray-500; } +.button.is-outline-gray { + @apply text-gray-500 hover:text-gray-600 focus:text-gray-600; + @apply border-gray-400 hover:border-gray-500 focus:border-gray-500; +} + .button.is-gradient { @apply hover:bg-gradient-to-br from-[#FF4D4D] to-[#F9CB28]; @apply hover:text-white;