diff --git a/.changeset/wild-rice-arrive.md b/.changeset/wild-rice-arrive.md new file mode 100644 index 0000000000..6ffa5481ac --- /dev/null +++ b/.changeset/wild-rice-arrive.md @@ -0,0 +1,6 @@ +--- +"@navikt/ds-react": patch +"@navikt/ds-css": patch +--- + +HelpText: Knapp er visuelt mindre. Klikkflate er fortsatt 24px diff --git a/@navikt/core/css/help-text.css b/@navikt/core/css/help-text.css index e31a01a408..4ed9d3c826 100644 --- a/@navikt/core/css/help-text.css +++ b/@navikt/core/css/help-text.css @@ -1,6 +1,5 @@ .navds-help-text__button { margin: 0; - padding: 0; border: 0; cursor: pointer; background-color: transparent; @@ -9,17 +8,19 @@ justify-content: center; align-items: center; color: var(--ac-help-text-button-color, var(--a-surface-action)); - font-size: 1.5rem; + font-size: 1.25rem; + padding: calc(var(--a-spacing-1) / 2); } .navds-help-text__button:focus-visible { - box-shadow: 0 0 0 1px var(--a-surface-default), 0 0 0 4px var(--a-border-focus); + outline: none; + box-shadow: 0 0 0 1px var(--a-border-focus), inset 0 0 0 1px var(--a-border-focus); } @supports not selector(:focus-visible) { .navds-help-text__button:focus { outline: none; - box-shadow: 0 0 0 1px var(--a-surface-default), 0 0 0 4px var(--a-border-focus); + box-shadow: 0 0 0 1px var(--a-border-focus), inset 0 0 0 1px var(--a-border-focus); } } diff --git a/@navikt/core/react/src/help-text/HelpText.tsx b/@navikt/core/react/src/help-text/HelpText.tsx index 75d1dda0cc..4e312d441c 100644 --- a/@navikt/core/react/src/help-text/HelpText.tsx +++ b/@navikt/core/react/src/help-text/HelpText.tsx @@ -90,6 +90,7 @@ export const HelpText = forwardRef( anchorEl={buttonRef.current} placement={placement} strategy={strategy} + offset={12} > {children} diff --git a/@navikt/core/react/src/help-text/HelpTextIcon.tsx b/@navikt/core/react/src/help-text/HelpTextIcon.tsx index f9770a614b..75e8035802 100644 --- a/@navikt/core/react/src/help-text/HelpTextIcon.tsx +++ b/@navikt/core/react/src/help-text/HelpTextIcon.tsx @@ -30,7 +30,7 @@ export const HelpTextIcon = ({ cx="12" cy="12" r="11" - strokeWidth="2" + strokeWidth="1.5" stroke="currentColor" fill={filled ? "currentColor" : "transparent"} />