forked from mirrors/thatmattlove-hyperglass
11 lines
346 B
TypeScript
11 lines
346 B
TypeScript
import { useMobile } from '~/context';
|
|
import { DesktopPrompt } from './desktop';
|
|
import { MobilePrompt } from './mobile';
|
|
|
|
import type { PromptProps } from './types';
|
|
|
|
export const Prompt = (props: PromptProps): JSX.Element => {
|
|
const isMobile = useMobile();
|
|
|
|
return isMobile ? <MobilePrompt {...props} /> : <DesktopPrompt {...props} />;
|
|
};
|