Skip to content

Commit

Permalink
enh: added comments on NcHeaderMenu for NcVue documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Morales <[email protected]>
  • Loading branch information
emoral435 committed Jan 26, 2024
1 parent 7d726b4 commit cc41a21
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions src/components/NcAppNavigationToggle/NcAppNavigationToggle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ import { t } from '../../l10n.js'
import MenuIcon from 'vue-material-design-icons/Menu.vue'
import MenuOpenIcon from 'vue-material-design-icons/MenuOpen.vue'

/**
* The NcAppNavigationToggle component is used typically alongside another header navigation component.
* It emits the status of whether the button has been clicked or not.
*
*/
export default {
name: 'NcAppNavigationToggle',

Expand All @@ -55,6 +60,11 @@ export default {
},

props: {
/**
* Tracks whether the toggle has been clicked or not.
* If it has been clicked, switches between the different MenuIcons
* and emits a boolean indicating its opened status
*/
open: {
type: Boolean,
required: true,
Expand All @@ -69,6 +79,10 @@ export default {
},
},
methods: {
/**
* Once the toggle has been clicked, emits the toggle status
* so parent components can gauge the status of the navigation button
*/
toggleNavigation() {
this.$emit('update:open', !this.open)
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/NcHeaderMenu/NcHeaderMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,8 @@ $externalMargin: 8px;
width: var(--header-height);
height: var(--header-height);

#{&}__trigger {
width: var(--header-height) !important;
&__trigger {
width: var(--header-height);
height: var(--header-height);
opacity: .85;

Expand Down

0 comments on commit cc41a21

Please sign in to comment.