UNPKG

primevue

Version:

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://badge.fury.io/js/primevue.svg)](https://badge.fury.io/js/primevue) [![Discord Chat](https://img.shields.io/discord/55794023

2 lines (1 loc) 904 B
import{openBlock as t,createElementBlock as o,createElementVNode as e,normalizeClass as n}from"vue";var i={name:"DataViewLayoutOptions",emits:["update:modelValue"],props:{modelValue:String},computed:{buttonListClass(){return["p-button p-button-icon-only",{"p-highlight":"list"===this.modelValue}]},buttonGridClass(){return["p-button p-button-icon-only",{"p-highlight":"grid"===this.modelValue}]}},methods:{changeLayout(t){this.$emit("update:modelValue",t)}}};const l={class:"p-dataview-layout-options p-selectbutton p-buttonset"},s=[e("i",{class:"pi pi-bars"},null,-1)],u=[e("i",{class:"pi pi-th-large"},null,-1)];i.render=function(i,a,p,r,d,c){return t(),o("div",l,[e("button",{class:n(c.buttonListClass),onClick:a[0]||(a[0]=t=>c.changeLayout("list")),type:"button"},s,2),e("button",{class:n(c.buttonGridClass),onClick:a[1]||(a[1]=t=>c.changeLayout("grid")),type:"button"},u,2)])};export{i as default};