Przeglądaj źródła

fix(types): allow style to be an array in JSX (#2947)

Kadir Yazıcı 5 lat temu
rodzic
commit
13c9d2ca82
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      packages/runtime-dom/types/jsx.d.ts

+ 4 - 1
packages/runtime-dom/types/jsx.d.ts

@@ -245,11 +245,14 @@ interface AriaAttributes {
   'aria-valuetext'?: string
 }
 
+// Vue's style normalization supports nested arrays
+type StyleValue = string | CSSProperties | Array<StyleValue>
+
 export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
   innerHTML?: string
 
   class?: any
-  style?: string | CSSProperties
+  style?: StyleValue
 
   // Standard HTML Attributes
   accesskey?: string