Skip to content

Commit

Permalink
fix: styling in subform table to be more similar the design (#14450)
Browse files Browse the repository at this point in the history
Co-authored-by: JamalAlabdullah <[email protected]>
  • Loading branch information
lassopicasso and JamalAlabdullah authored Jan 22, 2025
1 parent c3e12e8 commit 0e08fcb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion frontend/language/src/nb.json
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,7 @@
"ux_editor.properties_panel.subform_table_columns.cell_content_query_label": "Query",
"ux_editor.properties_panel.subform_table_columns.choose_component": "Velg komponenten fra underskjemaet som skal vises her",
"ux_editor.properties_panel.subform_table_columns.choose_component_description": "Listen viser bare de komponentene som har minst én datamodellbinding og en ledetekst",
"ux_editor.properties_panel.subform_table_columns.column_cell_content": "Celleinnhold (query):",
"ux_editor.properties_panel.subform_table_columns.column_cell_content": "Celleinnhold (query): <0>{{cellContent}}</0>",
"ux_editor.properties_panel.subform_table_columns.column_header": "Kolonne {{columnNumber}}",
"ux_editor.properties_panel.subform_table_columns.column_title_edit": "Kolonnetittel",
"ux_editor.properties_panel.subform_table_columns.column_title_error": "Kolonnetittel er påkrevd",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
.componentTitleButton {
margin-bottom: var(--fds-spacing-1);
}

.componentCellContent {
font: var(--fds-typography-label-small);
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from 'react';

import { StudioDisplayTile, StudioProperty, StudioTextfield } from '@studio/components';
import { useTranslation } from 'react-i18next';
import { StudioCodeFragment, StudioProperty, StudioTextfield } from '@studio/components';
import { Trans, useTranslation } from 'react-i18next';
import classes from './EditColumnElementContent.module.css';

type EditColumnElementContentProps = {
Expand Down Expand Up @@ -40,12 +40,13 @@ export const EditColumnElementContent = ({
/>
)}

<StudioDisplayTile
className={classes.componentCellContent}
label={t('ux_editor.properties_panel.subform_table_columns.column_cell_content')}
value={cellContent}
showPadlock={false}
/>
<div className={classes.componentCellContent}>
<Trans
i18nKey='ux_editor.properties_panel.subform_table_columns.column_cell_content'
values={{ cellContent }}
components={[<StudioCodeFragment key='0' />]}
/>
</div>
</div>
);
};

0 comments on commit 0e08fcb

Please sign in to comment.