From bec180c62f480a81c174b40b7e6c02bdc801e2db Mon Sep 17 00:00:00 2001 From: wvffle Date: Tue, 27 Sep 2022 00:16:01 +0000 Subject: [PATCH] Extract svg icons to a single component --- front/public/embed.css | 6 +++++- front/public/embed.html | 47 +++++++++++++++++++++++------------------ 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/front/public/embed.css b/front/public/embed.css index 50488c52e..e03586a26 100644 --- a/front/public/embed.css +++ b/front/public/embed.css @@ -108,7 +108,11 @@ button.play { font-size: 2.5em; } -button > svg { +button > span { + display: inline-flex; +} + +button svg.icon { height: 1em; width: 1em; } diff --git a/front/public/embed.html b/front/public/embed.html index 668352745..96551b87a 100644 --- a/front/public/embed.html +++ b/front/public/embed.html @@ -188,6 +188,9 @@ // Logo component const Logo = () => ({ $template: '#logo-template' }) + // Icon component + const Icon = ({ icon }) => ({ $template: '#icon-template', icon }) + // Media Session const initializeMediaSession = () => { if ('mediaSession' in navigator) { @@ -340,6 +343,7 @@ const app = createApp({ // Components Logo, + Icon, // Errors error, @@ -379,6 +383,21 @@ + +