bigbuffet-rw/app/soapbox/features/placeholder/components/placeholder-notification.tsx

36 lines
1.1 KiB
TypeScript
Raw Normal View History

import React from 'react';
import { HStack } from 'soapbox/components/ui';
2022-11-15 11:00:40 -08:00
import PlaceholderAvatar from './placeholder-avatar';
import PlaceholderDisplayName from './placeholder-display-name';
import PlaceholderStatusContent from './placeholder-status-content';
/** Fake notification to display while data is loading. */
2022-03-21 11:09:01 -07:00
const PlaceholderNotification = () => (
<div className='bg-white dark:bg-primary-900 px-4 py-6 sm:p-6'>
2022-03-21 11:09:01 -07:00
<div className='w-full animate-pulse'>
<div className='mb-2'>
<PlaceholderStatusContent minLength={20} maxLength={20} />
</div>
2022-03-21 11:09:01 -07:00
<div>
<HStack space={3} alignItems='center'>
2022-03-21 11:09:01 -07:00
<div className='flex-shrink-0'>
<PlaceholderAvatar size={48} />
</div>
2022-03-21 11:09:01 -07:00
<div className='min-w-0 flex-1'>
<PlaceholderDisplayName minLength={3} maxLength={25} />
</div>
</HStack>
2022-03-21 11:09:01 -07:00
</div>
2022-03-21 11:09:01 -07:00
<div className='mt-4'>
<PlaceholderStatusContent minLength={5} maxLength={120} />
</div>
2022-03-21 11:09:01 -07:00
</div>
</div>
);
2022-03-21 11:09:01 -07:00
export default React.memo(PlaceholderNotification);