mirror of
https://github.com/ichsankurnia/hats-app.git
synced 2026-12-05 10:46:29 +00:00
36 lines
1.5 KiB
TypeScript
36 lines
1.5 KiB
TypeScript
import { Dispatch, FC, SetStateAction } from 'react';
|
|
import dayjs from 'dayjs';
|
|
import { Dialog, DialogContent } from '@/components/ui/dialog';
|
|
|
|
type Props = {
|
|
open: boolean
|
|
onOpenChange: Dispatch<SetStateAction<boolean>>
|
|
data: any
|
|
};
|
|
|
|
const DetailEvent: FC<Props> = ({ open, data, onOpenChange }) => {
|
|
return (
|
|
<>
|
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
<DialogContent className='overflow-y-auto max-h-[95vh] p-0'>
|
|
<img alt='event-ilustration' src='/assets/illustrations/event.png' className='h-44 w-full object-cover object-top' />
|
|
<div className='pt-4 pb-7 px-8 text-sm'>
|
|
<div className='flex items-start space-x-5'>
|
|
<div className='w-4 h-4 mt-2 rounded-md bg-rose-500 dark:bg-rose-900'></div>
|
|
<div>
|
|
<h1 className='text-2xl'>{data.name}</h1>
|
|
<p className='text-muted-foreground'>{dayjs(data.date).format('dddd, MMMM DD')}</p>
|
|
</div>
|
|
</div>
|
|
<div className='flex space-x-5 justify-start mt-4'>
|
|
<i className="ti ti-text-caption text-xl text-muted-foreground"></i>
|
|
<p>{data.description || '-'}</p>
|
|
</div>
|
|
</div>
|
|
</DialogContent>
|
|
</Dialog>
|
|
</>
|
|
);
|
|
}
|
|
|
|
export default DetailEvent; |