Add explain toggle to layout example

This commit is contained in:
Héctor Ramón Jiménez 2024-01-10 03:56:39 +01:00
parent 5dbded61de
commit d76705df29
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
2 changed files with 56 additions and 11 deletions

View file

@ -82,6 +82,8 @@ pub struct Extended {
pub success: Success,
/// The set of danger colors.
pub danger: Danger,
/// Whether the palette is dark or not.
pub is_dark: bool,
}
/// The built-in light variant of an [`Extended`] palette.
@ -113,6 +115,7 @@ impl Extended {
palette.background,
palette.text,
),
is_dark: is_dark(palette.background),
}
}
}