fix(radio-tile): allow standalone RadioTile usage

This commit is contained in:
Eric Liu 2025-03-22 08:47:29 -07:00
commit 8f650ae880
2 changed files with 2 additions and 2 deletions

View file

@ -36,6 +36,7 @@
const { add, update, selectedValue, groupName, groupRequired } = getContext(
"TileGroup",
) ?? {
add: () => {},
groupName: readable(undefined),
groupRequired: readable(undefined),
selectedValue: readable(checked ? value : undefined),

View file

@ -94,8 +94,7 @@ describe("RadioTile", () => {
expect(radioTileLabel).toHaveAttribute("for", "custom-id");
});
// TODO(bug): support standalone radio tile.
it.skip("should handle custom name", () => {
it("should handle custom name", () => {
render(RadioTileSingle);
expect(screen.getByRole("radio")).toHaveAttribute("name", "custom-name");