Skip to content

Commit

Permalink
list styles
Browse files Browse the repository at this point in the history
  • Loading branch information
anamontiaga committed Aug 29, 2023
1 parent b285918 commit b0870b9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 26 deletions.
3 changes: 2 additions & 1 deletion app/hooks/cost-surface/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export function useProjectCostSurfaces<T = CostSurface[]>(
queryFn: async () =>
API.request<CostSurface[]>({
method: 'GET',
url: `/projects/${pid}/cost-surfaces`,
// !TODO: change this to the correct endpoint
url: `/projects/${pid}/protected-areas`,
headers: {
Authorization: `Bearer ${session.accessToken}`,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,29 @@ const InventoryTable = ({
onChange={onSelectAll}
/>
</th>
<th className="flex-1 pl-2">
<HeaderItem
text={'Name'}
name={'name'}
columns={columns}
sorting={sorting}
onClick={onSortChange}
/>
</th>
<th className="flex flex-1 justify-start py-2 pl-14">
<HeaderItem
className="justify-center"
text={'Type'}
name={'tag'}
columns={columns}
sorting={sorting}
onClick={onSortChange}
/>
</th>
{columns['name'] && (
<th className="flex-1 pl-2">
<HeaderItem
text={'Name'}
name={'name'}
columns={columns}
sorting={sorting}
onClick={onSortChange}
/>
</th>
)}
{columns['tag'] && (
<th className="flex flex-1 justify-start py-2 pl-14">
<HeaderItem
className="justify-center"
text={'Type'}
name={'tag'}
columns={columns}
sorting={sorting}
onClick={onSortChange}
/>
</th>
)}
</tr>
</thead>
<tbody className="block max-h-[calc(100vh-430px)] divide-y divide-gray-400 overflow-y-auto overflow-x-hidden pl-1 align-baseline text-sm">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const RowItem = ({
const { id, name, scenarios, tag, isVisibleOnMap } = item;

return (
<tr key={id} className="align-top">
<tr key={id} className="flex w-full align-top">
<td className="pb-2 pr-1 pt-5">
<Checkbox
id={`select-${id}`}
Expand All @@ -41,16 +41,16 @@ const RowItem = ({
scenarios.
</div>
</td>
<td className="px-6 pb-2 pt-5 text-xs">
{tag && (
{tag && (
<td className="w-28 px-6 pb-2 pt-5 text-xs">
<div className="flex justify-center">
<span className="whitespace-nowrap rounded-full bg-yellow-600 bg-opacity-10 px-2 py-1 text-yellow-600">
{tag}
</span>
</div>
)}
</td>
<td className="pb-2 pl-1 pr-2 pt-5">
</td>
)}
<td className="w-22 ml-auto pb-2 pl-1 pr-2 pt-5">
<div className="flex gap-6">
<button type="button" onClick={() => onToggleSeeOnMap(id)}>
<Icon
Expand Down

0 comments on commit b0870b9

Please sign in to comment.