Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: kiwicom/orbit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1afd5001bb63490807ddac2183600b56b3254c00
Choose a base ref
..
head repository: kiwicom/orbit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c0a5a49a4023f5b27e5bc4ce4719ff40ff3567af
Choose a head ref
Showing with 1 addition and 7 deletions.
  1. +1 −6 packages/orbit-components/src/Card/CardSection/index.tsx
  2. +0 −1 packages/orbit-components/src/Card/CardSection/types.d.ts
7 changes: 1 addition & 6 deletions packages/orbit-components/src/Card/CardSection/index.tsx
Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@ const InteractiveWrapper = ({
onClick,
className,
children,
...props
}: Pick<Props, "onClick"> & { children?: React.ReactNode; className?: string }) => (
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
<div
@@ -29,7 +28,6 @@ const InteractiveWrapper = ({
onClick && "before:rounded-100 before:absolute before:inset-0",
className,
)}
{...props}
>
{children}
</div>
@@ -49,7 +47,6 @@ export default function CardSection({
onExpand,
dataTest,
actions,
ariaLabel,
}: Props) {
const [opened, setOpened] = React.useState(initialExpanded);

@@ -125,7 +122,7 @@ export default function CardSection({

{(title != null || header != null) && !expandable && (
<div className="p-400 lm:p-600 ">
<InteractiveWrapper aria-label={onClick ? ariaLabel : undefined} onClick={onClick}>
<InteractiveWrapper onClick={onClick}>
<Header
title={title}
titleAs={titleAs}
@@ -145,7 +142,6 @@ export default function CardSection({
<div className="font-base text-normal text-primary-foreground px-400 lm:px-600 w-full leading-normal">
<InteractiveWrapper
onClick={opened ? onClick : undefined}
aria-label={onClick ? ariaLabel : undefined}
className={cx("py-400 lm:py-600 border-elevation-flat-border-color border-t")}
>
{children}
@@ -161,7 +157,6 @@ export default function CardSection({
title == null && header == null && "pt-400 lm:pt-600",
)}
onClick={onClick}
aria-label={onClick ? ariaLabel : undefined}
>
{children}
</InteractiveWrapper>
1 change: 0 additions & 1 deletion packages/orbit-components/src/Card/CardSection/types.d.ts
Original file line number Diff line number Diff line change
@@ -29,7 +29,6 @@ interface CardProps extends Common.Globals {
readonly onExpand?: Common.Callback;
readonly onClick?: Common.Callback;
readonly header?: React.ReactNode;
readonly ariaLabel?: string;
}

export type Props = CardProps & ExpandableConditionalProps;