Skip to content

Commit

Permalink
added hideForMobile to drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbitronics committed Aug 5, 2021
1 parent a186324 commit 33b2c75
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [2.6.0](https://github.com/silinternational/ui-components/releases/tag/v2.6.0) - 2021-08-04
### Added
- optional border-white class in Drawer
- hideForMobile prop and optional border-white class in Drawer
- another slot to TopAppBar
- main-drawer-content id and actions slot to Drawer

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Dialog [
Dialog.Alert (open, title, defaultAction), Dialog.Simple(open, title)
]

Drawer (title, subtitle, menuItems, toggle, modal, dismissible, hasTopAppBar, isFullHeightMenu)
Drawer (title, subtitle, menuItems, toggle, modal, dismissible, hasTopAppBar, isFullHeightMenu, hideForMobile)

Fab (icon, label, url)

Expand Down
3 changes: 2 additions & 1 deletion components/mdc/Drawer/Drawer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export let modal = false
export let dismissible = false
export let toggle = false
export let isFullHeightMenu = true
export let hideForMobile = true
let mdcDrawer = {}
let element = {}
Expand All @@ -40,7 +41,7 @@ $beforeUrlChange(({ url }) => {
})
const showAppropriateDrawer = () => {
isDesktop() && !dismissible ? showStandardDrawer() : showModalDrawer()
isDesktop() && !dismissible ? showStandardDrawer() : hideForMobile && showModalDrawer()
}
const showModalDrawer = () => modal = true
const showStandardDrawer = () => modal = false
Expand Down

0 comments on commit 33b2c75

Please sign in to comment.