Skip to content

Commit 1ad5c08

Browse files
committed
address comments
1 parent 875641c commit 1ad5c08

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/lib/sidenav/sidenav.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ represents the added side content.
99

1010
<!-- example(sidenav-overview) -->
1111

12-
There are also drawer components, `<mat-drawer-container>`, `<mat-drawer-content>`, and
13-
`<mat-drawer>`, which are analogous to their sidenav equivalents. Rather than adding side content
14-
to the app as a whole, these are designed to add side content to a small section of your app. They
15-
support almost all of the same features, but do not support fixed positioning.
12+
The drawer component is designed to add side content to a small section of your app. This is
13+
accomplished using the `<mat-drawer-container>`, `<mat-drawer-content>`, and `<mat-drawer>`
14+
components, which are analogous to their sidenav equivalents. Rather than adding side content to the
15+
app as a whole, these are designed to add side content to a small section of your app. They support
16+
almost all of the same features, but do not support fixed positioning.
1617

1718
<!-- example(sidenav-drawer-overview) -->
1819

@@ -25,7 +26,7 @@ of the container.
2526
The side content should be wrapped in a `<mat-sidenav>` element. The `position` property can be used
2627
to specify which end of the main content to place the side content on. `position` can be either
2728
`start` or `end` which places the side content on the left or right respectively in left-to-right
28-
languages. If the `position` is not set, the `start` end will be assumed. A
29+
languages. If the `position` is not set, the default value of `start` will be assumed. A
2930
`<mat-sidenav-container>` can have up to two `<mat-sidenav>` elements total, but only one for any
3031
given side.
3132

@@ -39,13 +40,15 @@ of it.
3940
The following are examples of valid sidenav layouts:
4041

4142
```html
43+
<!-- Creates a layout with a left-positioned sidenav and explicit content. -->
4244
<mat-sidenav-container>
4345
<mat-sidenav>Start</mat-sidenav>
4446
<mat-sidenav-content>Main</mat-sidenav-content>
4547
</mat-sidenav-container>
4648
```
4749

4850
```html
51+
<!-- Creates a layout with a left and right sidenav and implicit content. -->
4952
<mat-sidenav-container>
5053
<mat-sidenav>Start</mat-sidenav>
5154
<mat-sidenav position="end">End</mat-sidenav>
@@ -54,26 +57,30 @@ The following are examples of valid sidenav layouts:
5457
```
5558

5659
```html
60+
<!-- Creates an empty sidenav container with no sidenavs and implicit empty content. -->
5761
<mat-sidenav-container></mat-sidenav-container>
5862
```
5963

6064
And these are examples of invalid sidenav layouts:
6165

6266
```html
67+
<!-- Invalid because there are two `start` position sidenavs. -->
6368
<mat-sidenav-container>
6469
<mat-sidenav>Start</mat-sidenav>
6570
<mat-sidenav position="start">Start 2</mat-sidenav>
6671
</mat-sidenav-container>
6772
```
6873

6974
```html
75+
<!-- Invalid because there are multiple `<mat-sidenav-content>` elements. -->
7076
<mat-sidenav-container>
7177
<mat-sidenav-content>Main</mat-sidenav-content>
7278
<mat-sidenav-content>Main 2</mat-sidenav-content>
7379
</mat-sidenav-container>
7480
```
7581

7682
```html
83+
<!-- Invalid because the `<mat-sidenav>` is outside of the `<mat-sidenav-container>`. -->
7784
<mat-sidenav-container></mat-sidenav-container>
7885
<mat-sidenav></mat-sidenav>
7986
```

0 commit comments

Comments
 (0)