@gryt/ui-native 0.10.0 → 0.11.0
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.
|
@@ -86,6 +86,22 @@ export interface SheetContentProps {
|
|
|
86
86
|
* `BottomSheetView`, which sizes itself to its children, so a scrollable inside
|
|
87
87
|
* it has no bounded height to scroll within and simply grows until the sheet
|
|
88
88
|
* clips it.
|
|
89
|
+
*
|
|
90
|
+
* ## Why it is `height: "100%"`
|
|
91
|
+
*
|
|
92
|
+
* `flex: 1` is not enough on its own: `BottomSheetView` measures its children,
|
|
93
|
+
* so there is no bounded height for a flex child to be all of. Anything inside
|
|
94
|
+
* that wants to be the whole sheet — a column with a row pinned to the bottom,
|
|
95
|
+
* a list — collapses to the height of its own content instead.
|
|
96
|
+
*
|
|
97
|
+
* Every caller in the mobile app passed `height: "100%"` to get around that,
|
|
98
|
+
* all three for the same reason, which is a default being wrong rather than
|
|
99
|
+
* three callers being unusual. It is in the style array before `style`, so a
|
|
100
|
+
* caller can still override it exactly as it can the padding. GRYT-516.
|
|
101
|
+
*
|
|
102
|
+
* A sheet whose content is genuinely shorter than the snap point is unchanged
|
|
103
|
+
* by this: the view has no background of its own, so a full-height one draws
|
|
104
|
+
* the same as a short one.
|
|
89
105
|
*/
|
|
90
106
|
declare function Content({ children, style }: SheetContentProps): import("react").JSX.Element;
|
|
91
107
|
export type SheetScrollViewProps = ComponentProps<typeof BottomSheetScrollView>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAyB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,EAIL,qBAAqB,EAKtB,MAAM,sBAAsB,CAAC;AAM9B,OAAO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B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,iBAAS,KAAK,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,eAAe,+BAOlD;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,iBAAS,KAAK,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,eAAe,+BAiBlD;AAED,eAAO,MAAM,KAAK;;;;;;CAMhB,CAAC"}
|
|
@@ -233,12 +233,29 @@ function useSheetModal() {
|
|
|
233
233
|
* `BottomSheetView`, which sizes itself to its children, so a scrollable inside
|
|
234
234
|
* it has no bounded height to scroll within and simply grows until the sheet
|
|
235
235
|
* clips it.
|
|
236
|
+
*
|
|
237
|
+
* ## Why it is `height: "100%"`
|
|
238
|
+
*
|
|
239
|
+
* `flex: 1` is not enough on its own: `BottomSheetView` measures its children,
|
|
240
|
+
* so there is no bounded height for a flex child to be all of. Anything inside
|
|
241
|
+
* that wants to be the whole sheet — a column with a row pinned to the bottom,
|
|
242
|
+
* a list — collapses to the height of its own content instead.
|
|
243
|
+
*
|
|
244
|
+
* Every caller in the mobile app passed `height: "100%"` to get around that,
|
|
245
|
+
* all three for the same reason, which is a default being wrong rather than
|
|
246
|
+
* three callers being unusual. It is in the style array before `style`, so a
|
|
247
|
+
* caller can still override it exactly as it can the padding. GRYT-516.
|
|
248
|
+
*
|
|
249
|
+
* A sheet whose content is genuinely shorter than the snap point is unchanged
|
|
250
|
+
* by this: the view has no background of its own, so a full-height one draws
|
|
251
|
+
* the same as a short one.
|
|
236
252
|
*/
|
|
237
253
|
function Content({ children, style }) {
|
|
238
254
|
const { theme, insets, sheet, modalProps } = useSheetModal();
|
|
239
255
|
return (_jsx(BottomSheetModal, { ...modalProps, children: _jsx(BottomSheetView, { style: [
|
|
240
256
|
{
|
|
241
257
|
flex: 1,
|
|
258
|
+
height: "100%",
|
|
242
259
|
padding: theme.space(4),
|
|
243
260
|
// The home indicator's strip, on top of whatever padding the caller
|
|
244
261
|
// asked for. Without it the last row of content is clipped by it —
|