mastodon/app/javascript/mastodon/features/notifications/components/clear_column_button.tsx
2025-03-27 01:58:33 +09:00

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;