1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00
Files

18 lines
445 B
TypeScript

import { useMemo } from 'react';
import { useWindowDimensions } from 'react-native';
const useButtonSize = () => {
const { fontScale } = useWindowDimensions();
return useMemo(() => {
return {
// Scaling the button width/height by the device font scale causes the button to scale
// with the user's device font size.
buttonSize: 48 * fontScale,
iconSize: 22 * fontScale,
};
}, [fontScale]);
};
export default useButtonSize;