Skip to content

Commit

Permalink
fix: Update list style to match SummaryList
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Jun 27, 2024
1 parent ac9c112 commit 1bc4a92
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions editor.planx.uk/src/@planx/components/List/utils.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import React from "react";

import { Field, UserResponse } from "./model";
import { styled } from "@mui/material/styles";

const List = styled("ul")(() => ({
listStylePosition: "inside",
padding: 0,
margin: 0,
}))

/**
* In the case of "question" and "checklist" fields, ensure the displayed value reflects option "text", rather than "val" as recorded in passport
Expand All @@ -21,11 +28,11 @@ export function formatSchemaDisplayValue(
(value as string[]).includes(option.id),
);
return (
<ul>
<List>
{matchingOptions.map((option) => (
<li key={option.id}>{option.data.text}</li>
))}
</ul>
</List>
);
}
case "question": {
Expand Down

0 comments on commit 1bc4a92

Please sign in to comment.