Skip to content

Commit

Permalink
Replace logo slots with usa-link
Browse files Browse the repository at this point in the history
  • Loading branch information
amyleadem committed Aug 12, 2024
1 parent 6a94ffc commit f20b3b8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions src/components/usa-identifier/identifier.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,17 @@ export default {
}) => html`
<usa-identifier lang=${lang || nothing} taxpayer=${taxpayer_show || nothing} label=${aria_label || nothing} >
${primary_agency_logo_show ? html`
<a slot="logo" href="${primary_agency_url}">
<img src="${primary_agency_logo}" alt="${primary_agency_name} logo" />
</a>`: null}
<usa-link name="logo">
<a href="${primary_agency_url}">
<img src="${primary_agency_logo}" alt="${primary_agency_name} logo" />
</a>
</usa-link>`: null}
${secondary_agency_show ? html`
<a slot="logo" href="${secondary_agency_url}">
<img src="${secondary_agency_logo}" alt="${secondary_agency_name} logo" />
</a>`: null}
<usa-link name="logo">
<a href="${secondary_agency_url}">
<img src="${secondary_agency_logo}" alt="${secondary_agency_name} logo" />
</a>
</usa-link>`: null}
<p slot="domain">${domain}</p>
${agency_intro ? html`<span slot="agency-intro">${agency_intro}</span>`: null}
<usa-link name="agency-primary"><a href="${primary_agency_url}">${primary_agency_name}</a></usa-link>
Expand Down
2 changes: 1 addition & 1 deletion src/components/usa-identifier/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class UsaIdentifier extends LitElement {
this.disclaimer = this.querySelector('[slot="disclaimer"]');
this.domain = this.querySelector('[slot="domain"]');
this.includeTaxpayer = this.getAttribute("taxpayer");
this.logos = [...this.querySelectorAll('[slot="logo"]')];
this.logos = [...this.querySelectorAll('[name="logo"] a')];
this.linkAbout = this.querySelector('[name="link-about"] a');
this.linkAccessibility = this.querySelector('[name="link-accessibility"] a');
this.linkFOIA = this.querySelector('[name="link-foia"] a');
Expand Down

0 comments on commit f20b3b8

Please sign in to comment.