Skip to content

Commit

Permalink
Merge pull request #1237 from mi6/remove-missing-attributes
Browse files Browse the repository at this point in the history
fix(root): removed attribute sections if they aren't included
  • Loading branch information
GCHQ-Developer-741 authored Dec 4, 2024
2 parents 7e98694 + 7e19b41 commit 327fb20
Show file tree
Hide file tree
Showing 5 changed files with 843 additions and 832 deletions.
17 changes: 11 additions & 6 deletions src/components/ComponentDetails/AttributeName/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ const AttributeName: React.FC<{
value: (string | undefined)[];
}> = ({ name, value }) => (
<div className="attribute-name">
{name.map((attributeName, i) => (
<div key={`attribute-${attributeName.toLowerCase().split(" ")[0]}`}>
<ic-typography variant="subtitle-small">{attributeName}</ic-typography>
<ic-typography variant="subtitle-large">{value[i]}</ic-typography>
</div>
))}
{name.map(
(attributeName, i) =>
value[i] && (
<div key={`attribute-${attributeName.toLowerCase().split(" ")[0]}`}>
<ic-typography variant="subtitle-small">
{attributeName}
</ic-typography>
<ic-typography variant="subtitle-large">{value[i]}</ic-typography>
</div>
)
)}
</div>
);

Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ const Layout: React.FC<LayoutProps> = ({
{footerLink.text}
</ic-footer-link>
))}
<div slot="logo" className="logo-wrapper">
<div slot="logo" className="logo-wrapper" role="list">
<ic-footer-link href="https://sis.gov.uk">
<SISLogo aria-hidden="true" />
<span className="link-text">Go to S.I.S. website</span>
Expand Down
5 changes: 3 additions & 2 deletions src/content/structured/components/footer/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export const snippetsLogoLinks = [
<ic-footer-link slot="link" href="#">Styles</ic-footer-link>
<ic-footer-link slot="link" href="#">Components</ic-footer-link>
<ic-footer-link slot="link" href="#">Patterns</ic-footer-link>
<div slot="logo">
<div slot="logo" role="list">
<ic-footer-link href="#">
<svg xmlns="http://www.w3.org/2000/svg"
height="48"
Expand Down Expand Up @@ -267,7 +267,7 @@ export const snippetsLogoLinks = [
<IcFooterLink slot="link" href="#">Styles</IcFooterLink>
<IcFooterLink slot="link" href="#">Components</IcFooterLink>
<IcFooterLink slot="link" href="#">Patterns</IcFooterLink>
<div slot="logo">
<div slot="logo" role="list">
<IcFooterLink href="#">
<SlottedSVG
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -332,6 +332,7 @@ export const snippetsLogoLinks = [
display: "flex",
gap: "var(--ic-space-lg)",
}}
role="list"
>
<IcFooterLink href="#">
<svg
Expand Down
7 changes: 6 additions & 1 deletion src/content/structured/components/popover-menu/guidance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ export const IntroPopover = () => {
<path d="M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0zm0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z" />
</svg>
</IcButton>
<IcPopoverMenu anchor="button-1" aria-label="popover" open={popoverOpen} onIcPopoverClosed={handlePopoverClosed}>
<IcPopoverMenu
anchor="button-1"
aria-label="popover"
open={popoverOpen}
onIcPopoverClosed={handlePopoverClosed}
>
<IcMenuItem label="Copy code" />
<IcMenuItem label="Paste code" />
<IcMenuItem label="Actions" submenuTriggerFor="actions" />
Expand Down
Loading

0 comments on commit 327fb20

Please sign in to comment.