diff --git a/types/react-css-modules/index.d.ts b/types/react-css-modules/index.d.ts index d569850f99..32835f0c1d 100644 --- a/types/react-css-modules/index.d.ts +++ b/types/react-css-modules/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for react-css-modules 3.7.9 +// Type definitions for react-css-modules 4.2.0 // Project: https://github.com/gajus/react-css-modules // Definitions by: Kostya Esmukov , Tadas Dailyda // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -33,4 +33,7 @@ declare module 'react' { interface HTMLAttributes { styleName?: string; } + interface SVGAttributes { + styleName?: string; + } } diff --git a/types/react-css-modules/react-css-modules-tests.tsx b/types/react-css-modules/react-css-modules-tests.tsx index 62a3470dcb..18f4cd04e3 100644 --- a/types/react-css-modules/react-css-modules-tests.tsx +++ b/types/react-css-modules/react-css-modules-tests.tsx @@ -41,3 +41,23 @@ class TableDecorated extends React.Component { ; } } + + +interface TableProps extends CSSModules.InjectedCSSModuleProps { + +} + +class Svg extends React.Component { + render () { + const { styles } = this.props; + + return + + + + + ; + } +} + +const SvgHOC = CSSModules(Svg, styles);