diff options
Diffstat (limited to 'app/views/shared/ssh_keys')
-rw-r--r-- | app/views/shared/ssh_keys/_key_delete.html.haml | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/app/views/shared/ssh_keys/_key_delete.html.haml b/app/views/shared/ssh_keys/_key_delete.html.haml index f8bb0e21f67..4b89b2a0cbf 100644 --- a/app/views/shared/ssh_keys/_key_delete.html.haml +++ b/app/views/shared/ssh_keys/_key_delete.html.haml @@ -1,9 +1,7 @@ -- title = _('Delete Key') -- aria = { label: title } +- icon = local_assigns[:icon] +- category = local_assigns[:category] || :primary -- if defined?(text) - = button_to text, '#', class: html_class, data: button_data, title: title, aria: aria -- else - = button_to '#', class: html_class, data: button_data, title: title, aria: aria do - %span.sr-only= _('Delete') - = sprite_icon('remove') +.gl-p-2 + = render Pajamas::ButtonComponent.new(variant: :danger, category: category, icon: ('remove' if icon), button_options: { class: 'js-confirm-modal-button', data: button_data }) do + - unless icon + = _('Delete') |