@fto-consult/expo-ui
Version:
Bibliothèque de composants UI Expo,react-native
8 lines (5 loc) • 434 B
JavaScript
import {isMobileMedia,isTabletMedia,isDesktopMedia} from "$cplatform/dimensions";
import theme,{Colors} from "$theme";
export const getBackgroundColor = (backgroundColor)=> Colors.isValid(backgroundColor)? backgroundColor : Colors.darken(theme.colors.background,1);
export const NUMBER_OF_LINES = 5;
export const getNumberOfLines = (props)=> isMobileMedia() ? 2 : isTabletMedia() ? 3 : isDesktopMedia()? 4 : NUMBER_OF_LINES;