Add xsmall controls for close affordances
- Add the xsmall size class and Sizable::xsmall(). - Use xsmall close buttons in tabs, dialogs, and alerts. - Assert xsmall and medium button heights.
This commit is contained in:
@@ -24,6 +24,14 @@ pub trait Sizable: Sized {
|
||||
/// Applies the size to the component's fields.
|
||||
fn apply_size(&mut self, size: Size);
|
||||
|
||||
/// Sets `Size::XSmall`.
|
||||
fn xsmall(self) -> Self
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
self.with_size(Size::XSmall)
|
||||
}
|
||||
|
||||
/// Sets `Size::Small`.
|
||||
fn small(self) -> Self
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user