implements Widget {
];
return (
- // TODO(WB-1812, somewhatabstract): Migrate to Id or useId
- // eslint-disable-next-line no-restricted-syntax
-
- {(ids) => (
+
+ {(contentId) => (
<>
implements Widget {
>
)}
-
+
);
}
}
diff --git a/packages/perseus/src/widgets/label-image/answer-pill.tsx b/packages/perseus/src/widgets/label-image/answer-pill.tsx
index 1d6ce2ccf7..0fcde84664 100644
--- a/packages/perseus/src/widgets/label-image/answer-pill.tsx
+++ b/packages/perseus/src/widgets/label-image/answer-pill.tsx
@@ -1,8 +1,8 @@
-import {useUniqueIdWithMock} from "@khanacademy/wonder-blocks-core";
import Pill from "@khanacademy/wonder-blocks-pill";
import {color} from "@khanacademy/wonder-blocks-tokens";
import {StyleSheet, type CSSProperties} from "aphrodite";
import * as React from "react";
+import {useId} from "react";
import {Popper} from "react-popper";
import {usePerseusI18n} from "../../components/i18n-context";
@@ -34,9 +34,7 @@ export const AnswerPill = (props: {
hovered,
} = props;
- // TODO(WB-1812, somewhatabstract): Migrate to Id or useId
- // eslint-disable-next-line no-restricted-syntax
- const idFactory = useUniqueIdWithMock();
+ const pillId = useId();
const {strings} = usePerseusI18n();
const answerString =
@@ -66,7 +64,7 @@ export const AnswerPill = (props: {
["onChange"];
}) => {
- // TODO(WB-1812, somewhatabstract): Migrate to Id or useId
- // eslint-disable-next-line no-restricted-syntax
- const idFactory = useUniqueIdWithMock();
- const switchId = idFactory.get("hide-answers-toggle");
- const labelId = idFactory.get("hide-answers-label");
+ const switchId = useId();
+ const labelId = useId();
const {strings} = usePerseusI18n();
return (