From 3198acfd1a4aec85cfb3c52268276cc1a04cc85c Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Thu, 9 May 2024 22:13:44 +0300 Subject: [PATCH] Tokens for ProgressBar --- components/lib/progressbar/style/ProgressBarStyle.js | 12 ++++-------- components/lib/themes/aura/progressbar/index.js | 8 ++++++-- components/lib/themes/lara/progressbar/index.js | 8 ++++++-- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/components/lib/progressbar/style/ProgressBarStyle.js b/components/lib/progressbar/style/ProgressBarStyle.js index 377545ee8..11d798dfc 100644 --- a/components/lib/progressbar/style/ProgressBarStyle.js +++ b/components/lib/progressbar/style/ProgressBarStyle.js @@ -4,23 +4,20 @@ const theme = ({ dt }) => ` .p-progressbar { position: relative; overflow: hidden; - border: 0 none; - height: 1.25rem; + height: ${dt('progressbar.height')}; background: ${dt('progressbar.background')}; - border-radius: ${dt('border.radius.md')}; + border-radius: ${dt('progressbar.border.radius')}; } .p-progressbar-value { - border: 0 none; margin: 0; background: ${dt('progressbar.value.background')}; } .p-progressbar-label { color: ${dt('progressbar.label.color')}; - line-height: 1.25rem; - font-size: .75rem; - font-weight: 600; + font-size: ${dt('progressbar.label.font.size')}; + font-weight: ${dt('progressbar.label.font.weight')}; } .p-progressbar-determinate .p-progressbar-value { @@ -28,7 +25,6 @@ const theme = ({ dt }) => ` width: 0%; position: absolute; display: none; - border: 0 none; display: flex; align-items: center; justify-content: center; diff --git a/components/lib/themes/aura/progressbar/index.js b/components/lib/themes/aura/progressbar/index.js index 0c2459225..2b73141b2 100644 --- a/components/lib/themes/aura/progressbar/index.js +++ b/components/lib/themes/aura/progressbar/index.js @@ -1,11 +1,15 @@ export default { root: { - background: '{content.border.color}' + background: '{content.border.color}', + borderRadius: '{content.border.radius}', + height: '1.25rem' }, value: { background: '{primary.color}' }, label: { - color: '{primary.inverse.color}' + color: '{primary.inverse.color}', + fontSize: '0.75rem', + fontWeight: '600' } }; diff --git a/components/lib/themes/lara/progressbar/index.js b/components/lib/themes/lara/progressbar/index.js index 0c2459225..5b20a600f 100644 --- a/components/lib/themes/lara/progressbar/index.js +++ b/components/lib/themes/lara/progressbar/index.js @@ -1,11 +1,15 @@ export default { root: { - background: '{content.border.color}' + background: '{content.border.color}', + borderRadius: '{content.border.radius}', + height: '1.5rem' }, value: { background: '{primary.color}' }, label: { - color: '{primary.inverse.color}' + color: '{primary.inverse.color}', + fontSize: '0.875rem', + fontWeight: '600' } };