Skip to content

Commit

Permalink
refactor: 💡 Replace Rose::Dialog with Hds::Modal
Browse files Browse the repository at this point in the history
✅ Closes: ICU-15647
  • Loading branch information
laurenolivia committed Dec 11, 2024
1 parent 2b59808 commit 6511a8a
Showing 1 changed file with 36 additions and 29 deletions.
65 changes: 36 additions & 29 deletions ui/admin/app/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -132,33 +132,40 @@
{{/if}}

<PendingConfirmations as |confirmation accept deny|>
<Rose::Dialog
@heading={{if
confirmation.options.title
(t confirmation.options.title)
(t 'actions.confirm')
}}
@dismissButtonText={{t 'actions.cancel'}}
@icon='flight-icons/svg/alert-triangle-16'
@style='warning'
@modal={{true}}
@dismiss={{deny}}
as |dialog|
>
<dialog.body>
<p>{{confirmation.text}}</p>
</dialog.body>
<dialog.footer>
<Rose::Button @style='primary' {{on 'click' accept}}>
{{if
confirmation.options.confirm
(t confirmation.options.confirm)
(t 'actions.ok')
}}
</Rose::Button>
<Rose::Button @style='secondary' {{on 'click' deny}}>
{{t 'actions.cancel'}}
</Rose::Button>
</dialog.footer>
</Rose::Dialog>
<Hds::Modal @color='warning' as |M|>
<M.Header
@dismissButtonText={{t 'actions.cancel'}}
@modal={{true}}
@dismiss={{deny}}
>
{{if
confirmation.options.title
(t confirmation.options.title)
(t 'actions.confirm')
}}
</M.Header>
<M.Body>
<Hds::Text::Body @tag='p'>
{{confirmation.text}}
</Hds::Text::Body>
</M.Body>
<M.Footer>
<Hds::ButtonSet {{style width='15rem'}}>
<Hds::Button
@text={{if
confirmation.options.confirm
(t confirmation.options.confirm)
(t 'actions.ok')
}}
@color='primary'
{{on 'click' accept}}
/>
<Hds::Button
@text={{t 'actions.cancel'}}
@color='secondary'
{{on 'click' deny}}
/>
</Hds::ButtonSet>
</M.Footer>
</Hds::Modal>
</PendingConfirmations>

0 comments on commit 6511a8a

Please sign in to comment.