feat(element/input): text input element implementation
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 14s

Moved implementation from example/input as a standalone `Element`
implementation, which is directly used by the example instead.

The provided argument is the `App.Event`'s event that should be
triggered on acceptance for the contents of the Input `Element`.
Currently only `[]u21` strings are supported, but in the future also
`[]u8` strings shall be supported and automatically converted when
pushed as an `App.Event` into the app's queue.
This commit is contained in:
2025-06-29 11:19:09 +02:00
parent 2ba0ed85fb
commit 7595e3b5bb
3 changed files with 255 additions and 166 deletions

View File

@@ -418,6 +418,7 @@ pub fn App(comptime E: type) type {
pub const Element = element.Element(Event);
pub const Alignment = element.Alignment(Event);
pub const Scrollable = element.Scrollable(Event);
pub const Input = element.Input(Event, Queue);
pub const Queue = queue.Queue(Event, 256);
};
}