Skip to content

Commit

Permalink
fix(TU-8855): Build respectOpenModals from HTML attributes (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathio committed Feb 23, 2024
1 parent 1509ad6 commit 1105b36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ describe('build-options-from-attributes', () => {
data-tf-no-heading
data-tf-iframe-props="title=foo"
data-tf-button-props="aria-label=bar"
data-tf-preselect="foo=bar"
data-tf-respect-open-modals="all"
></div>`

it('should load correct options', () => {
Expand Down Expand Up @@ -84,6 +86,10 @@ describe('build-options-from-attributes', () => {
buttonProps: {
'aria-label': 'bar',
},
preselect: {
foo: 'bar',
},
respectOpenModals: 'all',
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ export const buildOptionsFromAttributes = (element: HTMLElement) => {
fullScreen: 'boolean',
noHeading: 'boolean',
preselect: 'record',
respectOpenModals: 'string',
})
}

0 comments on commit 1105b36

Please sign in to comment.