Skip to content

Commit 6721936

Browse files
committed
Docs & Enhancement: Updated code documentation and improved UI components​
1 parent 68b16b6 commit 6721936

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

Sources/MaterialUIKit/Components/Form Controls/SecureTextBox.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ extension View {
113113

114114
/// Sets the corner radius for the secure field.
115115
///
116-
/// - Parameter radius: The corner radius to be applied to the secure field.
116+
/// - Parameter cornerRadius: The corner radius to be applied to the secure field.
117117
///
118118
/// - Returns: A view modified to include the specified corner radius.
119-
public func secureTextBoxCornerRadius(_ radius: CGFloat) -> some View {
120-
self.environment(\.cornerRadius, radius)
119+
public func secureTextBoxCornerRadius(_ cornerRadius: CGFloat) -> some View {
120+
self.environment(\.cornerRadius, cornerRadius)
121121
}
122122
}

Sources/MaterialUIKit/Components/Form Controls/TextBox.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ extension View {
112112

113113
/// Sets the corner radius for the text box.
114114
///
115-
/// - Parameter radius: The corner radius to be applied to the text box.
115+
/// - Parameter cornerRadius: The corner radius to be applied to the text box.
116116
///
117117
/// - Returns: A view modified to include the specified corner radius.
118-
public func textBoxCornerRadius(_ radius: CGFloat) -> some View {
119-
self.environment(\.cornerRadius, radius)
118+
public func textBoxCornerRadius(_ cornerRadius: CGFloat) -> some View {
119+
self.environment(\.cornerRadius, cornerRadius)
120120
}
121121
}

Sources/MaterialUIKit/Components/Interactive Elements/ActionButton.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ extension View {
8787

8888
/// Sets the corner radius for an action buttons.
8989
///
90-
/// - Parameter radius: The corner radius value to apply.
90+
/// - Parameter cornerRadius: The corner radius value to apply.
9191
public func actionButtonCornerRadius(_ cornerRadius: CGFloat) -> some View {
9292
self.environment(\.cornerRadius, cornerRadius)
9393
}

Sources/MaterialUIKit/Components/Interactive Elements/DropdownMenu.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ public struct DropdownMenu<Label, Content> : View where Label : View, Content :
9595
showMenu.toggle()
9696
}
9797
}
98+
.zIndex(.infinity)
99+
.onChangeWithFallback(of: showMenu) { oldValue, newValue in
100+
withMaterialAnimation {
101+
showMenu.toggle()
102+
}
103+
}
98104
}
99105
}
100106

@@ -127,7 +133,7 @@ fileprivate extension DropdownMenu {
127133
@ViewBuilder func menuOverlay() -> some View {
128134
GeometryReader { geo in
129135
if showMenu {
130-
ZStack {
136+
VStack {
131137
// Uses scrollable frame with fixed height
132138
if height > 190 {
133139
ScrollView {

Sources/MaterialUIKit/Components/Interactive Elements/IconButton.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ public struct IconButton: View {
7878

7979
extension View {
8080

81-
/// Sets the corner radius for the icon button.
81+
/// Sets the frame size for the icon button.
8282
///
83-
/// - Parameter radius: The corner radius value to apply.
83+
/// - Parameter frameSize: The frame size value to apply.
8484
public func iconButtonSize(_ frameSize: CGFloat) -> some View {
8585
self.environment(\.frameSize, frameSize)
8686
}

0 commit comments

Comments
 (0)