diff --git a/resources/ios/NativeUIDrawerHost.swift b/resources/ios/NativeUIDrawerHost.swift index 94e019b..a1eeefa 100644 --- a/resources/ios/NativeUIDrawerHost.swift +++ b/resources/ios/NativeUIDrawerHost.swift @@ -76,7 +76,8 @@ struct NativeDrawerHost: View { @ObservedObject private var state = DrawerHostState.shared @Environment(\.accessibilityReduceMotion) private var reduceMotion - @Environment(\.nativeUITheme) private var theme + @ObservedObject private var themeStore = NativeUITheme.shared + @Environment(\.colorScheme) private var colorScheme @State private var dragOffset: CGFloat = 0 // The last drawer this host drew — see `panelNode`. @State private var lastDrawer = LastDrawer() @@ -86,6 +87,8 @@ struct NativeDrawerHost: View { /// Slide animation for the drawer. Suppressed when the user has Reduce /// Motion enabled — open/close state then applies instantly instead of /// sliding (`withAnimation(nil)` / `.animation(nil, value:)`). + private var theme: NativeUITokens { themeStore.resolve(for: colorScheme) } + private var drawerAnimation: Animation? { reduceMotion ? nil : .easeOut(duration: 0.25) }