'use client' import type { ContentEditorMode } from '@admin/utils/editor/content-editor-mode' import { Tabs, TabsList, TabsTrigger } from '@admin/components/ui/tabs' // The phone focus view's `Rich text / Markdown` switch (Paper `Posts / New · Writing / Mobile`, // `Mode switch · full width, bordered tablist`): the stock tab list across the bar, the active tab // the outline button (card fill, border, no shadow). The tabs prevent the pointer default so a tap // never takes focus from the editor: the keyboard stays through the switch and the newly mounted // editor takes focus over, instead of the blur dropping the keyboard and moving the dock. export function ContentEditorModeSwitch({ mode, onModeChange }: { mode: ContentEditorMode onModeChange: () => void }) { return ( { if (nextMode !== mode) onModeChange() }} > event.preventDefault()}> Rich text event.preventDefault()}> Markdown ) }