From 9ff9e0a6eff4afb6858d0c0143a79032626f9a25 Mon Sep 17 00:00:00 2001 From: Ashley Wright Date: Mon, 21 Sep 2026 15:36:15 -0600 Subject: [PATCH 1/2] fix: the border around the example checkbox --- src/components/ExampleCheckbox.module.css | 24 ++++++++++++++++++ src/components/ExampleCheckbox.tsx | 31 +++++------------------ 2 files changed, 30 insertions(+), 25 deletions(-) create mode 100644 src/components/ExampleCheckbox.module.css diff --git a/src/components/ExampleCheckbox.module.css b/src/components/ExampleCheckbox.module.css new file mode 100644 index 0000000000..557360a2a7 --- /dev/null +++ b/src/components/ExampleCheckbox.module.css @@ -0,0 +1,24 @@ +.container { + position: relative; +} + +.checkbox { + accent-color: var(--mui-palette-text-primary); + margin: var(--spacing-1) var(--spacing-1-point-5) var(--spacing-1) var(--spacing-point-5); + width: 15px; + height: 15px; +} + +.pseudoFocus { + display: inline-block; + /* border-box so host page box-sizing resets can't shift the outline off-center */ + box-sizing: border-box; + /* checkbox 15px + 1px gap + 1px border on each side */ + width: 19px; + height: 19px; + border: 1px solid; + border-radius: 3px; + position: absolute; + top: 6px; + left: 2px; +} diff --git a/src/components/ExampleCheckbox.tsx b/src/components/ExampleCheckbox.tsx index 8bf287841f..e5e181e153 100644 --- a/src/components/ExampleCheckbox.tsx +++ b/src/components/ExampleCheckbox.tsx @@ -1,7 +1,7 @@ import React from 'react' import PropTypes from 'prop-types' -import { useTheme } from '@mui/material' import { TouchIndicator } from 'src/components/TouchIndicator' +import styles from 'src/components/ExampleCheckbox.module.css' export const ExampleCheckbox: React.FC< React.HTMLAttributes & { @@ -9,26 +9,14 @@ export const ExampleCheckbox: React.FC< showTouchIndicator?: boolean } > = ({ id, showTouchIndicator, pseudoFocusColor }) => { - const theme = useTheme() - const checkboxSize = '15px' - return ( -