Skip to content

Commit

Permalink
💫 Update: Ex - Minor Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Apr 29, 2023
1 parent 7942f50 commit cdad76f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions example/src/examples/Test01.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ export function Test01(props: ExampleProps) {
ref={modalRef}
containerStyle={styles.modalContainer}
modalPresentationStyle={currentPresentationStyle}
modalContentPreferredContentSize={{
mode: 'percent',
percentWidth: 0.8,
percentHeight: 0.8,
}}
>
<React.Fragment>
<CardBody style={styles.modalCard}>
Expand Down
10 changes: 10 additions & 0 deletions example/src/examples/Test09.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ export function Test09(props: ExampleProps) {
containerStyle={styles.modalContainer}
modalSheetDetents={CUSTOM_DETENTS}
sheetSelectedDetentIdentifier={currentDetent.key}
sheetPrefersEdgeAttachedInCompactHeight={true}
sheetWidthFollowsPreferredContentSizeWhenEdgeAttached={true}
// Needed for `sheetWidthFollowsPreferredContentSizeWhenEdgeAttached`
// to take work on iphone's w/o notches
modalPresentationStyle={'formSheet'}
modalContentPreferredContentSize={{
mode: 'percent',
percentWidth: 1,
percentHeight: 1,
}}
onModalDidChangeSelectedDetentIdentifier={({ nativeEvent }) => {
setEventData((prev) => ({
...prev,
Expand Down

0 comments on commit cdad76f

Please sign in to comment.