Questa pagina è generata dai pacchetti Magma, documentati solo in inglese.
<!-- INCORRECT --><mds-pref-theme name="default" scheme="all"> <mds-pref-theme-item label="Predefinito" name="default" scheme="all"></mds-pref-theme-item></mds-pref-theme>
<!-- CORRECT --><mds-pref> <mds-pref-theme name="default" scheme="all"> <mds-pref-theme-item label="Predefinito" name="default" scheme="all"></mds-pref-theme-item> </mds-pref-theme></mds-pref><!-- INCORRECT --><mds-pref> <mds-pref-theme name="default" scheme="all"> <button>Predefinito</button> <span>Estate</span> </mds-pref-theme></mds-pref>
<!-- CORRECT --><mds-pref> <mds-pref-theme name="default" scheme="all"> <mds-pref-theme-item label="Predefinito" name="default" scheme="all"></mds-pref-theme-item> <mds-pref-theme-item label="Freddo" name="cool" scheme="all"></mds-pref-theme-item> </mds-pref-theme></mds-pref><!-- INCORRECT --><mds-pref-theme name="My Theme" scheme="all">...</mds-pref-theme><mds-pref-theme name="my_theme" scheme="all">...</mds-pref-theme><mds-pref-theme name="MyTheme" scheme="all">...</mds-pref-theme>
<!-- CORRECT --><mds-pref-theme name="warm" scheme="all">...</mds-pref-theme><!-- INCORRECT --><script> document.querySelector('mds-pref-theme').addEventListener('change', (e) => { console.log(e.target.value); // undefined - wrong event, wrong detail shape });</script>
<!-- CORRECT --><script> document.querySelector('mds-pref-theme').addEventListener('mdsPrefThemeChange', (e) => { console.log(e.detail.name, e.detail.scheme); });</script><!-- INCORRECT --><mds-pref size="sm"> <mds-pref-theme size="md" name="default" scheme="all"> <mds-pref-theme-item label="Predefinito" name="default" scheme="all"></mds-pref-theme-item> </mds-pref-theme></mds-pref>
<!-- CORRECT --><mds-pref> <mds-pref-theme size="sm" name="default" scheme="all"> <mds-pref-theme-item label="Predefinito" name="default" scheme="all"></mds-pref-theme-item> </mds-pref-theme></mds-pref>