bigbuffet-rw/app/soapbox/components/tombstone.tsx

39 lines
988 B
TypeScript
Raw Normal View History

2022-05-16 19:30:30 -07:00
import React from 'react';
import { HotKeys } from 'react-hotkeys';
2022-05-16 19:30:30 -07:00
import { FormattedMessage } from 'react-intl';
import { Text } from 'soapbox/components/ui';
interface ITombstone {
id: string
2023-05-22 09:47:49 -07:00
onMoveUp?: (statusId: string) => void
onMoveDown?: (statusId: string) => void
}
2022-05-16 19:30:30 -07:00
/** Represents a deleted item. */
const Tombstone: React.FC<ITombstone> = ({ id, onMoveUp, onMoveDown }) => {
const handlers = {
2023-05-22 09:47:49 -07:00
moveUp: () => onMoveUp?.(id),
moveDown: () => onMoveDown?.(id),
};
2022-05-16 19:30:30 -07:00
return (
<HotKeys handlers={handlers}>
<div className='h-16'>
<div
className='focusable flex h-[42px] items-center justify-center rounded-lg border-2 border-gray-200 text-center'
>
<Text theme='muted'>
<FormattedMessage
id='statuses.tombstone'
defaultMessage='One or more posts are unavailable.'
/>
</Text>
</div>
</div>
</HotKeys>
2022-05-16 19:30:30 -07:00
);
};
export default Tombstone;