Skip to content

Commit

Permalink
chore(PPDSC-2369): add extra description
Browse files Browse the repository at this point in the history
  • Loading branch information
Stoyan Delev committed Aug 24, 2022
1 parent b6a7d8b commit f52b459
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions site/components/unpack-content/unpack-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ const fragmentToOutput = (
UnpackComponent checks its children and wraps text, text-based components and text-based html tags inside a TextBlock.
Also, sibling texts are wrapped in single TextBlock
Why we need this:
We have few cases, like `description` prop in `ContentBase` component,
which initially thought is going to be used with text only but later we start adding other content as InlineMessage and UnorderedList.
Adding non text based content leads to having non semantic HTML and validateDOMNesting errors
since `description` prop uses TextBlock which is html Paragraphs and it can't contain div ( InlineMessage ) or ul ( UnorderedList ) elements.
Example:
The transformation looks like this:
<>
Text
Expand Down

0 comments on commit f52b459

Please sign in to comment.