import { Card, CardActions, CardBody, CardFooter, CardHeader, CardTitle, Dropdown, Flex, FlexItem, KebabToggle, Label, } from "@patternfly/react-core"; import { ReactElement, useState } from "react"; import { Link, To } from "react-router-dom"; import "./keycloak-card.css"; export type KeycloakCardProps = { title: string; dropdownItems?: ReactElement[]; labelText?: string; labelColor?: any; footerText?: string; to: To; }; export const KeycloakCard = ({ title, dropdownItems, labelText, labelColor, footerText, to, }: KeycloakCardProps) => { const [isDropdownOpen, setIsDropdownOpen] = useState(false); const onDropdownToggle = () => { setIsDropdownOpen(!isDropdownOpen); }; return ( {dropdownItems && ( } isOpen={isDropdownOpen} dropdownItems={dropdownItems} /> )} {title} {footerText && footerText} {labelText && ( )} ); };