Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: disabled state for buttons #724

Merged
merged 1 commit into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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