refactor: rename isMac to isAppleDevice

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-07-31 20:53:24 +02:00
parent 8e8df44f8c
commit 46e1b7471d
7 changed files with 35 additions and 18 deletions

View file

@ -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>
}

View file

@ -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>
}