mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
radium: update typings to fit with new default export in radium >= 0.22.0 (#24686)
* radium: update typings to fit with new default export in radium >= 0.22.0 * radium: replace tabs with spaces * radium: updated radium version number in header comment
This commit is contained in:
parent
00ca94db93
commit
e2efee7a56
4
types/radium/index.d.ts
vendored
4
types/radium/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for radium 0.18.1
|
||||
// Type definitions for radium 0.24.0
|
||||
// Project: https://github.com/formidablelabs/radium
|
||||
// Definitions by: Alex Gorbatchev <https://github.com/alexgorbatchev>, Philipp Holzer <https://github.com/nupplaphil>, Alexey Svetliakov <https://github.com/asvetliakov>, Mikael Hermansson <https://github.com/mihe>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
export = Radium;
|
||||
export default Radium;
|
||||
|
||||
// @Radium decorator
|
||||
declare function Radium<TElement extends Function>(component: TElement): TElement;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import * as React from "react";
|
||||
import { StyleRoot, Style } from "radium";
|
||||
import Radium = require('radium');
|
||||
import Radium from "radium";
|
||||
|
||||
|
||||
@Radium
|
||||
class TestComponent extends React.Component<{ a: number }> {
|
||||
@ -29,7 +29,7 @@ class TestComponentWithConfig extends React.Component<{ a?: number }> {
|
||||
return (
|
||||
<div>
|
||||
<Radium.StyleRoot >
|
||||
<Style scopeSelector="test"
|
||||
<Radium.Style scopeSelector="test"
|
||||
rules={{
|
||||
a: {
|
||||
background: "green"
|
||||
@ -39,13 +39,13 @@ class TestComponentWithConfig extends React.Component<{ a?: number }> {
|
||||
}
|
||||
}}
|
||||
>
|
||||
</Style>
|
||||
<Style scopeSelector="test"
|
||||
</Radium.Style>
|
||||
<Radium.Style scopeSelector="test"
|
||||
rules={{
|
||||
background: "green"
|
||||
}}
|
||||
>
|
||||
</Style>
|
||||
</Radium.Style>
|
||||
</Radium.StyleRoot>
|
||||
</div>
|
||||
)
|
||||
@ -62,7 +62,7 @@ class TestComponentWithConfigInStyleRoot
|
||||
userAgent: "test",
|
||||
matchMedia: window.matchMedia
|
||||
}} >
|
||||
<Style scopeSelector="test"
|
||||
<Radium.Style scopeSelector="test"
|
||||
rules={{
|
||||
a: {
|
||||
background: "green"
|
||||
@ -72,13 +72,13 @@ class TestComponentWithConfigInStyleRoot
|
||||
}
|
||||
}}
|
||||
>
|
||||
</Style>
|
||||
<Style scopeSelector="test"
|
||||
</Radium.Style>
|
||||
<Radium.Style scopeSelector="test"
|
||||
rules={{
|
||||
background: "green"
|
||||
}}
|
||||
>
|
||||
</Style>
|
||||
</Radium.Style>
|
||||
</Radium.StyleRoot>
|
||||
</div>
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user