mirror of
https://github.com/pboulch/luto.git
synced 2025-12-19 12:52:47 +00:00
🎉 first commit
This commit is contained in:
32
Luto/UI/Utils/TextFieldExtensions.swift
Normal file
32
Luto/UI/Utils/TextFieldExtensions.swift
Normal file
@ -0,0 +1,32 @@
|
||||
//
|
||||
// TextFieldExtensions.swift
|
||||
// Luto
|
||||
//
|
||||
// Created by Pierre Boulc'h on 06/07/2023.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct OvalTextFieldStyle: TextFieldStyle {
|
||||
func _body(configuration: TextField<Self._Label>) -> some View {
|
||||
configuration
|
||||
.textFieldStyle(.plain)
|
||||
.colorMultiply(.gray)
|
||||
.padding(10)
|
||||
.tint(.gray)
|
||||
.foregroundColor(.black)
|
||||
.background(.white)
|
||||
.cornerRadius(20)
|
||||
.shadow(color: .accentColor, radius: 2)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
extension NSTextField {
|
||||
open override var focusRingType: NSFocusRingType {
|
||||
get { .none }
|
||||
set { }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user