primocms / primo

Primo is a visual CMS with a built-in code editor, Svelte blocks, and static site generator.
https://primocms.org
MIT License
1.92k stars 474 forks source link

Primary button TS error #290

Closed SrGeneroso closed 4 months ago

SrGeneroso commented 1 year ago

Please add as much information as possible to help us reproduce the issue. So..., in https://github.com/primocms/primo/blob/master/src/lib/ui/PrimaryButton.svelte there is this export let type = 'button' that is giving an error because later is used as type in a button and those should only be Type 'string' is not assignable to type '"button" | "reset" | "submit" | null | undefined'. The thing is..., is also used to check if is an input, but don't look like is ever used in that way. This component is used in CreateSite.svelte and DeleteSite.svelte and both times is used as submit type. Should we add a correct jsdoc type? and remove the label condition?