Pulsante
Per visualizzare un pulsante utilizziamo il componente, pulsante.
Il componente Pulsante in JUI rappresenta un html <button/>
.
const buttonJSON = {
"component": "button",//tells the component name
"label": "Yes, login",//tells the text for the button
"variant": "cta",//tells the variants for the button which provides default styles
"on-click": "done",//tells what function to run after user clicks the button
};
Verrà generato un pulsante con l'etichetta Yes, login
. Le altre proprietà includono, ma non sono limitate a, variante, etichetta, clic con il mouse.
NOTA:
on-<events>
è la sintassi per richiamare i comandi nei controller.
Il pulsante con rendering sarà simile al seguente:
recommendation-more-help
11125c99-e1a1-4369-b5d7-fb3098b9b178