Debian Codegraph @

node/@patternfly/react-table/src/components/Table/DraggableCell.tsx

raw
1 import RhUiGripVerticalFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-grip-vertical-fill-icon';
2 import { Button } from '@patternfly/react-core/dist/esm/components/Button';
3
4 export interface DraggableCellProps {
5 id: string;
6 className?: string;
7 onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
8 'aria-label'?: string;
9 }
10
11 export const DraggableCell: React.FunctionComponent<DraggableCellProps> = ({
12 className,
13 onClick,
14 'aria-label': ariaLabel,
15 id,
16 ...props
17 }: DraggableCellProps) => (
18 <Button
19 id={id}
20 variant="plain"
21 className={className}
22 type="button"
23 aria-label={ariaLabel || `Draggable row draggable button`}
24 onClick={onClick}
25 {...props}
26 icon={<RhUiGripVerticalFillIcon />}
27 />
28 );
29
30 DraggableCell.displayName = 'DraggableCell';