Skip to content

Commit 7b4e398

Browse files
committed
random accessibility change
1 parent 9456d44 commit 7b4e398

File tree

1 file changed

+45
-44
lines changed

1 file changed

+45
-44
lines changed
Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,52 @@
1-
import React, {type ReactNode} from 'react';
2-
import clsx from 'clsx';
3-
import {ThemeClassNames} from '@docusaurus/theme-common';
4-
import LinkItem from '@theme/Footer/LinkItem';
5-
import type {Props} from '@theme/Footer/Links/MultiColumn';
1+
import React, { type ReactNode } from "react";
2+
import clsx from "clsx";
3+
import { ThemeClassNames } from "@docusaurus/theme-common";
4+
import LinkItem from "@theme/Footer/LinkItem";
5+
import type { Props } from "@theme/Footer/Links/MultiColumn";
66

7-
type ColumnType = Props['columns'][number];
8-
type ColumnItemType = ColumnType['items'][number];
7+
type ColumnType = Props["columns"][number];
8+
type ColumnItemType = ColumnType["items"][number];
99

10-
function ColumnLinkItem({item}: {item: ColumnItemType}) {
11-
return item.html ? (
12-
<li
13-
className={clsx('footer__item', item.className)}
14-
// Developer provided the HTML, so assume it's safe.
15-
// eslint-disable-next-line react/no-danger
16-
dangerouslySetInnerHTML={{__html: item.html}}
17-
/>
18-
) : (
19-
<li key={item.href ?? item.to} className="footer__item">
20-
<LinkItem item={item} />
21-
</li>
22-
);
10+
function ColumnLinkItem({ item }: { item: ColumnItemType }) {
11+
return item.html ? (
12+
<li
13+
className={clsx("footer__item", item.className)}
14+
// Developer provided the HTML, so assume it's safe.
15+
// eslint-disable-next-line react/no-danger
16+
dangerouslySetInnerHTML={{ __html: item.html }}
17+
/>
18+
) : (
19+
<li key={item.href ?? item.to} className="footer__item">
20+
<LinkItem item={item} />
21+
</li>
22+
);
2323
}
2424

25-
function Column({column}: {column: ColumnType}) {
26-
return (
27-
<div
28-
className={clsx(
29-
ThemeClassNames.layout.footer.column,
30-
'col footer__col',
31-
column.className,
32-
)}>
33-
<div className="footer__title">{column.title}</div>
34-
<ul className="footer__items clean-list">
35-
{column.items.map((item, i) => (
36-
<ColumnLinkItem key={i} item={item} />
37-
))}
38-
</ul>
39-
</div>
40-
);
25+
function Column({ column }: { column: ColumnType }) {
26+
return (
27+
<div
28+
className={clsx(
29+
ThemeClassNames.layout.footer.column,
30+
"col footer__col",
31+
column.className
32+
)}
33+
>
34+
<h2 className="footer__title">{column.title}</h2>
35+
<ul className="footer__items clean-list">
36+
{column.items.map((item, i) => (
37+
<ColumnLinkItem key={i} item={item} />
38+
))}
39+
</ul>
40+
</div>
41+
);
4142
}
4243

43-
export default function FooterLinksMultiColumn({columns}: Props): ReactNode {
44-
return (
45-
<div className="row footer__links">
46-
{columns.map((column, i) => (
47-
<Column key={i} column={column} />
48-
))}
49-
</div>
50-
);
44+
export default function FooterLinksMultiColumn({ columns }: Props): ReactNode {
45+
return (
46+
<div className="row footer__links">
47+
{columns.map((column, i) => (
48+
<Column key={i} column={column} />
49+
))}
50+
</div>
51+
);
5152
}

0 commit comments

Comments
 (0)