diff --git a/src/components/Themed.tsx b/src/components/Themed.tsx index 6f8d6ff..c1b3d4d 100644 --- a/src/components/Themed.tsx +++ b/src/components/Themed.tsx @@ -1,3 +1,4 @@ +/* eslint-disable react/destructuring-assignment */ /** * Learn more about Light and Dark modes: * https://docs.expo.io/guides/color-schemes/ @@ -31,13 +32,15 @@ export type TextProps = ThemeProps & DefaultText["props"]; export type ViewProps = ThemeProps & DefaultView["props"]; export const Text: VFC = (props) => { - const color = useThemeColor({ light: props.lightColor, dark: props.darkColor }, "text"); + const { style, lightColor, darkColor, ...otherProps } = props; + const color = useThemeColor({ light: lightColor, dark: darkColor }, "text"); - return ; + return ; }; export const View: VFC = (props) => { - const backgroundColor = useThemeColor({ light: props.lightColor, dark: props.darkColor }, "background"); + const { style, lightColor, darkColor, ...otherProps } = props; + const backgroundColor = useThemeColor({ light: lightColor, dark: darkColor }, "background"); - return ; + return ; };