mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-23 19:48:44 -06:00
icon button touchable opacity?
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import React from "react";
|
||||
import { Square, Theme } from "tamagui";
|
||||
import Icon from "./icon";
|
||||
import { TouchableOpacity } from "react-native";
|
||||
|
||||
interface IconButtonProps {
|
||||
onPress: () => void;
|
||||
@@ -18,26 +19,27 @@ export default function IconButton({
|
||||
|
||||
return (
|
||||
<Theme name={"inverted_purple"}>
|
||||
|
||||
<Square
|
||||
animation={"quick"}
|
||||
circular={circular}
|
||||
elevate
|
||||
hoverStyle={{ scale: 0.925 }}
|
||||
pressStyle={{ scale: 0.875 }}
|
||||
onPress={onPress}
|
||||
width={size}
|
||||
height={size}
|
||||
alignContent="center"
|
||||
justifyContent="center"
|
||||
backgroundColor={"$background"}
|
||||
>
|
||||
<Icon
|
||||
large
|
||||
name={name}
|
||||
color={"$color"}
|
||||
/>
|
||||
</Square>
|
||||
<TouchableOpacity>
|
||||
<Square
|
||||
animation={"quick"}
|
||||
circular={circular}
|
||||
elevate
|
||||
hoverStyle={{ scale: 0.925 }}
|
||||
pressStyle={{ scale: 0.875 }}
|
||||
onPress={onPress}
|
||||
width={size}
|
||||
height={size}
|
||||
alignContent="center"
|
||||
justifyContent="center"
|
||||
backgroundColor={"$background"}
|
||||
>
|
||||
<Icon
|
||||
large
|
||||
name={name}
|
||||
color={"$color"}
|
||||
/>
|
||||
</Square>
|
||||
</TouchableOpacity>
|
||||
</Theme>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user