Skip to content

Commit

Permalink
[@mantine/core] Spoiler: Fix unexpected empty space when hide label i…
Browse files Browse the repository at this point in the history
…s `null` (#5126)
  • Loading branch information
sartak committed Oct 26, 2023
1 parent e006b48 commit 72c0fcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mantine-core/src/components/Spoiler/Spoiler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ export const Spoiler = factory<SpoilerFactory>((_props, ref) => {
const regionId = `${_id}-region`;
const [show, setShowState] = useState(initialState);
const { ref: contentRef, height } = useElementSize();
const spoiler = maxHeight! < height;
const spoilerMoreContent = show ? hideLabel : showLabel;
const spoiler = spoilerMoreContent !== null && maxHeight! < height;

return (
<Box
Expand Down

0 comments on commit 72c0fcc

Please sign in to comment.