Skip to content

Commit

Permalink
feat(PlaceholderContainer): add qa prop (#1925)
Browse files Browse the repository at this point in the history
Co-authored-by: Aleksandr Burobin <[email protected]>
  • Loading branch information
lxndr and Aleksandr Burobin authored Oct 29, 2024
1 parent cdce171 commit 77ad28d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/PlaceholderContainer/PlaceholderContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const PlaceholderContainer = ({
image,
content,
actions,
qa,
}: PlaceholderContainerProps) => {
const renderTitle = () => {
if (!title) {
Expand Down Expand Up @@ -97,7 +98,7 @@ export const PlaceholderContainer = ({
};

return (
<div className={b({direction, align, size}, className || '')}>
<div className={b({direction, align, size}, className || '')} data-qa={qa}>
<div className={b('body')}>
<div className={b('image', {size})}>{renderImage()}</div>
{renderContent()}
Expand Down
3 changes: 2 additions & 1 deletion src/components/PlaceholderContainer/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type React from 'react';

import type {ButtonProps} from '../Button';
import type {QAProps} from '../types';

type Size = 's' | 'm' | 'l' | 'promo';

Expand All @@ -18,7 +19,7 @@ export type PlaceholderContainerActionProps = Pick<
text: string;
};

export interface PlaceholderContainerProps {
export interface PlaceholderContainerProps extends QAProps {
size?: Size;
direction?: 'row' | 'column';
align?: 'left' | 'center';
Expand Down

0 comments on commit 77ad28d

Please sign in to comment.