File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
packages/react-core/src/components/Card Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -4,19 +4,16 @@ import styles from '@patternfly/react-styles/css/components/Card/card';
44export interface CardSubtitleProps {
55 /** Content rendered inside the description. */
66 children ?: React . ReactNode ;
7- /** Additional classes added to the description. */
8- className ?: string ;
97 /** Id of the description. */
108 id ?: string ;
119}
1210
1311export const CardSubtitle : React . FunctionComponent < CardSubtitleProps > = ( {
1412 children = null ,
15- className = '' ,
1613 id = '' ,
1714 ...props
1815} : CardSubtitleProps ) => (
19- < div { ...props } id = { id } className = { css ( styles . cardSubtitle , className ) } >
16+ < div { ...props } id = { id } className = { css ( styles . cardSubtitle ) } >
2017 { children }
2118 </ div >
2219) ;
Original file line number Diff line number Diff line change @@ -25,13 +25,14 @@ export const CardTitle: React.FunctionComponent<CardTitleProps> = ({
2525 const { cardId } = useContext ( CardContext ) ;
2626 const Component = component as any ;
2727 const titleId = cardId ? `${ cardId } -title` : '' ;
28+ const subtitleId = cardId ? `${ cardId } -subtitle` : '' ;
2829
2930 return (
3031 < div className = { css ( styles . cardTitle ) } >
3132 < Component className = { css ( styles . cardTitleText , className ) } id = { titleId || undefined } { ...props } >
3233 { children }
3334 </ Component >
34- { subtitle && < CardSubtitle > { subtitle } </ CardSubtitle > }
35+ { subtitle && < CardSubtitle id = { subtitleId } > { subtitle } </ CardSubtitle > }
3536 </ div >
3637 ) ;
3738} ;
You can’t perform that action at this time.
0 commit comments