From 0a4969e079e216e76791b3d2b47f8040ca9e560b Mon Sep 17 00:00:00 2001 From: Adrien Date: Sun, 10 Mar 2024 10:42:02 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Center=20and=20uppercase=20the?= =?UTF-8?q?=20content=20of=20the=20Register=20and=20Login=20buttons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/button.rs | 14 +++++--------- src/components/button.scss | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/button.rs b/src/components/button.rs index caa6f8a..51917a0 100644 --- a/src/components/button.rs +++ b/src/components/button.rs @@ -53,13 +53,11 @@ impl IconShape for RegisterText { fn child_elements(&self) -> LazyNodes { rsx! { text { - x: "50%", y: "50%", - "dominant-baseline": "middle", - "text-anchor": "middle", + "dominant-baseline": "central", "font-size": "50", style: "fill: #ffffff", - "Register" + "REGISTER" } } } @@ -103,7 +101,7 @@ pub fn RegisterButton<'a>(cx: Scope<'a, ButtonProps>) -> Element<'a> { struct LoginText; impl IconShape for LoginText { fn view_box(&self) -> String { - String::from("0 0 250 50") + String::from("0 0 150 50") } fn xmlns(&self) -> String { String::from("http://www.w3.org/2000/svg") @@ -111,13 +109,11 @@ impl IconShape for LoginText { fn child_elements(&self) -> LazyNodes { rsx! { text { - x: "50%", y: "50%", - "dominant-baseline": "middle", - "text-anchor": "middle", + "dominant-baseline": "central", "font-size": "50", style: "fill: #ffffff", - "Login" + "LOGIN" } } } diff --git a/src/components/button.scss b/src/components/button.scss index c2ac1d4..ee71952 100644 --- a/src/components/button.scss +++ b/src/components/button.scss @@ -13,7 +13,7 @@ font-weight: bold; svg { - height: 100%; + height: 60%; width: 100%; } }