Skip to content

Commit

Permalink
style: disabled state for buttons (#724)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryan610 authored Apr 5, 2023
1 parent c9d8a8d commit 65037b5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions apps/app/components/ui/buttons/danger-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ export const DangerButton: React.FC<ButtonProps> = ({
}) => (
<button
type={type}
className={`${className} border font-medium duration-300 ${
className={`${className} border border-red-500 font-medium duration-300 ${
size === "sm"
? "rounded px-3 py-2 text-xs"
: size === "md"
? "rounded-md px-3.5 py-2 text-sm"
: "rounded-lg px-4 py-2 text-base"
} ${
disabled
? "cursor-not-allowed border-gray-300 bg-gray-300 text-black hover:border-gray-300 hover:border-opacity-100 hover:bg-gray-300 hover:bg-opacity-100 hover:text-black"
: "border-red-500"
? "cursor-not-allowed bg-opacity-70 border-opacity-70 hover:bg-opacity-70 hover:border-opacity-70"
: ""
} ${
outline
? "bg-transparent hover:bg-red-500 hover:text-white"
: "bg-red-500 hover:border-opacity-90 hover:bg-opacity-90"
} ${!disabled && !outline ? "text-white" : ""} ${loading ? "cursor-wait" : ""}`}
? "bg-transparent text-red-500 hover:bg-red-500 hover:text-white"
: "text-white bg-red-500 hover:border-opacity-90 hover:bg-opacity-90"
} ${loading ? "cursor-wait" : ""}`}
onClick={onClick}
disabled={disabled || loading}
>
Expand Down
12 changes: 6 additions & 6 deletions apps/app/components/ui/buttons/primary-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ export const PrimaryButton: React.FC<ButtonProps> = ({
}) => (
<button
type={type}
className={`${className} border font-medium duration-300 ${
className={`${className} border border-theme font-medium duration-300 ${
size === "sm"
? "rounded px-3 py-2 text-xs"
: size === "md"
? "rounded-md px-3.5 py-2 text-sm"
: "rounded-lg px-4 py-2 text-base"
} ${
disabled
? "cursor-not-allowed border-gray-300 bg-gray-300 text-black hover:border-gray-300 hover:border-opacity-100 hover:bg-gray-300 hover:bg-opacity-100 hover:text-black"
: "border-theme"
? "cursor-not-allowed bg-opacity-70 border-opacity-70 hover:bg-opacity-70 hover:border-opacity-70"
: ""
} ${
outline
? "bg-transparent hover:bg-theme hover:text-white"
: "bg-theme hover:border-opacity-90 hover:bg-opacity-90"
} ${!disabled && !outline ? "text-white" : ""} ${loading ? "cursor-wait" : ""}`}
? "bg-transparent text-theme hover:bg-theme hover:text-white"
: "text-white bg-theme hover:border-opacity-90 hover:bg-opacity-90"
} ${loading ? "cursor-wait" : ""}`}
onClick={onClick}
disabled={disabled || loading}
>
Expand Down

1 comment on commit 65037b5

@vercel
Copy link

@vercel vercel bot commented on 65037b5 Apr 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

plane-dev – ./apps/app

plane-dev.vercel.app
plane-dev-git-develop-caravel.vercel.app
plane-dev-caravel.vercel.app

Please sign in to comment.