Skip to content

Commit f7511e4

Browse files
chore(table-of-contents): remove className props
1 parent 2a5aa7c commit f7511e4

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

src/components/TableOfContents/TableOfContentsMobile.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,9 @@ import { Item, outerListProps } from "./utils"
1616
export interface IPropsTableOfContentsMobile {
1717
items?: Array<Item>
1818
maxDepth?: number
19-
className?: string
2019
}
2120

22-
const Mobile: React.FC<IPropsTableOfContentsMobile> = ({
23-
items,
24-
maxDepth,
25-
className,
26-
}) => {
21+
const Mobile: React.FC<IPropsTableOfContentsMobile> = ({ items, maxDepth }) => {
2722
const { getButtonProps, getDisclosureProps, isOpen } = useDisclosure({
2823
defaultIsOpen: false,
2924
})
@@ -40,7 +35,6 @@ const Mobile: React.FC<IPropsTableOfContentsMobile> = ({
4035
borderRadius="4px"
4136
py={2}
4237
px={4}
43-
className={className}
4438
>
4539
<Flex
4640
color="text200"

src/components/TableOfContents/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export { Item }
2929
export interface IProps extends BoxProps {
3030
items: Array<Item>
3131
maxDepth?: number
32-
className?: string
3332
slug?: string
3433
editPath?: string
3534
hideEditButton?: boolean
@@ -39,7 +38,6 @@ export interface IProps extends BoxProps {
3938
const TableOfContents: React.FC<IProps> = ({
4039
items,
4140
maxDepth = 1,
42-
className,
4341
slug,
4442
editPath,
4543
hideEditButton = false,
@@ -77,7 +75,7 @@ const TableOfContents: React.FC<IProps> = ({
7775
return null
7876
}
7977
if (isMobile) {
80-
return <Mobile items={items} maxDepth={maxDepth} className={className} />
78+
return <Mobile items={items} maxDepth={maxDepth} />
8179
}
8280

8381
const shouldShowZenModeToggle = slug?.includes("/docs/")

0 commit comments

Comments
 (0)