Skip to content

Commit

Permalink
Change Frame size to Optional
Browse files Browse the repository at this point in the history
  • Loading branch information
tsuzukihashi committed Mar 20, 2020
1 parent 0e6970f commit 33cd5cd
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
16 changes: 8 additions & 8 deletions Sources/CustomViews/NeumorphismBindingButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ public struct NeumorphismBindingButton: View {
private var shapeType: ShapeType
private var normalImage: Image
private var selectedImage: Image
private var width: CGFloat
private var height: CGFloat
private var imageWidth: CGFloat
private var imageHeight: CGFloat
private var width: CGFloat?
private var height: CGFloat?
private var imageWidth: CGFloat?
private var imageHeight: CGFloat?
private var shadowRadius: CGFloat
private var handler: (() -> Void)?

Expand All @@ -21,10 +21,10 @@ public struct NeumorphismBindingButton: View {
shapeType: ShapeType = .circle,
normalImage: Image = Image(systemName: "heart"),
selectedImage: Image = Image(systemName: "heart.fill"),
width: CGFloat = 100,
height: CGFloat = 100,
imageWidth: CGFloat = 60,
imageHeight: CGFloat = 60,
width: CGFloat? = nil,
height: CGFloat? = nil,
imageWidth: CGFloat? = nil,
imageHeight: CGFloat? = nil,
shadowRadius: CGFloat = 8,
handler: (() -> Void)? = nil
) {
Expand Down
16 changes: 8 additions & 8 deletions Sources/CustomViews/NeumorphismButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ public struct NeumorphismButton: View {
private var shapeType: ShapeType
private var normalImage: Image
private var selectedImage: Image
private var width: CGFloat
private var height: CGFloat
private var imageWidth: CGFloat
private var imageHeight: CGFloat
private var width: CGFloat?
private var height: CGFloat?
private var imageWidth: CGFloat?
private var imageHeight: CGFloat?
private var shadowRadius: CGFloat
private var handler: (() -> Void)?

Expand All @@ -20,10 +20,10 @@ public struct NeumorphismButton: View {
shapeType: ShapeType = .circle,
normalImage: Image = Image(systemName: "heart"),
selectedImage: Image = Image(systemName: "heart.fill"),
width: CGFloat = 100,
height: CGFloat = 100,
imageWidth: CGFloat = 60,
imageHeight: CGFloat = 60,
width: CGFloat? = nil,
height: CGFloat? = nil,
imageWidth: CGFloat? = nil,
imageHeight: CGFloat? = nil,
shadowRadius: CGFloat = 8,
handler: (() -> Void)? = nil
) {
Expand Down
8 changes: 4 additions & 4 deletions Sources/CustomViews/NeumorphismCircleDentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import SwiftUI
public struct NeumorphismCircleDentView: View {
@EnvironmentObject var neumorphism: NeumorphismManager

private let width: CGFloat
private let height: CGFloat
private let width: CGFloat?
private let height: CGFloat?

public init(
width: CGFloat = 100,
height: CGFloat = 100
width: CGFloat? = nil,
height: CGFloat? = nil
) {
self.width = width
self.height = height
Expand Down
8 changes: 4 additions & 4 deletions Sources/CustomViews/NeumorphismDentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import SwiftUI
public struct NeumorphismDentView: View {
@EnvironmentObject var neumorphism: NeumorphismManager

private let width: CGFloat
private let height: CGFloat
private let width: CGFloat?
private let height: CGFloat?
private let cornerRadius: CGFloat

public init(
width: CGFloat = 100,
height: CGFloat = 100,
width: CGFloat? = nil,
height: CGFloat? = nil,
cornerRadius: CGFloat = 16
) {
self.width = width
Expand Down
8 changes: 4 additions & 4 deletions Sources/CustomViews/NeumorphismLabelButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ public struct NeumorphismLabelButton: View {
private var text: String
private var font: Font?
private var color: Color?
private var width: CGFloat
private var height: CGFloat
private var width: CGFloat?
private var height: CGFloat?
private var cornerRadius: CGFloat
private var handler: (() -> Void)?

Expand All @@ -17,8 +17,8 @@ public struct NeumorphismLabelButton: View {
text: String = "Button",
font: Font? = nil,
color: Color? = nil,
width: CGFloat = 100,
height: CGFloat = 100,
width: CGFloat? = nil,
height: CGFloat? = nil,
cornerRadius: CGFloat = 10,
handler: (() -> Void)? = nil
) {
Expand Down

0 comments on commit 33cd5cd

Please sign in to comment.