mirror of
https://github.com/withastro/astro.git
synced 2025-03-31 23:31:30 -05:00
feat: add extendable CSSProperties
interface (#9587)
* feat: add extendable `CSSProperties` interface * Update .changeset/slow-kiwis-own.md Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev> --------- Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com> Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
This commit is contained in:
parent
fe719e27a8
commit
da307e4a08
2 changed files with 15 additions and 1 deletions
5
.changeset/slow-kiwis-own.md
Normal file
5
.changeset/slow-kiwis-own.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"astro": patch
|
||||
---
|
||||
|
||||
Adds a `CSSProperties` interface that allows extending the style attribute
|
11
packages/astro/astro-jsx.d.ts
vendored
11
packages/astro/astro-jsx.d.ts
vendored
|
@ -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;
|
||||
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue