diff --git a/dpc-portal/app/components/core/card/basic_component.html.erb b/dpc-portal/app/components/core/card/basic_component.html.erb index f674194a1..0f3512bad 100644 --- a/dpc-portal/app/components/core/card/basic_component.html.erb +++ b/dpc-portal/app/components/core/card/basic_component.html.erb @@ -6,7 +6,7 @@
<% if @button_params %> - <%= link_to @button_params[:name], @button_params[:path], class: 'usa-button' %> + <%= link_to @button_params[:name], @button_params[:path], class: @button_params[:class] %> <% end %>
diff --git a/dpc-portal/app/components/core/card/basic_component.rb b/dpc-portal/app/components/core/card/basic_component.rb index 1de518d08..ea917a4b2 100644 --- a/dpc-portal/app/components/core/card/basic_component.rb +++ b/dpc-portal/app/components/core/card/basic_component.rb @@ -9,7 +9,9 @@ class BasicComponent < ViewComponent::Base def initialize(text_content: '

Welcome

', button_params: nil) super @text_content = text_content - @button_params = button_params + @button_params = button_params&.merge({ + class: ['usa-button', button_params[:class]].join(' ').strip + }) end end end diff --git a/dpc-portal/app/components/page/credential_delegate/list_component.html.erb b/dpc-portal/app/components/page/credential_delegate/list_component.html.erb index c46c724ae..a29905ae9 100644 --- a/dpc-portal/app/components/page/credential_delegate/list_component.html.erb +++ b/dpc-portal/app/components/page/credential_delegate/list_component.html.erb @@ -15,7 +15,7 @@ <% end %> <%= render(Core::Card::BasicComponent.new(text_content: '

Invites

', - button_params: { name: 'Invite CD', path: new_organization_credential_delegate_invitation_path(@organization.path_id), method: :get} )) do %> + button_params: { name: 'Invite CD', path: new_organization_credential_delegate_invitation_path(@organization.path_id), class: 'margin-0'} )) do %>

You can invite users to be Credential Delegates.

Pending invites

diff --git a/dpc-portal/app/components/page/organization/credentials_component.html.erb b/dpc-portal/app/components/page/organization/credentials_component.html.erb index 770cdb010..cf13fdb5c 100644 --- a/dpc-portal/app/components/page/organization/credentials_component.html.erb +++ b/dpc-portal/app/components/page/organization/credentials_component.html.erb @@ -1,6 +1,6 @@
<%= render(Core::Card::BasicComponent.new(text_content: '

Client tokens

', - button_params: { name: 'Generate token', path: new_organization_client_token_path(@organization.path_id)} )) do %> + button_params: { name: 'Generate token', path: new_organization_client_token_path(@organization.path_id), class: 'margin-0' } )) do %>

Client tokens monitor who's accessing the API with your organization credentials.

<% if @organization.client_tokens.present? %> @@ -17,7 +17,7 @@
<% end %> <%= render(Core::Card::BasicComponent.new(text_content: '

Public keys

', - button_params: { name: 'Add key', path: new_organization_public_key_path(@organization.path_id) } )) do %> + button_params: { name: 'Add key', path: new_organization_public_key_path(@organization.path_id), class: 'margin-0' } )) do %>

Public keys verify that client token requests come from an authorized application.

<% if @organization.public_keys.present? %> @@ -35,7 +35,7 @@ <% end %> <%= render(Core::Card::BasicComponent.new(text_content: '

Public IP addresses

', - button_params: { name: 'Add IP', path: new_organization_ip_address_path(@organization.path_id)} )) do %> + button_params: { name: 'Add IP', path: new_organization_ip_address_path(@organization.path_id), class: 'margin-0'} )) do %>

Provide a maximum of 8 public IP addresses associated with systems that will access claims data.

<% if @organization.public_ips.present? %> diff --git a/dpc-portal/spec/components/page/credential_delegate/list_component_spec.rb b/dpc-portal/spec/components/page/credential_delegate/list_component_spec.rb index 06a1affe0..13959828b 100644 --- a/dpc-portal/spec/components/page/credential_delegate/list_component_spec.rb +++ b/dpc-portal/spec/components/page/credential_delegate/list_component_spec.rb @@ -48,7 +48,7 @@

Invites

You can invite users to be Credential Delegates.

diff --git a/dpc-portal/spec/components/page/organization/credentials_componenent_spec.rb b/dpc-portal/spec/components/page/organization/credentials_componenent_spec.rb index 5bf0b8a32..3a2cc0a45 100644 --- a/dpc-portal/spec/components/page/organization/credentials_componenent_spec.rb +++ b/dpc-portal/spec/components/page/organization/credentials_componenent_spec.rb @@ -20,19 +20,19 @@ let(:org) { ComponentSupport::MockOrg.new(0) } it 'Should have Generate token button' do button = <<~BUTTON - Generate token + Generate token BUTTON is_expected.to include(normalize_space(button)) end it 'Should have Create key button' do button = <<~BUTTON - Add key + Add key BUTTON is_expected.to include(normalize_space(button)) end it 'Should have Add IP button' do button = <<~BUTTON - Add IP + Add IP BUTTON is_expected.to include(normalize_space(button)) end