Skip to content

Commit

Permalink
Merge branch 'main' into fix-list-item-identation
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaevAlexandr authored Apr 17, 2024
2 parents 5e9f370 + b274498 commit 1c6b29d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ $block: '.#{variables.$ns}list-item-view';
flex-shrink: 0;

&__main-content {
width: 100%;
display: grid;
gap: var(--g-spacing-half, 2px);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';

import {Check, ChevronDown, ChevronUp} from '@gravity-ui/icons';

import {QA_DATA_ATTR} from '../../../../constants';
import {Icon} from '../../../Icon';
import {Text, colorText} from '../../../Text';
import {Flex, spacing} from '../../../layout';
Expand Down Expand Up @@ -89,7 +88,6 @@ const renderSafeIndentation = (indentation?: number) => {
export const ListItemView = React.forwardRef(
(
{
qa,
id,
as = 'div',
size = 'm',
Expand Down Expand Up @@ -121,7 +119,7 @@ export const ListItemView = React.forwardRef(

return (
<Flex
{...{[LIST_ITEM_DATA_ATR]: id, [QA_DATA_ATTR]: qa}}
{...{[LIST_ITEM_DATA_ATR]: id}}
role={role}
aria-selected={selected}
onClick={onClick}
Expand All @@ -147,7 +145,7 @@ export const ListItemView = React.forwardRef(
justifyContent="space-between"
{...rest}
>
<Flex gap="2" alignItems="center">
<Flex gap="2" alignItems="center" grow>
{hasSelectionIcon && (
<ListItemViewSlot // reserve space
>
Expand Down
2 changes: 0 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@ export const KeyCode = {
ARROW_UP: 'ArrowUp',
ARROW_DOWN: 'ArrowDown',
};

export const QA_DATA_ATTR = 'data-qa';

0 comments on commit 1c6b29d

Please sign in to comment.