test
This commit is contained in:
@@ -15,6 +15,7 @@ export type ThemedPressableProps = PressableProps & {
|
||||
export function ThemedButton({ style, lightColor, darkColor,lvl=1,border=-1,opacity="FF",shadow=false, ...otherProps }: ThemedPressableProps) {
|
||||
var lvlStr:string = "background";
|
||||
var borderColor ="";
|
||||
var borderWidth = 0;
|
||||
if(lvl>=0 && lvl<6){
|
||||
lvlStr+=lvl;
|
||||
}
|
||||
@@ -28,6 +29,7 @@ export function ThemedButton({ style, lightColor, darkColor,lvl=1,border=-1,opac
|
||||
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
|
||||
@@ -44,5 +46,5 @@ export function ThemedButton({ style, lightColor, darkColor,lvl=1,border=-1,opac
|
||||
shadowRadius: 6,
|
||||
}
|
||||
|
||||
return <Pressable style={(state) =>[{ backgroundColor, borderColor }, shadow && shadowStyle, typeof style === 'function' ? style(state) : style,]} {...otherProps}/>;
|
||||
return <Pressable style={(state) =>[{ backgroundColor, borderColor, borderWidth }, shadow && shadowStyle, typeof style === 'function' ? style(state) : style,]} {...otherProps}/>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user