diff options
author | Samantha Ming <sming@gitlab.com> | 2019-05-21 18:49:59 +0000 |
---|---|---|
committer | Samantha Ming <sming@gitlab.com> | 2019-05-21 18:49:59 +0000 |
commit | 4a50ce19033174955907c324cd5a28c54a4ff47b (patch) | |
tree | 12827f688be2938f1e0988f5012337e407827ef3 | |
parent | d6022e9deac732df62c2907fd43ae8646ffa43f7 (diff) | |
download | gitlab-ce-patch-61.tar.gz |
Update design_patterns.md to include some spacing for better markdown outputpatch-61
-rw-r--r-- | doc/development/fe_guide/design_patterns.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/development/fe_guide/design_patterns.md b/doc/development/fe_guide/design_patterns.md index 0342d16a87c..2f372f783f5 100644 --- a/doc/development/fe_guide/design_patterns.md +++ b/doc/development/fe_guide/design_patterns.md @@ -53,6 +53,7 @@ When writing a class that needs to manipulate the DOM guarantee a container opti This is useful when we need that class to be instantiated more than once in the same page. Bad: + ```javascript class Foo { constructor() { @@ -63,6 +64,7 @@ new Foo(); ``` Good: + ```javascript class Foo { constructor(opts) { @@ -72,6 +74,7 @@ class Foo { new Foo({ container: '.my-element' }); ``` + You can find an example of the above in this [class][container-class-example]; [container-class-example]: https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/assets/javascripts/mini_pipeline_graph_dropdown.js |