From df47158f296f58021d99a2563b3f8c90769cfe68 Mon Sep 17 00:00:00 2001 From: Valtteri Karesto Date: Mon, 13 Dec 2021 17:21:59 +0200 Subject: [PATCH] Some fixes to button --- components/Button.tsx | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/components/Button.tsx b/components/Button.tsx index 5497d95..f982942 100644 --- a/components/Button.tsx +++ b/components/Button.tsx @@ -6,6 +6,7 @@ import Spinner from "./Spinner"; export const StyledButton = styled("button", { // Reset all: "unset", + position: "relative", appereance: "none", fontFamily: "$body", alignItems: "center", @@ -112,7 +113,31 @@ export const StyledButton = styled("button", { boxShadow: "inset 0 0 0 1px $colors$pink8", }, }, + secondary: { + backgroundColor: `$purple9`, + boxShadow: "inset 0 0 0 1px $colors$purple9", + color: "$white", + "@hover": { + "&:hover": { + backgroundColor: "$purple10", + boxShadow: "inset 0 0 0 1px $colors$purple11", + }, + }, + "&:active": { + backgroundColor: "$purple8", + boxShadow: "inset 0 0 0 1px $colors$purple8", + }, + "&:focus": { + boxShadow: "inset 0 0 0 2px $colors$purple12", + }, + '&[data-radix-popover-trigger][data-state="open"], &[data-radix-dropdown-menu-trigger][data-state="open"]': + { + backgroundColor: "$mauve4", + boxShadow: "inset 0 0 0 1px $colors$purple8", + }, + }, }, + outline: { true: { backgroundColor: "transparent", @@ -183,6 +208,18 @@ export const StyledButton = styled("button", { }, }, }, + { + outline: true, + variant: "secondary", + css: { + background: "transparent", + color: "$mauve12", + "&:hover": { + color: "$mauve12", + background: "$mauve5", + }, + }, + }, ], defaultVariants: { size: "md",