@@ -30,6 +30,8 @@ import {
30
30
modalEventEmitter ,
31
31
togglePreviewModeEventEmitter ,
32
32
} from '../../lib/utils/events'
33
+ import WithTooltip from '../../../design/components/atoms/WithTooltip'
34
+ import { osName } from '../../../design/lib/platform'
33
35
import { getDocTitle } from '../../lib/utils/patterns'
34
36
import DocProperties from '../DocProperties'
35
37
import { getDocLinkHref } from '../Link/DocLink'
@@ -168,15 +170,20 @@ const DocPreviewModal = ({ doc, team, fallbackUrl }: DocPreviewModalProps) => {
168
170
< Flexbox className = 'doc-preview__actions' >
169
171
{ renderHeader }
170
172
{ currentUserIsCoreMember && (
171
- < Button
172
- variant = 'icon'
173
- iconPath = { mode === 'preview' ? mdiPencil : mdiEyeOutline }
174
- onClick = { ( ) =>
175
- setMode ( ( prev ) => ( prev === 'preview' ? 'editor' : 'preview' ) )
176
- }
177
- id = 'doc-preview__edit'
178
- size = 'sm'
179
- />
173
+ < WithTooltip
174
+ tooltip = { osName == 'macos' ? 'Cmd+E' : 'Ctrl+E' }
175
+ side = 'bottom'
176
+ >
177
+ < Button
178
+ variant = 'icon'
179
+ iconPath = { mode === 'preview' ? mdiPencil : mdiEyeOutline }
180
+ onClick = { ( ) =>
181
+ setMode ( ( prev ) => ( prev === 'preview' ? 'editor' : 'preview' ) )
182
+ }
183
+ id = 'doc-preview__edit'
184
+ size = 'sm'
185
+ />
186
+ </ WithTooltip >
180
187
) }
181
188
< Button
182
189
variant = 'icon'
@@ -281,7 +288,8 @@ const Container = styled.div`
281
288
282
289
.doc-preview__content {
283
290
padding: ${ ( { theme } ) => theme . sizes . spaces . df } px
284
- ${ ( { theme } ) => theme . sizes . spaces . xl } px 0 ${ ( { theme } ) => theme . sizes . spaces . xl } px;
291
+ ${ ( { theme } ) => theme . sizes . spaces . xl } px 0
292
+ ${ ( { theme } ) => theme . sizes . spaces . xl } px;
285
293
}
286
294
287
295
.doc-preview__title__wrapper {
0 commit comments