From e739afbf3fa00dc4bc4ffad9e8b75ea167a87f1e Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Sat, 11 May 2024 15:55:56 +0300 Subject: [PATCH] Tokens for Divider --- components/lib/divider/style/DividerStyle.js | 12 ++++++------ components/lib/themes/aura/divider/index.js | 14 ++++++++++++++ components/lib/themes/lara/divider/index.js | 14 ++++++++++++++ 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/components/lib/divider/style/DividerStyle.js b/components/lib/divider/style/DividerStyle.js index 7f5c170fd..2dc588a23 100644 --- a/components/lib/divider/style/DividerStyle.js +++ b/components/lib/divider/style/DividerStyle.js @@ -6,8 +6,8 @@ const theme = ({ dt }) => ` width: 100%; position: relative; align-items: center; - margin: 1rem 0; - padding: 0 1rem; + margin: ${dt('divider.horizontal.margin')}; + padding: ${dt('divider.horizontal.padding')}; } .p-divider-horizontal:before { @@ -21,7 +21,7 @@ const theme = ({ dt }) => ` } .p-divider-horizontal .p-divider-content { - padding: 0 0.5rem; + padding: ${dt('divider.horizontal.content.padding')}; } .p-divider-vertical { @@ -30,8 +30,8 @@ const theme = ({ dt }) => ` display: flex; position: relative; justify-content: center; - margin: 0 1rem; - padding: 1rem 0; + margin: ${dt('divider.vertical.margin')}; + padding: ${dt('divider.vertical.padding')}; } .p-divider-vertical:before { @@ -45,7 +45,7 @@ const theme = ({ dt }) => ` } .p-divider.p-divider-vertical .p-divider-content { - padding: 0.5rem 0; + padding: ${dt('divider.vertical.content.padding')}; } .p-divider-content { diff --git a/components/lib/themes/aura/divider/index.js b/components/lib/themes/aura/divider/index.js index 0570e83cc..1c5109d2e 100644 --- a/components/lib/themes/aura/divider/index.js +++ b/components/lib/themes/aura/divider/index.js @@ -5,5 +5,19 @@ export default { content: { background: '{content.background}', color: '{text.color}' + }, + horizontal: { + margin: '1rem 0', + padding: '0 1rem', + content: { + padding: '0 0.5rem' + } + }, + vertical: { + margin: '0 1rem', + padding: '0.5rem 0', + content: { + padding: '0.625rem 0' + } } }; diff --git a/components/lib/themes/lara/divider/index.js b/components/lib/themes/lara/divider/index.js index 0570e83cc..7a7094e8e 100644 --- a/components/lib/themes/lara/divider/index.js +++ b/components/lib/themes/lara/divider/index.js @@ -5,5 +5,19 @@ export default { content: { background: '{content.background}', color: '{text.color}' + }, + horizontal: { + margin: '1.125rem 0', + padding: '0 1.125rem', + content: { + padding: '0 0.625rem' + } + }, + vertical: { + margin: '0 1.125rem', + padding: '1.125rem 0', + content: { + padding: '0.625rem 0' + } } };