@@ -125,35 +125,36 @@ export function MarkdownEditor({
125125 return (
126126 < div className = { `border border-gray-300 dark:border-gray-600 rounded-md ${ isMobile ? 'markdown-editor-mobile' : '' } ${ className } ` } >
127127 { /* Toolbar */ }
128- < div className = "flex items-center gap-1 p-2 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 rounded-t-md" >
129- { toolbarButtons . map ( ( button , index ) => (
130- < button
131- key = { index }
132- onClick = { button . action }
133- className = "p-1.5 text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors"
134- title = { `${ button . label } (${ button . shortcut } )` }
135- type = "button"
136- >
137- < button . icon className = "w-4 h-4" />
138- </ button >
139- ) ) }
128+ < div className = { `border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800 rounded-t-md ${ isMobile ? 'p-1' : 'p-2' } ` } >
129+ < div className = { `flex items-center gap-1 ${ isMobile ? 'flex-wrap' : '' } ` } >
130+ { toolbarButtons . map ( ( button , index ) => (
131+ < button
132+ key = { index }
133+ onClick = { button . action }
134+ className = { `p-1.5 text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors ${ isMobile ? 'flex-shrink-0' : '' } ` }
135+ title = { `${ button . label } (${ button . shortcut } )` }
136+ type = "button"
137+ >
138+ < button . icon className = "w-4 h-4" />
139+ </ button >
140+ ) ) }
140141
141- < div className = "ml-auto flex items-center gap-1" >
142- < button
143- onClick = { ( ) => setShowPreview ( ! showPreview ) }
144- className = { `p-1.5 rounded transition-colors ${
145- showPreview
146- ? 'text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20'
147- : 'text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-200 dark:hover:bg-gray-700'
148- } `}
149- title = { showPreview ? t ( 'hidePreview' ) : t ( 'preview' ) }
150- type = "button"
151- >
152- { showPreview ? < EyeOff className = "w-4 h-4" /> : < Eye className = "w-4 h-4" /> }
153- </ button >
142+ < div className = { `ml-auto flex items-center gap-1 ${ isMobile ? 'w-full justify-end mt-1' : '' } ` } >
143+ < button
144+ onClick = { ( ) => setShowPreview ( ! showPreview ) }
145+ className = { `p-1.5 rounded transition-colors ${
146+ showPreview
147+ ? 'text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/20'
148+ : 'text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-200 dark:hover:bg-gray-700'
149+ } `}
150+ title = { showPreview ? t ( 'hidePreview' ) : t ( 'preview' ) }
151+ type = "button"
152+ >
153+ { showPreview ? < EyeOff className = "w-4 h-4" /> : < Eye className = "w-4 h-4" /> }
154+ </ button >
155+ </ div >
154156 </ div >
155157 </ div >
156-
157158 { /* Editor/Preview */ }
158159 < div className = "relative" >
159160 { showPreview ? (
0 commit comments