Skip to content

Commit

Permalink
chore(uikit canary version): test preview
Browse files Browse the repository at this point in the history
  • Loading branch information
Ddouglasz committed Sep 16, 2024
1 parent bff8bfc commit dfdd7bb
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions packages/components/card/src/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,22 +128,24 @@ const Card = (props: TCardProps) => {
}
}
}
console.log('Test preview');

return (
<div
{...commonProps}
// Support accessibility as a button when the `onClick` prop is provided
role={isClickable ? 'button' : undefined}
tabIndex={isClickable ? 0 : undefined}
onKeyDown={(event: KeyboardEvent<HTMLDivElement>) => {
if (isClickable && props.onClick && event.key === 'Enter') {
props.onClick();
}
}}
>
{content}
</div>
<>
<div>Test Preview</div>
<div
{...commonProps}
// Support accessibility as a button when the `onClick` prop is provided
role={isClickable ? 'button' : undefined}
tabIndex={isClickable ? 0 : undefined}
onKeyDown={(event: KeyboardEvent<HTMLDivElement>) => {
if (isClickable && props.onClick && event.key === 'Enter') {
props.onClick();
}
}}
>
{content}
</div>
</>
);
};

Expand Down

0 comments on commit dfdd7bb

Please sign in to comment.