UNPKG

@world-vision-canada/wvc-design-system

Version:

WVC Vue Design system is a fork of Vue Design System, an open-source tool for building Design Systems with Vue.js

60 lines (54 loc) 1.58 kB
((typeof self !== 'undefined' ? self : this)["webpackJsonpwvc"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpwvc"] || []).push([[23],{ /***/ "a38e": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // Use functional rendering in this component in order to enable wrapping an array of children individually. // see https://vuejs.org/v2/guide/render-function.html /* harmony default export */ __webpack_exports__["default"] = ({ name: 'WvcList', props: { /** * Display list in order */ color: { type: String, default: '#0c6699' }, order: { type: Boolean, default: false } }, render: function render(h) { // https://stackoverflow.com/questions/44966767/how-can-i-wrap-each-element-in-a-slot var list = []; if (this.$slots.default !== undefined) { this.$slots.default.forEach(function (element, index) { if (element.tag) { // add left padding to list element var paddedElement = h('span', { style: { position: 'relative', left: '14px' } }, [element]); list.push(h('li', {}, [paddedElement])); } }); return h(this.order ? 'ol' : 'ul', { class: { 'wvc-list': true }, style: { textAlign: 'left', color: this.color } }, list); } return h('span', {}, []); } }); /***/ }) }]); //# sourceMappingURL=wvc.common.23.js.map