UNPKG

nuke-biz-custom-feedback

Version:

custom-feedback

76 lines (67 loc) 2.31 kB
'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _variable = require('./variable'); var _variable2 = _interopRequireDefault(_variable); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function styleProvider() { var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var Variables = (0, _variable2.default)(theme); var core = theme.Core; return { CustomFeedback: { feedback: _extends({ alignItems: 'flex-start', flexDirection: 'row' }, core.padding(Variables['padding-tb'], Variables['padding-lr'], Variables['padding-tb'], Variables['padding-lr'])), 'fb-success': { backgroundColor: Variables['success-bg-color'] }, 'fb-info': { backgroundColor: Variables['info-bg-color'] }, 'fb-warning': { backgroundColor: Variables['warning-bg-color'] }, 'fb-error': { backgroundColor: Variables['error-bg-color'] }, icon: { width: Variables['icon-size'], height: Variables['icon-size'] }, content: { flexDirection: 'column', paddingLeft: Variables['content-padding-left'], // alignItems: 'center', // textAlign: 'center', flex: 1 }, title: { fontSize: Variables['title-font-size'], // height: Variables['icon-size'], lineHeight: Variables['icon-size'] }, 'title-success': { color: Variables['success-title-color'] }, 'title-info': { color: Variables['info-title-color'] }, 'title-warning': { color: Variables['warning-title-color'] }, 'title-error': { color: Variables['error-title-color'] }, messageWrap: { marginTop: Variables['message-margin-top'] }, message: { fontSize: Variables['message-font-size'], lineHeight: Variables['message-line-height'], color: Variables['message-color'] } } }; } module.exports = styleProvider;