From 21c9d9d4d63893ffc474ae190a46148bc2f30d76 Mon Sep 17 00:00:00 2001 From: Midhun Suresh <midhunr@element.io> Date: Wed, 5 Jan 2022 16:38:24 +0530 Subject: [PATCH] Style start button --- src/style.css | 19 ++++++++++++++++++- src/ui/res/chat-bubbles.svg | 11 +++++++++++ src/ui/views/RootView.ts | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 src/ui/res/chat-bubbles.svg diff --git a/src/style.css b/src/style.css index f6ef587..1cad703 100644 --- a/src/style.css +++ b/src/style.css @@ -1,6 +1,5 @@ #chatterbox { position: absolute; - width: 500px; bottom: 0; right: 0; } @@ -18,6 +17,24 @@ todo: this style should actually be in hydrogen-web left: 0; } +.StartChat { + width: 32px; + height: 32px; + border: none; + margin: 5px; + background: no-repeat center url('./ui/res/chat-bubbles.svg'), #295dbd; + border-radius: 2px; + cursor: pointer; +} + +.hydrogen { + background-color: transparent !important; +} + +.hydrogen :not(.StartChat) { + background-color: white; +} + body { background-color: #205a634d; } diff --git a/src/ui/res/chat-bubbles.svg b/src/ui/res/chat-bubbles.svg new file mode 100644 index 0000000..186bb3d --- /dev/null +++ b/src/ui/res/chat-bubbles.svg @@ -0,0 +1,11 @@ +<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> +<g clip-path="url(#clip0)"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M5.90964 11.5297C9.09231 11.5297 11.6724 8.94865 11.6724 5.76483C11.6724 2.581 9.09231 0 5.90964 0C2.72697 0 0.146904 2.581 0.146904 5.76483C0.146904 6.65678 0.3494 7.50142 0.710912 8.25525L0.0648767 10.3556C-0.171716 11.1248 0.550948 11.8442 1.31906 11.6041L3.39724 10.9544C4.15657 11.323 5.00898 11.5297 5.90964 11.5297Z" fill="white"/> +<path fill-rule="evenodd" clip-rule="evenodd" d="M5.03851 12.8449C5.70399 13.1151 6.4314 13.2638 7.19345 13.2638C10.3676 13.2638 13.5 10.6832 13.5 7.49979C13.5 6.63255 13.2676 5.81005 12.8651 5.07227C14.6487 6.05071 15.8583 7.94999 15.8583 10.1326C15.8583 11.0243 15.6564 11.8688 15.2959 12.6224L15.9404 14.7232C16.1765 15.4926 15.4533 16.2114 14.6854 15.9708L12.6155 15.322C11.8585 15.6902 11.0088 15.8966 10.111 15.8966C7.91459 15.8966 6.00594 14.661 5.03851 12.8449Z" fill="white"/> +</g> +<defs> +<clipPath id="clip0"> +<rect width="16" height="16" fill="white"/> +</clipPath> +</defs> +</svg> diff --git a/src/ui/views/RootView.ts b/src/ui/views/RootView.ts index 36aaeb9..8e5bb52 100644 --- a/src/ui/views/RootView.ts +++ b/src/ui/views/RootView.ts @@ -23,6 +23,6 @@ export class RootView extends TemplateView<RootViewModel> { class StartView extends TemplateView<RootViewModel> { render(t: Builder<RootViewModel>, vm: RootViewModel) { - return t.button({ className: "StartChat", onClick: () => vm.start() }, "Start Chat"); + return t.button({ className: "StartChat", onClick: () => vm.start() }); } } -- GitLab