ComposeForm: convert buttons to ComposeFormButton component
This commit is contained in:
parent
c9a4087108
commit
890299ead0
6 changed files with 34 additions and 0 deletions
|
@ -0,0 +1,34 @@
|
|||
import classNames from 'classnames';
|
||||
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-400 hover:text-gray-600', { 'text-gray-600': active })}
|
||||
src={icon}
|
||||
title={title}
|
||||
disabled={disabled}
|
||||
onClick={onClick}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ComposeFormButton;
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue