import React, { useMemo } from 'react'; import { useHMSTheme } from '../../hooks/HMSThemeProvider'; import { isMobileDevice } from '../../utils'; import { hmsUiClassParserGenerator } from '../../utils/classes'; import { Text } from '../Text'; import first_person_img from './first_person.png'; interface Props { username?: string; classes?: FirstPersonDisplayClasses; src?: string; } interface FirstPersonDisplayClasses { root: string; rootBg: string; content: string; } export const FirstPersonDisplay: React.FC = ({ username = '', classes, src, }) => { const defaultClasses: FirstPersonDisplayClasses = { root: 'h-full text-white flex items-center justify-center', rootBg: 'w-37.5 h-42.5 rounded-2xl relative flex flex-col text-center space-y-4 justify-center items-center bg-contain', content: 'flex flex-col transform -translate-y-full mls:translate-y-0', }; const { tw } = useHMSTheme(); const styler = useMemo( () => hmsUiClassParserGenerator({ tw, classes, defaultClasses, tag: 'hmsui-first-person-display', }), [], ); return (
Welcome {username} !
You’re the first one here. Sit back and relax till the others join.
); };