Skip to content

Commit 2fb8625

Browse files
Make dart_style section more like a callout
1 parent 3e76ef4 commit 2fb8625

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

README.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -494,47 +494,47 @@ as shown in the examples above.
494494

495495

496496
## Component Formatting
497-
498-
#### dart_style
499-
Currently, [dart_style (dartfmt)](https://github.com/dart-lang/dart_style) decreases the readability of components
500-
built using [OverReact's fluent-style](#fluent-style-component-consumption).
501-
See https://github.com/dart-lang/dart_style/issues/549 for more info.
502-
503-
We're exploring some different ideas to improve automated formatting, but for the time being, we __do not recommend__ using dart_style with OverReact.
504-
505-
However, if you do choose to use dart_style, you can greatly improve its output by using trailing commas in children argument lists:
506-
507-
* dart_style formatting:
508-
```dart
509-
return (Button()
510-
..id = 'flip'
511-
..skin =
512-
ButtonSkin.vanilla)((Dom.span()
513-
..className = 'flip-container')((Dom.span()..className = 'flipper')(
514-
(Dom.span()
515-
..className =
516-
'front-side')((Icon()..glyph = IconGlyph.CHEVRON_DOUBLE_RIGHT)()),
517-
(Dom.span()
518-
..className =
519-
'back-side')((Icon()..glyph = IconGlyph.CHEVRON_DOUBLE_LEFT)()))));
520-
```
521-
* dart_style formatting, when trailing commas are used:
522-
```dart
523-
return (Button()
524-
..id = 'flip'
525-
..skin = ButtonSkin.vanilla)(
526-
(Dom.span()..className = 'flip-container')(
527-
(Dom.span()..className = 'flipper')(
528-
(Dom.span()..className = 'front-side')(
529-
(Icon()..glyph = IconGlyph.CHEVRON_DOUBLE_RIGHT)(),
530-
),
531-
(Dom.span()..className = 'back-side')(
532-
(Icon()..glyph = IconGlyph.CHEVRON_DOUBLE_LEFT)(),
533-
),
534-
),
535-
),
536-
);
537-
```
497+
> __A note on dart_style:__
498+
>
499+
> Currently, [dart_style (dartfmt)](https://github.com/dart-lang/dart_style) decreases the readability of components
500+
> built using [OverReact's fluent-style](#fluent-style-component-consumption).
501+
> See https://github.com/dart-lang/dart_style/issues/549 for more info.
502+
>
503+
> We're exploring some different ideas to improve automated formatting, but for the time being, we __do not recommend__ using dart_style with OverReact.
504+
>
505+
> However, if you do choose to use dart_style, you can greatly improve its output by using trailing commas in children argument lists:
506+
>
507+
> * dart_style formatting:
508+
> ```dart
509+
> return (Button()
510+
> ..id = 'flip'
511+
> ..skin =
512+
> ButtonSkin.vanilla)((Dom.span()
513+
> ..className = 'flip-container')((Dom.span()..className = 'flipper')(
514+
> (Dom.span()
515+
> ..className =
516+
> 'front-side')((Icon()..glyph = IconGlyph.CHEVRON_DOUBLE_RIGHT)()),
517+
> (Dom.span()
518+
> ..className =
519+
> 'back-side')((Icon()..glyph = IconGlyph.CHEVRON_DOUBLE_LEFT)()))));
520+
> ```
521+
> * dart_style formatting, when trailing commas are used:
522+
> ```dart
523+
> return (Button()
524+
> ..id = 'flip'
525+
> ..skin = ButtonSkin.vanilla)(
526+
> (Dom.span()..className = 'flip-container')(
527+
> (Dom.span()..className = 'flipper')(
528+
> (Dom.span()..className = 'front-side')(
529+
> (Icon()..glyph = IconGlyph.CHEVRON_DOUBLE_RIGHT)(),
530+
> ),
531+
> (Dom.span()..className = 'back-side')(
532+
> (Icon()..glyph = IconGlyph.CHEVRON_DOUBLE_LEFT)(),
533+
> ),
534+
> ),
535+
> ),
536+
> );
537+
> ```
538538

539539
### Guidelines
540540

0 commit comments

Comments
 (0)