Output = (
value,
{ label = "Output", overline = false, bold = false, format = (d) => d } = {}
) =>
Object.assign(
html`<div style="
display: flex;
font: 13px/1.2 var(--sans-serif);
min-height: 25.5px;
align-items: center;
flex-wrap: nowrap;
width: calc(240px + 120px);
max-width: 100%;
padding-bottom: 1rem;
${bold ? "font-weight: bold;" : ""}
${overline ? "border-top: 1px solid rgb(118, 118, 118);" : ""}
">
<div style="
flex-shrink: 0;
align-self: start;
width: 120px;
margin-right: 6.5px;
padding: 5px 0 4px 0;
">
${label}
</div>
<div style="width: 100%;">
${format(value)}
</div>
</div>`,
{ value }
)