From 6ab5dd648ca3e1d248c841deedca58b19890215c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 4 Oct 2022 21:44:56 -0700 Subject: tip slider progress fill --- src/components/Tip.svelte | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'src/components') diff --git a/src/components/Tip.svelte b/src/components/Tip.svelte index 093fef46..9beee3af 100644 --- a/src/components/Tip.svelte +++ b/src/components/Tip.svelte @@ -73,13 +73,12 @@ -

{$t('invoice.addTipq')}

+

{$t('invoice.addTipq')}

{#if !showCustomAmount} -
- {f(tipAmount, currency)}{`(${s(tip)} SAT)`} - {Math.round(tipPercent)}% +
+ {f(tipAmount, currency)} + {`(${s(tip)} SAT)`} +
{Math.round(tipPercent)}%
(showMobileTip = false)} /> @@ -157,7 +157,13 @@ width: 100%; height: 6px; border-radius: 5px; - background: #eaecef; + background: linear-gradient( + to right, + black 0%, + black var(--bgPercent), + #F5F7FA var(--bgPercent), + #F5F7FA 100% + ); outline: none; } @@ -168,18 +174,22 @@ #slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; - width: 25px; - height: 25px; + width: 20px; + height: 20px; border-radius: 50%; background: black; cursor: pointer; } #slider::-moz-range-thumb { - width: 25px; - height: 25px; + width: 20px; + height: 20px; border-radius: 50%; background: black; cursor: pointer; } + + #slider.slider-track::-moz-range-progress { + background: black; + } -- cgit v1.2.3