bigbuffet-rw/app/soapbox/features/compose/components/compose_form_button.tsx
marcin mikołajczak 03d6211e1c Replace classnames with clsx
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-08-31 11:35:06 +02:00

39 lines
821 B
TypeScript

import classNames from 'clsx';
import React from 'react';
import { IconButton } from 'soapbox/components/ui';
interface IComposeFormButton {
icon: string,
title?: string,
active?: boolean,
disabled?: boolean,
onClick: () => void,
}
const ComposeFormButton: React.FC<IComposeFormButton> = ({
icon,
title,
active,
disabled,
onClick,
}) => {
return (
<div>
<IconButton
className={
classNames({
'text-gray-600 hover:text-gray-700 dark:hover:text-gray-500': !active,
'text-primary-500 hover:text-primary-600 dark:text-primary-500 dark:hover:text-primary-400': active,
})
}
src={icon}
title={title}
disabled={disabled}
onClick={onClick}
/>
</div>
);
};
export default ComposeFormButton;