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

32 lines
920 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,
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 = {
moveUp: () => onMoveUp(id),
moveDown: () => onMoveDown(id),
};
2022-05-16 19:30:30 -07:00
return (
<HotKeys handlers={handlers}>
<div className='p-9 flex items-center justify-center sm:rounded-xl bg-gray-100 border border-solid border-gray-200 dark:bg-gray-900 dark:border-gray-800 focusable' tabIndex={0}>
<Text>
2022-07-14 09:20:07 -07:00
<FormattedMessage id='statuses.tombstone' defaultMessage='One or more posts are unavailable.' />
</Text>
</div>
</HotKeys>
2022-05-16 19:30:30 -07:00
);
};
export default Tombstone;