chore: improve css styling for mobile

This commit is contained in:
Chris Anderson 2025-07-26 16:09:15 -05:00
parent e33f9d79c0
commit 44a7354ffe
7 changed files with 11 additions and 4 deletions

View file

@ -16,6 +16,7 @@ export interface DataTableCol<T> {
cell?: DataTableResolver<T, ReactNode> cell?: DataTableResolver<T, ReactNode>
sortable?: boolean sortable?: boolean
sortKey?: string sortKey?: string
minWidth?: number | string
} }
export interface ColSort { export interface ColSort {
@ -131,7 +132,7 @@ export function DataTable<T>({
} }
} }
return ( return (
<div className="table-cell" key={col.key}> <div className="table-cell" key={col.key} style={col.minWidth ? { minWidth: col.minWidth } : {}}>
{value ?? <>&#8211;</>} {value ?? <>&#8211;</>}
</div> </div>
) )

View file

@ -62,7 +62,7 @@
@media only screen and (max-width: 600px) { @media only screen and (max-width: 600px) {
.heading { .heading {
flex-direction: column; flex-wrap: wrap;
gap: 10px; gap: 10px;
} }
} }

View file

@ -10,7 +10,8 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
border-bottom: 1px solid var(--color-grey); border-bottom: 1px solid var(--color-grey);
gap: 20px; gap: 5px 20px;
flex-wrap: wrap;
} }
.ui-info-table .info-label { .ui-info-table .info-label {
@ -18,8 +19,8 @@
} }
.ui-info-table .info-value { .ui-info-table .info-value {
text-align: right;
position: relative; position: relative;
word-break: break-word;
} }
.ui-info-table .info-value .ui-tag { .ui-info-table .info-value .ui-tag {

View file

@ -4,8 +4,10 @@
flex-direction: row; flex-direction: row;
gap: var(--spacing); gap: var(--spacing);
margin-bottom: var(--spacing); margin-bottom: var(--spacing);
flex-wrap: wrap;
} }
.ui-stack.ui-stack-vertical { .ui-stack.ui-stack-vertical {
flex-direction: column; flex-direction: column;
flex-wrap: nowrap;
} }

View file

@ -128,6 +128,7 @@ export default function Campaigns() {
key: 'name', key: 'name',
title: t('name'), title: t('name'),
sortable: true, sortable: true,
minWidth: '225px',
cell: ({ item: { id, name, channel } }) => ( cell: ({ item: { id, name, channel } }) => (
<div className="multi-cell"> <div className="multi-cell">
{ channel === 'email' { channel === 'email'

View file

@ -53,6 +53,7 @@ export default function Journeys() {
{ {
key: 'name', key: 'name',
title: t('name'), title: t('name'),
minWidth: '150px',
}, },
{ {
key: 'status', key: 'status',

View file

@ -67,6 +67,7 @@ export default function ListTable({ search, selectedRow, onSelectRow, title }: L
key: 'name', key: 'name',
title: t('name'), title: t('name'),
sortable: true, sortable: true,
minWidth: '200px',
}, },
{ {
key: 'type', key: 'type',