Skip to content

Commit

Permalink
revert js toc class name change
Browse files Browse the repository at this point in the history
  • Loading branch information
rmccar committed Nov 19, 2024
1 parent e4b41cf commit 51aeb8a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ layout: ~

{% block main %}
<div class="ons-page__container ons-container">
<div class="ons-grid ons-js-table-of-contents-container">
<div class="ons-grid ons-js-toc-container">
<div class="ons-grid__col ons-grid__col--sticky@m ons-col-4@m">
{{
onsTableOfContents({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% from "components/table-of-contents/_macro.njk" import onsTableOfContents %}
<div class="ons-page__container ons-container">
<div class="ons-grid ons-js-table-of-contents-container">
<div class="ons-grid ons-js-toc-container">
<div class="ons-grid__col ons-grid__col--sticky@m ons-col-4@m">
{{-
onsTableOfContents({
Expand Down
2 changes: 1 addition & 1 deletion src/components/table-of-contents/table-of-contents.dom.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import domready from '../../js/domready';

async function tableOfContents() {
const tableOfContents = [...document.querySelectorAll('.ons-js-table-of-contents-container')];
const tableOfContents = [...document.querySelectorAll('.ons-js-toc-container')];

if (tableOfContents.length) {
const TableOfContents = (await import('./table-of-contents')).default;
Expand Down
4 changes: 2 additions & 2 deletions src/components/table-of-contents/table-of-contents.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('script: table-of-contents', () => {
/* eslint-disable indent */
`
<div class="ons-page__container ons-container">
<div class="ons-grid ons-js-table-of-contents-container">
<div class="ons-grid ons-js-toc-container">
<div class="ons-grid__col ons-grid__col--sticky@m ons-col-4@m">
${renderComponent('table-of-contents', {
title: 'Contents',
Expand Down Expand Up @@ -71,7 +71,7 @@ describe('script: table-of-contents-fixed-position', () => {
/* eslint-disable indent */
`
<div class="ons-page__container ons-container">
<div class="ons-grid ons-js-table-of-contents-container">
<div class="ons-grid ons-js-toc-container">
<div id="sticky-container" class="ons-grid__col ons-grid__col--sticky@m ons-col-4@m">
${renderComponent('table-of-contents', {
title: 'Contents',
Expand Down

0 comments on commit 51aeb8a

Please sign in to comment.