Botão
Para exibir um botão, usamos o componente, botão.
O componente de botão na interface do usuário representa um 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
};
Isso produzirá um botão com o rótulo Yes, login
. As outras propriedades incluem, entre outras, variante, rótulo, clique.
OBSERVAÇÃO:
on-<events>
é a sintaxe para invocar os comandos nos controladores.
O botão renderizado terá esta aparência:
recommendation-more-help
11125c99-e1a1-4369-b5d7-fb3098b9b178