-
Notifications
You must be signed in to change notification settings - Fork 7
refactor(components): DLT-3284 refactor props to not have native html attributes names #1204
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,25 +9,25 @@ | |
| class="d-banner__dialog" | ||
| :class="dialogClass" | ||
| :role="role" | ||
| :aria-labelledby="titleId" | ||
| :aria-labelledby="headerId" | ||
| :aria-describedby="contentId" | ||
| > | ||
| <dt-notice-icon | ||
| v-if="showIcon" | ||
| :kind="kind" | ||
| :class="{ 'd-notice__icon--has-title': title || $slots.title }" | ||
| :class="{ 'd-notice__icon--has-title': headerText || $slots.header }" | ||
| > | ||
| <!-- @slot Slot for custom icon --> | ||
| <slot name="icon" /> | ||
| </dt-notice-icon> | ||
| <dt-notice-content | ||
| :title-id="titleId" | ||
| :header-id="headerId" | ||
| :content-id="contentId" | ||
| :title="title" | ||
| :header-text="headerText" | ||
| > | ||
| <template #title> | ||
| <!-- @slot Slot for the title --> | ||
| <slot name="title" /> | ||
| <template #header> | ||
| <!-- @slot Slot for the header --> | ||
| <slot name="header" /> | ||
| </template> | ||
|
Comment on lines
+24
to
31
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a Lines 24β31 and 74β92 rename public props/slot ( As per coding guidelines, βThis is a public npm design system library β¦ Flag any prop/event/slot removal or rename without BREAKING CHANGE footer.β Also applies to: 74-92 π€ Prompt for AI Agents |
||
| <!-- @slot the main textual content of the banner --> | ||
| <slot /> | ||
|
|
@@ -68,10 +68,10 @@ export default { | |
|
|
||
| props: { | ||
| /** | ||
| * Sets an ID on the title element of the component. Useful for aria-describedby | ||
| * or aria-labelledby or any other reason you may need an id to refer to the title. | ||
| * Sets an ID on the header element of the component. Useful for aria-describedby | ||
| * or aria-labelledby or any other reason you may need an id to refer to the header. | ||
| */ | ||
| titleId: { | ||
| headerId: { | ||
| type: String, | ||
| default () { return utils.getUniqueString(); }, | ||
| }, | ||
|
|
@@ -86,9 +86,9 @@ export default { | |
| }, | ||
|
|
||
| /** | ||
| * Title header of the notice. This can be left blank to remove the title from the notice entirely. | ||
| * Header text of the banner. This can be left blank to remove the header from the banner entirely. | ||
| */ | ||
| title: { | ||
| headerText: { | ||
| type: String, | ||
| default: '', | ||
| }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,17 +21,17 @@ | |
| @keydown="onKeydown" | ||
| > | ||
| <div | ||
| v-if="open && (hasSlotContent($slots.banner) || bannerTitle)" | ||
| v-if="open && (hasSlotContent($slots.banner) || bannerHeaderText)" | ||
| data-qa="dt-modal-banner" | ||
| :class="[ | ||
| 'd-modal__banner', | ||
| bannerClass, | ||
| bannerKindClass, | ||
| ]" | ||
| > | ||
| <!-- @slot Slot for the banner, defaults to bannerTitle prop --> | ||
| <!-- @slot Slot for the banner, defaults to bannerHeaderText prop --> | ||
| <slot name="banner"> | ||
| {{ bannerTitle }} | ||
| {{ bannerHeaderText }} | ||
| </slot> | ||
| </div> | ||
| <transition | ||
|
|
@@ -54,7 +54,7 @@ | |
| class="d-modal__header" | ||
| data-qa="dt-modal-title" | ||
| > | ||
| <!-- @slot Slot for dialog header section, taking the place of any "title" text prop --> | ||
| <!-- @slot Slot for dialog header section, taking the place of any "headerText" text prop --> | ||
| <slot name="header" /> | ||
| </div> | ||
| <dt-text | ||
|
|
@@ -69,7 +69,7 @@ | |
| class="d-modal__header" | ||
| data-qa="dt-modal-title" | ||
| > | ||
| {{ title }} | ||
| {{ headerText }} | ||
| </dt-text> | ||
| <div | ||
| v-if="hasSlotContent($slots.default)" | ||
|
|
@@ -201,17 +201,17 @@ export default { | |
| }, | ||
|
|
||
| /** | ||
| * Title text to display in the modal header. | ||
| * Header text to display in the modal header. | ||
| */ | ||
| title: { | ||
| headerText: { | ||
| type: String, | ||
| default: '', | ||
| }, | ||
|
|
||
| /** | ||
| * Title text to display in the modal banner. | ||
| * Header text to display in the modal banner. | ||
| */ | ||
| bannerTitle: { | ||
| bannerHeaderText: { | ||
| type: String, | ||
| default: '', | ||
| }, | ||
|
Comment on lines
+204
to
217
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mark this API rename with a Line 204 and Line 214 rename public modal props ( As per coding guidelines, π€ Prompt for AI Agents |
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.