feat(events): add event creation form components
This commit is contained in:
parent
3a4695bc03
commit
29c72ce02d
24 changed files with 1875 additions and 52 deletions
28
src/components/custom-ui/participant-list-entry.tsx
Normal file
28
src/components/custom-ui/participant-list-entry.tsx
Normal file
|
@ -0,0 +1,28 @@
|
|||
import React from 'react';
|
||||
import Image from 'next/image';
|
||||
import { user_default_dark } from '@/assets/usericon/default/defaultusericon-export';
|
||||
import { user_default_light } from '@/assets/usericon/default/defaultusericon-export';
|
||||
import { useTheme } from 'next-themes';
|
||||
|
||||
type ParticipantListEntryProps = {
|
||||
participant: string;
|
||||
imageSrc?: string | null;
|
||||
};
|
||||
|
||||
export default function ParticipantListEntry({
|
||||
participant,
|
||||
imageSrc,
|
||||
}: ParticipantListEntryProps) {
|
||||
const { resolvedTheme } = useTheme();
|
||||
const defaultImage =
|
||||
resolvedTheme === 'dark' ? user_default_dark : user_default_light;
|
||||
|
||||
const finalImageSrc = imageSrc ?? defaultImage;
|
||||
|
||||
return (
|
||||
<div className='flex items-center gap-2 py-1 ml-5'>
|
||||
<Image src={finalImageSrc} alt='Avatar' width={30} height={30} />
|
||||
<span>{participant}</span>
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue