make invisible DTI title text not clickable

This commit is contained in:
Emi Matchu 2020-10-10 02:34:02 -07:00
parent 1eca5d1e27
commit f6268810be

View file

@ -42,9 +42,15 @@ function HomeLink(props) {
display="flex" display="flex"
alignItems="center" alignItems="center"
role="group" role="group"
// HACK: When we're on the homepage, I want the title "Dress to Impress"
// to stay visible for transition, but I don't want it to be a
// click target. To do this, I constrain the size of the container,
// and also remove pointer events from the overflowing children.
maxWidth={isHomePage ? "32px" : "none"}
{...props} {...props}
> >
<Box <Box
flex="0 0 auto"
display="flex" display="flex"
alignItems="center" alignItems="center"
marginRight="2" marginRight="2"
@ -58,6 +64,7 @@ function HomeLink(props) {
position="absolute" position="absolute"
right="100%" right="100%"
opacity={isHomePage ? "0" : "1"} opacity={isHomePage ? "0" : "1"}
pointerEvents={isHomePage ? "none" : "all"}
transform={isHomePage ? "translateX(3px)" : "none"} transform={isHomePage ? "translateX(3px)" : "none"}
transition="all 0.2s" transition="all 0.2s"
> >
@ -86,6 +93,7 @@ function HomeLink(props) {
/> />
</Box> </Box>
<Box <Box
flex="0 0 auto"
fontFamily="Delicious" fontFamily="Delicious"
fontWeight="600" fontWeight="600"
fontSize="2xl" fontSize="2xl"
@ -93,6 +101,7 @@ function HomeLink(props) {
opacity={isHomePage ? "0" : "1"} opacity={isHomePage ? "0" : "1"}
transition="all 0.2s" transition="all 0.2s"
marginRight="2" marginRight="2"
pointerEvents={isHomePage ? "none" : "all"}
_groupHover={{ fontWeight: "900" }} _groupHover={{ fontWeight: "900" }}
_groupFocus={{ fontWeight: "900" }} _groupFocus={{ fontWeight: "900" }}
> >