Skip to content

Commit

Permalink
fix blocked srcs styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ivopaunov committed Aug 19, 2024
1 parent b5b8e6e commit d0be97a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/components/CampaignAnalytics/Placements.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const Placements = ({ forAdmin, campaignId }: { forAdmin: boolean; campaignId: s
const isBlocked = !!campaign.targetingInput.inputs.publishers.nin.includes(item.segment)
const srcName = getHumneSrcName(item.segment, placement)
const data: PlacementsTableElement = {
rowColor: isBlocked ? 'red' : 'inherit',
rowColor: isBlocked ? 'warning' : 'inherit',
actionData: {
srcName,
isBlocked,
Expand Down Expand Up @@ -134,7 +134,7 @@ const Placements = ({ forAdmin, campaignId }: { forAdmin: boolean; campaignId: s
srcName
}))
}),
label: (selectedElements) => `Block selected ${selectedElements?.size}`,
label: (selectedElements) => `Block selected (${selectedElements?.size})`,
icon: (
<ThemeIcon variant="transparent" size="xs">
<BlockIcon size="inherit" />
Expand All @@ -151,7 +151,7 @@ const Placements = ({ forAdmin, campaignId }: { forAdmin: boolean; campaignId: s
srcName
}))
}),
label: (selectedElements) => `Unblock selected ${selectedElements?.size}`,
label: (selectedElements) => `Unblock selected (${selectedElements?.size})`,
// icon: () => <VisibilityIcon size="10px" />,
color: 'success'
}
Expand Down
18 changes: 13 additions & 5 deletions src/components/common/CustomTable/CustomTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export const CustomTable = ({
return (
<Tooltip key={label} label={label}>
<ActionIcon
size="23px"
size="sm"
variant="transparent"
color={a.color || 'mainText'}
onClick={() => a.action(e.actionData || e)}
Expand Down Expand Up @@ -203,7 +203,7 @@ export const CustomTable = ({
color={a.color || 'mainText'}
key={label}
leftSection={
<ThemeIcon size="20px" variant="transparent" color={a.color || 'mainText'}>
<ThemeIcon size="sm" variant="transparent" color={a.color || 'mainText'}>
{getIcon(a.icon, e.actionData)}
</ThemeIcon>
}
Expand All @@ -229,6 +229,7 @@ export const CustomTable = ({
e[column] ||
(column === 'select' && (
<Checkbox
aria-label="Select row"
checked={selectedElements.has(e.id || '')}
onChange={(el) => handleCheckbox(el.currentTarget.checked, e.id || '')}
/>
Expand All @@ -246,7 +247,7 @@ export const CustomTable = ({
<Divider />
</Stack>
) : (
<Table.Td key={column}>
<Table.Td key={column} maw={20}>
<Text size="sm" c={color} truncate maw={290}>
{columnParsed}
</Text>
Expand Down Expand Up @@ -292,10 +293,17 @@ export const CustomTable = ({
</Stack>
) : (
<ScrollArea scrollbars="x" type="auto" offsetScrollbars>
<Table {...tableProps} mih={420} w="100%" highlightOnHover verticalSpacing="sm">
<Table
{...tableProps}
mih={420}
w="100%"
highlightOnHover
verticalSpacing="sm"
layout="auto"
>
<Table.Thead bg="alternativeBackground">
<Table.Tr>
{selectedActions && <Table.Th maw={20}>{masterSelectAction}</Table.Th>}
{selectedActions && <Table.Th w="sm">{masterSelectAction}</Table.Th>}
{headings.map((h) => (
<Table.Th key={h}>{h}</Table.Th>
))}
Expand Down

0 comments on commit d0be97a

Please sign in to comment.