mirror of
https://github.com/mastodon/mastodon.git
synced 2025-05-07 12:16:14 +00:00
28 lines
716 B
TypeScript
28 lines
716 B
TypeScript
import React, { MouseEventHandler } from 'react';
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
|
import DeleteForeverIcon from '@/material-icons/400-24px/delete_forever.svg?react';
|
|
import { Icon } from 'mastodon/components/icon';
|
|
|
|
interface Props {
|
|
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
}
|
|
|
|
const ClearColumnButton: React.FC<Props> = ({ onClick }) => {
|
|
return (
|
|
<button
|
|
className='text-btn column-header__setting-btn'
|
|
tabIndex={0}
|
|
onClick={onClick}
|
|
>
|
|
<Icon id='eraser' icon={DeleteForeverIcon} />{' '}
|
|
<FormattedMessage
|
|
id='notifications.clear'
|
|
defaultMessage='Clear notifications'
|
|
/>
|
|
</button>
|
|
);
|
|
};
|
|
|
|
export default ClearColumnButton;
|