mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-06 16:03:52 +00:00
style: cleanup empty fields
This commit is contained in:
@@ -19,16 +19,30 @@
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 0.9em;
|
||||
color: #aaa;
|
||||
color: #ccc;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.label {
|
||||
.label,
|
||||
.emptyLabel {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 0.9em;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 0.9em;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.label::after {
|
||||
content: ': ';
|
||||
}
|
||||
|
||||
.emptyLabel {
|
||||
font-size: 0.8em;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.notes {
|
||||
|
||||
@@ -7,6 +7,12 @@ export default function InfoTitle(props) {
|
||||
const [collapsed, setCollapsed] = useState(false);
|
||||
|
||||
const { title, data } = props;
|
||||
|
||||
const noTitl = data.title == null || data.title === '';
|
||||
const noPres = data.presenter == null || data.presenter === '';
|
||||
const noSubt = data.subtitle == null || data.subtitle === '';
|
||||
const noNote = data.note == null || data.note === '';
|
||||
|
||||
return (
|
||||
<div className={style.container}>
|
||||
<div className={style.header}>
|
||||
@@ -21,19 +27,27 @@ export default function InfoTitle(props) {
|
||||
{!collapsed && (
|
||||
<>
|
||||
<div>
|
||||
<span className={style.label}>Title: </span>
|
||||
<span className={noTitl ? style.emptyLabel : style.label}>
|
||||
Title
|
||||
</span>
|
||||
{data.title}
|
||||
</div>
|
||||
<div>
|
||||
<span className={style.label}>Presenter: </span>
|
||||
<span className={noPres ? style.emptyLabel : style.label}>
|
||||
Presenter
|
||||
</span>
|
||||
{data.presenter}
|
||||
</div>
|
||||
<div>
|
||||
<span className={style.label}>Subtitle: </span>
|
||||
<span className={noSubt ? style.emptyLabel : style.label}>
|
||||
Subtitle
|
||||
</span>
|
||||
{data.subtitle}
|
||||
</div>
|
||||
<div className={style.notes}>
|
||||
<span className={style.label}>Note: </span>
|
||||
<span className={noNote ? style.emptyLabel : style.label}>
|
||||
Note
|
||||
</span>
|
||||
{data.note}
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user