Skip to content

Commit

Permalink
fix(MWPW-148801):Added two New sticky header variants. (#2744)
Browse files Browse the repository at this point in the history
* sticky-header variants added

* removed sticky header from all mobile devices

* linting error

* Added new sticky variant

* updated the selector for table buttons
  • Loading branch information
sharath-kannan authored Sep 5, 2024
1 parent 264c998 commit 0d6aadb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions libs/blocks/table/table.css
Original file line number Diff line number Diff line change
Expand Up @@ -705,4 +705,12 @@ header.global-navigation {
flex-direction: column;
align-items: initial;
}

.table :is(.heading-button,.action-area) {
max-width: 100%;
}

.table .action-area .con-button.button-l {
overflow: hidden;
}
}
4 changes: 3 additions & 1 deletion libs/blocks/table/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,9 @@ export default function init(el) {
expandSection = handleSection(sectionParams);
});

const isStickyHeader = el.classList.contains('sticky');
const isStickyHeader = el.classList.contains('sticky')
|| (el.classList.contains('sticky-desktop-up') && defineDeviceByScreenSize() === 'DESKTOP')
|| (el.classList.contains('sticky-tablet-up') && defineDeviceByScreenSize() !== 'MOBILE');

handleHighlight(el);
if (isMerch) formatMerchTable(el);
Expand Down

0 comments on commit 0d6aadb

Please sign in to comment.