Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(modal):removal of repeated classes from modal #1758

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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