From 0a6737a0e1c67be5d8e5867440407a6409ff5ec9 Mon Sep 17 00:00:00 2001 From: amathews Date: Mon, 22 Nov 2021 17:29:28 -0500 Subject: [PATCH 1/6] There was a styling bug in the TroubleShooting react component. So after a quick discussion added the missing style class and the ability to customize the header tag in the component. --- .../packages/components/troubleshooting-options.jsx | 9 ++++++--- .../packages/components/troubleshooting-options.spec.jsx | 4 ++-- .../packages/document-capture/components/warning.jsx | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/javascript/packages/components/troubleshooting-options.jsx b/app/javascript/packages/components/troubleshooting-options.jsx index f6ff90c53b1..0d2e1c8fb12 100644 --- a/app/javascript/packages/components/troubleshooting-options.jsx +++ b/app/javascript/packages/components/troubleshooting-options.jsx @@ -11,17 +11,20 @@ import { BlockLink } from '@18f/identity-components'; /** * @typedef TroubleshootingOptionsProps * - * @prop {string} heading + * @prop {string} headingTag + * @prop {string} headingText * @prop {TroubleshootingOption[]} options */ /** * @param {TroubleshootingOptionsProps} props */ -function TroubleshootingOptions({ heading, options }) { +function TroubleshootingOptions({ headingTag = 'h2', headingText, options }) { + const HeadingTag = headingTag; + return (
-

{heading}

+ {headingText}