Skip to content

Commit 176ce63

Browse files
authored
Merge pull request #5952 from ddkasa/add-masked-input-compact-param
Add `MaskedInput` `compact` Parameter
2 parents 2d32ff3 + b34a38b commit 176ce63

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88

99
## Unreleased
1010

11+
### Added
12+
13+
- Added `compact` parameter to `MaskedInput` https://github.com/Textualize/textual/pull/5952
14+
1115
### Fixed
1216

1317
- Fixed `query_one` and `query_exactly_one` not raising documented `WrongType` exception.

src/textual/widgets/_masked_input.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,9 @@ def __init__(
461461
classes: str | None = None,
462462
disabled: bool = False,
463463
tooltip: RenderableType | None = None,
464+
compact: bool = False,
464465
) -> None:
465-
"""Initialise the `Input` widget.
466+
"""Initialise the `MaskedInput` widget.
466467
467468
Args:
468469
template: Template string.
@@ -478,6 +479,7 @@ def __init__(
478479
classes: Optional initial classes for the widget.
479480
disabled: Whether the input is disabled or not.
480481
tooltip: Optional tooltip.
482+
compact: Enable compact style (without borders).
481483
"""
482484
self._template: _Template = None
483485
super().__init__(
@@ -490,6 +492,7 @@ def __init__(
490492
id=id,
491493
classes=classes,
492494
disabled=disabled,
495+
compact=compact,
493496
)
494497

495498
self._template = _Template(self, template)

0 commit comments

Comments
 (0)