So far I have this code which I got from a post on here (I can't find it lol):
import type { HTMLAttributes } from 'astro/types';
type Fill = 'primary' | 'secondary' | 'accent' | 'danger';
type TagType = 'a' | 'button';
interface Props<Tag extends TagType> extends HTMLAttributes<'a' | 'button'> {
icon?: boolean;
fill?: Fill;
link?: boolean; // style as link
href?: string;
as?: Tag & TagType;
}
I wanted to use the formmethod="dialog" in a dialog to close it automatically. But TypeScript is currently throwing an error when building
Property 'formmethod' does not exist on type 'IntrinsicAttributes & Props<TagType>'.
107 <Button id="cancel" fill="accent" formmethod="dialog" formnovalidate>
How should I resolve this?