Skip to content

Commit

Permalink
Adds documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
MinThaMie committed Jul 27, 2023
1 parent d32a300 commit 63702c6
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 4 deletions.
8 changes: 8 additions & 0 deletions addon/styles/components/es-sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
display: none;
}

.es-sidebar--border-right {
border-right: 2px solid var(--color-gray-300);
}

@media (max-width: 844px) {
.es-sidebar-toggle {
position: fixed;
Expand Down Expand Up @@ -83,4 +87,8 @@
.es-sidebar-close svg path {
fill: currentColor;
}

.es-sidebar--border-right {
border-right: none;
}
}
4 changes: 0 additions & 4 deletions addon/styles/sidebar-container.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
padding: 0;
}

.es-sidebar--border-right {
border-right: 2px solid var(--color-gray-300);
}

@media (max-width: 844px) {
.sidebar-container {
display: block;
Expand Down
39 changes: 39 additions & 0 deletions docs/components/sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,42 @@ The sidebar component will automatically switch to the mobile mode once your bro
</EsSidebar>
</div>
```


### Full Width Left Sidebar Example
```handlebars
<div class="sidebar-container sidebar-container--full-width">
<EsSidebar>
My Left Sidebar Content
</EsSidebar>
<div class="example-content">
My Content
</div>
</div>
```

### Full Width Right Sidebar Example
```handlebars
<div class="sidebar-container sidebar-container--full-width">
<div class="example-content">
My Content
</div>
<EsSidebar>
My Right Sidebar Content
</EsSidebar>
</div>
```

### Sidebar Right Border
There is a class, `es-sidebar--border-right`, that you can add to your sidebar to give it a right border. This will not show up in mobile.
```handlebars
<div class="sidebar-container">
<EsSidebar class="es-sidebar--border-right">
My Left Sidebar Content
</EsSidebar>
<div class="example-content">
My Content
</div>
</div>
```

0 comments on commit 63702c6

Please sign in to comment.