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;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,13 +11,15 @@ type Props = {
|
|||
};
|
||||
|
||||
const Divider = ({ className, label }: Props) => {
|
||||
const lineStyle = classNames(styles.line, label && styles.withLabel);
|
||||
|
||||
return (
|
||||
<div className={classNames(styles.divider, className)}>
|
||||
<i className={styles.line} />
|
||||
<i className={lineStyle} />
|
||||
{label && (
|
||||
<>
|
||||
<DynamicT forKey={label} />
|
||||
<i className={styles.line} />
|
||||
<i className={lineStyle} />
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue