UNPKG

weex-nuke

Version:

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

103 lines (83 loc) 3.04 kB
import { vLoader } from 'nuke-core'; function VariableMix(theme) { const core = theme.Core; const ComponentCustomStyle = theme.Toast; const modalCustomToastMaskBgColor = vLoader(core['color-black']); // / background // / @namespace statement const modalCustomToastBgColor = vLoader(core['color-black']); // / text // / @namespace statement const modalCustomToastColor = vLoader(core['color-white']); // / padding(l/r) // / @namespace size/bounding const modalCustomToastPaddingLeftRight = vLoader(core.s3); // / padding(t,b) // / @namespace size/bounding const modalCustomToastPaddingTopBottom = vLoader(core.s4); // / text // / @namespace size/text const modalCustomToastFontSize = vLoader(core['font-size-caption']); // / margin(b) // / @namespace size/icon const modalCustomToastIconMarginBottom = vLoader(core.s3); // / corner // / @namespace statement const modalCustomToastCorner = vLoader(core['corner-1']); // / size // / @namespace size/icon const modalCustomToastIconSize = vLoader(core['icon-l']); // / icon-color // / @namespace statement const modalCustomToastIconColor = vLoader(core['color-white']); // / opacity // / @namespace statement const modalCustomToastOpacity = vLoader('.7'); // / mask-opacity // / @namespace statement const modalCustomToastMaskOpacity = vLoader('0'); // / min width // / @namespace size const modalCustomToastMinWidth = vLoader(200); // / max width // / @namespace size const modalCustomToastMaxWidth = vLoader(320); // / min height // / @namespace size const modalCustomToastMinHeight = vLoader(core.s15); // / min width // / @namespace size const modalCustomToastIconMinWidth = vLoader(200); // / max width // / @namespace size const modalCustomToastIconMaxWidth = vLoader(240); // / min height // / @namespace size const modalCustomToastIconMinHeight = vLoader(core.s15); // / align // / @namespace statement const modalCustomToastAlign = vLoader('center'); const toastVariables = { 'mask-bg-color': modalCustomToastMaskBgColor, 'bg-color': modalCustomToastBgColor, color: modalCustomToastColor, 'padding-left-right': modalCustomToastPaddingLeftRight, 'padding-top-bottom': modalCustomToastPaddingTopBottom, 'font-size': modalCustomToastFontSize, 'icon-margin-bottom': modalCustomToastIconMarginBottom, corner: modalCustomToastCorner, 'icon-size': modalCustomToastIconSize, 'icon-color': modalCustomToastIconColor, opacity: modalCustomToastOpacity, 'mask-opacity': modalCustomToastMaskOpacity, 'min-width': modalCustomToastMinWidth, 'max-width': modalCustomToastMaxWidth, 'min-height': modalCustomToastMinHeight, 'icon-min-width': modalCustomToastIconMinWidth, 'icon-max-width': modalCustomToastIconMaxWidth, 'icon-min-height': modalCustomToastIconMinHeight, align: modalCustomToastAlign, }; return { ...toastVariables, ...ComponentCustomStyle }; } module.exports = VariableMix;