UNPKG

weex-nuke

Version:

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

65 lines (56 loc) 1.39 kB
'use strict'; export default function variableFactory(theme) { const Core = theme.Core; const ComponentCustomStyle = theme.FeedBack; /** * margin(b) * @property namespace size/icon */ const IconBottomMargin = Core.s5; /** * size * @property namespace size/icon */ const IconSize = Core['icon-xl']; /** * icon * @property namespace statement/success */ const IconSuccessColor = Core['color-success-2']; /** * icon * @property namespace statement/error */ const IconErrorColor = Core['color-error-2']; /** * icon * @property namespace statement/warning */ const IconWarningColor = Core['color-warning-2']; /** * text * @property namespace statement/success */ const SuccessColor = Core['color-text1-3']; /** * text * @property namespace statement/error */ const ErrorColor = Core['color-text1-3']; /** * text * @property namespace statement/warning */ const WarningColor = Core['color-text1-3']; const Variables = { 'icon-bottom-margin': IconBottomMargin, 'icon-size': IconSize, 'icon-success-color': IconSuccessColor, 'icon-error-color': IconErrorColor, 'icon-warning-color': IconWarningColor, 'success-color': SuccessColor, 'error-color': ErrorColor, 'warning-color': WarningColor }; return { ...Variables, ...ComponentCustomStyle }; }