Skip to content

Commit

Permalink
fix(tailwind/ButtonTwoLines): declare isSecondary prop
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerAPfledderer committed Aug 3, 2024
1 parent 828ee64 commit 7953917
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions tailwind/ui/buttons/ButtonTwoLines.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,20 @@ const ButtonTwoLines = ({
)

if (props.componentType === "link") {
const { buttonProps, ...rest } = props
return (
<ButtonLink className={commonClassStyles} size={size} {...props}>
<ChildContent {...props} size={size} isIconLeft={isIconLeft} />
<ButtonLink
className={commonClassStyles}
size={size}
buttonProps={buttonProps}
{...rest}
>
<ChildContent
{...rest}
size={size}
isSecondary={buttonProps?.isSecondary}
isIconLeft={isIconLeft}
/>
</ButtonLink>
)
}
Expand All @@ -79,7 +90,10 @@ const ButtonTwoLines = ({
export default ButtonTwoLines

const ChildContent = (
props: Omit<ButtonTwoLinesProps, "iconAlignment"> & { isIconLeft: boolean }
props: Omit<ButtonTwoLinesProps, "iconAlignment" | "buttonProps"> & {
isIconLeft: boolean
isSecondary?: boolean
}
) => {
const {
reverseTextOrder = false,
Expand Down

0 comments on commit 7953917

Please sign in to comment.