Refactor #3965 - For DataViewLayoutOptions

This commit is contained in:
Bahadır Sofuoğlu 2023-06-02 19:04:55 +03:00
parent 088d0aaa35
commit 80478bbfe1
3 changed files with 45 additions and 14 deletions

View file

@ -0,0 +1,35 @@
<script>
import BaseComponent from 'primevue/basecomponent';
const classes = {
root: 'p-dataview-layout-options p-selectbutton p-buttonset',
listButton: ({ props }) => [
'p-button p-button-icon-only',
{
'p-highlight': props.modelValue === 'list'
}
],
gridButton: ({ props }) => [
'p-button p-button-icon-only',
{
'p-highlight': props.modelValue === 'grid'
}
]
};
export default {
name: 'BaseDataViewLayoutOptions',
extends: BaseComponent,
props: {
modelValue: String
},
css: {
classes
},
provide() {
return {
$parentInstance: this
};
}
};
</script>