Skip to content

Commit 8fcd7f2

Browse files
authored
ComboBox: fix reset button's height (#38020)
* Fix allowReset x height * Remove knobs * Changelog
1 parent 65b092a commit 8fcd7f2

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

packages/components/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Bug Fix
66

77
- Components: Fix `Slot`/`Fill` Emotion `StyleProvider` ([#38237](https://github.com/WordPress/gutenberg/pull/38237))
8+
- Reduce height and min-width of the reset button on `ComboBoxControl` for consistency. ([#38020](https://github.com/WordPress/gutenberg/pull/38020))
89

910
## 19.3.0 (2022-01-27)
1011

packages/components/src/combobox-control/stories/index.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ const mapCountryOption = ( country ) => ( {
266266

267267
const countryOptions = countries.map( mapCountryOption );
268268

269-
function CountryCodeComboboxControl() {
269+
function CountryCodeComboboxControl( { allowReset } ) {
270270
const [ value, setValue ] = useState( null );
271271

272272
return (
@@ -276,9 +276,13 @@ function CountryCodeComboboxControl() {
276276
onChange={ setValue }
277277
label="Select a country"
278278
options={ countryOptions }
279+
allowReset={ allowReset }
279280
/>
280281
<p>Value: { value }</p>
281282
</>
282283
);
283284
}
284-
export const _default = () => <CountryCodeComboboxControl />;
285+
export const _default = CountryCodeComboboxControl.bind( {} );
286+
_default.args = {
287+
allowReset: false,
288+
};

packages/components/src/combobox-control/style.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ input.components-combobox-control__input[type="text"] {
4040

4141
.components-combobox-control__reset.components-button {
4242
display: flex;
43-
height: $grid-unit-30;
44-
min-width: $grid-unit-30;
43+
height: $grid-unit-20;
44+
min-width: $grid-unit-20;
4545
padding: 0;
4646
}

0 commit comments

Comments
 (0)