File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/react-table/src/components/Table Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1- import StarIcon from '@patternfly/react-icons/dist/esm/icons/star-icon' ;
21import { Button } from '@patternfly/react-core/dist/esm/components/Button' ;
32
43export interface FavoritesCellProps {
@@ -30,9 +29,10 @@ export const FavoritesCell: React.FunctionComponent<FavoritesCellProps> = ({
3029 type = "button"
3130 aria-label = { isFavorited ? 'Starred' : 'Not starred' }
3231 onClick = { onFavorite }
32+ isFavorite
33+ isFavorited = { isFavorited }
3334 { ...ariaProps }
3435 { ...props }
35- icon = { < StarIcon /> }
3636 />
3737 ) ;
3838} ;
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import { useState } from 'react';
22import LongArrowAltUpIcon from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-up-icon' ;
33import LongArrowAltDownIcon from '@patternfly/react-icons/dist/esm/icons/long-arrow-alt-down-icon' ;
44import ArrowsAltVIcon from '@patternfly/react-icons/dist/esm/icons/arrows-alt-v-icon' ;
5- import StarIcon from '@patternfly/react-icons/dist/esm/icons/star-icon' ;
65import { css } from '@patternfly/react-styles' ;
76import styles from '@patternfly/react-styles/css/components/Table/table' ;
87import { TableText } from './TableText' ;
@@ -50,10 +49,11 @@ export const SortColumn: React.FunctionComponent<SortColumnProps> = ({
5049 }
5150
5251 if ( favoriteButtonProps ) {
52+ const { favorited, ...rest } = favoriteButtonProps ;
5353 return (
5454 < ActionList isIconList >
5555 < ActionListItem >
56- < Button variant = "plain" icon = { < StarIcon /> } { ...favoriteButtonProps } />
56+ < Button variant = "plain" isFavorite isFavorited = { favorited } { ...rest } />
5757 </ ActionListItem >
5858 < ActionListItem >
5959 < Button
You can’t perform that action at this time.
0 commit comments