1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! The trait a control implements to sit on a rung of the shared size scale.
use crateControlSize;
/// A control that can be put on a rung of the shared size scale.
///
/// Implemented by every element that can share a row with another control:
/// `Button`, `IconButton`, `Checkbox`, `Switch`, `Toggle`, `Select`,
/// `TextField`, `Badge`, `Kbd`, `Input`, `Textarea` and `Field`. The rung
/// resolves through the theme
/// ([`Themeable::control`](crate::theme::Themeable::control)), so a control
/// never names a height of its own.
///
/// ```ignore
/// h_stack()
/// .child(button("save", "Save").large())
/// .child(badge("2").large())
/// ```