This commit is contained in:
trochas
2025-12-11 13:02:45 +01:00
parent bce1ea92a2
commit dae973b3fc
4 changed files with 43 additions and 17 deletions

View File

@@ -16,6 +16,7 @@ export type ThemedViewProps = ViewProps & {
export function ThemedView({ style, lightColor, darkColor,lvl=1,border=-1,opacity="FF",shadow=false, ...otherProps }: ThemedViewProps) {
var lvlStr:string = "background";
var borderColor ="";
var borderWidth =0;
if(lvl>=0 && lvl<6){
lvlStr+=lvl;
}
@@ -29,6 +30,7 @@ export function ThemedView({ style, lightColor, darkColor,lvl=1,border=-1,opacit
if(border>=0 && border<6){
borderStr="background"+border;
borderColor = useThemeColor({ light: lightColor, dark: darkColor },borderStr as 'background0'|'background1'|'background2'|'background3'|'background4'|'background5');
borderWidth = 2;
}
else{
borderColor = backgroundColor
@@ -45,5 +47,5 @@ export function ThemedView({ style, lightColor, darkColor,lvl=1,border=-1,opacit
shadowRadius: 6,
}
return <View style={[{ backgroundColor, borderColor }, shadow && shadowStyle, style]} {...otherProps} />;
return <View style={[{ backgroundColor, borderColor, borderWidth }, shadow && shadowStyle, style]} {...otherProps} />;
}