Skip to content

Commit 0733475

Browse files
authored
Merge branch 'styled-components:main' into master
2 parents d83c0fc + 377b54e commit 0733475

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

sections/api/typescript.md

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ declare module 'styled-components' {
4646
React-Native:
4747

4848
```ts
49+
import 'styled-components/native'
50+
4951
declare module 'styled-components/native' {
5052
export interface DefaultTheme {
5153
borderRadius: string;
@@ -80,24 +82,6 @@ const myTheme: DefaultTheme = {
8082
export { 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

10387
That's it! We're able to use styled-components just by using any original import.

sections/basics/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Installing styled-components only takes a single command and you're ready to rol
44

55
```
66
# with npm
7-
npm install --save styled-components
7+
npm install styled-components
88
99
# with yarn
1010
yarn add styled-components

sections/homepage/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default ({ children }) => (
2828
To download styled-components run:
2929

3030
```
31-
npm install --save styled-components
31+
npm install styled-components
3232
```
3333

3434
That's all you need to do, you are now ready to use it in your app! (yep, no build step needed 👌)

0 commit comments

Comments
 (0)