Skip to content

Commit

Permalink
feat(ui): Fix OutOfStock nested components (#1341)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurTriis1 authored Jun 3, 2022
1 parent be1a2b1 commit 0bd85a6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/ui/src/organisms/OutOfStock/OutOfStockMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ export const OutOfStockMessage = ({
as: MessageComponent = 'p',
testId = 'store-out-of-stock-message',
children,
...otherProps
}: OutOfStockMessageProps) => {
return (
<MessageComponent data-out-of-stock-message data-testid={testId}>
<MessageComponent
data-out-of-stock-message
data-testid={testId}
{...otherProps}
>
{children}
</MessageComponent>
)
Expand Down
7 changes: 6 additions & 1 deletion packages/ui/src/organisms/OutOfStock/OutOfStockTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ export const OutOfStockTitle = ({
as: TitleComponent = 'h2',
testId = 'store-out-of-stock-title',
children,
...otherProps
}: OutOfStockTitleProps) => {
return (
<TitleComponent data-out-of-stock-title data-testid={testId}>
<TitleComponent
data-out-of-stock-title
data-testid={testId}
{...otherProps}
>
{children}
</TitleComponent>
)
Expand Down

1 comment on commit 0bd85a6

@vercel
Copy link

@vercel vercel bot commented on 0bd85a6 Jun 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.