Skip to content

Commit 533edb9

Browse files
committed
Improve docs
1 parent 283ef26 commit 533edb9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ before:
7878
```typescript
7979
const shared = css`
8080
background: white;
81+
width: ${(props) => props.size}px;
8182
`
8283

8384
const Component = styled.View`
@@ -88,12 +89,13 @@ const Component = styled.View`
8889

8990
after:
9091
```typescript
91-
const shared = css({
92+
const shared = {
9293
backgroundColor: 'white',
93-
})
94+
width: styled.maybeDynamic((props) => props.size),
95+
}
9496

9597
const Component = styled.View({
96-
backgroundColor: 'white',
98+
...shared,
9799
height: 1,
98100
})
99101
```

0 commit comments

Comments
 (0)