Fusuma

Components / Components

split_view_vertical

Two panes one above the other, the same way (permille of the height goes to top).

How it looks

Drawn by the toolkit from the example below. No page of the gallery uses split_view_vertical yet, so there is nothing to run.

split_view_vertical drawn by Fusuma

Two panes one above the other, the same way (permille of the height goes to top).

Signature

pub fn split_view_vertical<'a, M: Clone + 'a, T: Children<M> + 'a, B: Children<M> + 'a>( permille: u16, on_change: fn(u16) -> M, top: T, bottom: B, ) -> impl View<M> + 'a

Example

use fusuma::{split_view_vertical, text};
let view = split_view_vertical(600, |permille| permille, (text("Editor"),), (text("Console"),));
let built = fusuma::doc::built::<u16, _>(&view);
assert_eq!(built.texts(), ["Editor", "Console"]);

All components · Source