import { type FC, type PropsWithChildren, type ReactElement, type ReactNode, } from 'react'; import cn from 'classnames'; import '../styles/components/decorated-list-item.scss'; type Props = { /** * Title */ title?: ReactNode; /** * Make this item visually stand-out */ highlight?: boolean; /** * Target/link of the list item when clicking on it */ link?: ReactElement<{ [key: string]: unknown }>; /** * Compact style */ compact?: boolean; /** * Hide the title */ hideTitle?: boolean; /** * Attempts to keep the element horizontally aligned with its siblings */ inline?: boolean; /** * Optional CSS classnames to be passed down from the parent component */ className?: string; /** * Switches to an alternative style for the decorative line */ altStyle?: boolean; }; const DecoratedListItem: FC> = ({ title, children, link, highlight, compact, hideTitle, inline, className, altStyle, ...props }) => (
{link &&
); export default DecoratedListItem;