Skip to content

Commit 9e9159d

Browse files
authored
chore(web_common): tweak button styling (#5284)
1 parent b0c623e commit 9e9159d

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

web/common/src/components/Button/Button.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
--color-button-primary-hover: var(--color-action-hover);
55
--color-button-primary-active: var(--color-action-active);
66

7-
--color-button-secondary-background: var(--color-neutral-100);
7+
--color-button-secondary-background: var(--color-neutral-10);
88
--color-button-secondary-foreground: var(--color-prose);
99
--color-button-secondary-hover: var(--color-neutral-125);
1010
--color-button-secondary-active: var(--color-neutral-150);
@@ -14,7 +14,7 @@
1414
--color-button-alternative-hover: var(--color-neutral-125);
1515
--color-button-alternative-active: var(--color-neutral-150);
1616

17-
--color-button-destructive-background: var(--color-neutral-100);
17+
--color-button-destructive-background: var(--color-neutral-10);
1818
--color-button-destructive-foreground: var(--color-destructive-foreground);
1919
--color-button-destructive-hover: var(--color-neutral-125);
2020
--color-button-destructive-active: var(--color-neutral-150);
@@ -26,6 +26,6 @@
2626

2727
--color-button-transparent-background: transparent;
2828
--color-button-transparent-foreground: var(--color-prose);
29-
--color-button-secondary-hover: var(--color-neutral-125);
30-
--color-button-secondary-active: var(--color-neutral-150);
29+
--color-button-transparent-hover: var(--color-neutral-125);
30+
--color-button-transparent-active: var(--color-neutral-150);
3131
}

web/common/src/components/Button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
3030
<Comp
3131
className={cn(
3232
buttonVariants({ variant, size, className }),
33-
disabled && 'pointer-events-none bg-neutral-100 text-neutral-400',
33+
disabled && 'pointer-events-none bg-neutral-150 text-prose',
3434
)}
3535
disabled={disabled}
3636
ref={ref}

web/common/src/components/CopyButton/CopyButton.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, { useState } from 'react'
22

33
import { Button, type ButtonProps } from '@/components/Button/Button'
4-
import { cn } from '@/utils'
54

65
type TimerID = ReturnType<typeof setTimeout>
76

@@ -20,7 +19,6 @@ export const CopyButton = React.forwardRef<HTMLButtonElement, CopyButtonProps>(
2019
size = 'xs',
2120
delay = 2000,
2221
disabled = false,
23-
className,
2422
children,
2523
onClick,
2624
...props
@@ -53,7 +51,6 @@ export const CopyButton = React.forwardRef<HTMLButtonElement, CopyButtonProps>(
5351
onClick={copy}
5452
disabled={disabled || !!copied}
5553
{...props}
56-
className={cn(className, copied && 'pointer-events-none')}
5754
>
5855
{children(copied != null)}
5956
</Button>

web/common/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// Components
22
export { Badge, type BadgeProps } from '@/components/Badge/Badge'
3-
export { Button, type ButtonProps } from '@/components/Button/Button'
3+
export {
4+
Button,
5+
type ButtonProps,
6+
type ButtonVariant,
7+
} from '@/components/Button/Button'
48
export {
59
CopyButton,
610
type CopyButtonProps,

0 commit comments

Comments
 (0)