Skip to content

Commit

Permalink
fix: React errors on content component (#2350)
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr authored Oct 27, 2023
1 parent 3d0366f commit f064283
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions editor.planx.uk/src/@planx/components/Content/Public.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type Props = PublicProps<Content>;

const Content = styled(Box, {
shouldForwardProp: (prop) => prop !== "color",
})<Props>(({ theme, color }) => ({
})<{ color?: string }>(({ theme, color }) => ({
padding: theme.spacing(2),
backgroundColor: color,
color:
Expand All @@ -28,7 +28,7 @@ const Content = styled(Box, {
const ContentComponent: React.FC<Props> = (props) => {
return (
<Card handleSubmit={props.handleSubmit} isValid>
<Content {...props} data-testid="content">
<Content color={props.color} data-testid="content">
<ReactMarkdownOrHtml
source={props.content}
openLinksOnNewTab
Expand Down

0 comments on commit f064283

Please sign in to comment.