From 111236a17fca449ec7325aded2341f2d7ef00bd9 Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Fri, 23 Jan 2026 19:33:30 +0000 Subject: [PATCH] feat(fakemui): add email input components (addresses, body) --- .../components/email/inputs/BodyEditor.tsx | 50 ++++++++++++++ .../email/inputs/EmailAddressInput.tsx | 48 +++++++++++++ .../email/inputs/RecipientInput.tsx | 67 +++++++++++++++++++ .../react/components/email/inputs/index.ts | 3 + 4 files changed, 168 insertions(+) create mode 100644 fakemui/react/components/email/inputs/BodyEditor.tsx create mode 100644 fakemui/react/components/email/inputs/EmailAddressInput.tsx create mode 100644 fakemui/react/components/email/inputs/RecipientInput.tsx create mode 100644 fakemui/react/components/email/inputs/index.ts diff --git a/fakemui/react/components/email/inputs/BodyEditor.tsx b/fakemui/react/components/email/inputs/BodyEditor.tsx new file mode 100644 index 000000000..eb82da112 --- /dev/null +++ b/fakemui/react/components/email/inputs/BodyEditor.tsx @@ -0,0 +1,50 @@ +// fakemui/react/components/email/inputs/BodyEditor.tsx +import React, { forwardRef } from 'react' +import { Box } from '../../layout/Box' +import { useAccessible } from '../../../../src/utils/useAccessible' + +export interface BodyEditorProps extends React.TextareaHTMLAttributes { + mode?: 'plain' | 'html' + onModeChange?: (mode: 'plain' | 'html') => void + testId?: string +} + +export const BodyEditor = forwardRef( + ({ mode = 'plain', onModeChange, testId: customTestId, ...props }, ref) => { + const accessible = useAccessible({ + feature: 'email', + component: 'body-editor', + identifier: customTestId || 'body' + }) + + return ( + +
+ + +
+