File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed
frontends/web/src/components/forms Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,8 @@ type TProps = TButtonStyleProp & {
37
37
children : ReactNode ;
38
38
}
39
39
40
+ type TButtonLink = LinkProps & TProps ;
41
+
40
42
export const ButtonLink = ( {
41
43
primary,
42
44
secondary,
@@ -46,14 +48,14 @@ export const ButtonLink = ({
46
48
children,
47
49
disabled,
48
50
...props
49
- } : LinkProps & TProps ) => {
51
+ } : TButtonLink ) => {
50
52
const classNames = [
51
53
style [
52
54
( primary && 'primary' )
53
- || ( secondary && 'secondary' )
54
- || ( transparent && 'transparent' )
55
- || ( danger && 'danger' )
56
- || 'button'
55
+ || ( secondary && 'secondary' )
56
+ || ( transparent && 'transparent' )
57
+ || ( danger && 'danger' )
58
+ || 'button'
57
59
] , className
58
60
] . join ( ' ' ) ;
59
61
@@ -75,6 +77,8 @@ export const ButtonLink = ({
75
77
) ;
76
78
} ;
77
79
80
+ type TButton = TProps & ComponentPropsWithoutRef < 'button' > ;
81
+
78
82
export const Button = ( {
79
83
type = 'button' ,
80
84
primary,
@@ -84,13 +88,14 @@ export const Button = ({
84
88
className = '' ,
85
89
children,
86
90
...props
87
- } : TProps & ComponentPropsWithoutRef < 'button' > ) => {
91
+ } : TButton ) => {
88
92
const classNames = [
89
- style [ ( primary && 'primary' )
90
- || ( secondary && 'secondary' )
91
- || ( transparent && 'transparent' )
92
- || ( danger && 'danger' )
93
- || 'button'
93
+ style [
94
+ ( primary && 'primary' )
95
+ || ( secondary && 'secondary' )
96
+ || ( transparent && 'transparent' )
97
+ || ( danger && 'danger' )
98
+ || 'button'
94
99
] , className
95
100
] . join ( ' ' ) ;
96
101
You can’t perform that action at this time.
0 commit comments