From 3e8170dbe1094e193e3ed1ef578c415652e2c51b Mon Sep 17 00:00:00 2001 From: Quentin Le Caignec Date: Fri, 20 Oct 2023 09:35:58 +0200 Subject: [PATCH] fix: code review --- packages/react-front-kit-shared/src/theme.ts | 11 +++- .../__snapshots__/Breadcrumbs.test.tsx.snap | 2 +- .../CollapseButton.test.tsx.snap | 4 +- .../DropdownButton.test.tsx.snap | 2 +- .../Header/__snapshots__/Header.test.tsx.snap | 2 +- .../__snapshots__/HeaderSearch.test.tsx.snap | 4 +- .../__snapshots__/Pagination.test.tsx.snap | 14 ++--- .../ResponsiveTabs.test.tsx.snap | 26 +++++----- .../__snapshots__/SidebarMenu.test.tsx.snap | 52 +++++++++---------- .../FoldableColumnLayout.test.tsx.snap | 4 +- .../Pages/DocumentDetails/DocumentDetails.tsx | 10 ---- 11 files changed, 65 insertions(+), 66 deletions(-) diff --git a/packages/react-front-kit-shared/src/theme.ts b/packages/react-front-kit-shared/src/theme.ts index 389bcef0..f6de92a3 100644 --- a/packages/react-front-kit-shared/src/theme.ts +++ b/packages/react-front-kit-shared/src/theme.ts @@ -2,7 +2,7 @@ import type { MantineThemeOverride } from '@mantine/core'; -import { DEFAULT_THEME } from '@mantine/core'; +import { DEFAULT_THEME, rem } from '@mantine/core'; export const baseTheme: MantineThemeOverride = { activeStyles: { @@ -17,6 +17,15 @@ export const baseTheme: MantineThemeOverride = { }, cursorType: 'pointer', defaultRadius: '1.5rem', + focusRingStyles: { + // Default orange for focus-ring on all elements and Input-based components + inputStyles: (theme) => ({ + outline: `${rem(2)} solid ${theme.colors.orange[5]}`, + }), + styles: (theme) => ({ + outline: `${rem(2)} solid ${theme.colors.orange[5]}`, + }), + }, fontFamily: 'var(--rfk-font, Open Sans)', fontSizes: { lg: '18px', diff --git a/packages/react-front-kit/src/Components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap b/packages/react-front-kit/src/Components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap index 8aad7dc4..2a9bdef0 100644 --- a/packages/react-front-kit/src/Components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +++ b/packages/react-front-kit/src/Components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap @@ -13,7 +13,7 @@ exports[`Breadcrumbs matches snapshot 1`] = ` test