UNPKG

react-native-material-elements

Version:

React native material elements is a sophisticated UI library crafted to enhance your React Native development workflow. Designed for simplicity and elegance, nex-ui provides a rich collection of components and utilities to effortlessly create polished mob

33 lines (28 loc) 875 B
import { ViewStyle } from 'react-native'; import { getVariant } from '../../utils'; import { ProgressBarContainerStylesParams, ProgressBarIndicatorStylesParams } from './Progress'; export const getProgressBarContainerStyles = ({ colors, variant, removeBorder, borderColor: progressBarBorderColor, borderWidth, height, }: ProgressBarContainerStylesParams): ViewStyle => { const borderColor = progressBarBorderColor ?? getVariant({ variant, colors }); return { borderColor, height, ...(!removeBorder && { borderWidth }), }; }; export const getProgressBarIndicatorStyles = ({ colors, variant, backgroundColor: progressBarIndicatorBackgroundColor, }: ProgressBarIndicatorStylesParams): ViewStyle => { const backgroundColor = progressBarIndicatorBackgroundColor ?? getVariant({ variant, colors }); return { backgroundColor, }; };