-
Notifications
You must be signed in to change notification settings - Fork 0
Basic Syntax
Brandon Jordan edited this page Aug 29, 2022
·
13 revisions
To apply styles to a component, simply add the corresponding method using dot notation.
Component()
.propertyMethod()Some components accept arguments, like Text(), Hyperlink(), Button(), etc. accept a text argument as a convenient shorthand to the text() method.
Hyperlink("Link Text")
.url('https://example.com')The other type of argument is an array of components which means that that component can nest components inside itself.
Div([
Text("Text")
])Resulting HTML:
<div>
<p>Text</p>
</div>