1.0.2 • Published 3 years ago
@bacons/expo-background-color v1.0.2
@bacons/expo-background-color
A stack based Expo component for setting the background color of the root view. Useful for changing the background color on certain screens or inside of native modals. Updates based on Appearance and AppState native modules.
Add the package to your npm dependencies
yarn add @bacons/expo-background-colorUsage
Drop the BackgroundColor component anywhere, background color respect the component instance at the highest level (i.e. StatusBar module in react-native).
import { BackgroundColor } from "@bacons/expo-background-color";
function App() {
return (
<>
<BackgroundColor color={{ light: "#fff", dark: "#000" }} />
<BackgroundColor color={"#fff000"} />
</>
);
}