Skip to content

Commit

Permalink
chore(Card): removed isHoverable prop
Browse files Browse the repository at this point in the history
  • Loading branch information
jenny-s51 committed Oct 10, 2022
1 parent 803b42c commit c8ac857
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
5 changes: 1 addition & 4 deletions packages/react-core/src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ export interface CardProps extends React.HTMLProps<HTMLElement>, OUIAProps {
className?: string;
/** Sets the base component to render. defaults to article */
component?: keyof JSX.IntrinsicElements;
/** @deprecated to make a card hoverable, use isSelectable or isSelectableRaised. */
isHoverable?: boolean;
/** Modifies the card to include compact styling. Should not be used with isLarge. */
isCompact?: boolean;
/** Modifies the card to include selectable styling */
Expand Down Expand Up @@ -70,7 +68,6 @@ export const Card: React.FunctionComponent<CardProps> = ({
id = '',
className = '',
component = 'article',
isHoverable = false,
isCompact = false,
isSelectable = false,
isSelectableRaised = false,
Expand Down Expand Up @@ -107,7 +104,7 @@ export const Card: React.FunctionComponent<CardProps> = ({
if (isSelectableRaised) {
return css(styles.modifiers.selectableRaised, isSelected && styles.modifiers.selectedRaised);
}
if (isSelectable || isHoverable) {
if (isSelectable) {
return css(styles.modifiers.selectable, isSelected && styles.modifiers.selected);
}
return '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ describe('Card', () => {
expect(screen.getByText('im a div')).toBeInTheDocument();
});

test('card with isHoverable applied ', () => {
const { asFragment } = render(<Card isHoverable />);
expect(asFragment()).toMatchSnapshot();
});

test('card with isCompact applied ', () => {
const { asFragment } = render(<Card isCompact />);
expect(asFragment()).toMatchSnapshot();
Expand Down

0 comments on commit c8ac857

Please sign in to comment.