UI Components
ThemedView
A customizable view component that adapts its background color based on the current theme.
ThemedView
is a customizable view component designed for React Native applications. It adapts its background color based on the current theme (light or dark) and allows for additional styling.
Installation
Ensure you have the necessary dependencies:
Import
Props
Prop | Type | Required | Description |
---|---|---|---|
{style} | StyleProp<ViewStyle> | No | Custom styles for the view component. |
{lightColor} | string | No | Background color for light mode. |
{darkColor} | string | No | Background color for dark mode. |
{...otherProps} | ViewProps | No | Additional props to pass to the underlying View. |
Usage
Basic Usage
The {lightColor}
and {darkColor}
props are optional. If not provided, the component will use the default colors defined in the theme.