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 17, 2024
1 parent dfdd7bb commit 81dfc00
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions packages/components/card/src/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const Card = (props: TCardProps) => {
onClick: isClickable ? props.onClick : undefined,
'aria-disabled': props.isDisabled ? true : undefined,
css: css`
background-color: lightBlue !important;
box-sizing: border-box;
width: 100%;
font-size: 1rem;
Expand Down Expand Up @@ -130,22 +131,19 @@ const Card = (props: TCardProps) => {
}

return (
<>
<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>
</>
<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 81dfc00

Please sign in to comment.