Skip to content

Commit

Permalink
fix: button improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinperaza committed Dec 13, 2022
1 parent 6e0b450 commit 920a0a2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/components/navbar/SignInButton.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.button {
padding: 2px 12px 2px 12px !important;
}
3 changes: 3 additions & 0 deletions src/components/navbar/SignInButton.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import React from "react";
import { Button } from "../shared/Button";

import styles from "./SignInButton.module.css";

export const SignInButton = () => (
<Button
href="https://portal.basistheory.com/"
target="_blank"
variant="secondary"
className={styles.button}
>
Sign In
</Button>
Expand Down
11 changes: 9 additions & 2 deletions src/components/shared/Button.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,29 @@
display: flex;
align-items: center;
border: none;
padding: 8px 12px 8px 12px !important;
padding: 8px 18px 8px 18px !important;
box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.05), 0px 1px 2px rgba(0, 0, 0, 0.04);
border-radius: 4px;
font-weight: 600;
font-size: 13px;
font-size: 14px;
line-height: 24px;
}

.primary {
background: var(--ifm-color-primary);
border: 1px solid var(--ifm-color-primary);
color: var(--bt-primary-button-color);
}

.primary svg path {
fill: var(--bt-primary-button-color);
}

.primary.button:hover {
background: var(--ifm-color-primary-darker);
border: 1px solid var(--ifm-color-primary-darker);
}

.secondary {
background: transparent;
color: var(--ifm-color-primary);
Expand All @@ -28,6 +34,7 @@

.secondary.button:hover {
color: var(--ifm-color-primary);
background: #00b68a0a;
}

.secondary svg path {
Expand Down
4 changes: 3 additions & 1 deletion src/components/shared/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import clsx from "clsx";
import React, { PropsWithChildren } from "react";

import Link from "@docusaurus/Link";

import styles from "./Button.module.css";

export const Button = ({
Expand All @@ -20,7 +22,7 @@ export const Button = ({
[styles.secondary]: variant == "secondary",
});

const defaultElement = other.href ? "a" : "button";
const defaultElement = other.href ? Link : "button";
const Root: React.ElementType = defaultElement;

return (
Expand Down

0 comments on commit 920a0a2

Please sign in to comment.