diff --git a/packages/experience/src/components/Divider/index.module.scss b/packages/experience/src/components/Divider/index.module.scss index 3a31bc8d2..964739418 100644 --- a/packages/experience/src/components/Divider/index.module.scss +++ b/packages/experience/src/components/Divider/index.module.scss @@ -11,12 +11,14 @@ height: 1px; background: var(--color-line-divider); - &:first-child { - margin-right: _.unit(4); - } + &.withLabel { + &:first-child { + margin-right: _.unit(4); + } - &:last-child { - margin-left: _.unit(4); + &:last-child { + margin-left: _.unit(4); + } } } } diff --git a/packages/experience/src/components/Divider/index.tsx b/packages/experience/src/components/Divider/index.tsx index 245afee97..e33c369c3 100644 --- a/packages/experience/src/components/Divider/index.tsx +++ b/packages/experience/src/components/Divider/index.tsx @@ -11,13 +11,15 @@ type Props = { }; const Divider = ({ className, label }: Props) => { + const lineStyle = classNames(styles.line, label && styles.withLabel); + return (