COMP-006: unnamed component argument
Error: the page doesn't build until this is fixed.
Component arguments are always named, so a call reads the same however the component orders its parameters, and adding one later doesn't shift the others.
Fails
component Badge(text: Text = "New") { span(class: "badge") "{text}" }
page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
h1 "Shoes"
Badge("Sale")
}error[COMP-006]: component arguments are named
--> page.hypra:5:9
|
5 | Badge("Sale")
| ^^^^^^
= help: Badge(name: value)
= docs: https://hypralang.dev/rules/comp-006/
1 error, 0 warningsFixed
component Badge(text: Text = "New") { span(class: "badge") "{text}" }
page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
h1 "Shoes"
Badge(text: "Sale")
}