summary refs log tree commit diff stats
path: root/src/components/icon_p.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/icon_p.rs')
-rw-r--r--src/components/icon_p.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/components/icon_p.rs b/src/components/icon_p.rs
new file mode 100644
index 0000000..372e280
--- /dev/null
+++ b/src/components/icon_p.rs
@@ -0,0 +1,18 @@
+use leptos::{
+    IntoView, component,
+    prelude::{ClassAttribute, ElementChild, Signal},
+    view,
+};
+use leptos_icons::Icon;
+
+#[component]
+pub fn IconP(#[prop(into)] icon: Signal<icondata_core::Icon>, text: &'static str) -> impl IntoView {
+    view! {
+        <div class="flex justify-evenly items-center">
+            <div class="mr-1">
+                <Icon icon=icon />
+            </div>
+            <p>{text}</p>
+        </div>
+    }
+}