Remove extra focus outline for SpeciesFacesPicker

Before the tooltips, I thought the focus state wasn't clear enough at a glance, so I added an extra focus outline to the species faces picker area. Now, I think it's clear enough with the species name tooltip popping up!
This commit is contained in:
Emi Matchu 2021-02-02 16:31:55 -08:00
parent e788040315
commit adecb4167b

View file

@ -718,20 +718,22 @@ function ItemPageOutfitPreview({ itemId }) {
</Box> </Box>
</Box> </Box>
</VStack> </VStack>
<SpeciesFacesPicker <Box maxWidth="400px">
selectedSpeciesId={petState.speciesId} <SpeciesFacesPicker
compatibleBodies={compatibleBodies} selectedSpeciesId={petState.speciesId}
couldProbablyModelMoreData={couldProbablyModelMoreData} compatibleBodies={compatibleBodies}
onChange={({ speciesId, colorId }) => couldProbablyModelMoreData={couldProbablyModelMoreData}
setPetState({ onChange={({ speciesId, colorId }) =>
speciesId, setPetState({
colorId, speciesId,
pose: idealPose, colorId,
appearanceId: null, pose: idealPose,
}) appearanceId: null,
} })
isLoading={loading} }
/> isLoading={loading}
/>
</Box>
</Stack> </Stack>
); );
} }
@ -801,19 +803,8 @@ function SpeciesFacesPicker({
a.speciesName.localeCompare(b.speciesName) a.speciesName.localeCompare(b.speciesName)
); );
const focusBorderColorValue = useToken("colors", "blue.100");
return ( return (
<Box <>
_focusWithin={{
boxShadow: `${focusBorderColorValue} 0 0 1px 2px`,
}}
maxWidth="400px"
boxSizing="content-box"
padding="2"
borderRadius="md"
transition="all 0.2s"
>
<Wrap <Wrap
spacing="0" spacing="0"
justify="center" justify="center"
@ -851,7 +842,7 @@ function SpeciesFacesPicker({
} }
`} `}
/> />
</Box> </>
); );
} }
@ -910,7 +901,7 @@ function SpeciesFaceOption({
<Tooltip <Tooltip
label={tooltipLabel} label={tooltipLabel}
placement="top" placement="top"
gutter={-12} gutter={-10}
// We track hover and focus state manually for the tooltip, so that // We track hover and focus state manually for the tooltip, so that
// keyboard nav to switch between options causes the tooltip to // keyboard nav to switch between options causes the tooltip to
// follow. (By default, the tooltip appears on the first tab focus, // follow. (By default, the tooltip appears on the first tab focus,