From 3b2153c7e57a694ff1d63363d3156f0ac3739faa Mon Sep 17 00:00:00 2001 From: Ed Lepedus Date: Mon, 5 Aug 2024 12:37:25 +0100 Subject: [PATCH] Support specifying column ratios in `Kino.Layout.grid` (#459) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jonatan KÅ‚osko --- lib/kino/layout.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/kino/layout.ex b/lib/kino/layout.ex index a5909f10..f4ec2d39 100644 --- a/lib/kino/layout.ex +++ b/lib/kino/layout.ex @@ -43,7 +43,9 @@ defmodule Kino.Layout do ## Options - * `:columns` - the number of columns in the grid. Defaults to `1` + * `:columns` - the number of columns in the grid. Optionally, supports + a tuple of column width ratio, such as `{1, 2, 1}`, for three columns, + where the middle one is twice as wide as the others. Defaults to `1` * `:boxed` - whether the grid should be wrapped in a bordered box. Defaults to `false`