COMP-008: malformed component parameter
Error: the page doesn't build until this is fixed.
A parameter is a name with a type, name: Type, and maybe a default after =. A value after the colon
looks like a default but is read as a type.
Fails
component Badge(text: "New") { span(class: "badge") "{text}" }
page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
h1 "Shoes"
}error[COMP-008]: a parameter is `name` or `name: Type`
--> page.hypra:1:23
|
1 | component Badge(text: "New") { span(class: "badge") "{text}" }
| ^^^^^
= help: component Card(title: Text, featured: Bool = false)
= docs: https://hypralang.dev/rules/comp-008/
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
}