From 38767fd466163d228d8f5d27387aa7f2c244484c Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Thu, 9 May 2024 22:36:40 +0300 Subject: [PATCH] Tokens for terminal --- components/lib/terminal/style/TerminalStyle.js | 10 +++++----- components/lib/themes/aura/terminal/index.js | 11 ++++++++++- components/lib/themes/lara/terminal/index.js | 11 ++++++++++- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/components/lib/terminal/style/TerminalStyle.js b/components/lib/terminal/style/TerminalStyle.js index 950561ff8..52c36856f 100644 --- a/components/lib/terminal/style/TerminalStyle.js +++ b/components/lib/terminal/style/TerminalStyle.js @@ -2,13 +2,13 @@ import BaseStyle from 'primevue/base/style'; const theme = ({ dt }) => ` .p-terminal { - height: 18rem; + height: ${dt('terminal.height')}; overflow: auto; background: ${dt('terminal.background')}; color: ${dt('terminal.color')}; border: 1px solid ${dt('terminal.border.color')}; - padding: 0.5rem 0.75rem; - border-radius: ${dt('border.radius.md')}; + padding: ${dt('terminal.padding')}; + border-radius: ${dt('terminal.border.radius')}; } .p-terminal-prompt { @@ -29,7 +29,7 @@ const theme = ({ dt }) => ` } .p-terminal-prompt-label { - margin-right: 0.25rem; + margin-right: ${dt('terminal.prompt.gap')}; } .p-terminal-input::-ms-clear { @@ -37,7 +37,7 @@ const theme = ({ dt }) => ` } .p-terminal-command-response { - margin: 2px 0; + margin: ${dt('terminal.command.response.margin')}; } `; diff --git a/components/lib/themes/aura/terminal/index.js b/components/lib/themes/aura/terminal/index.js index a679e9ad8..b657e5c4d 100644 --- a/components/lib/themes/aura/terminal/index.js +++ b/components/lib/themes/aura/terminal/index.js @@ -2,6 +2,15 @@ export default { root: { background: '{form.field.background}', borderColor: '{form.field.border.color}', - color: '{form.field.color}' + color: '{form.field.color}', + height: '18rem', + padding: '{form.field.padding.y} {form.field.padding.x}', + borderRadius: '{form.field.border.radius}' + }, + prompt: { + gap: '0.25rem' + }, + commandResponse: { + margin: '2px 0' } }; diff --git a/components/lib/themes/lara/terminal/index.js b/components/lib/themes/lara/terminal/index.js index a679e9ad8..b657e5c4d 100644 --- a/components/lib/themes/lara/terminal/index.js +++ b/components/lib/themes/lara/terminal/index.js @@ -2,6 +2,15 @@ export default { root: { background: '{form.field.background}', borderColor: '{form.field.border.color}', - color: '{form.field.color}' + color: '{form.field.color}', + height: '18rem', + padding: '{form.field.padding.y} {form.field.padding.x}', + borderRadius: '{form.field.border.radius}' + }, + prompt: { + gap: '0.25rem' + }, + commandResponse: { + margin: '2px 0' } };