Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions types/radium/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// 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
// TypeScript Version: 2.6

import * as React from 'react';

export = Radium;
export default Radium;

// @Radium decorator
declare function Radium<TElement extends Function>(component: TElement): TElement;
Expand Down
20 changes: 10 additions & 10 deletions types/radium/radium-tests.tsx
Original file line number Diff line number Diff line change
@@ -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 }> {
Expand Down Expand Up @@ -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"
Expand All @@ -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>
)
Expand All @@ -62,7 +62,7 @@ class TestComponentWithConfigInStyleRoot
userAgent: "test",
matchMedia: window.matchMedia
}} >
<Style scopeSelector="test"
<Radium.Style scopeSelector="test"
rules={{
a: {
background: "green"
Expand All @@ -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>
)
Expand Down