mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-25 20:02:58 +01:00
Make ToggleButton keyboard accessible (#12727)
This commit is contained in:
parent
889411a0d7
commit
dcffd5fbf8
@ -53,6 +53,12 @@ const ToggleButton = (props) => {
|
||||
|
||||
return (
|
||||
<div
|
||||
tabIndex="0"
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === 'Enter') {
|
||||
onToggle(value);
|
||||
}
|
||||
}}
|
||||
className={classnames('toggle-button', `toggle-button--${modifier}`, {
|
||||
'toggle-button--disabled': disabled,
|
||||
})}
|
||||
|
Loading…
Reference in New Issue
Block a user