diff --git a/src/components/TocLable/TocLabel.scss b/src/components/TocLable/TocLabel.scss index 628ea162..be8fa84c 100644 --- a/src/components/TocLable/TocLabel.scss +++ b/src/components/TocLable/TocLabel.scss @@ -2,9 +2,11 @@ @import '../../styles/mixins'; .dc-toc-label { - margin-left: 10px; + &_offset { + margin-left: 10px; - [dir='rtl'] & { - margin-right: 10px; + [dir='rtl'] & { + margin-right: 10px; + } } } diff --git a/src/components/TocLable/TocLabel.tsx b/src/components/TocLable/TocLabel.tsx index ff66f5c4..d4e4b71a 100644 --- a/src/components/TocLable/TocLabel.tsx +++ b/src/components/TocLable/TocLabel.tsx @@ -18,15 +18,21 @@ const TocLabel: FC = ({label}) => { let labelElement = null; if (label?.title) { + const hasDescription = Boolean(label.description); labelElement = ( -