Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tm 1561 site attribute table site view admin provide consistent padding offset between header labels and their sorting icons #765

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/admin/components/ResourceTabs/PolygonReviewTab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import LinearProgressBarMonitored from "@/components/elements/ProgressBar/Linear
import Table from "@/components/elements/Table/Table";
import { VARIANT_TABLE_SITE_POLYGON_REVIEW } from "@/components/elements/Table/TableVariants";
import Text from "@/components/elements/Text/Text";
import ToolTip from "@/components/elements/Tooltip/Tooltip";
import Icon from "@/components/extensive/Icon/Icon";
import { IconNames } from "@/components/extensive/Icon/Icon";
import ModalAdd from "@/components/extensive/Modal/ModalAdd";
Expand Down Expand Up @@ -629,9 +628,6 @@ const PolygonReviewTab: FC<IProps> = props => {
<div className="w-40 lg:w-48">
<Text variant="text-14" className="flex items-center gap-1 text-darkCustom">
Site Status
<ToolTip title={""} content={"Site Status"} width="" trigger="click">
<Icon name={IconNames.IC_INFO} className="h-3.5 w-3.5 text-darkCustom" />
</ToolTip>
</Text>
<Text variant="text-14-bold" className="leading-[normal] text-black">
{record?.readable_status}
Expand All @@ -640,9 +636,6 @@ const PolygonReviewTab: FC<IProps> = props => {
<div className="w-full">
<Text variant="text-14" className="mb-2 flex items-center gap-1 text-darkCustom">
Polygon Overview
<ToolTip title={""} content={"Polygon Overview"} width="" trigger="click">
<Icon name={IconNames.IC_INFO} className="h-3.5 w-3.5 text-darkCustom" />
</ToolTip>
</Text>
<If condition={sitePolygonData.length < total}>
<Then>
Expand All @@ -660,9 +653,6 @@ const PolygonReviewTab: FC<IProps> = props => {
<div className="mb-2">
<Text variant="text-16-bold" className="mb-2 flex items-center gap-1 text-darkCustom">
Add or Edit Polygons
<ToolTip title={""} content={"Add or Edit Polygons"} width="" trigger="click">
<Icon name={IconNames.IC_INFO} className="h-3.5 w-3.5 text-darkCustom" />
</ToolTip>
</Text>
<Text variant="text-14-light" className="text-darkCustom">
Add, remove or edit polygons that are associated to a site. Polygons may be edited in the map
Expand Down
6 changes: 4 additions & 2 deletions src/components/elements/Table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ function Table<TData extends RowData>({
>
<span
className="font-inherit relative"
style={{ marginRight: `${iconRefs.current[header.index]?.offsetWidth}px` }}
style={{
marginRight: `${iconRefs.current[header.index]?.getBoundingClientRect().width}px`
}}
>
<span
className="font-inherit "
Expand All @@ -219,7 +221,7 @@ function Table<TData extends RowData>({
}
}}
className="absolute left-[calc(100%+10px)] top-1/2 z-auto -translate-y-1/2 transform"
style={{ left: `${spanRefs.current[header.index]?.offsetWidth}px` }}
style={{ left: `${spanRefs.current[header.index]?.getBoundingClientRect().width}px` }}
>
<Icon
name={
Expand Down
Loading