fix(container): positioning; move separator options to layout struct
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 22s
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 22s
Added corresponding test cases for padding, borders and corresponding seperators.
This commit is contained in:
@@ -50,16 +50,16 @@ pub fn main() !void {
|
||||
const element = quit_text.element();
|
||||
|
||||
var container = try App.Container.init(allocator, .{
|
||||
.border = .{ .separator = .{ .enabled = true } },
|
||||
.layout = .{
|
||||
.separator = .{ .enabled = true },
|
||||
.padding = .{ .top = 5, .bottom = 3, .left = 3, .right = 3 },
|
||||
.direction = .horizontal,
|
||||
},
|
||||
}, element);
|
||||
for (0..3) |_| {
|
||||
var column = try App.Container.init(allocator, .{
|
||||
.border = .{ .separator = .{ .enabled = true } },
|
||||
.layout = .{
|
||||
.separator = .{ .enabled = true },
|
||||
.direction = .vertical,
|
||||
},
|
||||
}, .{});
|
||||
|
||||
@@ -58,8 +58,8 @@ pub fn main() !void {
|
||||
}, element);
|
||||
for (0..3) |i| {
|
||||
var column = try App.Container.init(allocator, .{
|
||||
.border = .{ .separator = .{ .enabled = true } },
|
||||
.layout = .{
|
||||
.separator = .{ .enabled = true },
|
||||
.direction = if (i > 0) .vertical else .horizontal,
|
||||
},
|
||||
}, .{});
|
||||
|
||||
Reference in New Issue
Block a user