@microbit/ui 0.1.0-alpha.7 → 0.1.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Collapse.tsx +13 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microbit/ui",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.8",
|
|
4
4
|
"description": "micro:bit design-system primitives: react-aria-components + Panda CSS with a design language ported from Chakra UI v2. Ships as source; see README for the consumption setup.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/src/Collapse.tsx
CHANGED
|
@@ -162,7 +162,19 @@ export const Collapse = ({
|
|
|
162
162
|
...style,
|
|
163
163
|
}}
|
|
164
164
|
>
|
|
165
|
-
<div
|
|
165
|
+
<div
|
|
166
|
+
ref={contentRef}
|
|
167
|
+
// flow-root: the measured element must be a block formatting
|
|
168
|
+
// context, or children's margins collapse through it and
|
|
169
|
+
// scrollHeight under-measures — the outer (overflow: hidden)
|
|
170
|
+
// wrapper IS a BFC and needs the full height, so the mismatch
|
|
171
|
+
// clips the last line of margined content (python-editor's API
|
|
172
|
+
// docs). Rendering is unchanged: the margins always displayed
|
|
173
|
+
// inside the outer BFC.
|
|
174
|
+
className={css({ display: "flow-root" })}
|
|
175
|
+
>
|
|
176
|
+
{children}
|
|
177
|
+
</div>
|
|
166
178
|
</div>
|
|
167
179
|
);
|
|
168
180
|
};
|