move custom environment key and values to PagerTabStripView.swift
This commit is contained in:
parent
e13452ad1b
commit
d3e9e367de
|
@ -21,17 +21,3 @@ extension View {
|
|||
}
|
||||
}
|
||||
|
||||
private struct CustomStyleKey: EnvironmentKey {
|
||||
static let defaultValue = PagerTabViewStyle()
|
||||
}
|
||||
|
||||
extension EnvironmentValues {
|
||||
var customStyleValue: PagerTabViewStyle {
|
||||
get { self[CustomStyleKey.self] }
|
||||
set { self[CustomStyleKey.self] = newValue }
|
||||
}
|
||||
}
|
||||
|
||||
//extension EnvironmentValues {
|
||||
// static let customStyle: Bool = false
|
||||
//}
|
||||
|
|
|
@ -20,6 +20,17 @@ public struct PagerTabViewStyle {
|
|||
}
|
||||
}
|
||||
|
||||
private struct CustomStyleKey: EnvironmentKey {
|
||||
static let defaultValue = PagerTabViewStyle()
|
||||
}
|
||||
|
||||
extension EnvironmentValues {
|
||||
var customStyleValue: PagerTabViewStyle {
|
||||
get { self[CustomStyleKey.self] }
|
||||
set { self[CustomStyleKey.self] = newValue }
|
||||
}
|
||||
}
|
||||
|
||||
public class PagerSettings: ObservableObject {
|
||||
@Published var width: CGFloat = 0
|
||||
@Published var contentOffset: CGFloat = 0
|
||||
|
|
Loading…
Reference in New Issue