@@ -25,9 +25,8 @@ type UseTheme<T, C> = () => ThemeContext<T, C>
2525type ThemeObject = {
2626 [ props : string ] : ViewStyle | TextStyle | ImageStyle
2727}
28- type UseStyle < T , C > = < S extends ThemeObject , O > (
29- createStyleSheet : ( theme : T & C , options ?: O ) => S ,
30- options ?: O
28+ type UseStyle < T , C > = < S extends ThemeObject > (
29+ createStyleSheet : ( theme : T & C ) => S
3130) => StyleSheet . NamedStyles < S >
3231type CreateTheme = < T , C > (
3332 themes : Themes < T , C | undefined > ,
@@ -108,9 +107,9 @@ const createTheme: CreateTheme = (ts, initialMode = 'auto') => {
108107 )
109108
110109 const useTheme : UseTheme < Theme , Common > = ( ) => useContext ( ThemeContext )
111- const useStyle : UseStyle < Theme , Common > = ( createStyledObject , options ) => {
110+ const useStyle : UseStyle < Theme , Common > = createStyledObject => {
112111 const { theme } = useTheme ( )
113- return StyleSheet . create ( createStyledObject ( theme , options ) )
112+ return StyleSheet . create ( createStyledObject ( theme ) )
114113 }
115114
116115 return { ThemeProvider, useStyle, useTheme }
0 commit comments