Button Component Referencetml`<Button text="Button text"/>`
tml`<Button>Button text</>`
The Button component creates a <button> with text. The if the text attribute is present it contains the string to be displayed. Otherwise the children are used for the button text.
The btnId attribute contains an ID string that's used to record user button presses. The event is recorded using ID button-${btnId}.
Button component accepts the standard attributes.<button> propertiesButton component accepts the standard <button> attributes.text (optional)btnId (optional)These methods are intended to be used by parent components to dynamically change the properties of the rendered components without re-rendering.
If a text attribute is present all children are ignored. If a text attribute is not present, then the children are used as the button text.
Button Component will render a <button>.data-btnId property will be set to the value of the btnId attribut, if present.