primefaces / sakai-vue

https://sakai.primevue.org
MIT License
748 stars 358 forks source link

Invalid Prop in FloatingConfigurator.vue #35

Closed HenriqueMoroziniHupp closed 2 months ago

HenriqueMoroziniHupp commented 3 months ago

Every time I access the Login page, "[Vue warn]: Invalid prop" appears in the console, the warning occurs on the toggle button dark mode within the FloatingConfigurator.vue component.

Expects a string with the icon value, but is receiving an object

Error: Captura de tela de 2024-08-03 02-04-27


Currently:

<Button :icon="{ 'pi pi-moon': isDarkTheme, 'pi pi-sun': !isDarkTheme }"  />

My sugestion:

<Button :icon="isDarkTheme ? 'pi pi-moon' : 'pi pi-sun'"  />
jonaskahn commented 3 months ago

Team already fixed this problem in the Main App. This is the code that taken form the main app to fix this.

        <button class="layout-topbar-action" type="button" @click="toggleDarkMode">
            <i :class="['pi', { 'pi-moon': isDarkTheme, 'pi-sun': !isDarkTheme }]"></i>
        </button>

I feel concern about the code quality, it's wired!!!

cagataycivici commented 2 months ago

Fixed but better needs to be handled at PrimeVue button prop type, we'll do it in v4.0.6. This is not Sakai related.