Skip to content
This repository was archived by the owner on Jun 8, 2022. It is now read-only.

Commit c8f2990

Browse files
author
Ronny Rook
committed
Fix styled components typing
1 parent 0288d9f commit c8f2990

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

package-lock.json

Lines changed: 43 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"@types/react": "17.0.39",
4646
"@types/react-native": "0.66.16",
4747
"@types/styled-components": "5.1.23",
48+
"@types/styled-components-react-native": "^5.1.3",
4849
"@typescript-eslint/eslint-plugin": "5.12.1",
4950
"@typescript-eslint/parser": "5.12.1",
5051
"babel-eslint": "10.1.0",

src/app/styles/styled.d.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import 'styled-components';
2+
3+
import theme from './theme';
4+
5+
type Theme = typeof theme;
6+
7+
declare module 'styled-components' {
8+
export interface DefaultTheme extends Theme {}
9+
}

0 commit comments

Comments
 (0)