diff --git a/CHANGELOG.md b/CHANGELOG.md index a76f222901..207df13c41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## Unreleased +### Added + +- Added `compact` parameter to `MaskedInput` https://github.com/Textualize/textual/pull/5952 + ### Fixed - Fixed issue with the "transparent" CSS value not being transparent when set using python https://github.com/Textualize/textual/pull/5890 diff --git a/src/textual/widgets/_masked_input.py b/src/textual/widgets/_masked_input.py index 47bf61e445..8f4c4931dd 100644 --- a/src/textual/widgets/_masked_input.py +++ b/src/textual/widgets/_masked_input.py @@ -461,8 +461,9 @@ def __init__( classes: str | None = None, disabled: bool = False, tooltip: RenderableType | None = None, + compact: bool = False, ) -> None: - """Initialise the `Input` widget. + """Initialise the `MaskedInput` widget. Args: template: Template string. @@ -478,6 +479,7 @@ def __init__( classes: Optional initial classes for the widget. disabled: Whether the input is disabled or not. tooltip: Optional tooltip. + compact: Enable compact style (without borders). """ self._template: _Template = None super().__init__( @@ -490,6 +492,7 @@ def __init__( id=id, classes=classes, disabled=disabled, + compact=compact, ) self._template = _Template(self, template)