Skip to content

Commit

Permalink
add data-testid to cards (#120)
Browse files Browse the repository at this point in the history
* add data-testid to cards
  • Loading branch information
djanicekpach authored Apr 11, 2024
1 parent 3ec41cc commit 16c0635
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/kit/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type CardProps = {
size?: CardSize;
onDropdown?: (key: string) => void;
onClick?: AnyMouseEventHandler;
testId?: string;
};

export type CardSize = 'small' | 'medium';
Expand All @@ -41,6 +42,7 @@ const Card: Card = ({
onClick,
onDropdown,
size = 'small',
testId,
}: CardProps) => {
const {
themeSettings: { className: themeClass },
Expand All @@ -62,6 +64,7 @@ const Card: Card = ({
return (
<div
className={classnames.join(' ')}
data-testid={testId}
style={sizeStyle}
tabIndex={onClick ? 0 : -1}
onClick={onClick}>
Expand Down

0 comments on commit 16c0635

Please sign in to comment.