Skip to content

Commit

Permalink
fix(toc): tweak media query for sidebar at lg
Browse files Browse the repository at this point in the history
  • Loading branch information
m4olivei committed Nov 29, 2024
1 parent f82fdea commit 3de72b1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function findLastIndex<T>(
@customElement(`${c4dPrefix}-table-of-contents`)
class C4DTableOfContents extends MediaQueryMixin(
HostListenerMixin(StableSelectorMixin(LitElement)),
{ [MQBreakpoints.LG]: MQDirs.MAX }
{ [MQBreakpoints.LG]: MQDirs.MIN }
) {
/**
* Defines TOC type, "" for default, `horizontal` for horizontal variant.
Expand Down Expand Up @@ -157,7 +157,7 @@ class C4DTableOfContents extends MediaQueryMixin(
* Whether we're viewing smaller or larger window.
*/
@state()
_isMobile = this.carbonBreakpoints.lg.matches;
_isMobile = !this.carbonBreakpoints.lg.matches;

/**
* The target elements matching `[name]` harvested from the document.
Expand Down Expand Up @@ -625,8 +625,8 @@ class C4DTableOfContents extends MediaQueryMixin(
}
}

mediaQueryCallbackMaxLG() {
this._isMobile = this.carbonBreakpoints.lg.matches;
mediaQueryCallbackLG() {
this._isMobile = !this.carbonBreakpoints.lg.matches;
}

/**
Expand Down

0 comments on commit 3de72b1

Please sign in to comment.