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,8 +1,8 @@
|
||||
---
|
||||
import type { Form } from '~/types';
|
||||
import type { Form as Props } from '~/types';
|
||||
import Button from '~/components/ui/Button.astro';
|
||||
|
||||
const { inputs, textarea, disclaimer, button = 'Contact us', description = '' } = Astro.props as Form;
|
||||
const { inputs, textarea, disclaimer, button = 'Contact us', description = '' } = Astro.props;
|
||||
---
|
||||
|
||||
<form>
|
||||
|
Reference in New Issue
Block a user