@fruits-chain/react-native-xiaoshu
Version:
🌈 React Native UI library
77 lines (75 loc) • 2.11 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.varCreator = exports.styleCreator = void 0;
var _reactNative = require("react-native");
const varCreator = TOKENS => {
return {
dropdown_active_color: TOKENS.brand_6,
dropdown_background_color: TOKENS.white,
dropdown_menu_height: 40,
dropdown_text_font_size: TOKENS.font_size_4,
dropdown_text_color: TOKENS.gray_7,
dropdown_text_disabled_color: TOKENS.gray_6,
dropdown_text_margin_right: 4,
dropdown_text_icon_size: 12,
dropdown_text_icon_color: TOKENS.gray_6,
dropdown_badge_color: TOKENS.red_6,
dropdown_badge_text_font_size: TOKENS.font_size_3,
dropdown_badge_dot_size: 8
};
};
exports.varCreator = varCreator;
const styleCreator = cv => {
return _reactNative.StyleSheet.create({
menu: {
flexDirection: 'row',
alignItems: 'center',
height: cv.dropdown_menu_height,
backgroundColor: cv.dropdown_background_color
},
// item_tree: {
// backgroundColor: cv.dropdown_background_color,
// // maxHeight: '100%',
// // backgroundColor: '#f30',
// },
item_tree_item: {
flex: 1
},
badge_dot: {
backgroundColor: cv.dropdown_badge_color,
width: cv.dropdown_badge_dot_size,
height: cv.dropdown_badge_dot_size,
borderRadius: cv.dropdown_badge_dot_size / 2,
overflow: 'hidden'
},
badge_text: {
color: cv.dropdown_badge_color,
fontSize: cv.dropdown_badge_text_font_size
},
text_item: {
flex: 1,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center'
},
text_text_container: {
flexShrink: 1,
maxWidth: '100%'
},
text_text: {
width: '100%',
fontSize: cv.dropdown_text_font_size
},
text_text_gap: {
marginRight: cv.dropdown_text_margin_right
},
text_text_badge: {
marginTop: -cv.dropdown_badge_dot_size,
marginLeft: cv.dropdown_text_margin_right / 2
}
});
};
exports.styleCreator = styleCreator;
//# sourceMappingURL=style.js.map