feature: conditional class & font-size changes

This commit is contained in:
kKaskak 2023-12-25 17:13:53 +02:00
parent a2c10e5d14
commit 66464c22eb
2 changed files with 10 additions and 3 deletions

View file

@ -84,7 +84,7 @@ const ModalDialog = ({ className, title, buttons, children, dataset, onCloseRequ
}
{
typeof label === 'string' && label.length > 0 ?
<div className={styles['label']}>{label}</div>
<div className={classnames(buttons.length > 2 ? styles['small-label'] : styles['label'])}>{label}</div>
:
null
}

View file

@ -84,6 +84,7 @@
}
}
}
.action-button {
flex: 1;
display: flex;
@ -116,7 +117,7 @@
color: var(--primary-foreground-color);
}
.label {
.label, .small-label {
flex-grow: 0;
flex-shrink: 1;
flex-basis: auto;
@ -126,7 +127,6 @@
text-align: center;
color: var(--primary-foreground-color);
}
}
@media only screen and (max-width: @minimum) {
@ -139,4 +139,11 @@
padding: 0 1.5rem;
}
}
.action-button {
.small-label {
font-size: 0.688rem;
font-weight: 600;
}
}
}