UNPKG

vuikit

Version:

A Vuejs component library based on UIkit

36 lines (31 loc) 744 B
/** * Vuikit 0.7.0 * (c) 2018 Miljan Aleksic * @license MIT */ import IconClose from '../../../icons/close-icon' import IconCloseLarge from '../../../icons/close-large' import mergeData from 'vuikit/core/helpers/vue-data-merge' export default { functional: true, props: ['type'], render (h, { data, props }) { const { type } = props const large = type === 'large' const outside = type === 'outside' const def = { class: ['uk-close', 'uk-icon', { 'uk-modal-close-large': large, 'uk-modal-close-outside': outside }], attrs: { type: 'button' } } return h('button', mergeData(data, def), [ large ? h(IconCloseLarge) : h(IconClose) ]) } }