diff --git a/CHANGELOG.md b/CHANGELOG.md index e2649f8..ca6b28e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- padding on `textFieldBootstrapStyle` in order to override MUI padding on `StaticTypeahead`, `AsyncTypeahead`, `ColorPickerInput` and `TelephoneNumberInput`. + ## [3.16.0] - 2026-02-05 ### Added diff --git a/src/lib/helpers/mui.ts b/src/lib/helpers/mui.ts index d0d2715..7be6964 100644 --- a/src/lib/helpers/mui.ts +++ b/src/lib/helpers/mui.ts @@ -10,6 +10,17 @@ const textFieldBootstrapStyle: SxProps = { padding: "0px 12px", borderColor: "#E0E3E7", transition: "border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out", + + // override padding for mui inputs to match bootstrap's default input padding + "& .MuiInputBase-input": { + padding: "0px 12px", + }, + + // override default padding when text-field is wrapped by autocomplete + ".MuiAutocomplete-root &": { + padding: "0px 12px", + }, + "&.Mui-focused": { borderColor: "#80bdff", boxShadow: "0 0 0 0.2rem rgba(0,123,255,.25)", @@ -42,7 +53,7 @@ const textFieldBootstrapStyle: SxProps = { "& fieldset": { border: "none", }, - "& .MuiFormHelperText-root ": { + "& .MuiFormHelperText-root": { marginLeft: "0.2rem", marginTop: "0.3rem", },