-
Notifications
You must be signed in to change notification settings - Fork 349
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Card) implement new selectable/clickable card design (#9092)
* feat(Card) implement new selectable/clickable card design * selectable and clickable changes * add selectableVariant, refactor markup * add clickable & selectable * Updated functionality * update examples, add functionality * Update selectableActions api * Added clickable and selectable example * Updated tests * Updated legacy verbiage and logic to render selectable cards * Added prop for link target * Updated example markup * Updated example order --------- Co-authored-by: Eric Olkowski <thatblindgeye@gmail.com>
- Loading branch information
1 parent
c3fe2fb
commit c3cf823
Showing
15 changed files
with
497 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/react-core/src/components/Card/CardSelectableActions.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import * as React from 'react'; | ||
import { css } from '@patternfly/react-styles'; | ||
import styles from '@patternfly/react-styles/css/components/Card/card'; | ||
|
||
export interface CardActionsProps extends React.HTMLProps<HTMLDivElement> { | ||
/** Content rendered inside the card action */ | ||
children?: React.ReactNode; | ||
/** Additional classes added to the action */ | ||
className?: string; | ||
} | ||
|
||
export const CardSelectableActions: React.FunctionComponent<CardActionsProps> = ({ | ||
children, | ||
className, | ||
...props | ||
}: CardActionsProps) => ( | ||
<div className={css(styles.cardSelectableActions, className)} {...props}> | ||
{children} | ||
</div> | ||
); | ||
CardSelectableActions.displayName = 'CardSelectableActions'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.