<!-- INCORRECT: close button present but nothing removes the note --><mds-note variant="yellow" deletable> <mds-text typography="detail">Questa nota non sparira' mai.</mds-text></mds-note>
<!-- CORRECT: listen for the event and remove programmatically --><mds-note id="nota-avviso" variant="yellow" deletable> <mds-text typography="detail">Chiudi per rimuovere questa nota.</mds-text></mds-note><script> document.getElementById('nota-avviso').addEventListener('mdsNoteDelete', (e) => { e.target.remove(); });</script><!-- INCORRECT: status variant not accepted by mds-note --><mds-note variant="warning"> <mds-text typography="detail">Operazione in corso.</mds-text></mds-note>
<!-- CORRECT: a state is a banner with a status variant --><mds-banner variant="warning"> <mds-text typography="detail">Operazione in corso.</mds-text></mds-banner><!-- INCORRECT: heading mixed into default body slot --><mds-note variant="blue"> <mds-text typography="h5">Nota importante</mds-text> <mds-text typography="detail">Dettagli dell'annotazione qui.</mds-text></mds-note>
<!-- CORRECT: heading goes in the title slot --><mds-note variant="blue"> <mds-text typography="h5" slot="title">Nota importante</mds-text> <mds-text typography="detail">Dettagli dell'annotazione qui.</mds-text></mds-note><!-- INCORRECT: the attribute still says the note is deletable --><mds-note variant="green" deletable="false"> <mds-text typography="detail">Questa nota dovrebbe essere fissa.</mds-text></mds-note>
<!-- CORRECT: omit the attribute --><mds-note variant="green"> <mds-text typography="detail">Questa nota e' fissa.</mds-text></mds-note>/* INCORRECT */mds-note { background-color: #fffacd; color: #3a3000;}
/* CORRECT */mds-note { --mds-note-background: rgb(var(--label-yellow-09)); --mds-note-color: rgb(var(--label-yellow-02));}