Skip to content

Commit 4eb2b41

Browse files
refactor(tailwind/ButtonTwoLines): redeclare isSecondary prop
1 parent ec47b90 commit 4eb2b41

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

tailwind/ui/buttons/ButtonTwoLines.tsx

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,20 @@ const ButtonTwoLines = ({
6363
)
6464

6565
if (props.componentType === "link") {
66+
const { buttonProps, ...rest } = props
6667
return (
67-
<ButtonLink className={commonClassStyles} size={size} {...props}>
68-
<ChildContent {...props} size={size} isIconLeft={isIconLeft} />
68+
<ButtonLink
69+
className={commonClassStyles}
70+
size={size}
71+
buttonProps={buttonProps}
72+
{...rest}
73+
>
74+
<ChildContent
75+
{...rest}
76+
size={size}
77+
isSecondary={buttonProps?.isSecondary}
78+
isIconLeft={isIconLeft}
79+
/>
6980
</ButtonLink>
7081
)
7182
}
@@ -79,7 +90,10 @@ const ButtonTwoLines = ({
7990
export default ButtonTwoLines
8091

8192
const ChildContent = (
82-
props: Omit<ButtonTwoLinesProps, "iconAlignment"> & { isIconLeft: boolean }
93+
props: Omit<ButtonTwoLinesProps, "iconAlignment" | "buttonProps"> & {
94+
isIconLeft: boolean
95+
isSecondary?: boolean
96+
}
8397
) => {
8498
const {
8599
reverseTextOrder = false,

0 commit comments

Comments
 (0)