Show response body size

This commit is contained in:
Gregory Schier
2023-02-25 23:08:19 -08:00
parent b852484559
commit 67d8bbc154
2 changed files with 11 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import { forwardRef } from 'react';
import { Icon, IconProps } from './Icon';
import { Button, ButtonProps } from './Button';
import classnames from 'classnames';
type Props = Omit<IconProps, 'size'> & ButtonProps<typeof Button>;
@@ -10,7 +11,14 @@ export const IconButton = forwardRef<HTMLButtonElement, Props>(function IconButt
) {
return (
<Button ref={ref} className="group" {...props}>
<Icon icon={icon} spin={spin} className="text-gray-700 group-hover:text-gray-900" />
<Icon
icon={icon}
spin={spin}
className={classnames(
'text-gray-700 group-hover:text-gray-900',
props.disabled && 'opacity-70',
)}
/>
</Button>
);
});