From cfdddac43f10d06a8b0e9bcf69dc0ce77ce16649 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 8 Jun 2022 19:06:27 +0200
Subject: fix(settings): avoid cropped tooltip on small devices

I changed the settings disposition to make tooltip positioning easier.
Jest complains about ref passed but everything seems to work as
expected so I'm not sure it is relevant. Maybe a bug with cloneElement.
---
 src/components/molecules/forms/fieldset.tsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'src/components/molecules/forms/fieldset.tsx')

diff --git a/src/components/molecules/forms/fieldset.tsx b/src/components/molecules/forms/fieldset.tsx
index dae3ead..961ec6d 100644
--- a/src/components/molecules/forms/fieldset.tsx
+++ b/src/components/molecules/forms/fieldset.tsx
@@ -16,6 +16,10 @@ export type FieldsetProps = {
    * Set additional classnames to the body wrapper.
    */
   bodyClassName?: string;
+  /**
+   * Set additional classnames to the help button.
+   */
+  buttonClassName?: string;
   /**
    * The fieldset body.
    */
@@ -57,6 +61,7 @@ export type FieldsetProps = {
  */
 const Fieldset: FC<FieldsetProps> = ({
   bodyClassName = '',
+  buttonClassName = '',
   children,
   className = '',
   legend,
@@ -102,7 +107,7 @@ const Fieldset: FC<FieldsetProps> = ({
         <>
           <HelpButton
             aria-pressed={isTooltipOpened}
-            className={`${styles.btn} ${buttonModifier}`}
+            className={`${styles.btn} ${buttonModifier} ${buttonClassName}`}
             onClick={() => setIsTooltipOpened(!isTooltipOpened)}
             ref={buttonRef}
           />
-- 
cgit v1.2.3

