Skip to content

Commit

Permalink
fix(Accordion): remove white background for Header and Footer
Browse files Browse the repository at this point in the history
Adjusted the bottom border radius on the Accordion's SectionFooter to
match the curve defined by the outer border-radius and border width.

Reported on Slack.
  • Loading branch information
RobinCsl committed Dec 9, 2024
1 parent f4fbfc1 commit 29957bc
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 5 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ interface Props extends Common.Globals {

const AccordionSectionFooter = ({ children, dataTest }: Props) => (
<div
className="p-600 bg-white-normal shadow-level2 sticky bottom-0 flex"
// the border-radius is calculated based on the border-radius and border-width of the AccordionSection component
// outer border-radius is 4px, border-width is 1px so inner border-radius is 4px - 1px = 3px
className="p-600 rounded-b-normal shadow-level2 sticky bottom-0 flex"
data-test={dataTest && `${dataTest}Footer`}
>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ const AccordionSectionHeader = ({
dataTest,
}: Props) => (
<div
className={cx(
"p-600 bg-white-normal flex items-center",
expanded ? "min-h-[19px]" : "min-h-form-box-normal",
)}
className={cx("p-600 flex items-center", expanded ? "min-h-[19px]" : "min-h-form-box-normal")}
data-test={dataTest && `${dataTest}Header`}
>
<div className="flex grow items-center">{children}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const AccordionSection = ({

return (
<div
// Note: update SectionFooter's border-radius in case border-width or border-radius of this component changes
className="border-elevation-flat-border-color rounded-100 my-200 bg-elevation-flat relative w-full border border-solid"
data-test={dataTest}
>
Expand Down

0 comments on commit 29957bc

Please sign in to comment.