File tree Expand file tree Collapse file tree 5 files changed +11
-5
lines changed
Expand file tree Collapse file tree 5 files changed +11
-5
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ public struct RadixToggleStyle: ToggleStyle {
7676 . fill ( newForegroundColor. text2)
7777 . frame ( width: 21 , height: 21 )
7878 . offset ( x: configuration. isOn ? 8 : - 8 )
79- . radixShadow1 ( )
79+ . radixShadow4 ( )
8080 }
8181 . onTapGesture {
8282 withAnimation ( . easeIn( duration: 0.2 ) ) {
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public struct RadixButtonLabelStyle: LabelStyle {
7272 . foregroundStyle ( fgColor)
7373 . padding ( . horizontal, 12 )
7474 . padding ( . vertical, 8 )
75- . background ( shape ( ) )
75+ . background ( shape)
7676 . opacity ( opacityValue)
7777 . scaleEffect ( isPressed ? 0.98 : 1 )
7878 . animation (
@@ -98,7 +98,7 @@ public struct RadixButtonLabelStyle: LabelStyle {
9898 }
9999
100100 @ViewBuilder
101- private func shape( ) -> some View {
101+ private var shape : some View {
102102 switch radius {
103103 case . none:
104104 Rectangle ( )
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ fileprivate struct RadixShadowModifier: ViewModifier {
2929
3030extension View {
3131
32+ /// Inset shadow
3233 public func radixShadow1( ) -> some View {
3334 self . modifier (
3435 RadixShadowModifier (
@@ -47,6 +48,7 @@ extension View {
4748 )
4849 }
4950
51+ /// Shadow for "classic" variant of panels, like Card
5052 public func radixShadow2( ) -> some View {
5153 self . modifier (
5254 RadixShadowModifier (
@@ -68,6 +70,7 @@ extension View {
6870 )
6971 }
7072
73+ /// Shadow for "classic" variant of panels, like Card
7174 public func radixShadow3( ) -> some View {
7275 self . modifier (
7376 RadixShadowModifier (
@@ -87,6 +90,7 @@ extension View {
8790 )
8891 }
8992
93+ /// Shadow for smaller overlay panels, like Hover Card and Popover
9094 public func radixShadow4( ) -> some View {
9195 self . modifier (
9296 RadixShadowModifier (
@@ -104,6 +108,7 @@ extension View {
104108 )
105109 }
106110
111+ /// Shadow for smaller overlay panels, like Hover Card and Popover
107112 public func radixShadow5( ) -> some View {
108113 self . modifier (
109114 RadixShadowModifier (
@@ -121,6 +126,7 @@ extension View {
121126 )
122127 }
123128
129+ /// Shadow for larger overlay panels, like Dialog
124130 public func radixShadow6( ) -> some View {
125131 self . modifier (
126132 RadixShadowModifier (
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ public struct RadixTextFieldStyle: TextFieldStyle {
8484 }
8585 . padding ( . horizontal, 12 )
8686 . padding ( . vertical, 8 )
87- . background ( shape ( ) )
87+ . background ( shape)
8888 . focused ( $isFocused)
8989 . onSubmit {
9090 if let action {
@@ -94,7 +94,7 @@ public struct RadixTextFieldStyle: TextFieldStyle {
9494 }
9595
9696 @ViewBuilder
97- private func shape( ) -> some View {
97+ private var shape : some View {
9898 switch radius {
9999 case . none:
100100 Rectangle ( )
You can’t perform that action at this time.
0 commit comments