UNPKG

weex-nuke

Version:

基于 Rax 、Weex 的高性能组件体系 ~~

246 lines (242 loc) 5.44 kB
'use strict'; function VariableMix(theme) { const Core = theme.Core; const ComponentCustomStyle = theme.Dialog; /** * 对话框 * @namespace component * @property module dialog * @property tag Dialog * @property category component */ const variables = { /** * width * @property namespace size/bounding */ 'dialog-width': 540, /** * width * @property namespace size/bounding */ 'md-dialog-width': 580, /** * background * @property namespace statement */ 'dialog-bg': Core['color-white'], /** * background * @property namespace statement */ 'md-dialog-bg': Core['color-white'], /** * margin(t) * @property namespace size/title */ 'title-margin-top': 38, /** * margin(t) * @property namespace size/title */ 'title-font-size': 34, /** * text * @property namespace size/title */ 'md-title-font-size': Core['font-size-title'], /** * line-height * @property namespace size/title */ 'title-line-height': 44, /** * margin(b) * @property namespace size/title */ 'title-margin-bottom': Core['s-1'], /** * margin(b) * @property namespace size/title */ 'md-title-margin-bottom': Core['s-3'], /** * color * @property namespace statement/title */ 'title-color': Core['color-black'], /** * color * @property namespace statement/title */ 'md-title-color': Core['color-text1-4'], /** * margin(b) * @property namespace size/content */ 'content-padding-l-r': 60, /** * line-height * @property namespace size/content */ 'content-line-height': Core['s-5'], /** * line-height * @property namespace size/content */ 'md-content-line-height': Core['s-6'], /** * text * @property namespace size/content */ 'content-font-size': Core['font-size-body-2'], /** * text * @property namespace size/content */ 'md-content-font-size': Core['font-size-subhead'], /** * color * @property namespace statement/content */ 'content-color': Core['color-black'], /** * color * @property namespace statement/content */ 'md-content-color': Core['color-text1-2'], /** * background * @property namespace statement/content */ 'content-bg-color': Core['color-white'], /** * background * @property namespace statement/content */ 'md-content-bg-color': Core['color-fill1-1'], /** * corner * @property namespace statement/content */ 'content-radius': 28, /** * corner * @property namespace statement/content */ 'md-content-radius': Core['corner-1'], /** * border-top * @property namespace size/footer */ 'footer-border-top-width': Core['line-1'], /** * border * @property namespace statement/footer */ 'footer-border-top-color': Core['color-line1-2'], /** * padding(l,r) * @property namespace size/content */ 'md-content-padding-l-r': Core['s-6'], /** * margin(t) * @property namespace size/footer */ 'footer-margin-top': 40, /** * padding(t,b) * @property namespace size/footer */ 'footer-padding-top-bottom': 0, /** * padding(r) * @property namespace size/footer */ 'footer-padding-right': 0, /** * text * @property namespace statement/button */ 'btn-font-size': 34, /** * text * @property namespace statement/button */ 'md-btn-font-size': Core['font-size-body-1'], /** * text * @property namespace statement/button */ 'btn-seperator-width': Core['line-1'], /** * color * @property namespace statement/seperator */ 'btn-seperator-color': Core['color-line1-2'], /** * margin(t) * @property namespace size/footer */ 'md-footer-margin-top': 46, /** * margin(b) * @property namespace size/footer */ 'md-footer-margin-bottom': Core['s-2'], /** * padding(r) * @property namespace size/footer */ 'md-footer-padding-right': Core['s-2'], /** * height * @property namespace size/button */ 'btn-height': Core['s-11'], /** * margin(l) * @property namespace size/button */ 'btn-margin-left': Core['s-2'], /** * background * @property namespace statment/button */ 'btn-bg-color': 'transparent', /** * color * @property namespace statment/button */ 'btn-color': '#007AFF', /** * height * @property namespace statment/button */ 'md-btn-height': Core['s-9'], /** * margin(l) * @property namespace size/button */ 'md-btn-margin-left': Core['s-2'], /** * padding(l,r) * @property namespace size/button */ 'md-btn-padding-lr': Core['s-2'], /** * background * @property namespace statment/button */ 'md-btn-bg-color': 'transparent', /** * color * @property namespace statment/button */ 'md-btn-color': Core['color-brand1-6'], }; const variable = Object.assign(variables, ComponentCustomStyle); return variable; } module.exports = VariableMix;