Details CSS tweaks (again) (#6743)

* Details CSS tweaks (again)

* Fix vertical alignment
This commit is contained in:
Oliver 2024-03-20 21:01:38 +11:00 committed by GitHub
parent 97ec4d00ef
commit 08c0953eb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -202,7 +202,8 @@ function TableStringValue(props: FieldProps) {
style={{ style={{
display: 'flex', display: 'flex',
justifyContent: 'space-between', justifyContent: 'space-between',
wordBreak: 'break-word' wordBreak: 'break-word',
alignItems: 'flex-start'
}} }}
> >
<Suspense fallback={<Skeleton width={200} height={20} radius="xl" />}> <Suspense fallback={<Skeleton width={200} height={20} radius="xl" />}>
@ -366,22 +367,19 @@ export function DetailsTableField({
const FieldType: any = getFieldType(field.type); const FieldType: any = getFieldType(field.type);
return ( return (
<tr> <tr style={{ verticalAlign: 'top' }}>
<td <td
style={{ style={{
display: 'flex',
alignItems: 'center',
gap: '20px', gap: '20px',
width: '50', width: '50'
justifyContent: 'flex-start'
}} }}
> >
<InvenTreeIcon icon={(field.icon ?? field.name) as InvenTreeIconType} /> <InvenTreeIcon icon={(field.icon ?? field.name) as InvenTreeIconType} />
</td> </td>
<td> <td style={{ minWidth: '25%', maxWidth: '65%' }}>
<Text>{field.label}</Text> <Text>{field.label}</Text>
</td> </td>
<td style={{ minWidth: '40%' }}> <td style={{ width: '100%' }}>
<FieldType field_data={field} field_value={item[field.name]} /> <FieldType field_data={field} field_value={item[field.name]} />
</td> </td>
<td style={{ width: '50' }}> <td style={{ width: '50' }}>