fix: define component Props type instead of typecasting Astro.props
This surfaces some type errors in props being passed to some components, particularly in the way Features passes the classes props.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
import type { Headline } from "~/types";
|
||||
import type { Headline as Props } from "~/types";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
|
||||
const {
|
||||
@@ -7,7 +7,7 @@ const {
|
||||
subtitle = await Astro.slots.render("subtitle"),
|
||||
tagline,
|
||||
classes = {},
|
||||
} = Astro.props as Headline;
|
||||
} = Astro.props;
|
||||
|
||||
const {
|
||||
container: containerClass = "max-w-3xl",
|
||||
|
Reference in New Issue
Block a user