import type { ElementType, ReactElement } from 'react' import React, { forwardRef } from 'react' import type { PolymorphicComponentPropsWithRef, PolymorphicRef, } from '../../typings' interface BaseProps { /** * ID to find this component in testing tools (e.g.: cypress, testing library, and jest). */ testId?: string /** * Specify whether or not this component should display the list's markers (bullets or numbers). */ marker?: boolean } export type ListProps = PolymorphicComponentPropsWithRef type ListComponent = ( props: ListProps ) => ReactElement | null const List = forwardRef, 'ref'>>( function List( { as, marker, testId = 'fs-list', ...otherProps }: ListProps, ref: PolymorphicRef ) { const Component = as ?? 'ul' return ( ) } ) as ListComponent export default List