From 005c4c46c37ba739944c88d659883b3c4f6df840 Mon Sep 17 00:00:00 2001 From: Gary Tokman Date: Sat, 8 May 2021 18:44:07 -0400 Subject: [PATCH] chore: update docs --- .../Reference/ExtensionKit/README.md | 3 +- .../Reference/ExtensionKit/enums/Height.md | 42 +++++++++++++++++++ .../Reference/ExtensionKit/extensions/View.md | 31 +++++++++++++- .../ExtensionKit/structs/KeyboardInfo.md | 2 +- 4 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 Documentation/Reference/ExtensionKit/enums/Height.md diff --git a/Documentation/Reference/ExtensionKit/README.md b/Documentation/Reference/ExtensionKit/README.md index be4efb3..e6a4a45 100644 --- a/Documentation/Reference/ExtensionKit/README.md +++ b/Documentation/Reference/ExtensionKit/README.md @@ -10,6 +10,7 @@ ## Enums - [CLLocation.GeocodeError](enums/CLLocation.GeocodeError.md) +- [Height](enums/Height.md) - [PrintEvent](enums/PrintEvent.md) - [UIImage.ArrowDirection](enums/UIImage.ArrowDirection.md) - [UIView.GradientLayerChangingDirection](enums/UIView.GradientLayerChangingDirection.md) @@ -62,4 +63,4 @@ - [dprint(____)](methods/dprint(____).md) - [sleep(duration_)](methods/sleep(duration_).md) -This file was generated by [SourceDocs](https://github.com/eneko/SourceDocs) on 2021-05-08 16:02:47 +0000 \ No newline at end of file +This file was generated by [SourceDocs](https://github.com/eneko/SourceDocs) on 2021-05-08 22:44:07 +0000 \ No newline at end of file diff --git a/Documentation/Reference/ExtensionKit/enums/Height.md b/Documentation/Reference/ExtensionKit/enums/Height.md new file mode 100644 index 0000000..4418dee --- /dev/null +++ b/Documentation/Reference/ExtensionKit/enums/Height.md @@ -0,0 +1,42 @@ +**ENUM** + +# `Height` + +```swift +public enum Height: Equatable +``` + +Bottom sheet modal height + +## Cases +### `low` + +```swift +case low +``` + +Third of Screen size + +### `mid` + +```swift +case mid +``` + +Half of Screen size + +### `full` + +```swift +case full +``` + +Full Screen size + +### `custom(_:)` + +```swift +case custom(CGFloat) +``` + +Custom screen size diff --git a/Documentation/Reference/ExtensionKit/extensions/View.md b/Documentation/Reference/ExtensionKit/extensions/View.md index 667208f..e88c2f2 100644 --- a/Documentation/Reference/ExtensionKit/extensions/View.md +++ b/Documentation/Reference/ExtensionKit/extensions/View.md @@ -679,4 +679,33 @@ Subscribe to the given notification | ---- | ----------- | | name | Notification name | | object | Object posting the notification | -| action | Action to run when received | \ No newline at end of file +| action | Action to run when received | + +### `bottomSheet(isPresented:height:animation:thumbHidden:content:)` + +```swift +func bottomSheet( + isPresented: Binding, + height: Height = .mid, + animation: Animation = .easeInOut(duration: 0.3), + thumbHidden: Bool = false, + @ViewBuilder content: @escaping () -> Content +) -> some View +``` + +Adds a bottom sheet to View +- Parameters: + - isPresented: Binding for presenting the View + - height: Height, default .mid + - animation: Animation + - content: modal content +- Returns: View + +#### Parameters + +| Name | Description | +| ---- | ----------- | +| isPresented | Binding for presenting the View | +| height | Height, default .mid | +| animation | Animation | +| content | modal content | \ No newline at end of file diff --git a/Documentation/Reference/ExtensionKit/structs/KeyboardInfo.md b/Documentation/Reference/ExtensionKit/structs/KeyboardInfo.md index 8680b9d..31ccee1 100644 --- a/Documentation/Reference/ExtensionKit/structs/KeyboardInfo.md +++ b/Documentation/Reference/ExtensionKit/structs/KeyboardInfo.md @@ -3,7 +3,7 @@ # `KeyboardInfo` ```swift -public struct KeyboardInfo +public struct KeyboardInfo: Equatable ``` Struct modeling keyboard updates