Skip to content

Commit 8f92058

Browse files
Fix TextField bootstrap style (#162)
Fix TextField bootstrap style in order to proper override MUI default padding
1 parent a10c1ef commit 8f92058

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- padding on `textFieldBootstrapStyle` in order to override MUI padding on `StaticTypeahead`, `AsyncTypeahead`, `ColorPickerInput` and `TelephoneNumberInput`.
13+
1014
## [3.16.0] - 2026-02-05
1115

1216
### Added

src/lib/helpers/mui.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,17 @@ const textFieldBootstrapStyle: SxProps = {
1010
padding: "0px 12px",
1111
borderColor: "#E0E3E7",
1212
transition: "border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out",
13+
14+
// override padding for mui inputs to match bootstrap's default input padding
15+
"& .MuiInputBase-input": {
16+
padding: "0px 12px",
17+
},
18+
19+
// override default padding when text-field is wrapped by autocomplete
20+
".MuiAutocomplete-root &": {
21+
padding: "0px 12px",
22+
},
23+
1324
"&.Mui-focused": {
1425
borderColor: "#80bdff",
1526
boxShadow: "0 0 0 0.2rem rgba(0,123,255,.25)",
@@ -42,7 +53,7 @@ const textFieldBootstrapStyle: SxProps = {
4253
"& fieldset": {
4354
border: "none",
4455
},
45-
"& .MuiFormHelperText-root ": {
56+
"& .MuiFormHelperText-root": {
4657
marginLeft: "0.2rem",
4758
marginTop: "0.3rem",
4859
},

0 commit comments

Comments
 (0)