mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 06:34:39 -04:00
refactor: rename isMac to isAppleDevice
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
8e8df44f8c
commit
46e1b7471d
7 changed files with 35 additions and 18 deletions
|
@ -3,12 +3,12 @@
|
|||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { isMac } from '../../editor-page/utils'
|
||||
import { isAppleDevice } from '../../../utils/is-apple-device'
|
||||
import React from 'react'
|
||||
|
||||
/**
|
||||
* Renders a keyboard alt/option key hint depending on if the browser is running on macOS or not.
|
||||
*/
|
||||
export const AltKey: React.FC = () => {
|
||||
return isMac() ? <kbd>⌥</kbd> : <kbd>Alt</kbd>
|
||||
return isAppleDevice() ? <kbd>⌥</kbd> : <kbd>Alt</kbd>
|
||||
}
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { isMac } from '../../editor-page/utils'
|
||||
import { isAppleDevice } from '../../../utils/is-apple-device'
|
||||
import React from 'react'
|
||||
|
||||
/**
|
||||
* Renders a keyboard control/command key hint depending on if the browser is running on macOS or not.
|
||||
*/
|
||||
export const ModifierKey: React.FC = () => {
|
||||
return isMac() ? <kbd>⌘</kbd> : <kbd>Ctrl</kbd>
|
||||
return isAppleDevice() ? <kbd>⌘</kbd> : <kbd>Ctrl</kbd>
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue