Skip to content

Commit

Permalink
fix(modal):removal of repeated classes (#1758)
Browse files Browse the repository at this point in the history
  • Loading branch information
RiyaJethwa committed Feb 27, 2024
1 parent 3c50f9d commit d88c84e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions packages/core/src/components/essentials/modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,30 +80,30 @@ export class Modal extends Component {
const tableArray = this.model.getTabularDataArray()

return `
<div class="cds--modal-container cds--modal-container">
<div class="cds--modal-header cds--modal-header">
<div class="cds--modal-container">
<div class="cds--modal-header">
<p class="cds--modal-header__label cds--type-delta cds--modal-header__label cds--type-delta" id="modal-title">${title}</p>
<p class="cds--modal-header__label cds--type-delta" id="modal-title">${title}</p>
<p class="cds--modal-header__heading cds--type-beta cds--modal-header__heading cds--type-beta" id="${id}__modal-description">${sanitizeText(
<p class="cds--modal-header__heading cds--type-beta" id="${id}__modal-description">${sanitizeText(
options.title
)}</p>
<button class="cds--modal-close cds--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>
<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="cds--modal-close__icon cds--modal-close__icon">
<button class="cds--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>
<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="cds--modal-close__icon">
<path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>
</svg>
</button>
</div>
<div class="cds--modal-content cds--modal-content">
<table class="cds--data-table cds--data-table--no-border cds--data-table cds--data-table--no-border">
<div class="cds--modal-content">
<table class="cds--data-table cds--data-table--no-border">
<thead>
<tr>
${get(tableArray, 0)
.map(
(heading: any) => `<th scope="col">
<div class="cds--table-header-label cds--table-header-label">${sanitizeText(heading)}</div>
<div class="cds--table-header-label">${sanitizeText(heading)}</div>
</th>`
)
.join('')}
Expand All @@ -123,9 +123,9 @@ export class Modal extends Component {
</table>
</div>
<div class="cds--modal-footer cds--modal-footer">
<div class="cds--modal-footer">
<div class="${carbonPrefix}--${chartprefix}-modal-footer-spacer"></div>
<button class="cds--btn cds--btn--primary cds--btn cds--btn--primary" type="button" data-modal-primary-focus>${downloadAsCSV}</button>
<button class="cds--btn cds--btn--primary" type="button" data-modal-primary-focus>${downloadAsCSV}</button>
</div>
</div>`
}
Expand Down

0 comments on commit d88c84e

Please sign in to comment.