File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ declare module 'styled-components' {
46
46
React-Native:
47
47
48
48
``` ts
49
+ import ' styled-components/native'
50
+
49
51
declare module ' styled-components/native' {
50
52
export interface DefaultTheme {
51
53
borderRadius: string ;
@@ -80,24 +82,6 @@ const myTheme: DefaultTheme = {
80
82
export { myTheme };
81
83
```
82
84
83
- React-Native:
84
-
85
- ``` jsx
86
- // styled-components.ts
87
- import * as styledComponents from " styled-components/native" ;
88
-
89
- import ThemeInterface from " ./theme" ;
90
-
91
- const {
92
- default: styled ,
93
- css ,
94
- ThemeProvider
95
- } = styledComponents as styledComponents .ReactNativeThemedStyledComponentsModule < ThemeInterface> ;
96
-
97
- export { css , ThemeProvider };
98
- export default styled ;
99
- ```
100
-
101
85
### Styling components
102
86
103
87
That's it! We're able to use styled-components just by using any original import.
You can’t perform that action at this time.
0 commit comments