ObjectTree: add padding
This commit is contained in:
@ -84,7 +84,7 @@ const TypeTree = ({
|
|||||||
}: TypeTreeProps) => {
|
}: TypeTreeProps) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NavLink p={0} label={`${label} ${count ? `(${count})` : ''}`}>
|
<NavLink px='xs' py={0} label={`${label} ${count ? `(${count})` : ''}`}>
|
||||||
{Array.isArray(objectList) && objectList.map(list => (
|
{Array.isArray(objectList) && objectList.map(list => (
|
||||||
<ObjectList map_id={map_id} key={list.id} label={list.name} id={list.id} planning={planning} count={list.count} />
|
<ObjectList map_id={map_id} key={list.id} label={list.name} id={list.id} planning={planning} count={list.count} />
|
||||||
))}
|
))}
|
||||||
@ -120,12 +120,12 @@ const ObjectList = ({
|
|||||||
|
|
||||||
const navLinks = useMemo(() => (
|
const navLinks = useMemo(() => (
|
||||||
Array.isArray(data) ? data.map((type) => (
|
Array.isArray(data) ? data.map((type) => (
|
||||||
<NavLink key={type.object_id} label={type.caption ? type.caption : 'Без названия'} p={0} onClick={() => setCurrentObjectId(map_id, type.object_id)} />
|
<NavLink key={type.object_id} label={type.caption ? type.caption : 'Без названия'} px='xs' py={0} onClick={() => setCurrentObjectId(map_id, type.object_id)} />
|
||||||
)) : null
|
)) : null
|
||||||
), [data, map_id]);
|
), [data, map_id]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NavLink onClick={() => setSelectedObjectType(map_id, id)} rightSection={<IconChevronDown size={14} />} p={0} label={`${label} ${count ? `(${count})` : ''}`}>
|
<NavLink onClick={() => setSelectedObjectType(map_id, id)} rightSection={<IconChevronDown size={14} />} px='xs' py={0} label={`${label} ${count ? `(${count})` : ''}`}>
|
||||||
{navLinks}
|
{navLinks}
|
||||||
</NavLink>
|
</NavLink>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user