UNPKG

@nexara/nativeflow

Version:

Beautiful, responsive, and customizable UI components for React Native – built for performance and seamless experiences.

69 lines (68 loc) 1.1 kB
"use strict"; const getBorderColor = ({ theme, strokeColor, disabled }) => { if (disabled) { return theme.colors.disable; } if (strokeColor) { return strokeColor; } return theme.colors.outline; }; const getTextColor = ({ theme, titleColor, disabled }) => { if (disabled) { return theme.colors.textDisable; } else if (titleColor) { return titleColor; } return theme.colors.textTertiary; }; const getBgColor = ({ theme, bg, disabled }) => { if (disabled) { return theme.colors.disable; } else if (bg) { return bg; } return theme.colors.chipBgColor; }; const getChipColors = ({ theme, bg, titleColor, strokeColor, disabled }) => { const backgroundColor = getBgColor({ theme, bg, disabled }); const buttonTextColor = getTextColor({ theme, titleColor, disabled }); const buttonBorderColor = getBorderColor({ theme, strokeColor, disabled }); return { backgroundColor, buttonTextColor, buttonBorderColor }; }; export { getChipColors }; //# sourceMappingURL=utils.js.map