diff --git a/src/components/table-of-contents/TableOfContentsItems.js b/src/components/table-of-contents/TableOfContentsItems.js index 19c0c44d..001668d6 100644 --- a/src/components/table-of-contents/TableOfContentsItems.js +++ b/src/components/table-of-contents/TableOfContentsItems.js @@ -120,11 +120,11 @@ const List = styled.ul` `} `; -export function TableOfContentsItems({ currentPath, isTopLevel, items, ...rest }) { +export function TableOfContentsItems({ className, currentPath, isTopLevel, items, ...rest }) { const isOrderedList = items.every((item) => item.type === ITEM_TYPES.BULLET_LINK); return ( - + {items.map((item) => { const ItemComponent = getItemComponent(item.type); return ( @@ -142,6 +142,7 @@ export function TableOfContentsItems({ currentPath, isTopLevel, items, ...rest } } TableOfContentsItems.propTypes = { + className: PropTypes.string, currentPath: PropTypes.string.isRequired, isTopLevel: PropTypes.bool.isRequired, items: PropTypes.arrayOf( @@ -150,3 +151,7 @@ TableOfContentsItems.propTypes = { }).isRequired ).isRequired, }; + +TableOfContentsItems.defaultProps = { + className: '', +};