1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

chore: command bar feedback focus and text size (#7521)

This commit is contained in:
David Leek 2024-07-03 09:33:28 +02:00 committed by GitHub
parent e9b643761c
commit a463e8b1e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -202,7 +202,11 @@ export const CommandBar = () => {
const onKeyDown = (event: React.KeyboardEvent) => {
if (event.key === 'Escape') {
setShowSuggestions(false);
} else if (event.keyCode >= 48 && event.keyCode <= 110) {
} else if (
event.keyCode >= 48 &&
event.keyCode <= 110 &&
!hasNoResults
) {
searchInputRef.current?.focus();
}
};

View File

@ -14,7 +14,7 @@ const StyledContainer = styled('div')(({ theme }) => ({
}));
const StyledText = styled('span')(({ theme }) => ({
fontSize: theme.spacing(1.5),
fontSize: theme.fontSizes.bodySize,
}));
const StyledButton = styled(Button)(({ theme }) => ({