I'm currently working with the PrimeVue Dialog component. My goal now is to apply different styles depending on whether the dialog is maximized or not. Let's keep it simple by saying I want to change the text to bold or red when the dialog is maximized. How can this be achieved?
Here is an example of the code:
<template>
<!-- OTHER STUFF HERE -->
<Dialog v-model:visible="true" maximizable modal header="TEST" :style="{ width: '50rem' }">
<div class="formgrid grid">
<div class="field col-12">
<!-- use this when dialog is not maximized -->
<p>Lorem ipsum.</p>
<!-- add new class/style when dialog is maximized -->
<p class="font-semibold" style="color: red">Lorem ipsum.</p>
</div>
</div>
</Dialog>
</template>
https://i.sstatic.net/oveHa.png https://i.sstatic.net/44psL.png
To achieve this, I would like to utilize v-bind:class
or v-bind:style
based on the state of the dialog being maximized or not. However, the challenge lies in the lack of direct access to the dialog maximized attribute.