From cb2d47a309a4a733f2a6705950359d035a2d1a80 Mon Sep 17 00:00:00 2001 From: Daniel Darritchon Date: Thu, 30 Oct 2025 13:39:36 -0300 Subject: [PATCH] remove maxHeight from expandable secfion --- CHANGELOG.md | 6 ++---- src/components/expandableSection/expandableSection.tsx | 9 +++------ 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c30e3fd6..9882a214 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,17 +2,15 @@ ## [0.20.0](https://github.com/frontapp/front-ui-kit/compare/v0.19.0...v0.20.0) (2025-10-29) - ### Features -* navigation dropdown ([#273](https://github.com/frontapp/front-ui-kit/issues/273)) ([3774b61](https://github.com/frontapp/front-ui-kit/commit/3774b6134c1797106b68b74d97f9aeb0be827a0f)) +- navigation dropdown ([#273](https://github.com/frontapp/front-ui-kit/issues/273)) ([3774b61](https://github.com/frontapp/front-ui-kit/commit/3774b6134c1797106b68b74d97f9aeb0be827a0f)) ## [0.19.0](https://github.com/frontapp/front-ui-kit/compare/v0.18.1...v0.19.0) (2025-10-24) - ### Features -* empty state subtitle ([#298](https://github.com/frontapp/front-ui-kit/issues/298)) ([7c11bf4](https://github.com/frontapp/front-ui-kit/commit/7c11bf4510838df83d7367321fc3b2ed301fa382)) +- empty state subtitle ([#298](https://github.com/frontapp/front-ui-kit/issues/298)) ([7c11bf4](https://github.com/frontapp/front-ui-kit/commit/7c11bf4510838df83d7367321fc3b2ed301fa382)) ## [0.18.1](https://github.com/frontapp/front-ui-kit/compare/v0.18.0...v0.18.1) (2025-10-24) diff --git a/src/components/expandableSection/expandableSection.tsx b/src/components/expandableSection/expandableSection.tsx index de14c8df..b6b1a3e3 100644 --- a/src/components/expandableSection/expandableSection.tsx +++ b/src/components/expandableSection/expandableSection.tsx @@ -48,8 +48,6 @@ interface ExpandableSectionProps { showBorder?: boolean; /** Whether to show the border between header and content when expanded (default: true) */ showContentBorder?: boolean; - /** Maximum height when expanded (default: 1000px) */ - maxHeight?: string; /** Background color for the expandable section (default: greys.white) */ backgroundColor?: string; /** Whether actions should only be visible on hover (default: false - actions always visible). */ @@ -125,10 +123,10 @@ const StyledActionsDiv = styled.div<{$showOnHover?: boolean}>` }`} `; -const StyledContentDiv = styled.div<{isOpen: boolean; showContentBorder?: boolean; maxHeight?: string}>` +const StyledContentDiv = styled.div<{isOpen: boolean; showContentBorder?: boolean}>` border-top: ${({showContentBorder = true}) => (showContentBorder ? `1px solid ${greys.shade20}` : 'none')}; overflow: hidden; - max-height: ${({isOpen, maxHeight = '1000px'}) => (isOpen ? maxHeight : '0')}; + max-height: ${({isOpen}) => (isOpen ? 'unset' : '0')}; opacity: ${({isOpen}) => (isOpen ? '1' : '0')}; `; @@ -149,7 +147,6 @@ export const ExpandableSection: FC = (props) => { hoverBackgroundColor, showBorder = true, showContentBorder = true, - maxHeight = '1000px', backgroundColor, showActionsOnHover = false, groupActions = false @@ -239,7 +236,7 @@ export const ExpandableSection: FC = (props) => { {renderActions()} - + {children}