import { ReactElement, ReactNode } from 'react'; import classnames from 'classnames'; import { TOKEN_FONT_SIZE_100, TOKEN_FONT_SIZE_200, TOKEN_FONT_SIZE_300, TOKEN_FONT_SIZE_400, TOKEN_FONT_SIZE_500, TOKEN_FONT_SIZE_600, } from '@swipebox/morphe-design-tokens'; import { useList } from './contexts/ListProvider'; import styles from './List.css'; import getChildrenToArray from './List/getChildrenToArray'; import List from './List/InternalList'; // eslint-disable import/no-cycle import ListText from './List/Message'; type Props = { /** * Use List.Item to build nested lists. Use List to combine different types nested lists. See [subcomponents](https://gestalt.pinterest.systems/web/list#Subcomponents). */ children?: ReactNode; /** * The content of the list item. See the [text variant](https://gestalt.pinterest.systems/web/list#Text-and-label) for guidance. */ text: string | ReactElement; }; /** * [List.Item](https://gestalt.pinterest.systems/web/list#List.Item) is a subcomponent of [List](https://gestalt.pinterest.systems/web/list). List.Item represents the `
  • ` tag nested within a `