Tab fixes

This commit is contained in:
Sacha Weatherstone
2022-02-25 23:23:23 +11:00
parent 9ad48da3ec
commit 5561ad62a9
3 changed files with 93 additions and 60 deletions
+18 -20
View File
@@ -24,29 +24,27 @@ export const IconButton = ({
}: IconButtonProps): JSX.Element => {
return (
<Tooltip disabled={!tooltip} content={tooltip}>
<m.div
whileHover={{ scale: 1.01 }}
whileTap={{ scale: 0.97 }}
className="my-auto text-gray-500 dark:text-gray-400"
<button
type="button"
disabled={disabled}
className={`rounded-md p-2 hover:bg-gray-300 ${
active ? 'bg-gray-300 dark:bg-secondaryDark' : ''
} ${
nested ? 'dark:hover:bg-primaryDark' : 'dark:hover:bg-secondaryDark'
} ${
disabled ? 'cursor-not-allowed text-gray-400 dark:text-gray-700' : ''
} ${className ?? ''}`}
{...props}
>
<button
type="button"
disabled={disabled}
className={`rounded-md p-2 hover:bg-gray-200 ${
active ? 'bg-gray-200 dark:bg-secondaryDark' : ''
} ${
nested ? 'dark:hover:bg-primaryDark' : 'dark:hover:bg-secondaryDark'
} ${
disabled
? 'cursor-not-allowed text-gray-400 dark:text-gray-700'
: ''
} ${className ?? ''}`}
{...props}
<m.div
whileHover={{ scale: 1.01 }}
whileTap={{ scale: 0.95 }}
className="my-auto text-gray-600 dark:text-gray-400"
>
{icon}
<span className="sr-only">Refresh</span>
</button>
</m.div>
</m.div>
<span className="sr-only">Refresh</span>
</button>
</Tooltip>
);
};