add toast
This commit is contained in:
@@ -25,6 +25,10 @@ pub struct ThemeDefinition {
|
||||
pub muted_foreground: Option<String>,
|
||||
pub destructive: Option<String>,
|
||||
pub destructive_foreground: Option<String>,
|
||||
pub success: Option<String>,
|
||||
pub success_foreground: Option<String>,
|
||||
pub warning: Option<String>,
|
||||
pub warning_foreground: Option<String>,
|
||||
pub border: Option<String>,
|
||||
pub input: Option<String>,
|
||||
pub ring: Option<String>,
|
||||
@@ -94,6 +98,22 @@ impl ThemeDefinition {
|
||||
parse_hex(self.destructive_foreground.as_deref()?)
|
||||
}
|
||||
|
||||
pub fn success(&self) -> Option<Hsla> {
|
||||
parse_hex(self.success.as_deref()?)
|
||||
}
|
||||
|
||||
pub fn success_foreground(&self) -> Option<Hsla> {
|
||||
parse_hex(self.success_foreground.as_deref()?)
|
||||
}
|
||||
|
||||
pub fn warning(&self) -> Option<Hsla> {
|
||||
parse_hex(self.warning.as_deref()?)
|
||||
}
|
||||
|
||||
pub fn warning_foreground(&self) -> Option<Hsla> {
|
||||
parse_hex(self.warning_foreground.as_deref()?)
|
||||
}
|
||||
|
||||
pub fn border(&self) -> Option<Hsla> {
|
||||
parse_hex(self.border.as_deref()?)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user