-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/1.1.1' into main
- Loading branch information
Showing
11 changed files
with
221 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// ActionButton.swift | ||
// Twitimer | ||
// | ||
// Created by Brais Moure on 27/7/21. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct ActionButton: View { | ||
|
||
let image: Image | ||
let action: () -> Void | ||
|
||
var body: some View { | ||
Button(action: { | ||
action() | ||
}) { | ||
image.template.resizable() | ||
.aspectRatio(contentMode: .fit) | ||
.frame(width: Size.mediumBig.rawValue, height: Size.mediumBig.rawValue) | ||
.foregroundColor(.lightColor) | ||
} | ||
.buttonStyle(BorderlessButtonStyle()) | ||
.padding(Size.small.rawValue) | ||
.background(Color.primaryColor) | ||
.clipShape(Circle()) | ||
.shadow(color: Color.darkColor.opacity(UIConstants.kShadowOpacity), radius: Size.verySmall.rawValue) | ||
} | ||
} | ||
|
||
struct ActionButton_Previews: PreviewProvider { | ||
static var previews: some View { | ||
ActionButton(image: Image("calendar-add"), action: { | ||
print("ActionButton primary action") | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.