Skip to content

Commit d40451a

Browse files
committed
client(Button.tsx): success disabled state
1 parent 1af8f81 commit d40451a

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

client/src/components/ui/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const buttonVariants = cva(
88
variants: {
99
variant: {
1010
success:
11-
"bg-gh-green border-gh-green-active hover:bg-gh-green-active disabled:bg-gh-green-disabled",
11+
"bg-gh-green border-gh-green-active hover:bg-gh-green-active disabled:bg-gh-green-disabled disabled:border-gh-green-disabled-border disabled:text-gh-text-secondary",
1212
secondary:
1313
"bg-gh-gray border-gh-border hover:bg-gh-gray-active hover:border-gh-border-active disabled:border-gh-border disabled:text-gh-text-secondary disabled:bg-gh-gray",
1414
danger:

client/src/components/ui/FormWrapper.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { FormHTMLAttributes, ReactNode } from "react";
22
import { AiOutlineSetting } from "react-icons/ai";
3-
import { BsSendCheck } from "react-icons/bs";
43
import { CgErase, CgEnter } from "react-icons/cg";
54
import Button from "./Button";
65
import { cn } from "./utils";
@@ -68,10 +67,11 @@ const FormWrapper = ({ title, children, className, ...props }: Props) => {
6867

6968
<Button
7069
type="submit"
71-
label={isLastPage ? "Generate" : "Next"}
70+
disabled={isLastPage}
71+
label="Next"
7272
variant="success"
7373
size="small"
74-
icon={isLastPage ? <BsSendCheck /> : <CgEnter />}
74+
icon={<CgEnter />}
7575
/>
7676
</div>
7777
</form>

client/tailwind.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export default {
1919
"gh-blue-active": "#58a6ff",
2020
"gh-green": "#238636",
2121
"gh-green-active": "#2EA043",
22-
"gh-green-disabled": "#20702F",
22+
"gh-green-disabled-border": "#20702F",
23+
"gh-green-disabled": "#1A5C27",
2324
"gh-red": "#DA3633",
2425
"gh-red-active": "#F85149",
2526
"gh-gray": "#21262D",

0 commit comments

Comments
 (0)