UNPKG

react-native-curved-tab-bar

Version:

A customizable curved tab bar component for React Native with smooth animations

18 lines (14 loc) 495 B
// src/utils.ts import { Dimensions } from 'react-native'; const { width: screenWidth, height: screenHeight } = Dimensions.get('window'); export const vw = screenWidth / 100; export const vh = screenHeight / 100; export const getGradientColors = (colors?: string[]): [string, string] => { if (!colors || colors.length === 0) { return ['#6366f1', '#8b5cf6']; // Default gradient } if (colors.length === 1) { return [colors[0], colors[0]]; } return [colors[0], colors[1]]; };