« get me outta code hell
1 2 3 4 5 6 7 8 9 10 11 12 13 14
export default { slots: { actionLinks: {validate: v => v.sparseArrayOf(v.isHTML)}, }, generate: (slots, {html}) => html.tag('div', {class: 'grid-actions'}, {[html.onlyIfContent]: true}, (slots.actionLinks ?? []) .filter(link => link && !html.isBlank(link)) .map(link => link .slot('attributes', {class: ['grid-item', 'box']}))), };