mirror of
https://github.com/usebruno/bruno.git
synced 2025-01-20 12:48:41 +01:00
feat: tab switch for languages
This commit is contained in:
parent
a0fcb6c91f
commit
b900d3070d
@ -59,7 +59,16 @@ const GenerateCodeItem = ({ collection, item, onClose }) => {
|
||||
className={
|
||||
language.name === selectedLanguage.name ? 'generate-code-item active' : 'generate-code-item'
|
||||
}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
onClick={() => setSelectedLanguage(language)}
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter' || e.key === ' ') {
|
||||
setSelectedLanguage(language);
|
||||
e.preventDefault();
|
||||
}
|
||||
}}
|
||||
aria-pressed={language.name === selectedLanguage.name}
|
||||
>
|
||||
<span className="capitalize">{language.name}</span>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user