From 094a19a920be3e3c44518ebdb924fef1bfdb0df0 Mon Sep 17 00:00:00 2001 From: robinvandermolen Date: Tue, 8 Oct 2024 14:23:10 +0200 Subject: [PATCH] :lipstick: [open-formulieren/open-forms#4636] Fixed custom table styling --- src/components/builder/i18n.tsx | 15 +++++++++------ src/components/builder/table.scss | 10 ++++++++++ src/components/builder/values/i18n.tsx | 13 +++++++++---- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/components/builder/i18n.tsx b/src/components/builder/i18n.tsx index a6c3022..50b10d8 100644 --- a/src/components/builder/i18n.tsx +++ b/src/components/builder/i18n.tsx @@ -57,7 +57,10 @@ export function ComponentTranslations({ - - - - -
+ ({ })} /> +
    {supportedLanguageCodes.map(code => (
  • @@ -93,19 +96,19 @@ export function ComponentTranslations({
+ + + ({
{(values?.[property] || '-') as string}
diff --git a/src/components/builder/table.scss b/src/components/builder/table.scss index d796162..1ae04bd 100644 --- a/src/components/builder/table.scss +++ b/src/components/builder/table.scss @@ -1,6 +1,7 @@ .offb-table { // Ensures that the column widths are respected table-layout: fixed; + width: 100%; &__content { &--allow-break { @@ -8,4 +9,13 @@ hyphens: auto; } } + + &__col { + &--width-25 { + width: 25%; + } + &--width-50 { + width: 50%; + } + } } diff --git a/src/components/builder/values/i18n.tsx b/src/components/builder/values/i18n.tsx index d1cb52e..9a0af86 100644 --- a/src/components/builder/values/i18n.tsx +++ b/src/components/builder/values/i18n.tsx @@ -46,14 +46,17 @@ export function ValuesTranslations({name, withOptionDescription}: ValuesTrans <>
- + {label}
{value || '-'}
@@ -94,7 +97,9 @@ export function ValuesTranslations({name, withOptionDescription}: ValuesTrans defaultMessage="Option description ()" values={{ option: () => ( - {value || '-'} + + {value || '-'} + ), }} /> @@ -104,7 +109,7 @@ export function ValuesTranslations({name, withOptionDescription}: ValuesTrans
{description || '-'}