feat: wip
This commit is contained in:
22
Sources/Styleguide/Modifiers/KeyboardStyles.swift
Normal file
22
Sources/Styleguide/Modifiers/KeyboardStyles.swift
Normal file
@@ -0,0 +1,22 @@
|
||||
import SwiftUI
|
||||
|
||||
extension View {
|
||||
|
||||
public func numberPad() -> some View {
|
||||
#if os(iOS)
|
||||
self.keyboardType(.numberPad)
|
||||
#else
|
||||
self
|
||||
#endif
|
||||
}
|
||||
|
||||
// The decimal pad autocompletes too quickly in the simulator, needs tested on an actual
|
||||
// device.
|
||||
public func decimalPad() -> some View {
|
||||
#if os(iOS)
|
||||
self.keyboardType(.decimalPad)
|
||||
#else
|
||||
self
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user