Skip to content

Commit

Permalink
feat(List): use Grip icon from @gravity-ui/icons (#1164)
Browse files Browse the repository at this point in the history
  • Loading branch information
ogonkov authored Nov 27, 2023
1 parent 9992770 commit 625679a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 24 deletions.
7 changes: 5 additions & 2 deletions src/components/List/List.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,13 @@ $block: '.#{variables.$ns}list';
}

&__item-sort-icon {
$icon-width: 12px;
$space-from-edge: 16px;

display: flex;
align-items: center;
width: 6px;
margin-right: 10px;
width: $icon-width;
margin-right: $space-from-edge - $icon-width;
flex: 0 0 auto;
color: var(--g-color-text-hint);
}
Expand Down
19 changes: 0 additions & 19 deletions src/components/List/components/DragHandleIcon.tsx

This file was deleted.

6 changes: 3 additions & 3 deletions src/components/List/components/ListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react';

import {Grip} from '@gravity-ui/icons';
import type {DraggableProvided} from 'react-beautiful-dnd';

import {Icon} from '../../Icon';
import {block} from '../../utils/cn';
import {eventBroker} from '../../utils/event-broker';
import {ListQa} from '../constants';
import type {ListItemProps} from '../types';

import {DragHandleIcon} from './DragHandleIcon';

const b = block('list');

export const defaultRenderItem = <T extends unknown>(item: T) => String(item);
Expand Down Expand Up @@ -87,7 +87,7 @@ export class ListItem<T = unknown> extends React.Component<ListItemProps<T>> {
const {sortable} = this.props;
return sortable ? (
<div className={b('item-sort-icon')}>
<DragHandleIcon />
<Icon data={Grip} size={12} />
</div>
) : null;
}
Expand Down

0 comments on commit 625679a

Please sign in to comment.