diff --git a/packages/react-table/src/components/Table/SortColumn.tsx b/packages/react-table/src/components/Table/SortColumn.tsx index 9e5945195ca..5dd45a1b3b8 100644 --- a/packages/react-table/src/components/Table/SortColumn.tsx +++ b/packages/react-table/src/components/Table/SortColumn.tsx @@ -2,10 +2,13 @@ import * as React from 'react'; import LongArrowAltUpIcon from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-up-icon'; import LongArrowAltDownIcon from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-down-icon'; import ArrowsAltVIcon from '@patternfly/react-icons/dist/esm/icons/arrows-alt-v-icon'; +import StarIcon from '@patternfly/react-icons/dist/esm/icons/star-icon'; import { css } from '@patternfly/react-styles'; import styles from '@patternfly/react-styles/css/components/Table/table'; import { TableText } from './TableText'; import { TooltipProps } from '@patternfly/react-core/dist/esm/components/Tooltip'; +import { ActionList, ActionListItem, Button } from '@patternfly/react-core'; +import { FavoriteButtonProps } from './base/types'; export enum SortByDirection { asc = 'asc', @@ -21,6 +24,7 @@ export interface SortColumnProps extends React.ButtonHTMLAttributes; tooltipHasDefaultBehavior?: boolean; + favoriteButtonProps?: FavoriteButtonProps; } export const SortColumn: React.FunctionComponent = ({ @@ -33,6 +37,7 @@ export const SortColumn: React.FunctionComponent = ({ tooltip, tooltipProps, tooltipHasDefaultBehavior, + favoriteButtonProps, ...props }: SortColumnProps) => { let SortedByIcon; @@ -42,6 +47,29 @@ export const SortColumn: React.FunctionComponent = ({ } else { SortedByIcon = ArrowsAltVIcon; } + + if (favoriteButtonProps) { + return ( + + +