Update Heading#583
Conversation
|
6d3ad00 to
e7b94c6
Compare
e7b94c6 to
cbe53c6
Compare
|
@flacoman91 |
The example I added, |
|
@flacoman91 If we include a story for "Heading with icon" in the way that you have set it up here, does it seem like we are recommend putting an icon next to an Heading 2? Or are we just providing the code needed to do so? The more common headings that are used with icons are smaller heading levels so if we want to show an example can we use an Heading 3 or Heading 4 with icon instead of a Heading 2 with icon? Another option is that we move the table from icons with text and put it in Heading with icon. Then in Icon with text we could leave the documentation paragraph and show a basic example of an icon paired with text. And from that documentation page we could link to "heading with icon." What's your preference? |
|
@natalia-fitzgerald I wanted it in heading to have a code example since the way we do it with a Button or Link component is not the same even though they kind of look the same. In the link / button we say iconLeft or iconRight to have it render an icon on the respective side. In Heading, it's inserted through child elements like I prefer having the documentation on the Heading page for the example on how to use it. I'm ok with moving the Icon w/ text Table over to the Heading section, or give the heading with icon its own section kinda like how we do it for the link with icon or button with icon Headings and Paragraph with icon can have their own with icons sections too. |
This doesn't change any of the underlying code, but it:
This prevents the nag warnings when passing in child elements such as Icons in the heading text
https://cfpb.github.io/design-system-react/pr-previews/pr-583/?path=/docs/components-verified-headings--overview&globals=responsivePreview:all
Breakout of #560