mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
style(experience): remove the margin of dividers without a label (#4747)
This commit is contained in:
parent
fdba3ae742
commit
dce2fd876d
2 changed files with 11 additions and 7 deletions
|
@ -11,12 +11,14 @@
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background: var(--color-line-divider);
|
background: var(--color-line-divider);
|
||||||
|
|
||||||
&:first-child {
|
&.withLabel {
|
||||||
margin-right: _.unit(4);
|
&:first-child {
|
||||||
}
|
margin-right: _.unit(4);
|
||||||
|
}
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
margin-left: _.unit(4);
|
margin-left: _.unit(4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,13 +11,15 @@ type Props = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const Divider = ({ className, label }: Props) => {
|
const Divider = ({ className, label }: Props) => {
|
||||||
|
const lineStyle = classNames(styles.line, label && styles.withLabel);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classNames(styles.divider, className)}>
|
<div className={classNames(styles.divider, className)}>
|
||||||
<i className={styles.line} />
|
<i className={lineStyle} />
|
||||||
{label && (
|
{label && (
|
||||||
<>
|
<>
|
||||||
<DynamicT forKey={label} />
|
<DynamicT forKey={label} />
|
||||||
<i className={styles.line} />
|
<i className={lineStyle} />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue