From 8c18f7d318940a780470c703d2bd06efd3977839 Mon Sep 17 00:00:00 2001 From: benishouga Date: Thu, 30 Jul 2015 01:03:33 +0900 Subject: [PATCH 1/3] add svg attribute width and height for react element. --- react/react.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/react/react.d.ts b/react/react.d.ts index 5fbad0d22..c27d523f0 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -540,6 +540,7 @@ declare module __React { fy?: number | string; gradientTransform?: string; gradientUnits?: string; + height?: number | string; markerEnd?: string; markerMid?: string; markerStart?: string; @@ -564,6 +565,7 @@ declare module __React { transform?: string; version?: string; viewBox?: string; + width?: number | string; x1?: number | string; x2?: number | string; x?: number | string; From 62bb9fd8073c969c84bf27347ff7d51e6199b7cb Mon Sep 17 00:00:00 2001 From: benishouga Date: Tue, 4 Aug 2015 00:01:32 +0900 Subject: [PATCH 2/3] SVGAttributes inherit HTMLAttributes. fixed react-addons.d.ts and react-global.d.ts. --- react/react-addons.d.ts | 5 +---- react/react-global.d.ts | 4 +--- react/react.d.ts | 6 +----- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/react/react-addons.d.ts b/react/react-addons.d.ts index 37cde636d..9479cc722 100644 --- a/react/react-addons.d.ts +++ b/react/react-addons.d.ts @@ -518,9 +518,7 @@ declare module "react/addons" { unselectable?: boolean; } - interface SVGAttributes extends DOMAttributes { - ref?: string | ((component: SVGComponent) => void); - + interface SVGAttributes extends HTMLAttributes { cx?: number | string; cy?: number | string; d?: string; @@ -1048,4 +1046,3 @@ declare module "react/addons" { identifiedTouch(identifier: number): Touch; } } - diff --git a/react/react-global.d.ts b/react/react-global.d.ts index 3c1a69e43..ea032100c 100644 --- a/react/react-global.d.ts +++ b/react/react-global.d.ts @@ -524,9 +524,7 @@ declare module React { preserveAspectRatio?: string; } - interface SVGAttributes extends DOMAttributes { - ref?: string | ((component: SVGComponent) => void); - + interface SVGAttributes extends HTMLAttributes { cx?: number | string; cy?: number | string; d?: string; diff --git a/react/react.d.ts b/react/react.d.ts index c27d523f0..74d6eab4f 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -524,9 +524,7 @@ declare module __React { preserveAspectRatio?: string; } - interface SVGAttributes extends DOMAttributes { - ref?: string | ((component: SVGComponent) => void); - + interface SVGAttributes extends HTMLAttributes { cx?: number | string; cy?: number | string; d?: string; @@ -540,7 +538,6 @@ declare module __React { fy?: number | string; gradientTransform?: string; gradientUnits?: string; - height?: number | string; markerEnd?: string; markerMid?: string; markerStart?: string; @@ -565,7 +562,6 @@ declare module __React { transform?: string; version?: string; viewBox?: string; - width?: number | string; x1?: number | string; x2?: number | string; x?: number | string; From a117cbd73edf88c2e6bc72811a36301630fb72ee Mon Sep 17 00:00:00 2001 From: benishouga Date: Thu, 6 Aug 2015 03:22:04 +0900 Subject: [PATCH 3/3] add svg attribute width and height for rect element. SVGAttribute inherit DOMAttributes. --- react/react-addons.d.ts | 6 +++++- react/react-global.d.ts | 6 +++++- react/react.d.ts | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/react/react-addons.d.ts b/react/react-addons.d.ts index 9479cc722..151511339 100644 --- a/react/react-addons.d.ts +++ b/react/react-addons.d.ts @@ -518,7 +518,9 @@ declare module "react/addons" { unselectable?: boolean; } - interface SVGAttributes extends HTMLAttributes { + interface SVGAttributes extends DOMAttributes { + ref?: string | ((component: SVGComponent) => void); + cx?: number | string; cy?: number | string; d?: string; @@ -532,6 +534,7 @@ declare module "react/addons" { fy?: number | string; gradientTransform?: string; gradientUnits?: string; + height?: number | string; markerEnd?: string; markerMid?: string; markerStart?: string; @@ -556,6 +559,7 @@ declare module "react/addons" { transform?: string; version?: string; viewBox?: string; + width?: number | string; x1?: number | string; x2?: number | string; x?: number | string; diff --git a/react/react-global.d.ts b/react/react-global.d.ts index ea032100c..fd84d982e 100644 --- a/react/react-global.d.ts +++ b/react/react-global.d.ts @@ -524,7 +524,9 @@ declare module React { preserveAspectRatio?: string; } - interface SVGAttributes extends HTMLAttributes { + interface SVGAttributes extends DOMAttributes { + ref?: string | ((component: SVGComponent) => void); + cx?: number | string; cy?: number | string; d?: string; @@ -538,6 +540,7 @@ declare module React { fy?: number | string; gradientTransform?: string; gradientUnits?: string; + height?: number | string; markerEnd?: string; markerMid?: string; markerStart?: string; @@ -562,6 +565,7 @@ declare module React { transform?: string; version?: string; viewBox?: string; + width?: number | string; x1?: number | string; x2?: number | string; x?: number | string; diff --git a/react/react.d.ts b/react/react.d.ts index 74d6eab4f..c27d523f0 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -524,7 +524,9 @@ declare module __React { preserveAspectRatio?: string; } - interface SVGAttributes extends HTMLAttributes { + interface SVGAttributes extends DOMAttributes { + ref?: string | ((component: SVGComponent) => void); + cx?: number | string; cy?: number | string; d?: string; @@ -538,6 +540,7 @@ declare module __React { fy?: number | string; gradientTransform?: string; gradientUnits?: string; + height?: number | string; markerEnd?: string; markerMid?: string; markerStart?: string; @@ -562,6 +565,7 @@ declare module __React { transform?: string; version?: string; viewBox?: string; + width?: number | string; x1?: number | string; x2?: number | string; x?: number | string;