Skip to content

Commit 08efde7

Browse files
Renamed header value attribute to id
1 parent c1e570e commit 08efde7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/cursorless-org-docs/src/docs/components/Header.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from "react";
33

44
interface Props {
55
className?: string;
6-
value?: string;
6+
id?: string;
77
title?: string;
88
children: string;
99
}
@@ -26,21 +26,21 @@ export function H5(props: Props) {
2626

2727
function renderHeader(
2828
level: number,
29-
{ className, value, title, children }: Props,
29+
{ className, id, title, children }: Props,
3030
): React.JSX.Element {
3131
const Tag = `h${level}` as keyof React.JSX.IntrinsicElements;
32-
const href = uriEncodeHashId(value ?? children);
32+
const encodedId = uriEncodeHashId(id ?? children);
3333
return (
3434
<Tag
35-
id={href}
35+
id={encodedId}
3636
title={title}
3737
className={
3838
"scope-header anchorWithStickyNavbar_IncK" +
3939
(className ? " " + className : "")
4040
}
4141
>
4242
{children}
43-
<a className="hash-link" href={`#${href}`} />
43+
<a className="hash-link" href={`#${encodedId}`} />
4444
</Tag>
4545
);
4646
}

packages/cursorless-org-docs/src/docs/components/ScopeSupport.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function renderFacet(
185185
if (scopeTypeType != null && previousLanguageId !== facetLanguageId) {
186186
previousLanguageId = facetLanguageId;
187187
return (
188-
<H5 className="language-id" value={`${facet.name}-${facetLanguageId}`}>
188+
<H5 className="language-id" id={`${facet.name}-${facetLanguageId}`}>
189189
{prettifyLanguageName(facetLanguageId)}
190190
</H5>
191191
);

0 commit comments

Comments
 (0)