import { type ReactElement } from "react"; import { ListItemAddon } from "./ListItemAddon.js"; import { ListItemText } from "./ListItemText.js"; import { type ListItemChildrenProps } from "./types.js"; /** * The `ListItemChildren` component is used to create a styled list item that * can have optional addons to the left or right of the children in the form of * icons, avatars, or media. The `children` can be replaced by the `primaryText` * and `secondaryText` props to create stacked text spanning two or more lines * with the default behavior of using `line-clamp` at three lines. * * Note: This will return a `React.Fragment` of the children and does not wrap * in a DOM node for styling. The parent component should normally have * `display: flex` for the styling to work. * * @example Custom Component Usage * ```tsx * import { ListItemChildren } from "@react-md/core/list/ListItemChildren"; * import FavoriteIcon from "@react-md/material-icons/FavoriteIcon"; * import type { ReactElement } from "react"; * * function Example(): ReactElement { * return ( *
}
* rightAddonType="media"
* secondaryText={Some additional content.}
* >
* Content
*
*