Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(root): removed attribute sections if they aren't included #1237

Merged
merged 2 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading