Skip to content

Commit

Permalink
fix: code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin Le Caignec committed Oct 20, 2023
1 parent a8389fa commit 3e8170d
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 66 deletions.
11 changes: 10 additions & 1 deletion packages/react-front-kit-shared/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports[`Breadcrumbs matches snapshot 1`] = `
test
</a>
<div
class="mantine-Text-root mantine-Breadcrumbs-separator mantine-omiwqm"
class="mantine-Text-root mantine-Breadcrumbs-separator mantine-j0vu4g"
>
<svg
fill="none"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`CollapseButton matches snapshot 1`] = `
<div>
<div
aria-expanded="false"
class="mantine-UnstyledButton-root mantine-Button-root mantine-jqjceh"
class="mantine-UnstyledButton-root mantine-Button-root mantine-1eo4e2y"
data-button="true"
data-testid="root"
type="button"
Expand All @@ -25,7 +25,7 @@ exports[`CollapseButton matches snapshot 1`] = `
class="mantine-Button-icon mantine-Button-rightIcon mantine-1ydydo3"
>
<button
class="mantine-UnstyledButton-root mantine-ActionIcon-root mantine-ov71kq"
class="mantine-UnstyledButton-root mantine-ActionIcon-root mantine-gj6ulq"
data-testid="toggle"
type="button"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`DropdownButton matches snapshot 1`] = `
aria-controls=":r0:-dropdown"
aria-expanded="false"
aria-haspopup="menu"
class="mantine-UnstyledButton-root mantine-Button-root mantine-yxv85n"
class="mantine-UnstyledButton-root mantine-Button-root mantine-s27q6v"
data-button="true"
data-testid="button"
id=":r0:-target"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ exports[`Header matches snapshot 1`] = `
class="mantine-1dcfulj"
>
<button
class="mantine-UnstyledButton-root mantine-Button-root mantine-103513z"
class="mantine-UnstyledButton-root mantine-Button-root mantine-1ckwbd"
data-button="true"
data-testid="search"
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ exports[`Header matches snapshot 1`] = `
>
<input
aria-invalid="false"
class="mantine-Input-input mantine-sfetfq"
class="mantine-Input-input mantine-1y2d4pm"
/>
<div
class="mantine-ihurxy mantine-Input-rightSection"
>
<button
aria-label="Clear"
class="mantine-UnstyledButton-root mantine-ActionIcon-root mantine-CloseButton-root mantine-1ub2lfw"
class="mantine-UnstyledButton-root mantine-ActionIcon-root mantine-CloseButton-root mantine-sbtbot"
type="button"
>
<svg
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports[`Pagination matches snapshot 1`] = `
aria-invalid="false"
aria-label="Number of results per page"
autocomplete="off"
class="mantine-Input-input mantine-Select-input mantine-1kaqzie"
class="mantine-Input-input mantine-Select-input mantine-1bcy86t"
data-mantine-stop-propagation="false"
data-testid="pagination-rowsPerPage"
id="mantine-f4bipx4bi"
Expand Down Expand Up @@ -63,33 +63,33 @@ exports[`Pagination matches snapshot 1`] = `
data-testid="pagination-page"
>
<button
class="mantine-UnstyledButton-root mantine-Pagination-control mantine-16h8s0u"
class="mantine-UnstyledButton-root mantine-Pagination-control mantine-n6qhx9"
type="button"
>
1
</button>
<button
aria-current="page"
class="mantine-UnstyledButton-root mantine-Pagination-control mantine-16h8s0u"
class="mantine-UnstyledButton-root mantine-Pagination-control mantine-n6qhx9"
data-active="true"
type="button"
>
2
</button>
<button
class="mantine-UnstyledButton-root mantine-Pagination-control mantine-16h8s0u"
class="mantine-UnstyledButton-root mantine-Pagination-control mantine-n6qhx9"
type="button"
>
3
</button>
<button
class="mantine-UnstyledButton-root mantine-Pagination-control mantine-16h8s0u"
class="mantine-UnstyledButton-root mantine-Pagination-control mantine-n6qhx9"
type="button"
>
4
</button>
<button
class="mantine-UnstyledButton-root mantine-Pagination-control mantine-16h8s0u"
class="mantine-UnstyledButton-root mantine-Pagination-control mantine-n6qhx9"
type="button"
>
5
Expand All @@ -109,7 +109,7 @@ exports[`Pagination matches snapshot 1`] = `
</svg>
</div>
<button
class="mantine-UnstyledButton-root mantine-Pagination-control mantine-16h8s0u"
class="mantine-UnstyledButton-root mantine-Pagination-control mantine-n6qhx9"
type="button"
>
10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exports[`ResponsiveTabs matches snapshot 1`] = `
>
<button
aria-selected="false"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-1d12h3a"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-9ec9of"
role="tab"
tabindex="0"
type="button"
Expand All @@ -26,7 +26,7 @@ exports[`ResponsiveTabs matches snapshot 1`] = `
</button>
<button
aria-selected="false"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-1d12h3a"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-9ec9of"
data-testid="test-tab"
role="tab"
tabindex="0"
Expand All @@ -40,7 +40,7 @@ exports[`ResponsiveTabs matches snapshot 1`] = `
</button>
<button
aria-selected="false"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-1d12h3a"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-9ec9of"
role="tab"
tabindex="0"
type="button"
Expand All @@ -53,7 +53,7 @@ exports[`ResponsiveTabs matches snapshot 1`] = `
</button>
<button
aria-selected="false"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-1d12h3a"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-9ec9of"
role="tab"
tabindex="0"
type="button"
Expand All @@ -66,7 +66,7 @@ exports[`ResponsiveTabs matches snapshot 1`] = `
</button>
<button
aria-selected="false"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-1d12h3a"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-9ec9of"
role="tab"
tabindex="0"
type="button"
Expand All @@ -79,7 +79,7 @@ exports[`ResponsiveTabs matches snapshot 1`] = `
</button>
<button
aria-selected="false"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-1d12h3a"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-9ec9of"
role="tab"
tabindex="0"
type="button"
Expand All @@ -101,7 +101,7 @@ exports[`ResponsiveTabs matches snapshot 1`] = `
aria-expanded="false"
aria-haspopup="menu"
aria-label="Overflow Button"
class="mantine-UnstyledButton-root mantine-ActionIcon-root mantine-1i00min"
class="mantine-UnstyledButton-root mantine-ActionIcon-root mantine-hmmmt0"
id="responsive-tabs-overflow-button-target"
type="button"
>
Expand Down Expand Up @@ -139,7 +139,7 @@ exports[`ResponsiveTabs matches snapshot 1`] = `
>
<button
aria-selected="false"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-1d12h3a"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-9ec9of"
id="responsive-tabs-tab-1"
role="tab"
tabindex="0"
Expand All @@ -153,7 +153,7 @@ exports[`ResponsiveTabs matches snapshot 1`] = `
</button>
<button
aria-selected="false"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-1d12h3a"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-9ec9of"
data-testid="test-tab"
id="responsive-tabs-tab-2"
role="tab"
Expand All @@ -168,7 +168,7 @@ exports[`ResponsiveTabs matches snapshot 1`] = `
</button>
<button
aria-selected="false"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-1d12h3a"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-9ec9of"
id="responsive-tabs-tab-3"
role="tab"
tabindex="0"
Expand All @@ -182,7 +182,7 @@ exports[`ResponsiveTabs matches snapshot 1`] = `
</button>
<button
aria-selected="false"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-1d12h3a"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-9ec9of"
id="responsive-tabs-tab-4"
role="tab"
tabindex="0"
Expand All @@ -196,7 +196,7 @@ exports[`ResponsiveTabs matches snapshot 1`] = `
</button>
<button
aria-selected="false"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-1d12h3a"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-9ec9of"
id="responsive-tabs-tab-5"
role="tab"
tabindex="0"
Expand All @@ -210,7 +210,7 @@ exports[`ResponsiveTabs matches snapshot 1`] = `
</button>
<button
aria-selected="false"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-1d12h3a"
class="mantine-UnstyledButton-root mantine-Tabs-tab mantine-9ec9of"
id="responsive-tabs-tab-6"
role="tab"
tabindex="0"
Expand Down
Loading

0 comments on commit 3e8170d

Please sign in to comment.