package.src.components.Tile.Tile.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/Tile/tile';
import { css } from '@patternfly/react-styles';
export interface TileProps extends React.HTMLProps {
/** Content rendered inside the banner */
children?: React.ReactNode;
/** Additional classes added to the banner */
className?: string;
/** Title of the tile */
title: string;
/** Icon in the tile title */
icon?: React.ReactNode;
/** Flag indicating if the tile is selected */
isSelected?: boolean;
/** Flag indicating if the tile is disabled */
isDisabled?: boolean;
/** Flag indicating if the tile header is stacked */
isStacked?: boolean;
/** Flag indicating if the stacked tile icon is large */
isDisplayLarge?: boolean;
}
export const Tile: React.FunctionComponent = ({
children,
title,
icon,
isStacked,
isSelected,
isDisabled,
isDisplayLarge,
className,
...props
}: TileProps) => (
{icon && {icon}}
{title}
{children && {children}}
);
Tile.displayName = 'Tile';