Skip to content

Commit

Permalink
feat: refactor and prettier run
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschi committed Jul 23, 2024
1 parent d49230c commit 1f44241
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { SendIcon } from "./components/buttons/icons/send-icon";
import { SendIcon } from "./components/icons/send-icon";
import { PrimaryButton } from "./components/buttons/primary";
import { SecondaryButton } from "./components/buttons/secondary";

export function App() {
return (
<div className="font-arial p-4">
<div className="p-4 font-arial">
<h1 aria-label="button">BärGPT - KI Testumgebung</h1>
<PrimaryButton
label={
Expand Down
6 changes: 4 additions & 2 deletions src/components/buttons/primary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface PrimaryButtonProps {
disabled?: boolean;
type?: "button" | "submit";
ariaLabel?: string;
title?: string;
isLoading?: boolean;
}

Expand All @@ -15,15 +16,16 @@ export const PrimaryButton: React.FC<PrimaryButtonProps> = ({
disabled,
type = "button",
ariaLabel,
title,
}) => {
return (
<button
className={`bg-dark-blue hover:bg-light-blue disabled:bg-light-grey hover:text-dark-blue disabled:text-dark-blue active:text-dark-blue outline-mid-grey my-2 flex h-[35px] w-fit items-center justify-center rounded px-3 text-sm font-semibold text-white active:bg-white active:font-normal active:outline active:outline-1 disabled:font-normal disabled:active:outline-none`}
className={`my-2 flex h-[35px] w-fit items-center justify-center rounded bg-dark-blue px-3 text-sm font-semibold text-white outline-mid-grey hover:bg-light-blue hover:text-dark-blue active:bg-white active:font-normal active:text-dark-blue active:outline active:outline-1 disabled:bg-light-grey disabled:font-normal disabled:text-dark-blue disabled:active:outline-none`}
disabled={disabled}
onClick={onClick}
type={type}
aria-label={ariaLabel}
title={ariaLabel}
title={title}
>
<span>{label}</span>
</button>
Expand Down
6 changes: 4 additions & 2 deletions src/components/buttons/secondary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface PrimaryButtonProps {
disabled?: boolean;
type?: "button" | "submit";
ariaLabel?: string;
title?: string;
isLoading?: boolean;
}

Expand All @@ -15,15 +16,16 @@ export const SecondaryButton: React.FC<PrimaryButtonProps> = ({
disabled,
type = "button",
ariaLabel,
title,
}) => {
return (
<button
className={`hover:bg-light-grey text-dark-blue outline-mid-grey my-2 flex h-[35px] w-fit items-center justify-center rounded bg-white px-3 text-sm font-normal outline outline-1 active:bg-white active:font-semibold`}
className={`my-2 flex h-[35px] w-fit items-center justify-center rounded bg-white px-3 text-sm font-normal text-dark-blue outline outline-1 outline-mid-grey hover:bg-light-grey active:bg-white active:font-semibold`}
disabled={disabled}
onClick={onClick}
type={type}
aria-label={ariaLabel}
title={ariaLabel}
title={title}
>
<span>{label}</span>
</button>
Expand Down
File renamed without changes.

0 comments on commit 1f44241

Please sign in to comment.