Skip to content

Commit ccc7f6c

Browse files
authored
Update README.md
Removed legacy BottomSheetView in documentation.
1 parent e805790 commit ccc7f6c

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,29 @@ Currently BottomSheet is only available through the [Swift Package Manager](http
4848
)
4949
```
5050

51-
5. Optionally receive the current panel position with a callback, set a custom background or change the animation curves;
52-
51+
5. Optionally receive the current panel position with a callback, change the background color, show a drag indicator or limit the background interaction based on the height;
5352
```
54-
BottomSheetView(
55-
position: $position,
56-
animationCurve: SheetAnimation(
57-
mass: 1,
58-
stiffness: 250,
59-
damping: 25
60-
),
53+
.sheetPlus(
54+
isPresented: $isPresented,
6155
background: (
6256
Color(UIColor.secondarySystemBackground)
57+
.cornerRadius(12, corners: [.topLeft, .topRight])
6358
),
59+
onDrag: { translation in
60+
settings.translation = translation
61+
}
6462
header: { },
65-
content: {
63+
main: {
6664
EmptyView()
67-
.onSheetDrag(translation: $settings.translation)
65+
.presentationDetentsPlus(
66+
[.height(244), .fraction(0.4), .medium, .large],
67+
selection: $selectedDetent
68+
)
69+
.presentationDragIndicatorPlus(.visible)
70+
.presentationBackgroundInteractionPlus(.enabled(upThrough: .height(380)))
71+
6872
}
69-
}
73+
)
7074
```
7175

7276
## Interface

0 commit comments

Comments
 (0)