-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Warn users when trying to delete a container
- Loading branch information
Shivam Gupta
committed
May 8, 2024
1 parent
b9effe1
commit 230e418
Showing
13 changed files
with
361 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
packages/ui/src/providers/__snapshots__/delete-modal.provider.test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`DeleteModalProvider should allow consumers to update the modal title and text 1`] = ` | ||
<div | ||
aria-describedby="pf-modal-part-4" | ||
aria-labelledby="pf-modal-part-3" | ||
aria-modal="true" | ||
class="pf-v5-c-modal-box pf-m-warning pf-m-sm" | ||
data-ouia-component-id="DeleteConfirmModal" | ||
data-ouia-component-type="PF5/ModalContent" | ||
data-ouia-safe="true" | ||
id="pf-modal-part-2" | ||
role="dialog" | ||
> | ||
<div | ||
class="pf-v5-c-modal-box__close" | ||
> | ||
<button | ||
aria-disabled="false" | ||
aria-label="Close" | ||
class="pf-v5-c-button pf-m-plain" | ||
data-ouia-component-id="DeleteConfirmModal-ModalBoxCloseButton" | ||
data-ouia-component-type="PF5/Button" | ||
data-ouia-safe="true" | ||
type="button" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
class="pf-v5-svg" | ||
fill="currentColor" | ||
height="1em" | ||
role="img" | ||
viewBox="0 0 352 512" | ||
width="1em" | ||
> | ||
<path | ||
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z" | ||
/> | ||
</svg> | ||
</button> | ||
</div> | ||
<header | ||
class="pf-v5-c-modal-box__header" | ||
> | ||
<h1 | ||
class="pf-v5-c-modal-box__title pf-m-icon" | ||
id="pf-modal-part-3" | ||
> | ||
<span | ||
class="pf-v5-c-modal-box__title-icon" | ||
> | ||
<svg | ||
aria-hidden="true" | ||
class="pf-v5-svg" | ||
fill="currentColor" | ||
height="1em" | ||
role="img" | ||
viewBox="0 0 576 512" | ||
width="1em" | ||
> | ||
<path | ||
d="M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z" | ||
/> | ||
</svg> | ||
</span> | ||
<span | ||
class="pf-v5-screen-reader" | ||
> | ||
Warning alert: | ||
</span> | ||
<span | ||
class="pf-v5-c-modal-box__title-text" | ||
> | ||
Custom title | ||
</span> | ||
</h1> | ||
</header> | ||
<div | ||
class="pf-v5-c-modal-box__body" | ||
id="pf-modal-part-4" | ||
> | ||
Custom text | ||
</div> | ||
<footer | ||
class="pf-v5-c-modal-box__footer" | ||
> | ||
<button | ||
aria-disabled="false" | ||
class="pf-v5-c-button pf-m-danger" | ||
data-ouia-component-id="OUIA-Generated-Button-danger-3" | ||
data-ouia-component-type="PF5/Button" | ||
data-ouia-safe="true" | ||
type="button" | ||
> | ||
Confirm | ||
</button> | ||
<button | ||
aria-disabled="false" | ||
class="pf-v5-c-button pf-m-link" | ||
data-ouia-component-id="OUIA-Generated-Button-link-3" | ||
data-ouia-component-type="PF5/Button" | ||
data-ouia-safe="true" | ||
type="button" | ||
> | ||
Cancel | ||
</button> | ||
</footer> | ||
</div> | ||
`; |
Oops, something went wrong.