Subscribe to our newsletter.
(It’s better than you think)
No spam. No sales pitches. Just product updates. Keep up with all our articles and news. Join our newsletter and stay up to date!
diff --git a/pgml-dashboard/src/components/icons/checkmark/checkmark.scss b/pgml-dashboard/src/components/icons/checkmark/checkmark.scss
index 98e0247a2..23396131a 100644
--- a/pgml-dashboard/src/components/icons/checkmark/checkmark.scss
+++ b/pgml-dashboard/src/components/icons/checkmark/checkmark.scss
@@ -1,5 +1,5 @@
div[data-controller="icons-checkmark"] {
- .active {
+ .blue {
.first {
stop-color: #3EDCFF;
}
@@ -8,7 +8,25 @@ div[data-controller="icons-checkmark"] {
}
}
- .inactive {
+ .green {
+ .first {
+ stop-color: #44FFDD;
+ }
+ .second {
+ stop-color: #05C168;
+ }
+ }
+
+ .orange {
+ .first {
+ stop-color: #FFB444;
+ }
+ .second {
+ stop-color: #FF6644;
+ }
+ }
+
+ .white {
.first {
stop-color: #{$gray-100};
}
@@ -17,6 +35,15 @@ div[data-controller="icons-checkmark"] {
}
}
+ .purple {
+ .first {
+ stop-color: #5337FF;
+ }
+ .second {
+ stop-color: #A175FF;
+ }
+ }
+
.disabled {
.first {
stop-color: #{$gray-500};
diff --git a/pgml-dashboard/src/components/icons/checkmark/mod.rs b/pgml-dashboard/src/components/icons/checkmark/mod.rs
index e0e119b27..f55087087 100644
--- a/pgml-dashboard/src/components/icons/checkmark/mod.rs
+++ b/pgml-dashboard/src/components/icons/checkmark/mod.rs
@@ -4,30 +4,27 @@ use sailfish::TemplateOnce;
#[derive(TemplateOnce, Default)]
#[template(path = "icons/checkmark/template.html")]
pub struct Checkmark {
- state: String,
+ color: String,
twitter: bool,
+ disabled: bool,
}
impl Checkmark {
pub fn new() -> Checkmark {
Checkmark {
- state: String::from("inactive"),
+ color: String::from("blue"),
twitter: false,
+ disabled: false,
}
}
- pub fn active(mut self) -> Self {
- self.state = String::from("active");
- self
- }
-
- pub fn inactive(mut self) -> Self {
- self.state = String::from("inactive");
+ pub fn color(mut self, color: &str) -> Self {
+ self.color = String::from(color);
self
}
pub fn disabled(mut self) -> Self {
- self.state = String::from("disabled");
+ self.disabled = true;
self
}
diff --git a/pgml-dashboard/src/components/icons/checkmark/template.html b/pgml-dashboard/src/components/icons/checkmark/template.html
index e5b6f4d97..0e83cdd22 100644
--- a/pgml-dashboard/src/components/icons/checkmark/template.html
+++ b/pgml-dashboard/src/components/icons/checkmark/template.html
@@ -2,6 +2,12 @@
use rand::Rng;
let mut rng = rand::thread_rng();
let id = rng.gen::
();
+
+ let color_class = if disabled {
+ "disabled"
+ } else {
+ &color
+ };
%>
<% if twitter {%>
@@ -10,7 +16,7 @@
<% } else {%>
-
+