@@ -12,11 +12,6 @@ import { useSystemColorScheme } from './useSystemColorScheme';
1212import MaterialCommunityIcon from '../components/MaterialCommunityIcon' ;
1313import PortalHost from '../components/Portal/PortalHost' ;
1414import { ReduceMotionContext } from '../theme/accessibility/ReduceMotionContext' ;
15- import {
16- isDynamicColorSupported ,
17- lightDynamicColors ,
18- darkDynamicColors ,
19- } from '../theme/schemes/DynamicTheme' ;
2015import type { ThemeProp } from '../types' ;
2116
2217export type Props = {
@@ -25,33 +20,26 @@ export type Props = {
2520 settings ?: Settings ;
2621 direction ?: Direction ;
2722 reduceMotion ?: ReduceMotionPreference ;
28- dynamicColor ?: boolean ;
2923} ;
3024
3125const PaperProvider = ( props : Props ) => {
32- const { reduceMotion = 'auto' , dynamicColor = false } = props ;
26+ const { reduceMotion = 'auto' } = props ;
3327
3428 const colorScheme = useSystemColorScheme ( ! props . theme ) ;
3529 const resolvedReduceMotion = useResolvedReduceMotion ( reduceMotion ) ;
3630
3731 const theme = React . useMemo ( ( ) => {
3832 const isDark = props . theme ?. dark ?? colorScheme === 'dark' ;
3933 const base = defaultThemes [ isDark ? 'dark' : 'light' ] ;
40- const dynamicColors =
41- dynamicColor && isDynamicColorSupported
42- ? isDark
43- ? darkDynamicColors
44- : lightDynamicColors
45- : undefined ;
4634 const scale = resolvedReduceMotion ? 0 : props . theme ?. animation ?. scale ?? 1 ;
4735
4836 return {
4937 ...base ,
5038 ...props . theme ,
51- colors : { ...base . colors , ...props . theme ?. colors , ... dynamicColors } ,
39+ colors : { ...base . colors , ...props . theme ?. colors } ,
5240 animation : { ...props . theme ?. animation , scale } ,
5341 } ;
54- } , [ colorScheme , props . theme , resolvedReduceMotion , dynamicColor ] ) ;
42+ } , [ colorScheme , props . theme , resolvedReduceMotion ] ) ;
5543
5644 const { children, settings } = props ;
5745
0 commit comments