Skip to content

Commit 38b2291

Browse files
committed
feat: update workspace table toolbar
Signed-off-by: Amit Amrutiya <[email protected]>
1 parent 08b124b commit 38b2291

File tree

2 files changed

+25
-27
lines changed

2 files changed

+25
-27
lines changed

src/custom/Workspaces/DesignTable.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
22
import _ from 'lodash';
33
import React, { useEffect, useRef, useState } from 'react';
4-
import { Box, Typography } from '../../base';
4+
import { Box } from '../../base';
55
import { DesignIcon } from '../../icons';
66
import { publishCatalogItemSchema } from '../../schemas';
77
import { useTheme } from '../../theme';
@@ -18,7 +18,7 @@ import PromptComponent from '../Prompt';
1818
import SearchBar from '../SearchBar';
1919
import AssignmentModal from './AssignmentModal';
2020
import useDesignAssignment from './hooks/useDesignAssignment';
21-
import { L5EditIcon, TableHeader, TableRightActionHeader } from './styles';
21+
import { L5EditIcon, TableHeader } from './styles';
2222
export interface DesignTableProps {
2323
workspaceId: string;
2424
isKanvasEnabled: boolean;
@@ -188,13 +188,15 @@ const DesignTable: React.FC<DesignTableProps> = ({
188188

189189
const tableHeaderContent = (
190190
<TableHeader style={{ padding: '1rem' }}>
191-
<Box display={'flex'} alignItems="center" gap={1} width="100%">
192-
<DesignIcon height="1.5rem" width="1.5rem" />
193-
<Typography variant="body1" fontWeight={'bold'}>
194-
Assigned Designs
195-
</Typography>
196-
</Box>
197-
<TableRightActionHeader style={{ marginRight: '0rem' }}>
191+
<Box
192+
style={{
193+
marginRight: '0rem',
194+
width: '100%',
195+
justifyContent: 'end',
196+
display: 'flex',
197+
alignItems: 'center'
198+
}}
199+
>
198200
<SearchBar
199201
onSearch={(value) => {
200202
setDesignSearch(value);
@@ -219,7 +221,7 @@ const DesignTable: React.FC<DesignTableProps> = ({
219221
disabled={!isAssignAllowed}
220222
title="Assign Designs"
221223
/>
222-
</TableRightActionHeader>
224+
</Box>
223225
</TableHeader>
224226
);
225227

src/custom/Workspaces/WorkspaceViewsTable.tsx

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import RemoveCircleIcon from '@mui/icons-material/RemoveCircle';
33
import { MUIDataTableColumn, MUIDataTableMeta } from 'mui-datatables';
44
import React, { useState } from 'react';
5-
import { Box, Typography } from '../../base';
6-
import { EnvironmentIcon, ViewIcon } from '../../icons';
5+
import { Box } from '../../base';
6+
import { EnvironmentIcon } from '../../icons';
77
import { useTheme } from '../../theme';
88
import { NameDiv } from '../CatalogDesignTable/style';
99
import { RESOURCE_TYPES } from '../CatalogDetail/types';
@@ -22,13 +22,7 @@ import { UserTableAvatarInfo } from '../UsersTable';
2222
import VisibilityChipMenu, { VIEW_VISIBILITY } from '../VisibilityChipMenu/VisibilityChipMenu';
2323
import AssignmentModal from './AssignmentModal';
2424
import useViewAssignment from './hooks/useViewsAssignment';
25-
import {
26-
CellStyle,
27-
CustomBodyRenderStyle,
28-
L5EditIcon,
29-
TableHeader,
30-
TableRightActionHeader
31-
} from './styles';
25+
import { CellStyle, CustomBodyRenderStyle, L5EditIcon, TableHeader } from './styles';
3226

3327
interface ViewsTableProps {
3428
workspaceId: string;
@@ -311,13 +305,15 @@ const WorkspaceViewsTable: React.FC<ViewsTableProps> = ({
311305
return (
312306
<>
313307
<TableHeader style={{ padding: '1rem' }}>
314-
<Box display={'flex'} alignItems="center" gap={1} width="100%">
315-
<ViewIcon height="1.5rem" width="1.5rem" fill={theme.palette.icon.brand} />
316-
<Typography variant="body1" fontWeight={'bold'}>
317-
Assigned Views
318-
</Typography>
319-
</Box>
320-
<TableRightActionHeader style={{ marginRight: '0rem' }}>
308+
<Box
309+
style={{
310+
marginRight: '0rem',
311+
width: '100%',
312+
justifyContent: 'end',
313+
display: 'flex',
314+
alignItems: 'center'
315+
}}
316+
>
321317
<SearchBar
322318
onSearch={(value) => {
323319
setSearch(value);
@@ -342,7 +338,7 @@ const WorkspaceViewsTable: React.FC<ViewsTableProps> = ({
342338
disabled={!isAssignAllowed}
343339
title="Assign Views"
344340
/>
345-
</TableRightActionHeader>
341+
</Box>
346342
</TableHeader>
347343

348344
<ResponsiveDataTable

0 commit comments

Comments
 (0)