Skip to content

Commit f4702ca

Browse files
authored
Update style.md
* Fix style example - needs to use `#"flex-start"` instead of `#flexStart` * Fix a bunch of places where it uses camel case instead of hyphens for the polymorphic variant name * There were also one or two missing variants * Change ```foovariant`` to `#foovariant` everywhere
1 parent 2ffb839 commit f4702ca

File tree

1 file changed

+79
-78
lines changed

1 file changed

+79
-78
lines changed

docs/style.md

Lines changed: 79 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ let styles = {
3939
"container": viewStyle(
4040
~maxHeight=600.->dp,
4141
~width=80.->pct,
42-
~justifyContent=#flexStart,
42+
~justifyContent=#"flex-start",
4343
~alignItems=#center,
4444
~margin=auto,
4545
(),
@@ -163,12 +163,12 @@ This function accepts all React Native styles below:
163163

164164
Accepts one of the following values:
165165

166-
- `` `flexStart `` (default)
167-
- `` `flexEnd ``
168-
- `` `center ``
169-
- `` `stretch ``
170-
- `` `spaceAround ``
171-
- `` `spaceBetween ``
166+
- `` #"flex-start" `` (default)
167+
- `` #"flex-end" ``
168+
- `` #center ``
169+
- `` #stretch ``
170+
- `` #"space-around" ``
171+
- `` #"space-between" ``
172172

173173
Controls how rows align in the cross direction, overriding the `alignContent` of
174174
the parent.
@@ -180,11 +180,11 @@ the parent.
180180

181181
Accepts one of the following values:
182182

183-
- `` `flexStart ``
184-
- `` `flexEnd ``
185-
- `` `center ``
186-
- `` `stretch `` (default)
187-
- `` `baseline ``
183+
- `` #"flex-start" ``
184+
- `` #"flex-end" ``
185+
- `` #center ``
186+
- `` #stretch `` (default)
187+
- `` #baseline ``
188188

189189
Aligns children in the cross direction. For example, if children are flowing
190190
vertically, `alignItems` controls how they align horizontally.
@@ -196,12 +196,12 @@ vertically, `alignItems` controls how they align horizontally.
196196

197197
Accepts one of the following values:
198198

199-
- `` `auto `` (default)
200-
- `` `flexStart ``
201-
- `` `flexEnd ``
202-
- `` `center ``
203-
- `` `stretch ``
204-
- `` `baseline ``
199+
- `` #auto `` (default)
200+
- `` #"flex-start" ``
201+
- `` #"flex-end" ``
202+
- `` #center ``
203+
- `` #stretch ``
204+
- `` #baseline ``
205205

206206
Controls how a child aligns in the cross direction, overriding the `alignItems`
207207
of the parent.
@@ -241,12 +241,12 @@ Number of logical pixels to offset the bottom edge of this component.
241241

242242
Accepts one of the following values:
243243

244-
- `` `inherit_ `` (default)
245-
- `` `ltr ``
246-
- `` `rtl ``
244+
- `` #inherit `` (default)
245+
- `` #ltr ``
246+
- `` #rtl ``
247247

248248
`direction` specifies the directional flow of the user interface. The default is
249-
`` `inherit_ ``, except for root node which will have value based on the current
249+
`` #inherit ``, except for root node which will have value based on the current
250250
locale.
251251

252252
- [Web reference](https://developer.mozilla.org/en-US/docs/Web/CSS/bottom)
@@ -260,8 +260,8 @@ Only for
260260

261261
Accepts one of the following values:
262262

263-
- `` `flex `` (default)
264-
- `` `none ``
263+
- `` #flex `` (default)
264+
- `` #none ``
265265

266266
Sets the display type of this component. It works similarly to `display` in CSS,
267267
but only supports `flex` and `none`.
@@ -312,10 +312,10 @@ Accepts a `margin`.
312312

313313
Accepts one of the following values:
314314

315-
- `` `row ``
316-
- `` `rowReverse ``
317-
- `` `column `` (default)
318-
- `` `columnReverse ``
315+
- `` #row ``
316+
- `` #"row-reverse" ``
317+
- `` #column `` (default)
318+
- `` #"column-reverse" ``
319319

320320
`flexDirection` controls which directions children of a container go. `row` goes
321321
left to right, `column` goes top to bottom, and you may be able to guess what
@@ -342,8 +342,8 @@ Accepts a `float`.
342342

343343
Accepts one of the following values:
344344

345-
- `` `wrap `` (default)
346-
- `` `nowrap ``
345+
- `` #wrap `` (default)
346+
- `` #nowrap ``
347347

348348
`flexWrap` controls whether children can wrap around after they hit the end of a
349349
flex container.
@@ -364,12 +364,12 @@ sets the height of this component.
364364

365365
Accepts one of the following values:
366366

367-
- `` `flexStart `` (default)
368-
- `` `flexEnd ``
369-
- `` `center ``
370-
- `` `spaceAround ``
371-
- `` `spaceBetween ``
372-
- `` `spaceEvenly ``
367+
- `` #"flex-start" `` (default)
368+
- `` #"flex-end" ``
369+
- `` #center ``
370+
- `` #"space-around" ``
371+
- `` #"space-between" ``
372+
- `` #"space-evenly" ``
373373

374374
`justifyContent` aligns children in the main direction. For example, if children
375375
are flowing vertically, `justifyContent` controls how they align vertically.
@@ -500,12 +500,12 @@ Minimum width for this component, in logical pixels.
500500

501501
Accepts one of the following values:
502502

503-
- `` `visible `` (default)
504-
- `` `hidden ``
505-
- `` `scroll ``
503+
- `` #visible `` (default)
504+
- `` #hidden ``
505+
- `` #scroll ``
506506

507-
`overflow` controls how children are measured and displayed. `` `hidden ``
508-
causes views to be clipped while `` `scroll `` causes views to be measured
507+
`overflow` controls how children are measured and displayed. `` #hidden ``
508+
causes views to be clipped while `` #scroll `` causes views to be measured
509509
independently of their parents main axis.
510510

511511
- [Web reference](https://developer.mozilla.org/en-US/docs/Web/CSS/overflow)
@@ -588,8 +588,8 @@ Setting `paddingVertical` is like setting both of `paddingTop` and
588588

589589
Accepts one of the following values:
590590

591-
- `` `absolute ``
592-
- `` `relative `` (default)
591+
- `` #absolute ``
592+
- `` #relative `` (default)
593593

594594
`position` in React Native is similar to regular CSS, but everything is set to
595595
`relative` by default, so `absolute` positioning is always just relative to the
@@ -815,8 +815,8 @@ style(~transform=[unsafeTransform({"translateZ": "0"})], ())
815815

816816
Accepts one of the following values:
817817

818-
- `` `visible ``
819-
- `` `hidden ``
818+
- `` #visible ``
819+
- `` #hidden ``
820820

821821
- [Web reference](https://developer.mozilla.org/en-US/docs/Web/CSS/backface-visibility)
822822

@@ -936,8 +936,9 @@ When direction is `rtl`, `borderStartWidth` is equivalent to `borderRightWidth`.
936936

937937
Accepts one of the following values:
938938

939-
- `` `solid `` (default)
940-
- `` `dotted ``
939+
- `` #solid `` (default)
940+
- `` #dotted ``
941+
- `` #dashed ``
941942

942943
- [Web reference](https://developer.mozilla.org/en-US/docs/Web/CSS/border-style)
943944

@@ -1032,8 +1033,8 @@ Accepts a `float`.
10321033

10331034
Accepts one of the following values:
10341035

1035-
- `` `normal `` (default)
1036-
- `` `italic ``
1036+
- `` #normal `` (default)
1037+
- `` #italic ``
10371038

10381039
- [Web reference](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style)
10391040

@@ -1083,22 +1084,22 @@ Only accepts logical pixels.
10831084

10841085
Accepts one of the following values:
10851086

1086-
- `` `auto `` (default)
1087-
- `` `left ``
1088-
- `` `right ``
1089-
- `` `center ``
1090-
- `` `justify ``
1087+
- `` #auto `` (default)
1088+
- `` #left ``
1089+
- `` #right ``
1090+
- `` #center ``
1091+
- `` #justify ``
10911092

10921093
- [Web reference](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align)
10931094

10941095
#### `textAlignVertical`
10951096

10961097
Accepts one of the following values:
10971098

1098-
- `` `auto `` (default)
1099-
- `` `top ``
1100-
- `` `bottom ``
1101-
- `` `center ``
1099+
- `` #auto `` (default)
1100+
- `` #top ``
1101+
- `` #bottom ``
1102+
- `` #center ``
11021103

11031104
#### `textDecorationColor`
11041105

@@ -1110,21 +1111,21 @@ Accepts a `Color.t` (`string`).
11101111

11111112
Accepts one of the following values:
11121113

1113-
- `` `none `` (default)
1114-
- `` `underline ``
1115-
- `` `lineThrough ``
1116-
- `` `underlineLineThrough ``
1114+
- `` #none `` (default)
1115+
- `` #underline ``
1116+
- `` #"line-through" ``
1117+
- `` #"underline line-through" ``
11171118

11181119
- [Web reference](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-line)
11191120

11201121
#### `textDecorationStyle`
11211122

11221123
Accepts one of the following values:
11231124

1124-
- `` `solid ``
1125-
- `` `double ``
1126-
- `` `dotted ``
1127-
- `` `dashed ``
1125+
- `` #solid ``
1126+
- `` #double ``
1127+
- `` #dotted ``
1128+
- `` #dashed ``
11281129

11291130
- [Web reference](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-style)
11301131

@@ -1156,32 +1157,32 @@ You can see it as CSS `text-shadow` blur radius.
11561157

11571158
Accepts one of the following values:
11581159

1159-
- `` `none `` (default)
1160-
- `` `uppercase ``
1161-
- `` `lowercase ``
1162-
- `` `capitalize ``
1160+
- `` #none `` (default)
1161+
- `` #uppercase ``
1162+
- `` #lowercase ``
1163+
- `` #capitalize ``
11631164

11641165
- [Web reference](https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform)
11651166

11661167
#### `writingDirection`
11671168

11681169
Accepts one of the following values:
11691170

1170-
- `` `auto `` (default)
1171-
- `` `ltr ``
1172-
- `` `rtl ``
1171+
- `` #auto `` (default)
1172+
- `` #ltr ``
1173+
- `` #rtl ``
11731174

11741175
### Image Style Props
11751176

11761177
#### `resizeMode`
11771178

11781179
Accepts one of the following values:
11791180

1180-
- `` `cover ``
1181-
- `` `contain ``
1182-
- `` `stretch ``
1183-
- `` `repeat ``
1184-
- `` `center ``
1181+
- `` #cover ``
1182+
- `` #contain ``
1183+
- `` #stretch ``
1184+
- `` #repeat ``
1185+
- `` #center ``
11851186

11861187
Similar to CSS `background-size` values
11871188

0 commit comments

Comments
 (0)