COMP-005: component name isn't capitalized
Error: the page doesn't build until this is fixed.
A capital letter is how Hypra, and anyone reading the page, tells a component from an HTML element:
ReviewCard is yours, figure is HTML's.
Fails
component reviewCard(author: Text, text: Text) {
figure {
blockquote "{text}"
figcaption "{author}"
}
}
page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
h1 "Shoes"
}error[COMP-005]: component names start with a capital letter
--> page.hypra:1:11
|
1 | component reviewCard(author: Text, text: Text) {
| ^^^^^^^^^^
= help: component ReviewCard(...)
= docs: https://hypralang.dev/rules/comp-005/
1 error, 0 warningsFixed
component ReviewCard(author: Text, text: Text) {
figure {
blockquote "{text}"
figcaption "{author}"
}
}
page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
h1 "Shoes"
ReviewCard(author: "Ana", text: "Light and fast.")
}