Updated the new post button with gradient fill.
Changelog-Changed: Added damus gradient to post button Closes: #244
This commit is contained in:
committed by
William Casarin
parent
22008aeabc
commit
553dcb785c
@@ -8,13 +8,20 @@
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
let BUTTON_SIZE = 57.0
|
||||
let LINEAR_GRADIENT = LinearGradient(gradient: Gradient(colors: [
|
||||
Color("DamusPurple"),
|
||||
Color("DamusBlue")
|
||||
]), startPoint: .topTrailing, endPoint: .bottomTrailing)
|
||||
|
||||
|
||||
func PostButton(action: @escaping () -> ()) -> some View {
|
||||
return Button(action: action, label: {
|
||||
Image(systemName: "plus")
|
||||
.font(.system(.title2))
|
||||
.foregroundColor(Color.white)
|
||||
.frame(width: 57, height: 57, alignment: .center)
|
||||
.background(Color.accentColor)
|
||||
.frame(width: BUTTON_SIZE, height: BUTTON_SIZE, alignment: .center)
|
||||
.background(LINEAR_GRADIENT)
|
||||
.cornerRadius(38.5)
|
||||
.padding()
|
||||
.shadow(color: Color.black.opacity(0.3),
|
||||
|
||||
Reference in New Issue
Block a user