Skip to content

Commit

Permalink
feat: add extendable CSSProperties interface
Browse files Browse the repository at this point in the history
  • Loading branch information
jjenzz committed Jan 3, 2024
1 parent 98c69b8 commit f09a7ed
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/slow-kiwis-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro": patch
---

Add extendable `CSSProperties` interface to style attribute
11 changes: 10 additions & 1 deletion packages/astro/astro-jsx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,15 @@ declare namespace astroHTML.JSX {
KebabCSSDOMProperties & DOMCSSProperties & AllCSSProperties
>;

interface CSSProperties extends StyleObject {
/**
* Extend namespace to add properties or an index signature of your own.
*
* For more information, visit:
* https://docs.astro.build/en/guides/typescript/#built-in-html-attributes
*/
}

interface HTMLAttributes extends AriaAttributes, DOMAttributes, AstroBuiltinAttributes {
// Standard HTML Attributes
accesskey?: string | undefined | null;
Expand Down Expand Up @@ -547,7 +556,7 @@ declare namespace astroHTML.JSX {
popover?: boolean | string | undefined | null;
slot?: string | undefined | null;
spellcheck?: 'true' | 'false' | boolean | undefined | null;
style?: string | StyleObject | undefined | null;
style?: string | CSSProperties | undefined | null;
tabindex?: number | string | undefined | null;
title?: string | undefined | null;
translate?: 'yes' | 'no' | '' | undefined | null;
Expand Down

0 comments on commit f09a7ed

Please sign in to comment.