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' {
4646React-Native:
4747
4848``` ts
49+ import ' styled-components/native'
50+
4951declare module ' styled-components/native' {
5052 export interface DefaultTheme {
5153 borderRadius: string ;
@@ -80,24 +82,6 @@ const myTheme: DefaultTheme = {
8082export { myTheme };
8183```
8284
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-
10185### Styling components
10286
10387That'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