package.src.components.Card.CardExpandableContent.tsx Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of react-core Show documentation
Show all versions of react-core Show documentation
This library provides a set of common React components for use with the PatternFly reference implementation.
The newest version!
import * as React from 'react';
import styles from '@patternfly/react-styles/css/components/Card/card';
import { css } from '@patternfly/react-styles';
import { CardContext } from './Card';
export interface CardExpandableContentProps extends React.HTMLProps {
/** Content rendered inside the Card Body */
children?: React.ReactNode;
/** Additional classes added to the Card Body */
className?: string;
}
export const CardExpandableContent: React.FunctionComponent = ({
children,
className,
...props
}: CardExpandableContentProps) => (
{({ isExpanded }) =>
isExpanded ? (
{children}
) : null
}
);
CardExpandableContent.displayName = 'CardExpandableContent';