File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -367,6 +367,34 @@ impl Catalog for Theme {
367367 }
368368}
369369
370+ /// Text conveying some important information, like an action.
371+ pub fn primary ( theme : & Theme ) -> Style {
372+ Style {
373+ color : Some ( theme. palette ( ) . primary ) ,
374+ }
375+ }
376+
377+ /// Text conveying some secondary information, like a footnote.
378+ pub fn secondary ( theme : & Theme ) -> Style {
379+ Style {
380+ color : Some ( theme. extended_palette ( ) . secondary . strong . color ) ,
381+ }
382+ }
383+
384+ /// Text conveying some positive information, like a successful event.
385+ pub fn success ( theme : & Theme ) -> Style {
386+ Style {
387+ color : Some ( theme. palette ( ) . success ) ,
388+ }
389+ }
390+
391+ /// Text conveying some negative information, like an error.
392+ pub fn danger ( theme : & Theme ) -> Style {
393+ Style {
394+ color : Some ( theme. palette ( ) . danger ) ,
395+ }
396+ }
397+
370398/// A fragment of [`Text`].
371399///
372400/// This is just an alias to a string that may be either
You can’t perform that action at this time.
0 commit comments