mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-04-04 14:53:33 -04:00
Add type="button" to theme toggle for accessibility compliance
This commit is contained in:
@@ -31,7 +31,12 @@ export default function ThemeIcon(props: {className?: string}) {
|
||||
</>
|
||||
)
|
||||
return (
|
||||
<button onClick={toggleTheme} className={'w-fit'} data-testid="settings-dark-light-toggle">
|
||||
<button
|
||||
type={'button'}
|
||||
onClick={toggleTheme}
|
||||
className={'w-fit'}
|
||||
data-testid="settings-dark-light-toggle"
|
||||
>
|
||||
<Row className="items-center gap-1 border-2 border-gray-500 rounded-full p-1 w-fit mx-2 px-3 hover:bg-canvas-100">
|
||||
{icon}
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user