mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2024-11-16 22:09:26 +08:00
Made button visually responsive on pressing
This commit is contained in:
parent
de33fe30fd
commit
8867306bd0
1 changed files with 4 additions and 1 deletions
|
@ -17,7 +17,10 @@ export default function Button({ disabled = false, ...props }: props) {
|
|||
<Pressable
|
||||
disabled={disabled}
|
||||
onPress={props.onPress}
|
||||
style={{ ...styles.button_template, ...{ backgroundColor: props.color } }}
|
||||
style={({ pressed }) => [
|
||||
styles.button_template,
|
||||
{ backgroundColor: pressed ? colors.primary_2 : props.color },
|
||||
]}
|
||||
>
|
||||
{props.children}
|
||||
</Pressable>
|
||||
|
|
Loading…
Reference in a new issue