UNPKG

@hc.ds/mobile

Version:
42 lines (40 loc) 879 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getButtonType = getButtonType; exports.getTextStyle = getTextStyle; var _Colors = require("../Colors"); /** * Button utils * * These utils are used to determine the text style and button type based on the theme prop that matches with AntDesign Button component. */ function getTextStyle(theme) { switch (theme) { case 'ghost': return { color: _Colors.Colors.primary[100] }; case 'light': return { color: _Colors.Colors.text }; default: return { color: _Colors.Colors.white }; } } function getButtonType(theme) { switch (theme) { case 'success': case 'danger': return 'primary'; case 'light': return 'ghost'; default: return theme; } } //# sourceMappingURL=utils.js.map