Integrated the RecordingButtonStyle button style into the RecordingView view in. the Recording package target.
This commit is contained in:
@@ -113,7 +113,7 @@ private enum Constant {
|
|||||||
/// The size constants.
|
/// The size constants.
|
||||||
enum Size {
|
enum Size {
|
||||||
/// The width and height of a button's label.
|
/// The width and height of a button's label.
|
||||||
static let button: CGFloat = 24
|
static let button: CGFloat = 16
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ public struct RecordingView: View {
|
|||||||
model.pressedMain()
|
model.pressedMain()
|
||||||
} label: {
|
} label: {
|
||||||
Image(model.iconMain)
|
Image(model.iconMain)
|
||||||
|
.resizable()
|
||||||
|
.scaledToFit()
|
||||||
}
|
}
|
||||||
.disabled(model.shouldDisableMain)
|
.disabled(model.shouldDisableMain)
|
||||||
|
|
||||||
@@ -48,13 +50,16 @@ public struct RecordingView: View {
|
|||||||
} label: {
|
} label: {
|
||||||
if let icon = model.iconSend {
|
if let icon = model.iconSend {
|
||||||
Image(icon)
|
Image(icon)
|
||||||
|
.resizable()
|
||||||
} else {
|
} else {
|
||||||
ProgressView()
|
ProgressView()
|
||||||
|
.dynamicTypeSize(.small)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.disabled(model.isProcessing)
|
.disabled(model.isProcessing)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.buttonStyle(.recording)
|
||||||
}
|
}
|
||||||
.onChange(
|
.onChange(
|
||||||
of: model.state,
|
of: model.state,
|
||||||
|
|||||||
Reference in New Issue
Block a user