Skip to content

Commit

Permalink
fix: aligne data elements in profile
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikmv committed Mar 1, 2024
1 parent 6e9826f commit 54fb586
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/core_modules/capture-ui/FlatList/FlatList.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { colors, spacersNum } from '@dhis2/ui';
import { withStyles } from '@material-ui/core';
import type { Props } from './flatList.types';


const styles = {
itemRow: {
borderBottom: `1px solid${colors.grey300}`,
Expand All @@ -16,11 +15,15 @@ const styles = {
'&.isLastItem': {
borderBottomWidth: 0,
},
gap: '5px',
},
itemKey: {
width: 128,
flex: '50%',
color: colors.grey600,
},
itemValue: {
flex: '50%',
},
};

const FlatListPlain = ({ list, classes, dataTest }: Props) => {
Expand All @@ -31,18 +34,15 @@ const FlatListPlain = ({ list, classes, dataTest }: Props) => {
className={cx(classes.itemRow, { isLastItem: item.reactKey === lastItemKey })}
>
<div className={classes.itemKey}>{item.key}</div>
<div>{item.value}</div>
<div className={classes.itemValue}>{item.value}</div> {/* Added className */}
</div>
);

return (
<div
data-test={dataTest}
>
<div data-test={dataTest}>
{list.map(item => renderItem(item))}
</div>
);
};


export const FlatList: ComponentType<$Diff<Props, CssClasses>> = withStyles(styles)(FlatListPlain);

0 comments on commit 54fb586

Please sign in to comment.