Skip to content

Commit d7adb48

Browse files
committed
is_active
1 parent ba0ecab commit d7adb48

File tree

1 file changed

+9
-0
lines changed
  • pgml-dashboard/src/components/cards/rgb

1 file changed

+9
-0
lines changed

pgml-dashboard/src/components/cards/rgb/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ impl Rgb {
3939
self
4040
}
4141

42+
pub fn is_active(mut self, active: bool) -> Self {
43+
if active {
44+
self.card_classes.push("active".into());
45+
self.card_classes.push("main-gradient-border-card-1".into());
46+
}
47+
48+
self
49+
}
50+
4251
pub fn link(mut self, link: &str) -> Self {
4352
self.link = Some(link.to_string());
4453
self

0 commit comments

Comments
 (0)